@byzantine/vault-sdk
Version:
Byzantine Vault SDK for creating and managing vaults on Ethereum for restaking strategies
906 lines (905 loc) • 28.4 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ERC20_VAULT_ABI = void 0;
exports.ERC20_VAULT_ABI = [
{
type: "constructor",
inputs: [
{
name: "_eigenRewards",
type: "address",
internalType: "contract IEigenRewards",
},
],
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: "canDeposit",
inputs: [{ name: "addr", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "completeUndelegation",
inputs: [],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "completeWithdrawal",
inputs: [{ name: "requestId", type: "bytes32", internalType: "bytes32" }],
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: "convertToShares",
inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "curatorFee",
inputs: [],
outputs: [{ name: "", type: "uint16", internalType: "uint16" }],
stateMutability: "view",
},
{
type: "function",
name: "decimals",
inputs: [],
outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
stateMutability: "view",
},
{
type: "function",
name: "delegateTo",
inputs: [
{ name: "operator", type: "address", internalType: "address" },
{
name: "approverSignatureAndExpiry",
type: "tuple",
internalType: "struct ISignatureUtilsMixinTypes.SignatureWithExpiry",
components: [
{ name: "signature", type: "bytes", internalType: "bytes" },
{ name: "expiry", type: "uint256", internalType: "uint256" },
],
},
{ name: "approverSalt", type: "bytes32", internalType: "bytes32" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "delegatedTo",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "deposit",
inputs: [
{ name: "assets", type: "uint256", internalType: "uint256" },
{ name: "receiver", type: "address", internalType: "address" },
],
outputs: [{ name: "shares", type: "uint256", internalType: "uint256" }],
stateMutability: "nonpayable",
},
{
type: "function",
name: "depositLimit",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "eigenRewards",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "contract IEigenRewards",
},
],
stateMutability: "view",
},
{
type: "function",
name: "eigenStrategy",
inputs: [],
outputs: [
{ name: "", type: "address", internalType: "contract IStrategy" },
],
stateMutability: "view",
},
{
type: "function",
name: "getDepositedEigenShares",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "getQueuedWithdrawalRequests",
inputs: [{ name: "staker", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "bytes32[]", internalType: "bytes32[]" }],
stateMutability: "view",
},
{
type: "function",
name: "getRoleAdmin",
inputs: [{ name: "role", type: "bytes32", internalType: "bytes32" }],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
stateMutability: "view",
},
{
type: "function",
name: "getWithdrawableEigenShares",
inputs: [],
outputs: [
{ name: "", type: "uint256", internalType: "uint256" },
{ name: "", type: "uint256", internalType: "uint256" },
],
stateMutability: "view",
},
{
type: "function",
name: "getWithdrawalRequest",
inputs: [{ name: "requestId", type: "bytes32", internalType: "bytes32" }],
outputs: [
{
name: "",
type: "tuple",
internalType: "struct BaseVaultLogicLib.WithdrawalRequest",
components: [
{
name: "receiver",
type: "address",
internalType: "address",
},
{ name: "owner", type: "address", internalType: "address" },
{ name: "assets", type: "uint256", internalType: "uint256" },
{ name: "shares", type: "uint256", internalType: "uint256" },
{
name: "requestTimestamp",
type: "uint256",
internalType: "uint256",
},
],
},
],
stateMutability: "view",
},
{
type: "function",
name: "grantRole",
inputs: [
{ name: "role", type: "bytes32", internalType: "bytes32" },
{ name: "account", type: "address", internalType: "address" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "hasRole",
inputs: [
{ name: "role", type: "bytes32", internalType: "bytes32" },
{ name: "account", type: "address", internalType: "address" },
],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "initialize",
inputs: [
{
name: "_byzVaultParams",
type: "tuple",
internalType: "struct IByzantineFactory.ByzVaultParams",
components: [
{
name: "token",
type: "address",
internalType: "contract IERC20",
},
{
name: "roleManager",
type: "address",
internalType: "address",
},
{
name: "versionManager",
type: "address",
internalType: "address",
},
{
name: "depositWhitelistManager",
type: "address",
internalType: "address",
},
{
name: "depositLimitManager",
type: "address",
internalType: "address",
},
{
name: "curatorFeeClaimer",
type: "address",
internalType: "address",
},
{
name: "curatorFeeClaimerRoleAdmin",
type: "address",
internalType: "address",
},
{
name: "depositLimit",
type: "uint256",
internalType: "uint256",
},
{
name: "curatorFee",
type: "uint16",
internalType: "uint16",
},
{
name: "isDepositLimit",
type: "bool",
internalType: "bool",
},
{
name: "isPrivateVault",
type: "bool",
internalType: "bool",
},
{ name: "isTokenized", type: "bool", internalType: "bool" },
{ name: "name", type: "string", internalType: "string" },
{ name: "symbol", type: "string", internalType: "string" },
{
name: "metadataURI",
type: "string",
internalType: "string",
},
],
},
{
name: "_eigenParams",
type: "tuple",
internalType: "struct IByzantineFactory.EigenParams",
components: [
{
name: "delegationSetRoleHolder",
type: "address",
internalType: "address",
},
{
name: "operator",
type: "address",
internalType: "address",
},
{
name: "approverSignatureAndExpiry",
type: "tuple",
internalType: "struct ISignatureUtilsMixinTypes.SignatureWithExpiry",
components: [
{
name: "signature",
type: "bytes",
internalType: "bytes",
},
{
name: "expiry",
type: "uint256",
internalType: "uint256",
},
],
},
{
name: "approverSalt",
type: "bytes32",
internalType: "bytes32",
},
],
},
{
name: "_strategy",
type: "address",
internalType: "contract IStrategy",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "isDepositLimit",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isPrivateVault",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isTokenized",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "maxRedeem",
inputs: [{ name: "owner", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "maxWithdraw",
inputs: [{ name: "owner", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "name",
inputs: [],
outputs: [{ name: "", type: "string", internalType: "string" }],
stateMutability: "view",
},
{
type: "function",
name: "previewDeposit",
inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "previewRedeem",
inputs: [{ name: "shares", type: "uint256", internalType: "uint256" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "previewWithdraw",
inputs: [{ name: "assets", type: "uint256", internalType: "uint256" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "redeem",
inputs: [
{ name: "shares", type: "uint256", internalType: "uint256" },
{ name: "receiver", type: "address", internalType: "address" },
{ name: "owner", type: "address", internalType: "address" },
],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "nonpayable",
},
{
type: "function",
name: "redelegate",
inputs: [
{ name: "newOperator", type: "address", internalType: "address" },
{
name: "newOperatorApproverSig",
type: "tuple",
internalType: "struct ISignatureUtilsMixinTypes.SignatureWithExpiry",
components: [
{ name: "signature", type: "bytes", internalType: "bytes" },
{ name: "expiry", type: "uint256", internalType: "uint256" },
],
},
{ name: "approverSalt", type: "bytes32", internalType: "bytes32" },
],
outputs: [
{
name: "withdrawalRoot",
type: "bytes32",
internalType: "bytes32",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "renounceRole",
inputs: [{ name: "role", type: "bytes32", internalType: "bytes32" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "restakeIdleTokens",
inputs: [],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "revokeRole",
inputs: [
{ name: "role", type: "bytes32", internalType: "bytes32" },
{ name: "account", type: "address", internalType: "address" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setCanDeposit",
inputs: [
{
name: "_stakers",
type: "address[]",
internalType: "address[]",
},
{ name: "_canDeposit", type: "bool", internalType: "bool" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setCuratorFee",
inputs: [{ name: "_curatorFee", type: "uint16", internalType: "uint16" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setDepositLimit",
inputs: [
{
name: "_depositLimit",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setIsDepositLimit",
inputs: [{ name: "_isDepositLimit", type: "bool", internalType: "bool" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setIsPrivateVault",
inputs: [{ name: "_isPrivateVault", type: "bool", internalType: "bool" }],
outputs: [],
stateMutability: "nonpayable",
},
{
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: "totalPendingWithdrawals",
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: "undelegate",
inputs: [],
outputs: [
{
name: "withdrawalRoot",
type: "bytes32",
internalType: "bytes32",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "updateMetadataURI",
inputs: [{ name: "metadataURI", type: "string", internalType: "string" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "withdraw",
inputs: [
{ name: "assets", type: "uint256", internalType: "uint256" },
{ name: "receiver", type: "address", internalType: "address" },
{ name: "owner", type: "address", internalType: "address" },
],
outputs: [{ name: "", 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: "Initialized",
inputs: [
{
name: "version",
type: "uint64",
indexed: false,
internalType: "uint64",
},
],
anonymous: false,
},
{
type: "event",
name: "RoleAdminChanged",
inputs: [
{
name: "role",
type: "bytes32",
indexed: true,
internalType: "bytes32",
},
{
name: "newAdminRole",
type: "bytes32",
indexed: true,
internalType: "bytes32",
},
],
anonymous: false,
},
{
type: "event",
name: "RoleHolderStatusChanged",
inputs: [
{
name: "role",
type: "bytes32",
indexed: true,
internalType: "bytes32",
},
{
name: "account",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "sender",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "hasRole",
type: "bool",
indexed: false,
internalType: "bool",
},
],
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: "VaultDepositLimitStatusChanged",
inputs: [
{
name: "isDepositLimit",
type: "bool",
indexed: false,
internalType: "bool",
},
],
anonymous: false,
},
{
type: "event",
name: "VaultMetadataURIUpdated",
inputs: [
{
name: "metadataURI",
type: "string",
indexed: false,
internalType: "string",
},
],
anonymous: false,
},
{
type: "event",
name: "VaultPrivateStatusChanged",
inputs: [
{
name: "isPrivateVault",
type: "bool",
indexed: false,
internalType: "bool",
},
],
anonymous: false,
},
{
type: "event",
name: "WithdrawalClaimed",
inputs: [
{
name: "receiver",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "owner",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "requestId",
type: "bytes32",
indexed: true,
internalType: "bytes32",
},
{
name: "assets",
type: "uint256",
indexed: false,
internalType: "uint256",
},
{
name: "shares",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "error",
name: "AccessControlUnauthorizedAccount",
inputs: [
{ name: "account", type: "address", internalType: "address" },
{ name: "neededRole", type: "bytes32", internalType: "bytes32" },
],
},
{
type: "error",
name: "CannotDeposit",
inputs: [{ name: "addr", type: "address", internalType: "address" }],
},
{
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: "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: "InsufficientBalance",
inputs: [
{ name: "balance", type: "uint256", internalType: "uint256" },
{ name: "requested", type: "uint256", internalType: "uint256" },
{ name: "owner", type: "address", internalType: "address" },
],
},
{ type: "error", name: "InvalidInitialization", inputs: [] },
{
type: "error",
name: "InvalidWithdrawalRequest",
inputs: [{ name: "requestId", type: "bytes32", internalType: "bytes32" }],
},
{ type: "error", name: "MissingRoles", inputs: [] },
{ type: "error", name: "NotInitializing", inputs: [] },
{ type: "error", name: "ReentrancyGuardReentrantCall", inputs: [] },
{
type: "error",
name: "SafeERC20FailedOperation",
inputs: [{ name: "token", type: "address", internalType: "address" }],
},
{
type: "error",
name: "WithdrawalNotClaimable",
inputs: [{ name: "requestId", type: "bytes32", internalType: "bytes32" }],
},
{ type: "error", name: "WithdrawalNotReadyToClaim", inputs: [] },
{ type: "error", name: "WithdrawalStateInconsistency", inputs: [] },
{ type: "error", name: "ZeroInput", inputs: [] },
];