@lagoon-protocol/v0-core 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/index.cjs +668 -0
  2. package/dist/esm/index.js +636 -0
  3. package/dist/tsconfig.tsbuildinfo +1 -0
  4. package/dist/types/addresses.d.ts.map +1 -0
  5. package/dist/types/chain.d.ts.map +1 -0
  6. package/dist/types/constants/abis.d.ts +9366 -0
  7. package/dist/types/constants/abis.d.ts.map +1 -0
  8. package/dist/types/constants/index.d.ts +2 -0
  9. package/dist/types/constants/index.d.ts.map +1 -0
  10. package/dist/{index.d.ts → types/index.d.ts} +2 -0
  11. package/dist/types/index.d.ts.map +1 -0
  12. package/dist/types/math/MathLib.d.ts.map +1 -0
  13. package/dist/types/math/index.d.ts.map +1 -0
  14. package/dist/{token → types/token}/Token.d.ts +0 -2
  15. package/dist/types/token/Token.d.ts.map +1 -0
  16. package/dist/types/token/index.d.ts.map +1 -0
  17. package/dist/types/types.d.ts.map +1 -0
  18. package/dist/types/utils.d.ts +12 -0
  19. package/dist/types/utils.d.ts.map +1 -0
  20. package/dist/types/vault/SettleData.d.ts +27 -0
  21. package/dist/types/vault/SettleData.d.ts.map +1 -0
  22. package/dist/types/vault/Vault.d.ts +7655 -0
  23. package/dist/types/vault/Vault.d.ts.map +1 -0
  24. package/dist/{vault → types/vault}/VaultUtils.d.ts +9 -0
  25. package/dist/types/vault/VaultUtils.d.ts.map +1 -0
  26. package/dist/types/vault/index.d.ts +4 -0
  27. package/dist/types/vault/index.d.ts.map +1 -0
  28. package/package.json +13 -7
  29. package/dist/addresses.d.ts.map +0 -1
  30. package/dist/chain.d.ts.map +0 -1
  31. package/dist/index.d.ts.map +0 -1
  32. package/dist/index.js +0 -533
  33. package/dist/math/MathLib.d.ts.map +0 -1
  34. package/dist/math/index.d.ts.map +0 -1
  35. package/dist/token/Token.d.ts.map +0 -1
  36. package/dist/token/index.d.ts.map +0 -1
  37. package/dist/types.d.ts.map +0 -1
  38. package/dist/vault/Vault.d.ts +0 -91
  39. package/dist/vault/Vault.d.ts.map +0 -1
  40. package/dist/vault/VaultUtils.d.ts.map +0 -1
  41. package/dist/vault/index.d.ts +0 -3
  42. package/dist/vault/index.d.ts.map +0 -1
  43. /package/dist/{addresses.d.ts → types/addresses.d.ts} +0 -0
  44. /package/dist/{chain.d.ts → types/chain.d.ts} +0 -0
  45. /package/dist/{math → types/math}/MathLib.d.ts +0 -0
  46. /package/dist/{math → types/math}/index.d.ts +0 -0
  47. /package/dist/{token → types/token}/index.d.ts +0 -0
  48. /package/dist/{types.d.ts → types/types.d.ts} +0 -0
@@ -0,0 +1,636 @@
1
+ // src/constants/abis.ts
2
+ var vaultAbi_v0_5_0 = [{ type: "constructor", inputs: [{ name: "disable", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "MAX_MANAGEMENT_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PERFORMANCE_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PROTOCOL_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "acceptOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "addToWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "allowance", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "asset", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "cancelRequestDeposit", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesAndRequestRedeem", inputs: [{ name: "sharesToRedeem", type: "uint256", internalType: "uint256" }], outputs: [{ name: "requestId", type: "uint40", internalType: "uint40" }], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesOnBehalf", inputs: [{ name: "controllers", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimableDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "claimableRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "close", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "disableWhitelist", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "expireTotalAssets", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "feeRates", inputs: [], outputs: [{ name: "", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], stateMutability: "view" }, { type: "function", name: "getRolesStorage", inputs: [], outputs: [{ name: "_rolesStorage", type: "tuple", internalType: "struct Roles.RolesStorage", components: [{ name: "whitelistManager", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "safe", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "contract FeeRegistry" }, { name: "valuationManager", type: "address", internalType: "address" }] }], stateMutability: "pure" }, { type: "function", name: "initialize", inputs: [{ name: "data", type: "bytes", internalType: "bytes" }, { name: "feeRegistry", type: "address", internalType: "address" }, { name: "wrappedNativeToken", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "initiateClosing", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isOperator", inputs: [{ name: "controller", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isTotalAssetsValid", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelisted", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "maxDeposit", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxMint", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxRedeem", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxWithdraw", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "paused", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "pendingDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingOwner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pendingRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "previewDeposit", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewMint", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewRedeem", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewWithdraw", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "redeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }, { name: "referral", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestRedeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "revokeFromWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "safe", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "setOperator", inputs: [{ name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" }], outputs: [{ name: "success", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "settleDeposit", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "settleRedeem", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "share", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "syncDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "referral", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "totalAssets", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [{ name: "newOwner", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "unpause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateFeeReceiver", inputs: [{ name: "_feeReceiver", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateNewTotalAssets", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateRates", inputs: [{ name: "newRates", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateTotalAssetsLifespan", inputs: [{ name: "lifespan", type: "uint128", internalType: "uint128" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateValuationManager", inputs: [{ name: "_valuationManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateWhitelistManager", inputs: [{ name: "_whitelistManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "version", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "pure" }, { type: "function", name: "withdraw", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Deposit", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequestCanceled", inputs: [{ name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "controller", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "DepositSync", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "FeeReceiverUpdated", inputs: [{ name: "oldReceiver", type: "address", indexed: false, internalType: "address" }, { name: "newReceiver", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "HighWaterMarkUpdated", inputs: [{ name: "oldHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }, { name: "newHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Initialized", inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], anonymous: false }, { type: "event", name: "NewTotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "OperatorSet", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "OwnershipTransferStarted", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "Paused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "RatesUpdated", inputs: [{ name: "oldRates", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "newRate", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "timestamp", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "RedeemRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Referral", inputs: [{ name: "referral", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleDeposit", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsDeposited", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesMinted", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleRedeem", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsWithdrawed", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesBurned", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "StateUpdated", inputs: [{ name: "state", type: "uint8", indexed: false, internalType: "enum State" }], anonymous: false }, { type: "event", name: "TotalAssetsLifespanUpdated", inputs: [{ name: "oldLifespan", type: "uint128", indexed: false, internalType: "uint128" }, { name: "newLifespan", type: "uint128", indexed: false, internalType: "uint128" }], anonymous: false }, { type: "event", name: "TotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Unpaused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "ValuationManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistDisabled", inputs: [], anonymous: false }, { type: "event", name: "WhitelistManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistUpdated", inputs: [{ name: "account", type: "address", indexed: true, internalType: "address" }, { name: "authorized", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "Withdraw", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "receiver", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "error", name: "AboveMaxRate", inputs: [{ name: "maxRate", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "AddressEmptyCode", inputs: [{ name: "target", type: "address", internalType: "address" }] }, { type: "error", name: "AddressInsufficientBalance", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "CantDepositNativeToken", inputs: [] }, { type: "error", name: "Closed", inputs: [] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC4626ExceededMaxDeposit", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxMint", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxRedeem", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxWithdraw", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC7540InvalidOperator", inputs: [] }, { type: "error", name: "ERC7540PreviewDepositDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewMintDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewRedeemDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewWithdrawDisabled", inputs: [] }, { type: "error", name: "EnforcedPause", inputs: [] }, { type: "error", name: "ExpectedPause", inputs: [] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "MathOverflowedMulDiv", inputs: [] }, { type: "error", name: "NewTotalAssetsMissing", inputs: [] }, { type: "error", name: "NotClosing", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "NotOpen", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotWhitelisted", inputs: [] }, { type: "error", name: "OnlyAsyncDepositAllowed", inputs: [] }, { type: "error", name: "OnlyOneRequestAllowed", inputs: [] }, { type: "error", name: "OnlySafe", inputs: [{ name: "safe", type: "address", internalType: "address" }] }, { type: "error", name: "OnlySyncDepositAllowed", inputs: [] }, { type: "error", name: "OnlyValuationManager", inputs: [{ name: "valuationManager", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyWhitelistManager", inputs: [{ name: "whitelistManager", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableInvalidOwner", inputs: [{ name: "owner", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "RequestIdNotClaimable", inputs: [] }, { type: "error", name: "RequestNotCancelable", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address", internalType: "address" }] }, { type: "error", name: "ValuationUpdateNotAllowed", inputs: [] }, { type: "error", name: "WrongNewTotalAssets", inputs: [] }];
3
+ var vaultAbi_v0_4_0 = [{ type: "constructor", inputs: [{ name: "disable", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "MAX_MANAGEMENT_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PERFORMANCE_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PROTOCOL_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "acceptOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "addToWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "allowance", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "asset", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "cancelRequestDeposit", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesAndRequestRedeem", inputs: [{ name: "sharesToRedeem", type: "uint256", internalType: "uint256" }], outputs: [{ name: "requestId", type: "uint40", internalType: "uint40" }], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesOnBehalf", inputs: [{ name: "controllers", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimableDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "claimableRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "close", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "disableWhitelist", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "feeRates", inputs: [], outputs: [{ name: "", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], stateMutability: "view" }, { type: "function", name: "getRolesStorage", inputs: [], outputs: [{ name: "_rolesStorage", type: "tuple", internalType: "struct Roles.RolesStorage", components: [{ name: "whitelistManager", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "safe", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "contract FeeRegistry" }, { name: "valuationManager", type: "address", internalType: "address" }] }], stateMutability: "pure" }, { type: "function", name: "highWaterMark", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [{ name: "data", type: "bytes", internalType: "bytes" }, { name: "feeRegistry", type: "address", internalType: "address" }, { name: "wrappedNativeToken", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "initiateClosing", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isOperator", inputs: [{ name: "controller", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelistActivated", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelisted", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lastDepositRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "lastFeeTime", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "lastRedeemRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "maxDeposit", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxMint", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxRedeem", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxWithdraw", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "paused", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "pendingDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingOwner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pendingRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingSilo", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "previewDeposit", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewMint", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewRedeem", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewWithdraw", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "redeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }, { name: "referral", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestRedeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "revokeFromWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setOperator", inputs: [{ name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" }], outputs: [{ name: "success", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "settleDeposit", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "settleRedeem", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "share", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "totalAssets", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [{ name: "newOwner", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "unpause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateFeeReceiver", inputs: [{ name: "_feeReceiver", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateNewTotalAssets", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateRates", inputs: [{ name: "newRates", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateValuationManager", inputs: [{ name: "_valuationManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateWhitelistManager", inputs: [{ name: "_whitelistManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "version", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "pure" }, { type: "function", name: "withdraw", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Deposit", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequestCanceled", inputs: [{ name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "controller", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "FeeReceiverUpdated", inputs: [{ name: "oldReceiver", type: "address", indexed: false, internalType: "address" }, { name: "newReceiver", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "HighWaterMarkUpdated", inputs: [{ name: "oldHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }, { name: "newHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Initialized", inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], anonymous: false }, { type: "event", name: "NewTotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "OperatorSet", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "OwnershipTransferStarted", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "Paused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "RatesUpdated", inputs: [{ name: "oldRates", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "newRate", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "timestamp", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "RedeemRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Referral", inputs: [{ name: "referral", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleDeposit", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsDeposited", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesMinted", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleRedeem", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsWithdrawed", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesBurned", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "StateUpdated", inputs: [{ name: "state", type: "uint8", indexed: false, internalType: "enum State" }], anonymous: false }, { type: "event", name: "TotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Unpaused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "ValuationManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistDisabled", inputs: [], anonymous: false }, { type: "event", name: "WhitelistManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistUpdated", inputs: [{ name: "account", type: "address", indexed: true, internalType: "address" }, { name: "authorized", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "Withdraw", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "receiver", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "error", name: "AboveMaxRate", inputs: [{ name: "maxRate", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "AddressEmptyCode", inputs: [{ name: "target", type: "address", internalType: "address" }] }, { type: "error", name: "AddressInsufficientBalance", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "CantDepositNativeToken", inputs: [] }, { type: "error", name: "Closed", inputs: [] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC4626ExceededMaxDeposit", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxMint", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxRedeem", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxWithdraw", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC7540InvalidOperator", inputs: [] }, { type: "error", name: "ERC7540PreviewDepositDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewMintDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewRedeemDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewWithdrawDisabled", inputs: [] }, { type: "error", name: "EnforcedPause", inputs: [] }, { type: "error", name: "ExpectedPause", inputs: [] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "MathOverflowedMulDiv", inputs: [] }, { type: "error", name: "NewTotalAssetsMissing", inputs: [] }, { type: "error", name: "NotClosing", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "NotOpen", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotWhitelisted", inputs: [] }, { type: "error", name: "OnlyOneRequestAllowed", inputs: [] }, { type: "error", name: "OnlySafe", inputs: [{ name: "safe", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyValuationManager", inputs: [{ name: "valuationManager", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyWhitelistManager", inputs: [{ name: "whitelistManager", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableInvalidOwner", inputs: [{ name: "owner", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "RequestIdNotClaimable", inputs: [] }, { type: "error", name: "RequestNotCancelable", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address", internalType: "address" }] }, { type: "error", name: "WrongNewTotalAssets", inputs: [] }];
4
+ var vaultAbi_v0_3_0 = [{ type: "constructor", inputs: [{ name: "disable", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "MAX_MANAGEMENT_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PERFORMANCE_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PROTOCOL_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "acceptOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "addToWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "allowance", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "asset", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "cancelRequestDeposit", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesAndRequestRedeem", inputs: [{ name: "sharesToRedeem", type: "uint256", internalType: "uint256" }], outputs: [{ name: "requestId", type: "uint40", internalType: "uint40" }], stateMutability: "nonpayable" }, { type: "function", name: "claimableDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "claimableRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "close", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "disableWhitelist", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "feeRates", inputs: [], outputs: [{ name: "", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], stateMutability: "view" }, { type: "function", name: "getRolesStorage", inputs: [], outputs: [{ name: "_rolesStorage", type: "tuple", internalType: "struct Roles.RolesStorage", components: [{ name: "whitelistManager", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "safe", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "contract FeeRegistry" }, { name: "valuationManager", type: "address", internalType: "address" }] }], stateMutability: "pure" }, { type: "function", name: "highWaterMark", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [{ name: "data", type: "bytes", internalType: "bytes" }, { name: "feeRegistry", type: "address", internalType: "address" }, { name: "wrappedNativeToken", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "initiateClosing", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isOperator", inputs: [{ name: "controller", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelistActivated", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelisted", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lastDepositRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "lastFeeTime", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "lastRedeemRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "maxDeposit", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxMint", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxRedeem", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxWithdraw", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "paused", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "pendingDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingOwner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pendingRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingSilo", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "previewDeposit", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewMint", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewRedeem", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewWithdraw", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "redeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }, { name: "referral", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestRedeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "revokeFromWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setOperator", inputs: [{ name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" }], outputs: [{ name: "success", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "settleDeposit", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "settleRedeem", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "share", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "totalAssets", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [{ name: "newOwner", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "unpause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateFeeReceiver", inputs: [{ name: "_feeReceiver", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateNewTotalAssets", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateRates", inputs: [{ name: "newRates", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateValuationManager", inputs: [{ name: "_valuationManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateWhitelistManager", inputs: [{ name: "_whitelistManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "version", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "pure" }, { type: "function", name: "withdraw", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Deposit", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequestCanceled", inputs: [{ name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "controller", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "FeeReceiverUpdated", inputs: [{ name: "oldReceiver", type: "address", indexed: false, internalType: "address" }, { name: "newReceiver", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "HighWaterMarkUpdated", inputs: [{ name: "oldHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }, { name: "newHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Initialized", inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], anonymous: false }, { type: "event", name: "NewTotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "OperatorSet", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "OwnershipTransferStarted", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "Paused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "RatesUpdated", inputs: [{ name: "oldRates", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "newRate", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "timestamp", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "RedeemRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Referral", inputs: [{ name: "referral", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleDeposit", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsDeposited", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesMinted", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleRedeem", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsWithdrawed", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesBurned", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "StateUpdated", inputs: [{ name: "state", type: "uint8", indexed: false, internalType: "enum State" }], anonymous: false }, { type: "event", name: "TotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Unpaused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "ValuationManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistDisabled", inputs: [], anonymous: false }, { type: "event", name: "WhitelistManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistUpdated", inputs: [{ name: "account", type: "address", indexed: true, internalType: "address" }, { name: "authorized", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "Withdraw", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "receiver", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "error", name: "AboveMaxRate", inputs: [{ name: "maxRate", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "AddressEmptyCode", inputs: [{ name: "target", type: "address", internalType: "address" }] }, { type: "error", name: "AddressInsufficientBalance", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "CantDepositNativeToken", inputs: [] }, { type: "error", name: "Closed", inputs: [] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC4626ExceededMaxDeposit", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxMint", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxRedeem", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxWithdraw", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC7540InvalidOperator", inputs: [] }, { type: "error", name: "ERC7540PreviewDepositDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewMintDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewRedeemDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewWithdrawDisabled", inputs: [] }, { type: "error", name: "EnforcedPause", inputs: [] }, { type: "error", name: "ExpectedPause", inputs: [] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "MathOverflowedMulDiv", inputs: [] }, { type: "error", name: "NewTotalAssetsMissing", inputs: [] }, { type: "error", name: "NotClosing", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "NotOpen", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotWhitelisted", inputs: [] }, { type: "error", name: "OnlyOneRequestAllowed", inputs: [] }, { type: "error", name: "OnlySafe", inputs: [{ name: "safe", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyValuationManager", inputs: [{ name: "valuationManager", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyWhitelistManager", inputs: [{ name: "whitelistManager", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableInvalidOwner", inputs: [{ name: "owner", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "RequestIdNotClaimable", inputs: [] }, { type: "error", name: "RequestNotCancelable", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address", internalType: "address" }] }, { type: "error", name: "WrongNewTotalAssets", inputs: [] }];
5
+ var vaultAbi_v0_2_0 = [{ type: "constructor", inputs: [{ name: "disable", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "MAX_MANAGEMENT_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PERFORMANCE_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PROTOCOL_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "acceptOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "addToWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "allowance", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "asset", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "cancelRequestDeposit", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesAndRequestRedeem", inputs: [{ name: "sharesToRedeem", type: "uint256", internalType: "uint256" }], outputs: [{ name: "requestId", type: "uint40", internalType: "uint40" }], stateMutability: "nonpayable" }, { type: "function", name: "claimableDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "claimableRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "close", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "disableWhitelist", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "feeRates", inputs: [], outputs: [{ name: "", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], stateMutability: "view" }, { type: "function", name: "getRolesStorage", inputs: [], outputs: [{ name: "_rolesStorage", type: "tuple", internalType: "struct Roles.RolesStorage", components: [{ name: "whitelistManager", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "safe", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "contract FeeRegistry" }, { name: "valuationManager", type: "address", internalType: "address" }] }], stateMutability: "pure" }, { type: "function", name: "highWaterMark", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [{ name: "init", type: "tuple", internalType: "struct InitStruct", components: [{ name: "underlying", type: "address", internalType: "contract IERC20" }, { name: "name", type: "string", internalType: "string" }, { name: "symbol", type: "string", internalType: "string" }, { name: "safe", type: "address", internalType: "address" }, { name: "whitelistManager", type: "address", internalType: "address" }, { name: "valuationManager", type: "address", internalType: "address" }, { name: "admin", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "address" }, { name: "wrappedNativeToken", type: "address", internalType: "address" }, { name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }, { name: "enableWhitelist", type: "bool", internalType: "bool" }, { name: "rateUpdateCooldown", type: "uint256", internalType: "uint256" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "initiateClosing", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isOperator", inputs: [{ name: "controller", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelistActivated", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelisted", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lastDepositRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "lastFeeTime", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "lastRedeemRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "maxDeposit", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxMint", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxRedeem", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxWithdraw", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "paused", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "pendingDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingOwner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pendingRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingSilo", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "previewDeposit", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewMint", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewRedeem", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewWithdraw", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "redeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }, { name: "referral", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestRedeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "revokeFromWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setOperator", inputs: [{ name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" }], outputs: [{ name: "success", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "settleDeposit", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "settleRedeem", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "share", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "totalAssets", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [{ name: "newOwner", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "unpause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateFeeReceiver", inputs: [{ name: "_feeReceiver", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateNewTotalAssets", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateRates", inputs: [{ name: "newRates", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateValuationManager", inputs: [{ name: "_valuationManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateWhitelistManager", inputs: [{ name: "_whitelistManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "withdraw", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Deposit", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequestCanceled", inputs: [{ name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "controller", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "FeeReceiverUpdated", inputs: [{ name: "oldReceiver", type: "address", indexed: false, internalType: "address" }, { name: "newReceiver", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "HighWaterMarkUpdated", inputs: [{ name: "oldHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }, { name: "newHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Initialized", inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], anonymous: false }, { type: "event", name: "NewTotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "OperatorSet", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "OwnershipTransferStarted", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "Paused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "RatesUpdated", inputs: [{ name: "oldRates", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "newRate", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "timestamp", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "RedeemRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Referral", inputs: [{ name: "referral", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleDeposit", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsDeposited", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesMinted", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleRedeem", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsWithdrawed", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesBurned", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "StateUpdated", inputs: [{ name: "state", type: "uint8", indexed: false, internalType: "enum State" }], anonymous: false }, { type: "event", name: "TotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Unpaused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "ValuationManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistDisabled", inputs: [], anonymous: false }, { type: "event", name: "WhitelistManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistUpdated", inputs: [{ name: "account", type: "address", indexed: true, internalType: "address" }, { name: "authorized", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "Withdraw", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "receiver", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "error", name: "AboveMaxRate", inputs: [{ name: "maxRate", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "AddressEmptyCode", inputs: [{ name: "target", type: "address", internalType: "address" }] }, { type: "error", name: "AddressInsufficientBalance", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "CantDepositNativeToken", inputs: [] }, { type: "error", name: "Closed", inputs: [] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC4626ExceededMaxDeposit", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxMint", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxRedeem", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxWithdraw", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC7540InvalidOperator", inputs: [] }, { type: "error", name: "ERC7540PreviewDepositDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewMintDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewRedeemDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewWithdrawDisabled", inputs: [] }, { type: "error", name: "EnforcedPause", inputs: [] }, { type: "error", name: "ExpectedPause", inputs: [] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "MathOverflowedMulDiv", inputs: [] }, { type: "error", name: "NewTotalAssetsMissing", inputs: [] }, { type: "error", name: "NotClosing", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "NotOpen", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotWhitelisted", inputs: [] }, { type: "error", name: "OnlyOneRequestAllowed", inputs: [] }, { type: "error", name: "OnlySafe", inputs: [{ name: "safe", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyValuationManager", inputs: [{ name: "valuationManager", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyWhitelistManager", inputs: [{ name: "whitelistManager", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableInvalidOwner", inputs: [{ name: "owner", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "RequestIdNotClaimable", inputs: [] }, { type: "error", name: "RequestNotCancelable", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address", internalType: "address" }] }, { type: "error", name: "WrongNewTotalAssets", inputs: [] }];
6
+ var vaultAbi_v0_1_0 = [{ type: "constructor", inputs: [{ name: "disable", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "MAX_MANAGEMENT_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PERFORMANCE_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "MAX_PROTOCOL_RATE", inputs: [], outputs: [{ name: "", type: "uint16", internalType: "uint16" }], stateMutability: "view" }, { type: "function", name: "acceptOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "addToWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "allowance", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "asset", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "cancelRequestDeposit", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "claimSharesAndRequestRedeem", inputs: [{ name: "sharesToRedeem", type: "uint256", internalType: "uint256" }], outputs: [{ name: "requestId", type: "uint40", internalType: "uint40" }], stateMutability: "nonpayable" }, { type: "function", name: "claimableDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "claimableRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "close", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToAssets", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "convertToShares", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "requestId", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "deposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "disableWhitelist", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "feeRates", inputs: [], outputs: [{ name: "", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], stateMutability: "view" }, { type: "function", name: "getRolesStorage", inputs: [], outputs: [{ name: "_rolesStorage", type: "tuple", internalType: "struct Roles.RolesStorage", components: [{ name: "whitelistManager", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "safe", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "contract FeeRegistry" }, { name: "valuationManager", type: "address", internalType: "address" }] }], stateMutability: "pure" }, { type: "function", name: "highWaterMark", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [{ name: "init", type: "tuple", internalType: "struct InitStruct", components: [{ name: "underlying", type: "address", internalType: "contract IERC20" }, { name: "name", type: "string", internalType: "string" }, { name: "symbol", type: "string", internalType: "string" }, { name: "safe", type: "address", internalType: "address" }, { name: "whitelistManager", type: "address", internalType: "address" }, { name: "valuationManager", type: "address", internalType: "address" }, { name: "admin", type: "address", internalType: "address" }, { name: "feeReceiver", type: "address", internalType: "address" }, { name: "feeRegistry", type: "address", internalType: "address" }, { name: "wrappedNativeToken", type: "address", internalType: "address" }, { name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }, { name: "enableWhitelist", type: "bool", internalType: "bool" }, { name: "rateUpdateCooldown", type: "uint256", internalType: "uint256" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "initiateClosing", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isOperator", inputs: [{ name: "controller", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelistActivated", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isWhitelisted", inputs: [{ name: "account", type: "address", internalType: "address" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lastDepositRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "lastFeeTime", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "lastRedeemRequestId", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint40", internalType: "uint40" }], stateMutability: "view" }, { type: "function", name: "maxDeposit", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxMint", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxRedeem", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "maxWithdraw", inputs: [{ name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "mint", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "paused", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "pendingDepositRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingOwner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "pendingRedeemRequest", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "pendingSilo", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "previewDeposit", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewMint", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewRedeem", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "previewWithdraw", inputs: [{ name: "", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "pure" }, { type: "function", name: "redeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "assets", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestDeposit", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }, { name: "referral", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "payable" }, { type: "function", name: "requestRedeem", inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }, { name: "controller", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" }], outputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "function", name: "revokeFromWhitelist", inputs: [{ name: "accounts", type: "address[]", internalType: "address[]" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setOperator", inputs: [{ name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" }], outputs: [{ name: "success", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "settleDeposit", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "settleRedeem", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "share", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "totalAssets", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [{ name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [{ name: "newOwner", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "unpause", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateFeeReceiver", inputs: [{ name: "_feeReceiver", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateNewTotalAssets", inputs: [{ name: "_newTotalAssets", type: "uint256", internalType: "uint256" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateRates", inputs: [{ name: "newRates", type: "tuple", internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateValuationManager", inputs: [{ name: "_valuationManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "updateWhitelistManager", inputs: [{ name: "_whitelistManager", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "withdraw", inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }, { name: "receiver", type: "address", internalType: "address" }, { name: "controller", type: "address", internalType: "address" }], outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable" }, { type: "event", name: "Approval", inputs: [{ name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Deposit", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "DepositRequestCanceled", inputs: [{ name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "controller", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "FeeReceiverUpdated", inputs: [{ name: "oldReceiver", type: "address", indexed: false, internalType: "address" }, { name: "newReceiver", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "HighWaterMarkUpdated", inputs: [{ name: "oldHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }, { name: "newHighWaterMark", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Initialized", inputs: [{ name: "version", type: "uint64", indexed: false, internalType: "uint64" }], anonymous: false }, { type: "event", name: "NewTotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "OperatorSet", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "OwnershipTransferStarted", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [{ name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" }], anonymous: false }, { type: "event", name: "Paused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "RatesUpdated", inputs: [{ name: "oldRates", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "newRate", type: "tuple", indexed: false, internalType: "struct Rates", components: [{ name: "managementRate", type: "uint16", internalType: "uint16" }, { name: "performanceRate", type: "uint16", internalType: "uint16" }] }, { name: "timestamp", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "RedeemRequest", inputs: [{ name: "controller", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "sender", type: "address", indexed: false, internalType: "address" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Referral", inputs: [{ name: "referral", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "requestId", type: "uint256", indexed: true, internalType: "uint256" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleDeposit", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsDeposited", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesMinted", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "SettleRedeem", inputs: [{ name: "epochId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "settledId", type: "uint40", indexed: true, internalType: "uint40" }, { name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "totalSupply", type: "uint256", indexed: false, internalType: "uint256" }, { name: "assetsWithdrawed", type: "uint256", indexed: false, internalType: "uint256" }, { name: "sharesBurned", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "StateUpdated", inputs: [{ name: "state", type: "uint8", indexed: false, internalType: "enum State" }], anonymous: false }, { type: "event", name: "TotalAssetsUpdated", inputs: [{ name: "totalAssets", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Transfer", inputs: [{ name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "event", name: "Unpaused", inputs: [{ name: "account", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "ValuationManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistDisabled", inputs: [], anonymous: false }, { type: "event", name: "WhitelistManagerUpdated", inputs: [{ name: "oldManager", type: "address", indexed: false, internalType: "address" }, { name: "newManager", type: "address", indexed: false, internalType: "address" }], anonymous: false }, { type: "event", name: "WhitelistUpdated", inputs: [{ name: "account", type: "address", indexed: true, internalType: "address" }, { name: "authorized", type: "bool", indexed: false, internalType: "bool" }], anonymous: false }, { type: "event", name: "Withdraw", inputs: [{ name: "sender", type: "address", indexed: true, internalType: "address" }, { name: "receiver", type: "address", indexed: true, internalType: "address" }, { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "assets", type: "uint256", indexed: false, internalType: "uint256" }, { name: "shares", type: "uint256", indexed: false, internalType: "uint256" }], anonymous: false }, { type: "error", name: "AboveMaxRate", inputs: [{ name: "maxRate", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "AddressEmptyCode", inputs: [{ name: "target", type: "address", internalType: "address" }] }, { type: "error", name: "AddressInsufficientBalance", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "CantDepositNativeToken", inputs: [] }, { type: "error", name: "Closed", inputs: [] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [{ name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [{ name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC20InvalidApprover", inputs: [{ name: "approver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [{ name: "receiver", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSender", inputs: [{ name: "sender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC20InvalidSpender", inputs: [{ name: "spender", type: "address", internalType: "address" }] }, { type: "error", name: "ERC4626ExceededMaxDeposit", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxMint", inputs: [{ name: "receiver", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxRedeem", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "shares", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC4626ExceededMaxWithdraw", inputs: [{ name: "owner", type: "address", internalType: "address" }, { name: "assets", type: "uint256", internalType: "uint256" }, { name: "max", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "ERC7540InvalidOperator", inputs: [] }, { type: "error", name: "ERC7540PreviewDepositDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewMintDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewRedeemDisabled", inputs: [] }, { type: "error", name: "ERC7540PreviewWithdrawDisabled", inputs: [] }, { type: "error", name: "EnforcedPause", inputs: [] }, { type: "error", name: "ExpectedPause", inputs: [] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "MathOverflowedMulDiv", inputs: [] }, { type: "error", name: "NewTotalAssetsMissing", inputs: [] }, { type: "error", name: "NotClosing", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "NotOpen", inputs: [{ name: "currentState", type: "uint8", internalType: "enum State" }] }, { type: "error", name: "NotWhitelisted", inputs: [] }, { type: "error", name: "OnlyOneRequestAllowed", inputs: [] }, { type: "error", name: "OnlySafe", inputs: [{ name: "safe", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyValuationManager", inputs: [{ name: "valuationManager", type: "address", internalType: "address" }] }, { type: "error", name: "OnlyWhitelistManager", inputs: [{ name: "whitelistManager", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableInvalidOwner", inputs: [{ name: "owner", type: "address", internalType: "address" }] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address", internalType: "address" }] }, { type: "error", name: "RequestIdNotClaimable", inputs: [] }, { type: "error", name: "RequestNotCancelable", inputs: [{ name: "requestId", type: "uint256", internalType: "uint256" }] }, { type: "error", name: "SafeERC20FailedOperation", inputs: [{ name: "token", type: "address", internalType: "address" }] }, { type: "error", name: "WrongNewTotalAssets", inputs: [] }];
7
+
8
+ // src/math/MathLib.ts
9
+ var MathLib;
10
+ ((MathLib) => {
11
+ MathLib.WAD = 1000000000000000000n;
12
+ MathLib.RAY = 1000000000000000000000000000n;
13
+ MathLib.MAX_UINT_256 = maxUint(256);
14
+ MathLib.MAX_UINT_160 = maxUint(160);
15
+ MathLib.MAX_UINT_128 = maxUint(128);
16
+ MathLib.MAX_UINT_48 = maxUint(48);
17
+ function maxUint(nBits) {
18
+ if (nBits % 4 !== 0)
19
+ throw new Error(`Invalid number of bits: ${nBits}`);
20
+ return BigInt(`0x${"f".repeat(nBits / 4)}`);
21
+ }
22
+ MathLib.maxUint = maxUint;
23
+ function abs(a) {
24
+ a = BigInt(a);
25
+ return a >= 0 ? a : -a;
26
+ }
27
+ MathLib.abs = abs;
28
+ function min(...xs) {
29
+ return xs.map(BigInt).reduce((x, y) => x <= y ? x : y);
30
+ }
31
+ MathLib.min = min;
32
+ function max(...xs) {
33
+ return xs.map(BigInt).reduce((x, y) => x <= y ? y : x);
34
+ }
35
+ MathLib.max = max;
36
+ function zeroFloorSub(x, y) {
37
+ x = BigInt(x);
38
+ y = BigInt(y);
39
+ return x <= y ? 0n : x - y;
40
+ }
41
+ MathLib.zeroFloorSub = zeroFloorSub;
42
+ function wMulDown(x, y) {
43
+ return MathLib.wMul(x, y, "Down");
44
+ }
45
+ MathLib.wMulDown = wMulDown;
46
+ function wMulUp(x, y) {
47
+ return MathLib.wMul(x, y, "Up");
48
+ }
49
+ MathLib.wMulUp = wMulUp;
50
+ function wMul(x, y, rounding) {
51
+ return MathLib.mulDiv(x, y, MathLib.WAD, rounding);
52
+ }
53
+ MathLib.wMul = wMul;
54
+ function wDivDown(x, y) {
55
+ return MathLib.wDiv(x, y, "Down");
56
+ }
57
+ MathLib.wDivDown = wDivDown;
58
+ function wDivUp(x, y) {
59
+ return MathLib.wDiv(x, y, "Up");
60
+ }
61
+ MathLib.wDivUp = wDivUp;
62
+ function wDiv(x, y, rounding) {
63
+ return MathLib.mulDiv(x, MathLib.WAD, y, rounding);
64
+ }
65
+ MathLib.wDiv = wDiv;
66
+ function mulDivDown(x, y, denominator) {
67
+ x = BigInt(x);
68
+ y = BigInt(y);
69
+ denominator = BigInt(denominator);
70
+ if (denominator === 0n)
71
+ throw Error("MathLib: DIVISION_BY_ZERO");
72
+ return x * y / denominator;
73
+ }
74
+ MathLib.mulDivDown = mulDivDown;
75
+ function mulDivUp(x, y, denominator) {
76
+ x = BigInt(x);
77
+ y = BigInt(y);
78
+ denominator = BigInt(denominator);
79
+ if (denominator === 0n)
80
+ throw Error("MathLib: DIVISION_BY_ZERO");
81
+ const roundup = x * y % denominator > 0 ? 1n : 0n;
82
+ return x * y / denominator + roundup;
83
+ }
84
+ MathLib.mulDivUp = mulDivUp;
85
+ function mulDiv(x, y, denominator, rounding) {
86
+ return MathLib[`mulDiv${rounding}`](x, y, denominator);
87
+ }
88
+ MathLib.mulDiv = mulDiv;
89
+ function wTaylorCompounded(x, n) {
90
+ const firstTerm = BigInt(x) * BigInt(n);
91
+ const secondTerm = MathLib.mulDivDown(firstTerm, firstTerm, 2n * MathLib.WAD);
92
+ const thirdTerm = MathLib.mulDivDown(secondTerm, firstTerm, 3n * MathLib.WAD);
93
+ return firstTerm + secondTerm + thirdTerm;
94
+ }
95
+ MathLib.wTaylorCompounded = wTaylorCompounded;
96
+ function wToRay(x) {
97
+ return BigInt(x) * 1000000000n;
98
+ }
99
+ MathLib.wToRay = wToRay;
100
+ })(MathLib ||= {});
101
+ // src/token/Token.ts
102
+ class Token {
103
+ address;
104
+ name;
105
+ symbol;
106
+ decimals;
107
+ totalSupply;
108
+ price;
109
+ constructor({
110
+ address,
111
+ name,
112
+ symbol,
113
+ decimals = 0,
114
+ totalSupply,
115
+ price
116
+ }) {
117
+ this.address = address;
118
+ this.name = name;
119
+ this.symbol = symbol;
120
+ this.decimals = Number(decimals);
121
+ this.totalSupply = BigInt(totalSupply);
122
+ if (price != null)
123
+ this.price = BigInt(price);
124
+ }
125
+ fromUsd(amount, rounding = "Down") {
126
+ if (this.price == null)
127
+ return;
128
+ return MathLib.mulDiv(amount, 10n ** BigInt(this.decimals), this.price, rounding);
129
+ }
130
+ toUsd(amount, rounding = "Down") {
131
+ if (this.price == null)
132
+ return;
133
+ return MathLib.mulDiv(amount, this.price, 10n ** BigInt(this.decimals), rounding);
134
+ }
135
+ }
136
+
137
+ // src/vault/VaultUtils.ts
138
+ var VaultUtils;
139
+ ((VaultUtils) => {
140
+ VaultUtils.VIRTUAL_ASSETS = 1n;
141
+ VaultUtils.ONE_SHARE = 10n ** 18n;
142
+ function decimalsOffset(decimals) {
143
+ return MathLib.zeroFloorSub(18n, decimals);
144
+ }
145
+ VaultUtils.decimalsOffset = decimalsOffset;
146
+ function convertToAssets(shares, {
147
+ totalAssets,
148
+ totalSupply,
149
+ decimalsOffset: decimalsOffset2
150
+ }, rounding = "Down") {
151
+ return MathLib.mulDiv(shares, BigInt(totalAssets) + VaultUtils.VIRTUAL_ASSETS, BigInt(totalSupply) + 10n ** BigInt(decimalsOffset2), rounding);
152
+ }
153
+ VaultUtils.convertToAssets = convertToAssets;
154
+ function convertToShares(assets, {
155
+ totalAssets,
156
+ totalSupply,
157
+ decimalsOffset: decimalsOffset2
158
+ }, rounding = "Up") {
159
+ return MathLib.mulDiv(assets, BigInt(totalSupply) + 10n ** BigInt(decimalsOffset2), BigInt(totalAssets) + VaultUtils.VIRTUAL_ASSETS, rounding);
160
+ }
161
+ VaultUtils.convertToShares = convertToShares;
162
+ function calculateShareValue(pricePerShare, {
163
+ totalSupply,
164
+ decimals
165
+ }, rounding = "Down") {
166
+ return MathLib.mulDiv(pricePerShare, totalSupply, 10n ** BigInt(decimals), rounding);
167
+ }
168
+ VaultUtils.calculateShareValue = calculateShareValue;
169
+ function calculateAssetsToUnwind(sharesToRedeem, assetsPendingDeposit, safeAssetBalance, vault) {
170
+ const assetsToRedeem = convertToAssets(sharesToRedeem, vault);
171
+ return MathLib.zeroFloorSub(assetsToRedeem, BigInt(safeAssetBalance) + BigInt(assetsPendingDeposit));
172
+ }
173
+ VaultUtils.calculateAssetsToUnwind = calculateAssetsToUnwind;
174
+ })(VaultUtils ||= {});
175
+
176
+ // src/vault/Vault.ts
177
+ var Version;
178
+ ((Version2) => {
179
+ Version2["v0_5_0"] = "v0.5.0";
180
+ Version2["v0_4_0"] = "v0.4.0";
181
+ Version2["v0_3_0"] = "v0.3.0";
182
+ Version2["v0_2_0"] = "v0.2.0";
183
+ Version2["v0_1_0"] = "v0.1.0";
184
+ })(Version ||= {});
185
+ var LATEST_VERSION = "v0.5.0" /* v0_5_0 */;
186
+ function resolveVersion(version) {
187
+ return version === "latest" ? LATEST_VERSION : version;
188
+ }
189
+ function isValidVersion(version) {
190
+ switch (version) {
191
+ case "v0.5.0" /* v0_5_0 */:
192
+ case "v0.4.0" /* v0_4_0 */:
193
+ case "v0.3.0" /* v0_3_0 */:
194
+ case "v0.2.0" /* v0_2_0 */:
195
+ case "v0.1.0" /* v0_1_0 */:
196
+ return true;
197
+ default:
198
+ return false;
199
+ }
200
+ }
201
+ var State;
202
+ ((State2) => {
203
+ State2[State2["Open"] = 0] = "Open";
204
+ State2[State2["Closing"] = 1] = "Closing";
205
+ State2[State2["Closed"] = 2] = "Closed";
206
+ })(State ||= {});
207
+
208
+ class Vault extends Token {
209
+ asset;
210
+ underlyingDecimals;
211
+ totalAssets;
212
+ newTotalAssets;
213
+ depositEpochId;
214
+ depositSettleId;
215
+ lastDepositEpochIdSettled;
216
+ redeemEpochId;
217
+ redeemSettleId;
218
+ lastRedeemEpochIdSettled;
219
+ pendingSilo;
220
+ wrappedNativeToken;
221
+ decimalsOffset;
222
+ totalAssetsExpiration;
223
+ totalAssetsLifespan;
224
+ feeRegistry;
225
+ newRatesTimestamp;
226
+ lastFeeTime;
227
+ highWaterMark;
228
+ cooldown;
229
+ feeRates;
230
+ owner;
231
+ pendingOwner;
232
+ whitelistManager;
233
+ feeReceiver;
234
+ safe;
235
+ valuationManager;
236
+ state;
237
+ isWhitelistActivated;
238
+ version;
239
+ constructor({
240
+ asset,
241
+ underlyingDecimals,
242
+ totalAssets,
243
+ newTotalAssets,
244
+ depositEpochId,
245
+ depositSettleId,
246
+ lastDepositEpochIdSettled,
247
+ redeemEpochId,
248
+ redeemSettleId,
249
+ lastRedeemEpochIdSettled,
250
+ pendingSilo,
251
+ wrappedNativeToken,
252
+ decimalsOffset,
253
+ totalAssetsExpiration,
254
+ totalAssetsLifespan,
255
+ feeRegistry,
256
+ newRatesTimestamp,
257
+ lastFeeTime,
258
+ highWaterMark,
259
+ cooldown,
260
+ feeRates,
261
+ owner,
262
+ pendingOwner,
263
+ whitelistManager,
264
+ feeReceiver,
265
+ safe,
266
+ valuationManager,
267
+ state,
268
+ isWhitelistActivated,
269
+ version,
270
+ ...config
271
+ }) {
272
+ super({ ...config, decimals: 18 });
273
+ this.asset = asset;
274
+ this.underlyingDecimals = underlyingDecimals;
275
+ this.totalAssets = totalAssets;
276
+ this.newTotalAssets = newTotalAssets;
277
+ this.depositEpochId = depositEpochId;
278
+ this.depositSettleId = depositSettleId;
279
+ this.lastDepositEpochIdSettled = lastDepositEpochIdSettled;
280
+ this.redeemEpochId = redeemEpochId;
281
+ this.redeemSettleId = redeemSettleId;
282
+ this.lastRedeemEpochIdSettled = lastRedeemEpochIdSettled;
283
+ this.pendingSilo = pendingSilo;
284
+ this.wrappedNativeToken = wrappedNativeToken;
285
+ this.decimalsOffset = decimalsOffset;
286
+ this.totalAssetsExpiration = totalAssetsExpiration;
287
+ this.totalAssetsLifespan = totalAssetsLifespan;
288
+ this.feeRegistry = feeRegistry;
289
+ this.newRatesTimestamp = newRatesTimestamp;
290
+ this.lastFeeTime = lastFeeTime;
291
+ this.highWaterMark = highWaterMark;
292
+ this.cooldown = cooldown;
293
+ this.feeRates = feeRates;
294
+ this.owner = owner;
295
+ this.pendingOwner = pendingOwner;
296
+ this.whitelistManager = whitelistManager;
297
+ this.feeReceiver = feeReceiver;
298
+ this.safe = safe;
299
+ this.valuationManager = valuationManager;
300
+ this.state = state;
301
+ this.isWhitelistActivated = isWhitelistActivated;
302
+ this.version = version;
303
+ }
304
+ convertToAssets(shares, rounding) {
305
+ return VaultUtils.convertToAssets(shares, this, rounding);
306
+ }
307
+ convertToShares(assets, rounding) {
308
+ return VaultUtils.convertToShares(assets, this, rounding);
309
+ }
310
+ calculateTotalAssetsAtHWM() {
311
+ return VaultUtils.calculateShareValue(this.highWaterMark, this);
312
+ }
313
+ calculateAssetsToUnwind(sharesToRedeem, assetsPendingDeposit, safeAssetBalance) {
314
+ return VaultUtils.calculateAssetsToUnwind(sharesToRedeem, assetsPendingDeposit, safeAssetBalance, this);
315
+ }
316
+ getAbi() {
317
+ switch (this.version) {
318
+ case "v0.5.0" /* v0_5_0 */:
319
+ return vaultAbi_v0_5_0;
320
+ case "v0.4.0" /* v0_4_0 */:
321
+ return vaultAbi_v0_4_0;
322
+ case "v0.3.0" /* v0_3_0 */:
323
+ return vaultAbi_v0_3_0;
324
+ case "v0.2.0" /* v0_2_0 */:
325
+ return vaultAbi_v0_2_0;
326
+ case "v0.1.0" /* v0_1_0 */:
327
+ return vaultAbi_v0_2_0;
328
+ }
329
+ throw new Error("Unknown version");
330
+ }
331
+ }
332
+ // src/vault/SettleData.ts
333
+ class SettleData {
334
+ static _CACHE = {};
335
+ static get(settleId) {
336
+ const settleData = SettleData._CACHE[settleId];
337
+ if (!settleData)
338
+ throw new CacheMissError(`unknown settleData id ${settleId}`);
339
+ return settleData;
340
+ }
341
+ settleId;
342
+ totalSupply;
343
+ totalAssets;
344
+ pendingAssets;
345
+ pendingShares;
346
+ constructor({
347
+ settleId,
348
+ totalSupply,
349
+ totalAssets,
350
+ pendingAssets,
351
+ pendingShares
352
+ }) {
353
+ this.settleId = settleId;
354
+ this.totalSupply = BigInt(totalSupply);
355
+ this.totalAssets = BigInt(totalAssets);
356
+ this.pendingAssets = BigInt(pendingAssets);
357
+ this.pendingShares = BigInt(pendingShares);
358
+ SettleData._CACHE[this.settleId] = this;
359
+ }
360
+ }
361
+
362
+ class CacheMissError extends Error {
363
+ msg;
364
+ constructor(msg) {
365
+ super(`CACHE MISS: ${msg}`);
366
+ this.msg = msg;
367
+ }
368
+ }
369
+ // src/chain.ts
370
+ var ChainId;
371
+ ((ChainId2) => {
372
+ ChainId2[ChainId2["EthMainnet"] = 1] = "EthMainnet";
373
+ ChainId2[ChainId2["BaseMainnet"] = 8453] = "BaseMainnet";
374
+ ChainId2[ChainId2["PolygonMainnet"] = 137] = "PolygonMainnet";
375
+ ChainId2[ChainId2["ArbitrumMainnet"] = 42161] = "ArbitrumMainnet";
376
+ ChainId2[ChainId2["OptimismMainnet"] = 10] = "OptimismMainnet";
377
+ ChainId2[ChainId2["WorldChainMainnet"] = 480] = "WorldChainMainnet";
378
+ ChainId2[ChainId2["FraxtalMainnet"] = 252] = "FraxtalMainnet";
379
+ ChainId2[ChainId2["ScrollMainnet"] = 534352] = "ScrollMainnet";
380
+ ChainId2[ChainId2["InkMainnet"] = 57073] = "InkMainnet";
381
+ ChainId2[ChainId2["UnichainMainnet"] = 130] = "UnichainMainnet";
382
+ ChainId2[ChainId2["SonicMainnet"] = 146] = "SonicMainnet";
383
+ ChainId2[ChainId2["HemiMainnet"] = 43111] = "HemiMainnet";
384
+ ChainId2[ChainId2["ModeMainnet"] = 34443] = "ModeMainnet";
385
+ ChainId2[ChainId2["CornMainnet"] = 21000000] = "CornMainnet";
386
+ ChainId2[ChainId2["PlumeMainnet"] = 98866] = "PlumeMainnet";
387
+ ChainId2[ChainId2["CampMainnet"] = 123420001114] = "CampMainnet";
388
+ ChainId2[ChainId2["BerachainMainnet"] = 80094] = "BerachainMainnet";
389
+ ChainId2[ChainId2["MantleMainnet"] = 5000] = "MantleMainnet";
390
+ ChainId2[ChainId2["AvalancheMainnet"] = 43114] = "AvalancheMainnet";
391
+ })(ChainId ||= {});
392
+ var ChainUtils;
393
+ ((ChainUtils) => {
394
+ ChainUtils.toHexChainId = (chainId) => {
395
+ return `0x${chainId.toString(16)}`;
396
+ };
397
+ ChainUtils.getExplorerUrl = (chainId) => {
398
+ return ChainUtils.CHAIN_METADATA[chainId].explorerUrl;
399
+ };
400
+ ChainUtils.getExplorerAddressUrl = (chainId, address) => {
401
+ return `${ChainUtils.getExplorerUrl(chainId)}/address/${address}`;
402
+ };
403
+ ChainUtils.getExplorerTransactionUrl = (chainId, tx) => {
404
+ return `${ChainUtils.getExplorerUrl(chainId)}/tx/${tx}`;
405
+ };
406
+ ChainUtils.CHAIN_METADATA = {
407
+ [1 /* EthMainnet */]: {
408
+ name: "Ethereum",
409
+ id: 1 /* EthMainnet */,
410
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
411
+ explorerUrl: "https://etherscan.io",
412
+ identifier: "mainnet"
413
+ },
414
+ [8453 /* BaseMainnet */]: {
415
+ name: "Base",
416
+ id: 8453 /* BaseMainnet */,
417
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
418
+ explorerUrl: "https://basescan.org",
419
+ identifier: "base"
420
+ },
421
+ [137 /* PolygonMainnet */]: {
422
+ name: "Polygon",
423
+ id: 137 /* PolygonMainnet */,
424
+ nativeCurrency: { name: "Polygon", symbol: "POL", decimals: 18 },
425
+ explorerUrl: "https://polygonscan.com",
426
+ identifier: "polygon"
427
+ },
428
+ [42161 /* ArbitrumMainnet */]: {
429
+ name: "Arbitrum One",
430
+ id: 42161 /* ArbitrumMainnet */,
431
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
432
+ explorerUrl: "https://arbiscan.io",
433
+ identifier: "arbitrum"
434
+ },
435
+ [10 /* OptimismMainnet */]: {
436
+ name: "OP Mainnet",
437
+ id: 10 /* OptimismMainnet */,
438
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
439
+ explorerUrl: "https://optimistic.etherscan.io",
440
+ identifier: "optimism"
441
+ },
442
+ [480 /* WorldChainMainnet */]: {
443
+ name: "World Chain",
444
+ id: 480 /* WorldChainMainnet */,
445
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
446
+ explorerUrl: "https://worldscan.org",
447
+ identifier: "worldchain"
448
+ },
449
+ [252 /* FraxtalMainnet */]: {
450
+ name: "Fraxtal",
451
+ id: 252 /* FraxtalMainnet */,
452
+ nativeCurrency: { name: "Frax Ether", symbol: "frxETH", decimals: 18 },
453
+ explorerUrl: "https://fraxscan.com",
454
+ identifier: "fraxtal"
455
+ },
456
+ [534352 /* ScrollMainnet */]: {
457
+ name: "Scroll",
458
+ id: 534352 /* ScrollMainnet */,
459
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
460
+ explorerUrl: "https://scrollscan.com",
461
+ identifier: "scroll"
462
+ },
463
+ [57073 /* InkMainnet */]: {
464
+ name: "Ink",
465
+ id: 57073 /* InkMainnet */,
466
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
467
+ explorerUrl: "https://explorer.inkonchain.com",
468
+ identifier: "ink"
469
+ },
470
+ [130 /* UnichainMainnet */]: {
471
+ name: "Unichain",
472
+ id: 130 /* UnichainMainnet */,
473
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
474
+ explorerUrl: "https://uniscan.xyz",
475
+ identifier: "unichain"
476
+ },
477
+ [146 /* SonicMainnet */]: {
478
+ name: "Sonic",
479
+ id: 146 /* SonicMainnet */,
480
+ nativeCurrency: { name: "Sonic", symbol: "S", decimals: 18 },
481
+ explorerUrl: "https://sonicscan.org",
482
+ identifier: "sonic"
483
+ },
484
+ [43111 /* HemiMainnet */]: {
485
+ name: "Hemi",
486
+ id: 43111 /* HemiMainnet */,
487
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
488
+ explorerUrl: "https://explorer.hemi.xyz",
489
+ identifier: "hemi"
490
+ },
491
+ [34443 /* ModeMainnet */]: {
492
+ name: "Mode",
493
+ id: 34443 /* ModeMainnet */,
494
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
495
+ explorerUrl: "https://modescan.io",
496
+ identifier: "mode"
497
+ },
498
+ [21000000 /* CornMainnet */]: {
499
+ name: "Corn",
500
+ id: 21000000 /* CornMainnet */,
501
+ nativeCurrency: { name: "Bitcoin", symbol: "BTCN", decimals: 18 },
502
+ explorerUrl: "https://cornscan.io",
503
+ identifier: "corn"
504
+ },
505
+ [98866 /* PlumeMainnet */]: {
506
+ name: "Plume",
507
+ id: 98866 /* PlumeMainnet */,
508
+ nativeCurrency: { name: "Plume", symbol: "PLUME", decimals: 18 },
509
+ explorerUrl: "https://phoenix-explorer.plumenetwork.xyz",
510
+ identifier: "plume"
511
+ },
512
+ [123420001114 /* CampMainnet */]: {
513
+ name: "Camp",
514
+ id: 123420001114 /* CampMainnet */,
515
+ nativeCurrency: { name: "Camp", symbol: "CAMP", decimals: 18 },
516
+ explorerUrl: "https://basecamp.cloud.blockscout.com/",
517
+ identifier: "camp"
518
+ },
519
+ [80094 /* BerachainMainnet */]: {
520
+ name: "Berachain",
521
+ id: 80094 /* BerachainMainnet */,
522
+ nativeCurrency: { name: "Bera", symbol: "BERA", decimals: 18 },
523
+ explorerUrl: "https://berascan.com/",
524
+ identifier: "berachain"
525
+ },
526
+ [5000 /* MantleMainnet */]: {
527
+ name: "Mantle",
528
+ id: 5000 /* MantleMainnet */,
529
+ nativeCurrency: { name: "Mantle", symbol: "MNT", decimals: 18 },
530
+ explorerUrl: "https://mantlescan.xyz/",
531
+ identifier: "mantle"
532
+ },
533
+ [43114 /* AvalancheMainnet */]: {
534
+ name: "Avalanche",
535
+ id: 43114 /* AvalancheMainnet */,
536
+ nativeCurrency: { name: "Avalanche", symbol: "AVAX", decimals: 18 },
537
+ explorerUrl: "https://snowtrace.io",
538
+ identifier: "avalanche"
539
+ }
540
+ };
541
+ })(ChainUtils ||= {});
542
+
543
+ // src/addresses.ts
544
+ var NATIVE_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
545
+ var addresses = {
546
+ [1 /* EthMainnet */]: {
547
+ beaconProxyFactory: "0x09C8803f7Dc251f9FaAE5f56E3B91f8A6d0b70ee",
548
+ feeRegistry: "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
549
+ v0_5_0: "0xe50554ec802375c9c3f9c087a8a7bb8c26d3dedf",
550
+ wrappedNative: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
551
+ },
552
+ [42161 /* ArbitrumMainnet */]: {
553
+ beaconProxyFactory: "0x58a7729125acA9e5E9C687018E66bfDd5b2D4490",
554
+ feeRegistry: "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
555
+ v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
556
+ wrappedNative: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 ",
557
+ dev: {
558
+ beaconProxyFactory: "0x29f3dba953C57814A5579e08462724B9C760333e",
559
+ feeRegistry: "0x45BA44B8899D39abdc383a25bB17fcD18240c6Bc"
560
+ }
561
+ },
562
+ [8453 /* BaseMainnet */]: {
563
+ beaconProxyFactory: "0xC953Fd298FdfA8Ed0D38ee73772D3e21Bf19c61b",
564
+ feeRegistry: "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
565
+ v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
566
+ wrappedNative: "0x4200000000000000000000000000000000000006"
567
+ },
568
+ [130 /* UnichainMainnet */]: {
569
+ beaconProxyFactory: "0xaba1A2e157Dae248f8630cA550bd826725Ff745c",
570
+ feeRegistry: "0x652716FaD571f04D26a3c8fFd9E593F17123Ab20",
571
+ v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
572
+ wrappedNative: "0x4200000000000000000000000000000000000006"
573
+ },
574
+ [80094 /* BerachainMainnet */]: {
575
+ beaconProxyFactory: "0x7cf8cf276450bd568187fdc0b0959d30ec599853",
576
+ feeRegistry: "0xaba1A2e157Dae248f8630cA550bd826725Ff745c",
577
+ v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
578
+ wrappedNative: "0x6969696969696969696969696969696969696969"
579
+ },
580
+ [146 /* SonicMainnet */]: {
581
+ beaconProxyFactory: "0x99CD0b8b32B15922f0754Fddc21323b5278c5261",
582
+ feeRegistry: "0xab4aC28D10a4Bc279aD073B1D74Bfa0E385C010C",
583
+ v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
584
+ wrappedNative: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38"
585
+ },
586
+ [5000 /* MantleMainnet */]: {
587
+ beaconProxyFactory: "0x57D969B556C6AebB3Ac8f54c98CF3a3f921d5659",
588
+ feeRegistry: "0x47A144e67834408716cB40Fa87fc886D63362ddC",
589
+ v0_4_0: "0xA7260Cee56B679eC05a736A7b603b8DA8525Dd69",
590
+ wrappedNative: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8"
591
+ },
592
+ [480 /* WorldChainMainnet */]: {
593
+ beaconProxyFactory: "0x600fA26581771F56221FC9847A834B3E5fd34AF7",
594
+ feeRegistry: "0x68e793658def657551fd4D3cA6Bc04b4E7723655",
595
+ v0_5_0: "0x1D42DbDde553F4099691A25F712bbd8f2686E355 ",
596
+ wrappedNative: "0x4200000000000000000000000000000000000006"
597
+ },
598
+ [43114 /* AvalancheMainnet */]: {
599
+ beaconProxyFactory: "0x5e231c6d030a5c0f51fa7d0f891d3f50a928c685",
600
+ feeRegistry: "0xD7F69ba99c6981Eab5579Aa16871Ae94c509d578",
601
+ v0_5_0: "0x33F65C8D025b5418C7f8dd248C2Ec1d31881D465",
602
+ wrappedNative: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"
603
+ }
604
+ };
605
+ // src/utils.ts
606
+ async function tryCatch(promise) {
607
+ try {
608
+ const data = await promise;
609
+ return { data, error: null };
610
+ } catch (error) {
611
+ return { data: null, error };
612
+ }
613
+ }
614
+ export {
615
+ vaultAbi_v0_5_0,
616
+ vaultAbi_v0_4_0,
617
+ vaultAbi_v0_3_0,
618
+ vaultAbi_v0_2_0,
619
+ vaultAbi_v0_1_0,
620
+ tryCatch,
621
+ resolveVersion,
622
+ isValidVersion,
623
+ addresses,
624
+ Version,
625
+ VaultUtils,
626
+ Vault,
627
+ Token,
628
+ State,
629
+ SettleData,
630
+ NATIVE_ADDRESS,
631
+ MathLib,
632
+ LATEST_VERSION,
633
+ ChainUtils,
634
+ ChainId,
635
+ CacheMissError
636
+ };