@@ -182,11 +182,6 @@ abstract contract ReceiptVault is
182182 (from, to, ids, amounts);
183183 }
184184
185- /// @inheritdoc IReceiptVaultV2
186- function receipt () public view virtual returns (IReceiptV2) {
187- return sReceipt;
188- }
189-
190185 /// The spec demands this function ignores per-user concerns. It seems to
191186 /// imply minting but doesn't provide a sibling conversion for burning.
192187 /// > The amount of shares that the Vault would exchange for the amount of
@@ -198,6 +193,26 @@ abstract contract ReceiptVault is
198193 return val;
199194 }
200195
196+ /// The spec demands that this function ignores per-user concerns. It seems
197+ /// to imply burning but doesn't provide a sibling conversion for minting.
198+ /// > The amount of assets that the Vault would exchange for the amount of
199+ /// > shares provided
200+ /// @inheritdoc IReceiptVaultV1
201+ function convertToAssets (uint256 shares , uint256 id ) external view virtual returns (uint256 ) {
202+ return _calculateRedeem (
203+ shares,
204+ // Not clear what a good ID for a hypothetical context free burn
205+ // should be. Next ID is technically nonsense but we don't have
206+ // any other ID to prefer either.
207+ _shareRatioUserAgnostic (id, ShareAction.Burn)
208+ );
209+ }
210+
211+ /// @inheritdoc IReceiptVaultV2
212+ function receipt () public view virtual returns (IReceiptV2) {
213+ return sReceipt;
214+ }
215+
201216 /// @inheritdoc IReceiptVaultV1
202217 function previewDeposit (uint256 assets , uint256 minShareRatio ) external payable virtual returns (uint256 ) {
203218 uint256 val = _calculateDeposit (
@@ -443,21 +458,6 @@ abstract contract ReceiptVault is
443458 return 1 ;
444459 }
445460
446- /// The spec demands that this function ignores per-user concerns. It seems
447- /// to imply burning but doesn't provide a sibling conversion for minting.
448- /// > The amount of assets that the Vault would exchange for the amount of
449- /// > shares provided
450- /// @inheritdoc IReceiptVaultV1
451- function convertToAssets (uint256 shares , uint256 id ) external view virtual returns (uint256 ) {
452- return _calculateRedeem (
453- shares,
454- // Not clear what a good ID for a hypothetical context free burn
455- // should be. Next ID is technically nonsense but we don't have
456- // any other ID to prefer either.
457- _shareRatioUserAgnostic (id, ShareAction.Burn)
458- );
459- }
460-
461461 /// @inheritdoc IReceiptVaultV1
462462 function maxDeposit (address ) external pure virtual returns (uint256 ) {
463463 // The spec states to return this if there is no deposit limit.
0 commit comments