@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.
- package/dist/cjs/index.cjs +668 -0
- package/dist/esm/index.js +636 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/addresses.d.ts.map +1 -0
- package/dist/types/chain.d.ts.map +1 -0
- package/dist/types/constants/abis.d.ts +9366 -0
- package/dist/types/constants/abis.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/{index.d.ts → types/index.d.ts} +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/math/MathLib.d.ts.map +1 -0
- package/dist/types/math/index.d.ts.map +1 -0
- package/dist/{token → types/token}/Token.d.ts +0 -2
- package/dist/types/token/Token.d.ts.map +1 -0
- package/dist/types/token/index.d.ts.map +1 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils.d.ts +12 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/vault/SettleData.d.ts +27 -0
- package/dist/types/vault/SettleData.d.ts.map +1 -0
- package/dist/types/vault/Vault.d.ts +7655 -0
- package/dist/types/vault/Vault.d.ts.map +1 -0
- package/dist/{vault → types/vault}/VaultUtils.d.ts +9 -0
- package/dist/types/vault/VaultUtils.d.ts.map +1 -0
- package/dist/types/vault/index.d.ts +4 -0
- package/dist/types/vault/index.d.ts.map +1 -0
- package/package.json +13 -7
- package/dist/addresses.d.ts.map +0 -1
- package/dist/chain.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -533
- package/dist/math/MathLib.d.ts.map +0 -1
- package/dist/math/index.d.ts.map +0 -1
- package/dist/token/Token.d.ts.map +0 -1
- package/dist/token/index.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/vault/Vault.d.ts +0 -91
- package/dist/vault/Vault.d.ts.map +0 -1
- package/dist/vault/VaultUtils.d.ts.map +0 -1
- package/dist/vault/index.d.ts +0 -3
- package/dist/vault/index.d.ts.map +0 -1
- /package/dist/{addresses.d.ts → types/addresses.d.ts} +0 -0
- /package/dist/{chain.d.ts → types/chain.d.ts} +0 -0
- /package/dist/{math → types/math}/MathLib.d.ts +0 -0
- /package/dist/{math → types/math}/index.d.ts +0 -0
- /package/dist/{token → types/token}/index.d.ts +0 -0
- /package/dist/{types.d.ts → types/types.d.ts} +0 -0
|
@@ -0,0 +1,668 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
6
|
+
var __toCommonJS = (from) => {
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
16
|
+
__moduleCache.set(from, entry);
|
|
17
|
+
return entry;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/index.ts
|
|
30
|
+
var exports_src = {};
|
|
31
|
+
__export(exports_src, {
|
|
32
|
+
vaultAbi_v0_5_0: () => vaultAbi_v0_5_0,
|
|
33
|
+
vaultAbi_v0_4_0: () => vaultAbi_v0_4_0,
|
|
34
|
+
vaultAbi_v0_3_0: () => vaultAbi_v0_3_0,
|
|
35
|
+
vaultAbi_v0_2_0: () => vaultAbi_v0_2_0,
|
|
36
|
+
vaultAbi_v0_1_0: () => vaultAbi_v0_1_0,
|
|
37
|
+
tryCatch: () => tryCatch,
|
|
38
|
+
resolveVersion: () => resolveVersion,
|
|
39
|
+
isValidVersion: () => isValidVersion,
|
|
40
|
+
addresses: () => addresses,
|
|
41
|
+
Version: () => Version,
|
|
42
|
+
VaultUtils: () => VaultUtils,
|
|
43
|
+
Vault: () => Vault,
|
|
44
|
+
Token: () => Token,
|
|
45
|
+
State: () => State,
|
|
46
|
+
SettleData: () => SettleData,
|
|
47
|
+
NATIVE_ADDRESS: () => NATIVE_ADDRESS,
|
|
48
|
+
MathLib: () => MathLib,
|
|
49
|
+
LATEST_VERSION: () => LATEST_VERSION,
|
|
50
|
+
ChainUtils: () => ChainUtils,
|
|
51
|
+
ChainId: () => ChainId,
|
|
52
|
+
CacheMissError: () => CacheMissError
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(exports_src);
|
|
55
|
+
|
|
56
|
+
// src/constants/abis.ts
|
|
57
|
+
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: [] }];
|
|
58
|
+
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: [] }];
|
|
59
|
+
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: [] }];
|
|
60
|
+
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: [] }];
|
|
61
|
+
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: [] }];
|
|
62
|
+
|
|
63
|
+
// src/math/MathLib.ts
|
|
64
|
+
var MathLib;
|
|
65
|
+
((MathLib) => {
|
|
66
|
+
MathLib.WAD = 1000000000000000000n;
|
|
67
|
+
MathLib.RAY = 1000000000000000000000000000n;
|
|
68
|
+
MathLib.MAX_UINT_256 = maxUint(256);
|
|
69
|
+
MathLib.MAX_UINT_160 = maxUint(160);
|
|
70
|
+
MathLib.MAX_UINT_128 = maxUint(128);
|
|
71
|
+
MathLib.MAX_UINT_48 = maxUint(48);
|
|
72
|
+
function maxUint(nBits) {
|
|
73
|
+
if (nBits % 4 !== 0)
|
|
74
|
+
throw new Error(`Invalid number of bits: ${nBits}`);
|
|
75
|
+
return BigInt(`0x${"f".repeat(nBits / 4)}`);
|
|
76
|
+
}
|
|
77
|
+
MathLib.maxUint = maxUint;
|
|
78
|
+
function abs(a) {
|
|
79
|
+
a = BigInt(a);
|
|
80
|
+
return a >= 0 ? a : -a;
|
|
81
|
+
}
|
|
82
|
+
MathLib.abs = abs;
|
|
83
|
+
function min(...xs) {
|
|
84
|
+
return xs.map(BigInt).reduce((x, y) => x <= y ? x : y);
|
|
85
|
+
}
|
|
86
|
+
MathLib.min = min;
|
|
87
|
+
function max(...xs) {
|
|
88
|
+
return xs.map(BigInt).reduce((x, y) => x <= y ? y : x);
|
|
89
|
+
}
|
|
90
|
+
MathLib.max = max;
|
|
91
|
+
function zeroFloorSub(x, y) {
|
|
92
|
+
x = BigInt(x);
|
|
93
|
+
y = BigInt(y);
|
|
94
|
+
return x <= y ? 0n : x - y;
|
|
95
|
+
}
|
|
96
|
+
MathLib.zeroFloorSub = zeroFloorSub;
|
|
97
|
+
function wMulDown(x, y) {
|
|
98
|
+
return MathLib.wMul(x, y, "Down");
|
|
99
|
+
}
|
|
100
|
+
MathLib.wMulDown = wMulDown;
|
|
101
|
+
function wMulUp(x, y) {
|
|
102
|
+
return MathLib.wMul(x, y, "Up");
|
|
103
|
+
}
|
|
104
|
+
MathLib.wMulUp = wMulUp;
|
|
105
|
+
function wMul(x, y, rounding) {
|
|
106
|
+
return MathLib.mulDiv(x, y, MathLib.WAD, rounding);
|
|
107
|
+
}
|
|
108
|
+
MathLib.wMul = wMul;
|
|
109
|
+
function wDivDown(x, y) {
|
|
110
|
+
return MathLib.wDiv(x, y, "Down");
|
|
111
|
+
}
|
|
112
|
+
MathLib.wDivDown = wDivDown;
|
|
113
|
+
function wDivUp(x, y) {
|
|
114
|
+
return MathLib.wDiv(x, y, "Up");
|
|
115
|
+
}
|
|
116
|
+
MathLib.wDivUp = wDivUp;
|
|
117
|
+
function wDiv(x, y, rounding) {
|
|
118
|
+
return MathLib.mulDiv(x, MathLib.WAD, y, rounding);
|
|
119
|
+
}
|
|
120
|
+
MathLib.wDiv = wDiv;
|
|
121
|
+
function mulDivDown(x, y, denominator) {
|
|
122
|
+
x = BigInt(x);
|
|
123
|
+
y = BigInt(y);
|
|
124
|
+
denominator = BigInt(denominator);
|
|
125
|
+
if (denominator === 0n)
|
|
126
|
+
throw Error("MathLib: DIVISION_BY_ZERO");
|
|
127
|
+
return x * y / denominator;
|
|
128
|
+
}
|
|
129
|
+
MathLib.mulDivDown = mulDivDown;
|
|
130
|
+
function mulDivUp(x, y, denominator) {
|
|
131
|
+
x = BigInt(x);
|
|
132
|
+
y = BigInt(y);
|
|
133
|
+
denominator = BigInt(denominator);
|
|
134
|
+
if (denominator === 0n)
|
|
135
|
+
throw Error("MathLib: DIVISION_BY_ZERO");
|
|
136
|
+
const roundup = x * y % denominator > 0 ? 1n : 0n;
|
|
137
|
+
return x * y / denominator + roundup;
|
|
138
|
+
}
|
|
139
|
+
MathLib.mulDivUp = mulDivUp;
|
|
140
|
+
function mulDiv(x, y, denominator, rounding) {
|
|
141
|
+
return MathLib[`mulDiv${rounding}`](x, y, denominator);
|
|
142
|
+
}
|
|
143
|
+
MathLib.mulDiv = mulDiv;
|
|
144
|
+
function wTaylorCompounded(x, n) {
|
|
145
|
+
const firstTerm = BigInt(x) * BigInt(n);
|
|
146
|
+
const secondTerm = MathLib.mulDivDown(firstTerm, firstTerm, 2n * MathLib.WAD);
|
|
147
|
+
const thirdTerm = MathLib.mulDivDown(secondTerm, firstTerm, 3n * MathLib.WAD);
|
|
148
|
+
return firstTerm + secondTerm + thirdTerm;
|
|
149
|
+
}
|
|
150
|
+
MathLib.wTaylorCompounded = wTaylorCompounded;
|
|
151
|
+
function wToRay(x) {
|
|
152
|
+
return BigInt(x) * 1000000000n;
|
|
153
|
+
}
|
|
154
|
+
MathLib.wToRay = wToRay;
|
|
155
|
+
})(MathLib ||= {});
|
|
156
|
+
// src/token/Token.ts
|
|
157
|
+
class Token {
|
|
158
|
+
address;
|
|
159
|
+
name;
|
|
160
|
+
symbol;
|
|
161
|
+
decimals;
|
|
162
|
+
totalSupply;
|
|
163
|
+
price;
|
|
164
|
+
constructor({
|
|
165
|
+
address,
|
|
166
|
+
name,
|
|
167
|
+
symbol,
|
|
168
|
+
decimals = 0,
|
|
169
|
+
totalSupply,
|
|
170
|
+
price
|
|
171
|
+
}) {
|
|
172
|
+
this.address = address;
|
|
173
|
+
this.name = name;
|
|
174
|
+
this.symbol = symbol;
|
|
175
|
+
this.decimals = Number(decimals);
|
|
176
|
+
this.totalSupply = BigInt(totalSupply);
|
|
177
|
+
if (price != null)
|
|
178
|
+
this.price = BigInt(price);
|
|
179
|
+
}
|
|
180
|
+
fromUsd(amount, rounding = "Down") {
|
|
181
|
+
if (this.price == null)
|
|
182
|
+
return;
|
|
183
|
+
return MathLib.mulDiv(amount, 10n ** BigInt(this.decimals), this.price, rounding);
|
|
184
|
+
}
|
|
185
|
+
toUsd(amount, rounding = "Down") {
|
|
186
|
+
if (this.price == null)
|
|
187
|
+
return;
|
|
188
|
+
return MathLib.mulDiv(amount, this.price, 10n ** BigInt(this.decimals), rounding);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// src/vault/VaultUtils.ts
|
|
193
|
+
var VaultUtils;
|
|
194
|
+
((VaultUtils) => {
|
|
195
|
+
VaultUtils.VIRTUAL_ASSETS = 1n;
|
|
196
|
+
VaultUtils.ONE_SHARE = 10n ** 18n;
|
|
197
|
+
function decimalsOffset(decimals) {
|
|
198
|
+
return MathLib.zeroFloorSub(18n, decimals);
|
|
199
|
+
}
|
|
200
|
+
VaultUtils.decimalsOffset = decimalsOffset;
|
|
201
|
+
function convertToAssets(shares, {
|
|
202
|
+
totalAssets,
|
|
203
|
+
totalSupply,
|
|
204
|
+
decimalsOffset: decimalsOffset2
|
|
205
|
+
}, rounding = "Down") {
|
|
206
|
+
return MathLib.mulDiv(shares, BigInt(totalAssets) + VaultUtils.VIRTUAL_ASSETS, BigInt(totalSupply) + 10n ** BigInt(decimalsOffset2), rounding);
|
|
207
|
+
}
|
|
208
|
+
VaultUtils.convertToAssets = convertToAssets;
|
|
209
|
+
function convertToShares(assets, {
|
|
210
|
+
totalAssets,
|
|
211
|
+
totalSupply,
|
|
212
|
+
decimalsOffset: decimalsOffset2
|
|
213
|
+
}, rounding = "Up") {
|
|
214
|
+
return MathLib.mulDiv(assets, BigInt(totalSupply) + 10n ** BigInt(decimalsOffset2), BigInt(totalAssets) + VaultUtils.VIRTUAL_ASSETS, rounding);
|
|
215
|
+
}
|
|
216
|
+
VaultUtils.convertToShares = convertToShares;
|
|
217
|
+
function calculateShareValue(pricePerShare, {
|
|
218
|
+
totalSupply,
|
|
219
|
+
decimals
|
|
220
|
+
}, rounding = "Down") {
|
|
221
|
+
return MathLib.mulDiv(pricePerShare, totalSupply, 10n ** BigInt(decimals), rounding);
|
|
222
|
+
}
|
|
223
|
+
VaultUtils.calculateShareValue = calculateShareValue;
|
|
224
|
+
function calculateAssetsToUnwind(sharesToRedeem, assetsPendingDeposit, safeAssetBalance, vault) {
|
|
225
|
+
const assetsToRedeem = convertToAssets(sharesToRedeem, vault);
|
|
226
|
+
return MathLib.zeroFloorSub(assetsToRedeem, BigInt(safeAssetBalance) + BigInt(assetsPendingDeposit));
|
|
227
|
+
}
|
|
228
|
+
VaultUtils.calculateAssetsToUnwind = calculateAssetsToUnwind;
|
|
229
|
+
})(VaultUtils ||= {});
|
|
230
|
+
|
|
231
|
+
// src/vault/Vault.ts
|
|
232
|
+
var Version;
|
|
233
|
+
((Version2) => {
|
|
234
|
+
Version2["v0_5_0"] = "v0.5.0";
|
|
235
|
+
Version2["v0_4_0"] = "v0.4.0";
|
|
236
|
+
Version2["v0_3_0"] = "v0.3.0";
|
|
237
|
+
Version2["v0_2_0"] = "v0.2.0";
|
|
238
|
+
Version2["v0_1_0"] = "v0.1.0";
|
|
239
|
+
})(Version ||= {});
|
|
240
|
+
var LATEST_VERSION = "v0.5.0" /* v0_5_0 */;
|
|
241
|
+
function resolveVersion(version) {
|
|
242
|
+
return version === "latest" ? LATEST_VERSION : version;
|
|
243
|
+
}
|
|
244
|
+
function isValidVersion(version) {
|
|
245
|
+
switch (version) {
|
|
246
|
+
case "v0.5.0" /* v0_5_0 */:
|
|
247
|
+
case "v0.4.0" /* v0_4_0 */:
|
|
248
|
+
case "v0.3.0" /* v0_3_0 */:
|
|
249
|
+
case "v0.2.0" /* v0_2_0 */:
|
|
250
|
+
case "v0.1.0" /* v0_1_0 */:
|
|
251
|
+
return true;
|
|
252
|
+
default:
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
var State;
|
|
257
|
+
((State2) => {
|
|
258
|
+
State2[State2["Open"] = 0] = "Open";
|
|
259
|
+
State2[State2["Closing"] = 1] = "Closing";
|
|
260
|
+
State2[State2["Closed"] = 2] = "Closed";
|
|
261
|
+
})(State ||= {});
|
|
262
|
+
|
|
263
|
+
class Vault extends Token {
|
|
264
|
+
asset;
|
|
265
|
+
underlyingDecimals;
|
|
266
|
+
totalAssets;
|
|
267
|
+
newTotalAssets;
|
|
268
|
+
depositEpochId;
|
|
269
|
+
depositSettleId;
|
|
270
|
+
lastDepositEpochIdSettled;
|
|
271
|
+
redeemEpochId;
|
|
272
|
+
redeemSettleId;
|
|
273
|
+
lastRedeemEpochIdSettled;
|
|
274
|
+
pendingSilo;
|
|
275
|
+
wrappedNativeToken;
|
|
276
|
+
decimalsOffset;
|
|
277
|
+
totalAssetsExpiration;
|
|
278
|
+
totalAssetsLifespan;
|
|
279
|
+
feeRegistry;
|
|
280
|
+
newRatesTimestamp;
|
|
281
|
+
lastFeeTime;
|
|
282
|
+
highWaterMark;
|
|
283
|
+
cooldown;
|
|
284
|
+
feeRates;
|
|
285
|
+
owner;
|
|
286
|
+
pendingOwner;
|
|
287
|
+
whitelistManager;
|
|
288
|
+
feeReceiver;
|
|
289
|
+
safe;
|
|
290
|
+
valuationManager;
|
|
291
|
+
state;
|
|
292
|
+
isWhitelistActivated;
|
|
293
|
+
version;
|
|
294
|
+
constructor({
|
|
295
|
+
asset,
|
|
296
|
+
underlyingDecimals,
|
|
297
|
+
totalAssets,
|
|
298
|
+
newTotalAssets,
|
|
299
|
+
depositEpochId,
|
|
300
|
+
depositSettleId,
|
|
301
|
+
lastDepositEpochIdSettled,
|
|
302
|
+
redeemEpochId,
|
|
303
|
+
redeemSettleId,
|
|
304
|
+
lastRedeemEpochIdSettled,
|
|
305
|
+
pendingSilo,
|
|
306
|
+
wrappedNativeToken,
|
|
307
|
+
decimalsOffset,
|
|
308
|
+
totalAssetsExpiration,
|
|
309
|
+
totalAssetsLifespan,
|
|
310
|
+
feeRegistry,
|
|
311
|
+
newRatesTimestamp,
|
|
312
|
+
lastFeeTime,
|
|
313
|
+
highWaterMark,
|
|
314
|
+
cooldown,
|
|
315
|
+
feeRates,
|
|
316
|
+
owner,
|
|
317
|
+
pendingOwner,
|
|
318
|
+
whitelistManager,
|
|
319
|
+
feeReceiver,
|
|
320
|
+
safe,
|
|
321
|
+
valuationManager,
|
|
322
|
+
state,
|
|
323
|
+
isWhitelistActivated,
|
|
324
|
+
version,
|
|
325
|
+
...config
|
|
326
|
+
}) {
|
|
327
|
+
super({ ...config, decimals: 18 });
|
|
328
|
+
this.asset = asset;
|
|
329
|
+
this.underlyingDecimals = underlyingDecimals;
|
|
330
|
+
this.totalAssets = totalAssets;
|
|
331
|
+
this.newTotalAssets = newTotalAssets;
|
|
332
|
+
this.depositEpochId = depositEpochId;
|
|
333
|
+
this.depositSettleId = depositSettleId;
|
|
334
|
+
this.lastDepositEpochIdSettled = lastDepositEpochIdSettled;
|
|
335
|
+
this.redeemEpochId = redeemEpochId;
|
|
336
|
+
this.redeemSettleId = redeemSettleId;
|
|
337
|
+
this.lastRedeemEpochIdSettled = lastRedeemEpochIdSettled;
|
|
338
|
+
this.pendingSilo = pendingSilo;
|
|
339
|
+
this.wrappedNativeToken = wrappedNativeToken;
|
|
340
|
+
this.decimalsOffset = decimalsOffset;
|
|
341
|
+
this.totalAssetsExpiration = totalAssetsExpiration;
|
|
342
|
+
this.totalAssetsLifespan = totalAssetsLifespan;
|
|
343
|
+
this.feeRegistry = feeRegistry;
|
|
344
|
+
this.newRatesTimestamp = newRatesTimestamp;
|
|
345
|
+
this.lastFeeTime = lastFeeTime;
|
|
346
|
+
this.highWaterMark = highWaterMark;
|
|
347
|
+
this.cooldown = cooldown;
|
|
348
|
+
this.feeRates = feeRates;
|
|
349
|
+
this.owner = owner;
|
|
350
|
+
this.pendingOwner = pendingOwner;
|
|
351
|
+
this.whitelistManager = whitelistManager;
|
|
352
|
+
this.feeReceiver = feeReceiver;
|
|
353
|
+
this.safe = safe;
|
|
354
|
+
this.valuationManager = valuationManager;
|
|
355
|
+
this.state = state;
|
|
356
|
+
this.isWhitelistActivated = isWhitelistActivated;
|
|
357
|
+
this.version = version;
|
|
358
|
+
}
|
|
359
|
+
convertToAssets(shares, rounding) {
|
|
360
|
+
return VaultUtils.convertToAssets(shares, this, rounding);
|
|
361
|
+
}
|
|
362
|
+
convertToShares(assets, rounding) {
|
|
363
|
+
return VaultUtils.convertToShares(assets, this, rounding);
|
|
364
|
+
}
|
|
365
|
+
calculateTotalAssetsAtHWM() {
|
|
366
|
+
return VaultUtils.calculateShareValue(this.highWaterMark, this);
|
|
367
|
+
}
|
|
368
|
+
calculateAssetsToUnwind(sharesToRedeem, assetsPendingDeposit, safeAssetBalance) {
|
|
369
|
+
return VaultUtils.calculateAssetsToUnwind(sharesToRedeem, assetsPendingDeposit, safeAssetBalance, this);
|
|
370
|
+
}
|
|
371
|
+
getAbi() {
|
|
372
|
+
switch (this.version) {
|
|
373
|
+
case "v0.5.0" /* v0_5_0 */:
|
|
374
|
+
return vaultAbi_v0_5_0;
|
|
375
|
+
case "v0.4.0" /* v0_4_0 */:
|
|
376
|
+
return vaultAbi_v0_4_0;
|
|
377
|
+
case "v0.3.0" /* v0_3_0 */:
|
|
378
|
+
return vaultAbi_v0_3_0;
|
|
379
|
+
case "v0.2.0" /* v0_2_0 */:
|
|
380
|
+
return vaultAbi_v0_2_0;
|
|
381
|
+
case "v0.1.0" /* v0_1_0 */:
|
|
382
|
+
return vaultAbi_v0_2_0;
|
|
383
|
+
}
|
|
384
|
+
throw new Error("Unknown version");
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
// src/vault/SettleData.ts
|
|
388
|
+
class SettleData {
|
|
389
|
+
static _CACHE = {};
|
|
390
|
+
static get(settleId) {
|
|
391
|
+
const settleData = SettleData._CACHE[settleId];
|
|
392
|
+
if (!settleData)
|
|
393
|
+
throw new CacheMissError(`unknown settleData id ${settleId}`);
|
|
394
|
+
return settleData;
|
|
395
|
+
}
|
|
396
|
+
settleId;
|
|
397
|
+
totalSupply;
|
|
398
|
+
totalAssets;
|
|
399
|
+
pendingAssets;
|
|
400
|
+
pendingShares;
|
|
401
|
+
constructor({
|
|
402
|
+
settleId,
|
|
403
|
+
totalSupply,
|
|
404
|
+
totalAssets,
|
|
405
|
+
pendingAssets,
|
|
406
|
+
pendingShares
|
|
407
|
+
}) {
|
|
408
|
+
this.settleId = settleId;
|
|
409
|
+
this.totalSupply = BigInt(totalSupply);
|
|
410
|
+
this.totalAssets = BigInt(totalAssets);
|
|
411
|
+
this.pendingAssets = BigInt(pendingAssets);
|
|
412
|
+
this.pendingShares = BigInt(pendingShares);
|
|
413
|
+
SettleData._CACHE[this.settleId] = this;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
class CacheMissError extends Error {
|
|
418
|
+
msg;
|
|
419
|
+
constructor(msg) {
|
|
420
|
+
super(`CACHE MISS: ${msg}`);
|
|
421
|
+
this.msg = msg;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// src/chain.ts
|
|
425
|
+
var ChainId;
|
|
426
|
+
((ChainId2) => {
|
|
427
|
+
ChainId2[ChainId2["EthMainnet"] = 1] = "EthMainnet";
|
|
428
|
+
ChainId2[ChainId2["BaseMainnet"] = 8453] = "BaseMainnet";
|
|
429
|
+
ChainId2[ChainId2["PolygonMainnet"] = 137] = "PolygonMainnet";
|
|
430
|
+
ChainId2[ChainId2["ArbitrumMainnet"] = 42161] = "ArbitrumMainnet";
|
|
431
|
+
ChainId2[ChainId2["OptimismMainnet"] = 10] = "OptimismMainnet";
|
|
432
|
+
ChainId2[ChainId2["WorldChainMainnet"] = 480] = "WorldChainMainnet";
|
|
433
|
+
ChainId2[ChainId2["FraxtalMainnet"] = 252] = "FraxtalMainnet";
|
|
434
|
+
ChainId2[ChainId2["ScrollMainnet"] = 534352] = "ScrollMainnet";
|
|
435
|
+
ChainId2[ChainId2["InkMainnet"] = 57073] = "InkMainnet";
|
|
436
|
+
ChainId2[ChainId2["UnichainMainnet"] = 130] = "UnichainMainnet";
|
|
437
|
+
ChainId2[ChainId2["SonicMainnet"] = 146] = "SonicMainnet";
|
|
438
|
+
ChainId2[ChainId2["HemiMainnet"] = 43111] = "HemiMainnet";
|
|
439
|
+
ChainId2[ChainId2["ModeMainnet"] = 34443] = "ModeMainnet";
|
|
440
|
+
ChainId2[ChainId2["CornMainnet"] = 21000000] = "CornMainnet";
|
|
441
|
+
ChainId2[ChainId2["PlumeMainnet"] = 98866] = "PlumeMainnet";
|
|
442
|
+
ChainId2[ChainId2["CampMainnet"] = 123420001114] = "CampMainnet";
|
|
443
|
+
ChainId2[ChainId2["BerachainMainnet"] = 80094] = "BerachainMainnet";
|
|
444
|
+
ChainId2[ChainId2["MantleMainnet"] = 5000] = "MantleMainnet";
|
|
445
|
+
ChainId2[ChainId2["AvalancheMainnet"] = 43114] = "AvalancheMainnet";
|
|
446
|
+
})(ChainId ||= {});
|
|
447
|
+
var ChainUtils;
|
|
448
|
+
((ChainUtils) => {
|
|
449
|
+
ChainUtils.toHexChainId = (chainId) => {
|
|
450
|
+
return `0x${chainId.toString(16)}`;
|
|
451
|
+
};
|
|
452
|
+
ChainUtils.getExplorerUrl = (chainId) => {
|
|
453
|
+
return ChainUtils.CHAIN_METADATA[chainId].explorerUrl;
|
|
454
|
+
};
|
|
455
|
+
ChainUtils.getExplorerAddressUrl = (chainId, address) => {
|
|
456
|
+
return `${ChainUtils.getExplorerUrl(chainId)}/address/${address}`;
|
|
457
|
+
};
|
|
458
|
+
ChainUtils.getExplorerTransactionUrl = (chainId, tx) => {
|
|
459
|
+
return `${ChainUtils.getExplorerUrl(chainId)}/tx/${tx}`;
|
|
460
|
+
};
|
|
461
|
+
ChainUtils.CHAIN_METADATA = {
|
|
462
|
+
[1 /* EthMainnet */]: {
|
|
463
|
+
name: "Ethereum",
|
|
464
|
+
id: 1 /* EthMainnet */,
|
|
465
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
466
|
+
explorerUrl: "https://etherscan.io",
|
|
467
|
+
identifier: "mainnet"
|
|
468
|
+
},
|
|
469
|
+
[8453 /* BaseMainnet */]: {
|
|
470
|
+
name: "Base",
|
|
471
|
+
id: 8453 /* BaseMainnet */,
|
|
472
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
473
|
+
explorerUrl: "https://basescan.org",
|
|
474
|
+
identifier: "base"
|
|
475
|
+
},
|
|
476
|
+
[137 /* PolygonMainnet */]: {
|
|
477
|
+
name: "Polygon",
|
|
478
|
+
id: 137 /* PolygonMainnet */,
|
|
479
|
+
nativeCurrency: { name: "Polygon", symbol: "POL", decimals: 18 },
|
|
480
|
+
explorerUrl: "https://polygonscan.com",
|
|
481
|
+
identifier: "polygon"
|
|
482
|
+
},
|
|
483
|
+
[42161 /* ArbitrumMainnet */]: {
|
|
484
|
+
name: "Arbitrum One",
|
|
485
|
+
id: 42161 /* ArbitrumMainnet */,
|
|
486
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
487
|
+
explorerUrl: "https://arbiscan.io",
|
|
488
|
+
identifier: "arbitrum"
|
|
489
|
+
},
|
|
490
|
+
[10 /* OptimismMainnet */]: {
|
|
491
|
+
name: "OP Mainnet",
|
|
492
|
+
id: 10 /* OptimismMainnet */,
|
|
493
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
494
|
+
explorerUrl: "https://optimistic.etherscan.io",
|
|
495
|
+
identifier: "optimism"
|
|
496
|
+
},
|
|
497
|
+
[480 /* WorldChainMainnet */]: {
|
|
498
|
+
name: "World Chain",
|
|
499
|
+
id: 480 /* WorldChainMainnet */,
|
|
500
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
501
|
+
explorerUrl: "https://worldscan.org",
|
|
502
|
+
identifier: "worldchain"
|
|
503
|
+
},
|
|
504
|
+
[252 /* FraxtalMainnet */]: {
|
|
505
|
+
name: "Fraxtal",
|
|
506
|
+
id: 252 /* FraxtalMainnet */,
|
|
507
|
+
nativeCurrency: { name: "Frax Ether", symbol: "frxETH", decimals: 18 },
|
|
508
|
+
explorerUrl: "https://fraxscan.com",
|
|
509
|
+
identifier: "fraxtal"
|
|
510
|
+
},
|
|
511
|
+
[534352 /* ScrollMainnet */]: {
|
|
512
|
+
name: "Scroll",
|
|
513
|
+
id: 534352 /* ScrollMainnet */,
|
|
514
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
515
|
+
explorerUrl: "https://scrollscan.com",
|
|
516
|
+
identifier: "scroll"
|
|
517
|
+
},
|
|
518
|
+
[57073 /* InkMainnet */]: {
|
|
519
|
+
name: "Ink",
|
|
520
|
+
id: 57073 /* InkMainnet */,
|
|
521
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
522
|
+
explorerUrl: "https://explorer.inkonchain.com",
|
|
523
|
+
identifier: "ink"
|
|
524
|
+
},
|
|
525
|
+
[130 /* UnichainMainnet */]: {
|
|
526
|
+
name: "Unichain",
|
|
527
|
+
id: 130 /* UnichainMainnet */,
|
|
528
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
529
|
+
explorerUrl: "https://uniscan.xyz",
|
|
530
|
+
identifier: "unichain"
|
|
531
|
+
},
|
|
532
|
+
[146 /* SonicMainnet */]: {
|
|
533
|
+
name: "Sonic",
|
|
534
|
+
id: 146 /* SonicMainnet */,
|
|
535
|
+
nativeCurrency: { name: "Sonic", symbol: "S", decimals: 18 },
|
|
536
|
+
explorerUrl: "https://sonicscan.org",
|
|
537
|
+
identifier: "sonic"
|
|
538
|
+
},
|
|
539
|
+
[43111 /* HemiMainnet */]: {
|
|
540
|
+
name: "Hemi",
|
|
541
|
+
id: 43111 /* HemiMainnet */,
|
|
542
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
543
|
+
explorerUrl: "https://explorer.hemi.xyz",
|
|
544
|
+
identifier: "hemi"
|
|
545
|
+
},
|
|
546
|
+
[34443 /* ModeMainnet */]: {
|
|
547
|
+
name: "Mode",
|
|
548
|
+
id: 34443 /* ModeMainnet */,
|
|
549
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
550
|
+
explorerUrl: "https://modescan.io",
|
|
551
|
+
identifier: "mode"
|
|
552
|
+
},
|
|
553
|
+
[21000000 /* CornMainnet */]: {
|
|
554
|
+
name: "Corn",
|
|
555
|
+
id: 21000000 /* CornMainnet */,
|
|
556
|
+
nativeCurrency: { name: "Bitcoin", symbol: "BTCN", decimals: 18 },
|
|
557
|
+
explorerUrl: "https://cornscan.io",
|
|
558
|
+
identifier: "corn"
|
|
559
|
+
},
|
|
560
|
+
[98866 /* PlumeMainnet */]: {
|
|
561
|
+
name: "Plume",
|
|
562
|
+
id: 98866 /* PlumeMainnet */,
|
|
563
|
+
nativeCurrency: { name: "Plume", symbol: "PLUME", decimals: 18 },
|
|
564
|
+
explorerUrl: "https://phoenix-explorer.plumenetwork.xyz",
|
|
565
|
+
identifier: "plume"
|
|
566
|
+
},
|
|
567
|
+
[123420001114 /* CampMainnet */]: {
|
|
568
|
+
name: "Camp",
|
|
569
|
+
id: 123420001114 /* CampMainnet */,
|
|
570
|
+
nativeCurrency: { name: "Camp", symbol: "CAMP", decimals: 18 },
|
|
571
|
+
explorerUrl: "https://basecamp.cloud.blockscout.com/",
|
|
572
|
+
identifier: "camp"
|
|
573
|
+
},
|
|
574
|
+
[80094 /* BerachainMainnet */]: {
|
|
575
|
+
name: "Berachain",
|
|
576
|
+
id: 80094 /* BerachainMainnet */,
|
|
577
|
+
nativeCurrency: { name: "Bera", symbol: "BERA", decimals: 18 },
|
|
578
|
+
explorerUrl: "https://berascan.com/",
|
|
579
|
+
identifier: "berachain"
|
|
580
|
+
},
|
|
581
|
+
[5000 /* MantleMainnet */]: {
|
|
582
|
+
name: "Mantle",
|
|
583
|
+
id: 5000 /* MantleMainnet */,
|
|
584
|
+
nativeCurrency: { name: "Mantle", symbol: "MNT", decimals: 18 },
|
|
585
|
+
explorerUrl: "https://mantlescan.xyz/",
|
|
586
|
+
identifier: "mantle"
|
|
587
|
+
},
|
|
588
|
+
[43114 /* AvalancheMainnet */]: {
|
|
589
|
+
name: "Avalanche",
|
|
590
|
+
id: 43114 /* AvalancheMainnet */,
|
|
591
|
+
nativeCurrency: { name: "Avalanche", symbol: "AVAX", decimals: 18 },
|
|
592
|
+
explorerUrl: "https://snowtrace.io",
|
|
593
|
+
identifier: "avalanche"
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
})(ChainUtils ||= {});
|
|
597
|
+
|
|
598
|
+
// src/addresses.ts
|
|
599
|
+
var NATIVE_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
600
|
+
var addresses = {
|
|
601
|
+
[1 /* EthMainnet */]: {
|
|
602
|
+
beaconProxyFactory: "0x09C8803f7Dc251f9FaAE5f56E3B91f8A6d0b70ee",
|
|
603
|
+
feeRegistry: "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
|
|
604
|
+
v0_5_0: "0xe50554ec802375c9c3f9c087a8a7bb8c26d3dedf",
|
|
605
|
+
wrappedNative: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
|
|
606
|
+
},
|
|
607
|
+
[42161 /* ArbitrumMainnet */]: {
|
|
608
|
+
beaconProxyFactory: "0x58a7729125acA9e5E9C687018E66bfDd5b2D4490",
|
|
609
|
+
feeRegistry: "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
|
|
610
|
+
v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
|
|
611
|
+
wrappedNative: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 ",
|
|
612
|
+
dev: {
|
|
613
|
+
beaconProxyFactory: "0x29f3dba953C57814A5579e08462724B9C760333e",
|
|
614
|
+
feeRegistry: "0x45BA44B8899D39abdc383a25bB17fcD18240c6Bc"
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
[8453 /* BaseMainnet */]: {
|
|
618
|
+
beaconProxyFactory: "0xC953Fd298FdfA8Ed0D38ee73772D3e21Bf19c61b",
|
|
619
|
+
feeRegistry: "0x6dA4D1859bA1d02D095D2246142CdAd52233e27C",
|
|
620
|
+
v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
|
|
621
|
+
wrappedNative: "0x4200000000000000000000000000000000000006"
|
|
622
|
+
},
|
|
623
|
+
[130 /* UnichainMainnet */]: {
|
|
624
|
+
beaconProxyFactory: "0xaba1A2e157Dae248f8630cA550bd826725Ff745c",
|
|
625
|
+
feeRegistry: "0x652716FaD571f04D26a3c8fFd9E593F17123Ab20",
|
|
626
|
+
v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
|
|
627
|
+
wrappedNative: "0x4200000000000000000000000000000000000006"
|
|
628
|
+
},
|
|
629
|
+
[80094 /* BerachainMainnet */]: {
|
|
630
|
+
beaconProxyFactory: "0x7cf8cf276450bd568187fdc0b0959d30ec599853",
|
|
631
|
+
feeRegistry: "0xaba1A2e157Dae248f8630cA550bd826725Ff745c",
|
|
632
|
+
v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
|
|
633
|
+
wrappedNative: "0x6969696969696969696969696969696969696969"
|
|
634
|
+
},
|
|
635
|
+
[146 /* SonicMainnet */]: {
|
|
636
|
+
beaconProxyFactory: "0x99CD0b8b32B15922f0754Fddc21323b5278c5261",
|
|
637
|
+
feeRegistry: "0xab4aC28D10a4Bc279aD073B1D74Bfa0E385C010C",
|
|
638
|
+
v0_5_0: "0xE50554ec802375C9c3F9c087a8a7bb8C26d3DEDf",
|
|
639
|
+
wrappedNative: "0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38"
|
|
640
|
+
},
|
|
641
|
+
[5000 /* MantleMainnet */]: {
|
|
642
|
+
beaconProxyFactory: "0x57D969B556C6AebB3Ac8f54c98CF3a3f921d5659",
|
|
643
|
+
feeRegistry: "0x47A144e67834408716cB40Fa87fc886D63362ddC",
|
|
644
|
+
v0_4_0: "0xA7260Cee56B679eC05a736A7b603b8DA8525Dd69",
|
|
645
|
+
wrappedNative: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8"
|
|
646
|
+
},
|
|
647
|
+
[480 /* WorldChainMainnet */]: {
|
|
648
|
+
beaconProxyFactory: "0x600fA26581771F56221FC9847A834B3E5fd34AF7",
|
|
649
|
+
feeRegistry: "0x68e793658def657551fd4D3cA6Bc04b4E7723655",
|
|
650
|
+
v0_5_0: "0x1D42DbDde553F4099691A25F712bbd8f2686E355 ",
|
|
651
|
+
wrappedNative: "0x4200000000000000000000000000000000000006"
|
|
652
|
+
},
|
|
653
|
+
[43114 /* AvalancheMainnet */]: {
|
|
654
|
+
beaconProxyFactory: "0x5e231c6d030a5c0f51fa7d0f891d3f50a928c685",
|
|
655
|
+
feeRegistry: "0xD7F69ba99c6981Eab5579Aa16871Ae94c509d578",
|
|
656
|
+
v0_5_0: "0x33F65C8D025b5418C7f8dd248C2Ec1d31881D465",
|
|
657
|
+
wrappedNative: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
// src/utils.ts
|
|
661
|
+
async function tryCatch(promise) {
|
|
662
|
+
try {
|
|
663
|
+
const data = await promise;
|
|
664
|
+
return { data, error: null };
|
|
665
|
+
} catch (error) {
|
|
666
|
+
return { data: null, error };
|
|
667
|
+
}
|
|
668
|
+
}
|