@byzantine/vault-sdk
Version:
Byzantine Vault SDK for creating and managing vaults on Ethereum for restaking strategies
949 lines (948 loc) • 29.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SYM_VAULT_ABI = void 0;
exports.SYM_VAULT_ABI = [
{
type: "constructor",
inputs: [
{ name: "delegatorFactory", type: "address", internalType: "address" },
{ name: "slasherFactory", type: "address", internalType: "address" },
{ name: "vaultFactory", type: "address", internalType: "address" },
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "DEFAULT_ADMIN_ROLE",
inputs: [],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
stateMutability: "view",
},
{
type: "function",
name: "DELEGATOR_FACTORY",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "DEPOSITOR_WHITELIST_ROLE",
inputs: [],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
stateMutability: "view",
},
{
type: "function",
name: "DEPOSIT_LIMIT_SET_ROLE",
inputs: [],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
stateMutability: "view",
},
{
type: "function",
name: "DEPOSIT_WHITELIST_SET_ROLE",
inputs: [],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
stateMutability: "view",
},
{
type: "function",
name: "FACTORY",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "IS_DEPOSIT_LIMIT_SET_ROLE",
inputs: [],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
stateMutability: "view",
},
{
type: "function",
name: "SLASHER_FACTORY",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "activeBalanceOf",
inputs: [{ name: "account", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeBalanceOfAt",
inputs: [
{ name: "account", type: "address", internalType: "address" },
{ name: "timestamp", type: "uint48", internalType: "uint48" },
{ name: "hints", type: "bytes", internalType: "bytes" },
],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeShares",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeSharesAt",
inputs: [
{ name: "timestamp", type: "uint48", internalType: "uint48" },
{ name: "hint", type: "bytes", internalType: "bytes" },
],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeSharesOf",
inputs: [{ name: "account", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeSharesOfAt",
inputs: [
{ name: "account", type: "address", internalType: "address" },
{ name: "timestamp", type: "uint48", internalType: "uint48" },
{ name: "hint", type: "bytes", internalType: "bytes" },
],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeStake",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "activeStakeAt",
inputs: [
{ name: "timestamp", type: "uint48", internalType: "uint48" },
{ name: "hint", type: "bytes", internalType: "bytes" },
],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "burner",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "claim",
inputs: [
{ name: "recipient", type: "address", internalType: "address" },
{ name: "epoch", type: "uint256", internalType: "uint256" },
],
outputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
stateMutability: "nonpayable",
},
{
type: "function",
name: "claimBatch",
inputs: [
{ name: "recipient", type: "address", internalType: "address" },
{ name: "epochs", type: "uint256[]", internalType: "uint256[]" },
],
outputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
stateMutability: "nonpayable",
},
{
type: "function",
name: "collateral",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "currentEpoch",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "currentEpochStart",
inputs: [],
outputs: [{ name: "", type: "uint48", internalType: "uint48" }],
stateMutability: "view",
},
{
type: "function",
name: "delegator",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "deposit",
inputs: [
{ name: "onBehalfOf", type: "address", internalType: "address" },
{ name: "amount", type: "uint256", internalType: "uint256" },
],
outputs: [
{ name: "depositedAmount", type: "uint256", internalType: "uint256" },
{ name: "mintedShares", type: "uint256", internalType: "uint256" },
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "depositLimit",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "depositWhitelist",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "epochAt",
inputs: [{ name: "timestamp", type: "uint48", internalType: "uint48" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "epochDuration",
inputs: [],
outputs: [{ name: "", type: "uint48", internalType: "uint48" }],
stateMutability: "view",
},
{
type: "function",
name: "epochDurationInit",
inputs: [],
outputs: [{ name: "", type: "uint48", internalType: "uint48" }],
stateMutability: "view",
},
{
type: "function",
name: "getRoleAdmin",
inputs: [{ name: "role", type: "bytes32", internalType: "bytes32" }],
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
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: "initialVersion", type: "uint64", internalType: "uint64" },
{ name: "owner_", type: "address", internalType: "address" },
{ name: "data", type: "bytes", internalType: "bytes" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "isDelegatorInitialized",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isDepositLimit",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isDepositorWhitelisted",
inputs: [{ name: "account", type: "address", internalType: "address" }],
outputs: [{ name: "value", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isInitialized",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isSlasherInitialized",
inputs: [],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "isWithdrawalsClaimed",
inputs: [
{ name: "epoch", type: "uint256", internalType: "uint256" },
{ name: "account", type: "address", internalType: "address" },
],
outputs: [{ name: "value", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "migrate",
inputs: [
{ name: "newVersion", type: "uint64", internalType: "uint64" },
{ name: "data", type: "bytes", internalType: "bytes" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "nextEpochStart",
inputs: [],
outputs: [{ name: "", type: "uint48", internalType: "uint48" }],
stateMutability: "view",
},
{
type: "function",
name: "onSlash",
inputs: [
{ name: "amount", type: "uint256", internalType: "uint256" },
{ name: "captureTimestamp", type: "uint48", internalType: "uint48" },
],
outputs: [
{ name: "slashedAmount", type: "uint256", internalType: "uint256" },
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "owner",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "previousEpochStart",
inputs: [],
outputs: [{ name: "", type: "uint48", internalType: "uint48" }],
stateMutability: "view",
},
{
type: "function",
name: "redeem",
inputs: [
{ name: "claimer", type: "address", internalType: "address" },
{ name: "shares", type: "uint256", internalType: "uint256" },
],
outputs: [
{ name: "withdrawnAssets", type: "uint256", internalType: "uint256" },
{ name: "mintedShares", type: "uint256", internalType: "uint256" },
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "renounceOwnership",
inputs: [],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "renounceRole",
inputs: [
{ name: "role", type: "bytes32", internalType: "bytes32" },
{ name: "callerConfirmation", type: "address", internalType: "address" },
],
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: "setDelegator",
inputs: [{ name: "delegator_", type: "address", internalType: "address" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setDepositLimit",
inputs: [{ name: "limit", type: "uint256", internalType: "uint256" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setDepositWhitelist",
inputs: [{ name: "status", type: "bool", internalType: "bool" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setDepositorWhitelistStatus",
inputs: [
{ name: "account", type: "address", internalType: "address" },
{ name: "status", type: "bool", internalType: "bool" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setIsDepositLimit",
inputs: [{ name: "status", type: "bool", internalType: "bool" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setSlasher",
inputs: [{ name: "slasher_", type: "address", internalType: "address" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "slashableBalanceOf",
inputs: [{ name: "account", type: "address", internalType: "address" }],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "slasher",
inputs: [],
outputs: [{ name: "", type: "address", internalType: "address" }],
stateMutability: "view",
},
{
type: "function",
name: "staticDelegateCall",
inputs: [
{ name: "target", type: "address", internalType: "address" },
{ name: "data", type: "bytes", internalType: "bytes" },
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "supportsInterface",
inputs: [{ name: "interfaceId", type: "bytes4", internalType: "bytes4" }],
outputs: [{ name: "", type: "bool", internalType: "bool" }],
stateMutability: "view",
},
{
type: "function",
name: "totalStake",
inputs: [],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "transferOwnership",
inputs: [{ name: "newOwner", type: "address", internalType: "address" }],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "version",
inputs: [],
outputs: [{ name: "", type: "uint64", internalType: "uint64" }],
stateMutability: "view",
},
{
type: "function",
name: "withdraw",
inputs: [
{ name: "claimer", type: "address", internalType: "address" },
{ name: "amount", type: "uint256", internalType: "uint256" },
],
outputs: [
{ name: "burnedShares", type: "uint256", internalType: "uint256" },
{ name: "mintedShares", type: "uint256", internalType: "uint256" },
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "withdrawalShares",
inputs: [{ name: "epoch", type: "uint256", internalType: "uint256" }],
outputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "withdrawalSharesOf",
inputs: [
{ name: "epoch", type: "uint256", internalType: "uint256" },
{ name: "account", type: "address", internalType: "address" },
],
outputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "withdrawals",
inputs: [{ name: "epoch", type: "uint256", internalType: "uint256" }],
outputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "function",
name: "withdrawalsOf",
inputs: [
{ name: "epoch", type: "uint256", internalType: "uint256" },
{ name: "account", type: "address", internalType: "address" },
],
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
stateMutability: "view",
},
{
type: "event",
name: "Claim",
inputs: [
{
name: "claimer",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "recipient",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "epoch",
type: "uint256",
indexed: false,
internalType: "uint256",
},
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "ClaimBatch",
inputs: [
{
name: "claimer",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "recipient",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "epochs",
type: "uint256[]",
indexed: false,
internalType: "uint256[]",
},
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "Deposit",
inputs: [
{
name: "depositor",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "onBehalfOf",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
{
name: "shares",
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: "OnSlash",
inputs: [
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
{
name: "captureTimestamp",
type: "uint48",
indexed: false,
internalType: "uint48",
},
{
name: "slashedAmount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
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: "RoleAdminChanged",
inputs: [
{ name: "role", type: "bytes32", indexed: true, internalType: "bytes32" },
{
name: "previousAdminRole",
type: "bytes32",
indexed: true,
internalType: "bytes32",
},
{
name: "newAdminRole",
type: "bytes32",
indexed: true,
internalType: "bytes32",
},
],
anonymous: false,
},
{
type: "event",
name: "RoleGranted",
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",
},
],
anonymous: false,
},
{
type: "event",
name: "RoleRevoked",
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",
},
],
anonymous: false,
},
{
type: "event",
name: "SetDelegator",
inputs: [
{
name: "delegator",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "SetDepositLimit",
inputs: [
{
name: "limit",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "SetDepositWhitelist",
inputs: [
{ name: "status", type: "bool", indexed: false, internalType: "bool" },
],
anonymous: false,
},
{
type: "event",
name: "SetDepositorWhitelistStatus",
inputs: [
{
name: "account",
type: "address",
indexed: true,
internalType: "address",
},
{ name: "status", type: "bool", indexed: false, internalType: "bool" },
],
anonymous: false,
},
{
type: "event",
name: "SetIsDepositLimit",
inputs: [
{ name: "status", type: "bool", indexed: false, internalType: "bool" },
],
anonymous: false,
},
{
type: "event",
name: "SetSlasher",
inputs: [
{
name: "slasher",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "Withdraw",
inputs: [
{
name: "withdrawer",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "claimer",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
{
name: "burnedShares",
type: "uint256",
indexed: false,
internalType: "uint256",
},
{
name: "mintedShares",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{ type: "error", name: "AccessControlBadConfirmation", inputs: [] },
{
type: "error",
name: "AccessControlUnauthorizedAccount",
inputs: [
{ name: "account", type: "address", internalType: "address" },
{ name: "neededRole", type: "bytes32", internalType: "bytes32" },
],
},
{
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: "AlreadyClaimed", inputs: [] },
{ type: "error", name: "AlreadyInitialized", inputs: [] },
{ type: "error", name: "AlreadySet", inputs: [] },
{ type: "error", name: "CheckpointUnorderedInsertion", inputs: [] },
{ type: "error", name: "DelegatorAlreadyInitialized", inputs: [] },
{ type: "error", name: "DepositLimitReached", inputs: [] },
{ type: "error", name: "FailedInnerCall", inputs: [] },
{ type: "error", name: "InsufficientClaim", inputs: [] },
{ type: "error", name: "InsufficientDeposit", inputs: [] },
{ type: "error", name: "InsufficientRedemption", inputs: [] },
{ type: "error", name: "InsufficientWithdrawal", inputs: [] },
{ type: "error", name: "InvalidAccount", inputs: [] },
{ type: "error", name: "InvalidCaptureEpoch", inputs: [] },
{ type: "error", name: "InvalidClaimer", inputs: [] },
{ type: "error", name: "InvalidCollateral", inputs: [] },
{ type: "error", name: "InvalidDelegator", inputs: [] },
{ type: "error", name: "InvalidEpoch", inputs: [] },
{ type: "error", name: "InvalidEpochDuration", inputs: [] },
{ type: "error", name: "InvalidInitialization", inputs: [] },
{ type: "error", name: "InvalidLengthEpochs", inputs: [] },
{ type: "error", name: "InvalidOnBehalfOf", inputs: [] },
{ type: "error", name: "InvalidRecipient", inputs: [] },
{ type: "error", name: "InvalidSlasher", inputs: [] },
{ type: "error", name: "InvalidTimestamp", inputs: [] },
{ type: "error", name: "MathOverflowedMulDiv", inputs: [] },
{ type: "error", name: "MissingRoles", inputs: [] },
{ type: "error", name: "NoPreviousEpoch", inputs: [] },
{ type: "error", name: "NotDelegator", inputs: [] },
{ type: "error", name: "NotFactory", inputs: [] },
{ type: "error", name: "NotInitialized", inputs: [] },
{ type: "error", name: "NotInitializing", inputs: [] },
{ type: "error", name: "NotSlasher", inputs: [] },
{ type: "error", name: "NotWhitelistedDepositor", inputs: [] },
{
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: "ReentrancyGuardReentrantCall", inputs: [] },
{
type: "error",
name: "SafeCastOverflowedUintDowncast",
inputs: [
{ name: "bits", type: "uint8", internalType: "uint8" },
{ name: "value", type: "uint256", internalType: "uint256" },
],
},
{
type: "error",
name: "SafeERC20FailedOperation",
inputs: [{ name: "token", type: "address", internalType: "address" }],
},
{ type: "error", name: "SlasherAlreadyInitialized", inputs: [] },
{ type: "error", name: "TooMuchRedeem", inputs: [] },
{ type: "error", name: "TooMuchWithdraw", inputs: [] },
];