@everstake/wallet-sdk-ethereum
Version:
Ethereum - Everstake Wallet SDK
1,102 lines (1,098 loc) • 25 kB
text/typescript
/**
* Copyright (c) 2025, Everstake.
* Licensed under the BSD-3-Clause License. See LICENSE file for details.
*/
export const ABI_CONTRACT_ACCOUNTING = [
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'InvalidParam',
type: 'error',
},
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'InvalidValue',
type: 'error',
},
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'ZeroValue',
type: 'error',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'round',
type: 'uint256',
},
],
name: 'ActivateRound',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'AddWithdrawRequest',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'Autocompound',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'int256', name: '', type: 'int256' },
],
name: 'ChangeExpectValidatorsToStop',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'ClaimPoolFee',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'ClaimWithdrawRequest',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'DepositPending',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'newFee',
type: 'uint256',
},
],
name: 'FeeUpdated',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'oldGovernor',
type: 'address',
},
{
indexed: false,
internalType: 'address',
name: 'newGovernor',
type: 'address',
},
],
name: 'GovernorChanged',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint8',
name: 'version',
type: 'uint8',
},
],
name: 'Initialized',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'InterchangeDeposit',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'InterchangeWithdraw',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'previousOwner',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'superAdmin',
type: 'address',
},
],
name: 'SetSuperAdmin',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'rewarderBalance',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'reward',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'fee',
type: 'uint256',
},
],
name: 'Update',
type: 'event',
},
{
inputs: [],
name: 'BEACON_AMOUNT',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'FEE_DENOMINATOR',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'governor',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'renounceOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'value', type: 'address' }],
name: 'setSuperAdmin',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'superAdmin',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'poolFee', type: 'uint256' },
{ internalType: 'address', name: 'rewardsTreasury', type: 'address' },
{ internalType: 'address', name: 'withdrawTreasury', type: 'address' },
{
internalType: 'address',
name: 'accountingGovernor',
type: 'address',
},
],
name: 'initialize',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'account', type: 'address' },
{
internalType: 'uint256',
name: 'depositToPendingValue',
type: 'uint256',
},
],
name: 'deposit',
outputs: [
{
internalType: 'uint256',
name: 'interchangedAmount',
type: 'uint256',
},
{ internalType: 'uint256', name: 'activatedSlots', type: 'uint256' },
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'balance',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'pendingDepositedBalance',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'pendingBalance',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'autocompoundBalanceOf',
outputs: [
{
internalType: 'uint256',
name: 'autocompoundBalance',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'depositedBalanceOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'pendingDepositedBalanceOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'pendingBalanceOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'account', type: 'address' },
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
],
name: 'withdrawPending',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'staker', type: 'address' },
{ internalType: 'uint256', name: 'value', type: 'uint256' },
],
name: 'withdraw',
outputs: [
{
internalType: 'uint256',
name: 'withdrawFromPendingAmount',
type: 'uint256',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'claimPoolFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'getPoolFee',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'feeBalance',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'update',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'feeValue', type: 'uint256' }],
name: 'setFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'autocompound',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'pendingRestakedRewards',
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'pendingRestakedRewardOf',
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
name: 'restakedRewardOf',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'withdrawRequestQueueParams',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'staker', type: 'address' }],
name: 'withdrawRequest',
outputs: [
{ internalType: 'uint256', name: '', type: 'uint256' },
{ internalType: 'uint256', name: '', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'claimWithdrawRequest',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'readyforAutocompoundRewardsAmount',
outputs: [
{ internalType: 'uint256', name: 'unclaimedReward', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'closeValidatorsStat',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'stakeAmount', type: 'uint256' }],
name: 'setMinRestakeAmount',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: 'activatedValidatorNum',
type: 'uint256',
},
],
name: 'activateValidators',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
] as const;
export const ABI_CONTRACT_POOL = [
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'InvalidAmount',
type: 'error',
},
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'InvalidParam',
type: 'error',
},
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'InvalidValue',
type: 'error',
},
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'Paused',
type: 'error',
},
{
inputs: [{ internalType: 'string', name: 'field', type: 'string' }],
name: 'ZeroValue',
type: 'error',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'oldGovernor',
type: 'address',
},
{
indexed: false,
internalType: 'address',
name: 'newGovernor',
type: 'address',
},
],
name: 'GovernorChanged',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint8', name: 'version', type: 'uint8' },
],
name: 'Initialized',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'previousOwner',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
name: 'OwnershipTransferStarted',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'previousOwner',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
name: 'OwnershipTransferred',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'bool', name: '', type: 'bool' }],
name: 'PauseStaking',
type: 'event',
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: 'bool', name: '', type: 'bool' }],
name: 'PauseWithdraw',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bytes',
name: 'oldPendingValidatorPubKey',
type: 'bytes',
},
{
indexed: false,
internalType: 'bytes',
name: 'newPendingValidatorPubKey',
type: 'bytes',
},
],
name: 'PendingValidatorReplaced',
type: 'event',
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: 'uint256', name: '', type: 'uint256' },
],
name: 'Restake',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'SetMinStakeAmount',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'superAdmin',
type: 'address',
},
],
name: 'SetSuperAdmin',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'StakeActivated',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint64',
name: 'source',
type: 'uint64',
},
],
name: 'StakeAdded',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
],
name: 'StakeCanceled',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bytes',
name: 'validator',
type: 'bytes',
},
],
name: 'StakeDeposited',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'value',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint64',
name: 'source',
type: 'uint64',
},
],
name: 'Unstake',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bytes',
name: 'validator',
type: 'bytes',
},
],
name: 'ValidatorMarkedAsExited',
type: 'event',
},
{
inputs: [],
name: 'BEACON_AMOUNT',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'acceptOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'governor',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'owner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'pendingOwner',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'renounceOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'value', type: 'address' }],
name: 'setSuperAdmin',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'superAdmin',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }],
name: 'transferOwnership',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'depositContract', type: 'address' },
{ internalType: 'address', name: 'accountingContract', type: 'address' },
{ internalType: 'address', name: 'withdrawTreasury', type: 'address' },
{ internalType: 'address', name: 'rewardsTreasury', type: 'address' },
{ internalType: 'address', name: 'poolGovernor', type: 'address' },
],
name: 'initialize',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint64', name: 'source', type: 'uint64' }],
name: 'stake',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
name: 'unstakePending',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'value', type: 'uint256' },
{ internalType: 'uint16', name: 'allowedInterchangeNum', type: 'uint16' },
{ internalType: 'uint64', name: 'source', type: 'uint64' },
],
name: 'unstake',
outputs: [
{
internalType: 'uint256',
name: 'unstakeFromPendingValue',
type: 'uint256',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'activateStake',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'activatedSlots', type: 'uint256' },
],
name: 'restake',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'bytes', name: 'pubkey', type: 'bytes' },
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
{
internalType: 'bytes32',
name: 'deposit_data_root',
type: 'bytes32',
},
],
internalType: 'struct ValidatorList.DepositData[]',
name: 'pendingValidators',
type: 'tuple[]',
},
],
name: 'setPendingValidators',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'getPendingValidatorCount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
name: 'getPendingValidator',
outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getValidatorCount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
name: 'getValidator',
outputs: [
{ internalType: 'bytes', name: '', type: 'bytes' },
{
internalType: 'enum ValidatorList.ValidatorStatus',
name: '',
type: 'uint8',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'index', type: 'uint256' },
{
components: [
{ internalType: 'bytes', name: 'pubkey', type: 'bytes' },
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
{
internalType: 'bytes32',
name: 'deposit_data_root',
type: 'bytes32',
},
],
internalType: 'struct ValidatorList.DepositData',
name: 'pendingValidator',
type: 'tuple',
},
],
name: 'replacePendingValidator',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'num', type: 'uint256' }],
name: 'markValidatorsAsExited',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
name: 'markValidatorAsExited',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'reorderPending',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bool', name: 'pause', type: 'bool' }],
name: 'pauseStaking',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'bool', name: 'pause', type: 'bool' }],
name: 'pauseWithdraw',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'newGovernor', type: 'address' }],
name: 'setGovernor',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'minStakeAmount',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'stakeAmount', type: 'uint256' }],
name: 'setMinStakeAmount',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
] as const;