From ea6a66fab2d869238517b9449d55b9ac078e2f27 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Thu, 16 May 2024 15:47:48 +0200 Subject: [PATCH 01/14] Move old code to legacy folder --- lib/{ => legacy}/config/abis/ERC20PermitABI.ts | 0 lib/{ => legacy}/config/abis/anvil/GuardianModule.json | 0 lib/{ => legacy}/config/abis/anvil/PufferModule.json | 0 lib/{ => legacy}/config/abis/anvil/PufferModuleManager.json | 0 lib/{ => legacy}/config/abis/anvil/PufferOracle.json | 0 lib/{ => legacy}/config/abis/anvil/PufferOracleV2.json | 0 lib/{ => legacy}/config/abis/anvil/PufferProtocol.json | 0 lib/{ => legacy}/config/abis/anvil/PufferVault.json | 0 lib/{ => legacy}/config/abis/anvil/PufferVaultV2.json | 0 lib/{ => legacy}/config/abis/anvil/RestakingOperator.json | 0 lib/{ => legacy}/config/abis/anvil/ValidatorTicket.json | 0 lib/{ => legacy}/config/abis/anvil/addresses.json | 0 lib/{ => legacy}/config/abis/holesky/GuardianModule.json | 0 lib/{ => legacy}/config/abis/holesky/PufferModule.json | 0 lib/{ => legacy}/config/abis/holesky/PufferModuleManager.json | 0 lib/{ => legacy}/config/abis/holesky/PufferOracle.json | 0 lib/{ => legacy}/config/abis/holesky/PufferOracleV2.json | 0 lib/{ => legacy}/config/abis/holesky/PufferProtocol.json | 0 lib/{ => legacy}/config/abis/holesky/PufferVaultV2.json | 0 lib/{ => legacy}/config/abis/holesky/RestakingOperator.json | 0 lib/{ => legacy}/config/abis/holesky/ValidatorTicket.json | 0 lib/{ => legacy}/config/abis/mainnet/EnclaveVerifier.json | 0 lib/{ => legacy}/config/abis/mainnet/GuardianModule.json | 0 lib/{ => legacy}/config/abis/mainnet/OperationsCoordinator.json | 0 lib/{ => legacy}/config/abis/mainnet/PufferDepositor.json | 0 lib/{ => legacy}/config/abis/mainnet/PufferModule.json | 0 lib/{ => legacy}/config/abis/mainnet/PufferModuleManager.json | 0 lib/{ => legacy}/config/abis/mainnet/PufferOracleV2.json | 0 lib/{ => legacy}/config/abis/mainnet/PufferProtocol.json | 0 lib/{ => legacy}/config/abis/mainnet/PufferVaultV2.json | 0 lib/{ => legacy}/config/abis/mainnet/RestakingOperator.json | 0 lib/{ => legacy}/config/abis/mainnet/Timelock.json | 0 lib/{ => legacy}/config/abis/mainnet/ValidatorTicket.json | 0 lib/{ => legacy}/config/addresses.ts | 0 lib/{ => legacy}/config/addresses/anvil.json | 0 lib/{ => legacy}/config/addresses/holesky.json | 0 lib/{ => legacy}/config/addresses/mainnet.json | 0 lib/{ => legacy}/config/networks.ts | 0 lib/{ => legacy}/config/networks/anvil.ts | 0 lib/{ => legacy}/config/networks/default.ts | 0 lib/{ => legacy}/config/networks/holesky.ts | 0 lib/{ => legacy}/config/networks/mainnet.ts | 0 lib/{ => legacy}/config/protocol.ts | 0 lib/{ => legacy}/react/context/NetworkConfig.tsx | 0 lib/{ => legacy}/react/context/Web3Context.tsx | 0 lib/{ => legacy}/react/hooks/useContracts.ts | 0 lib/{ => legacy}/react/hooks/usePufETHModule.ts | 0 lib/{ => legacy}/react/hooks/usePufferProtocol.ts | 0 lib/{ => legacy}/react/hooks/useVTModule.ts | 0 lib/{ => legacy}/react/hooks/useVerifySignature.ts | 0 lib/{ => legacy}/types/error.ts | 0 lib/{ => legacy}/types/networkConfig.ts | 0 lib/{ => legacy}/types/node.ts | 0 lib/{ => legacy}/types/registration.ts | 0 lib/{ => legacy}/types/system.ts | 0 lib/{ => legacy}/types/validator.ts | 0 lib/{ => legacy}/types/web3Context.ts | 0 lib/{ => legacy}/utils/ERC20Permit.ts | 0 lib/{ => legacy}/utils/ErrorPrepration.ts | 0 lib/{ => legacy}/utils/Key.ts | 0 lib/{ => legacy}/utils/localStorage.ts | 0 61 files changed, 0 insertions(+), 0 deletions(-) rename lib/{ => legacy}/config/abis/ERC20PermitABI.ts (100%) rename lib/{ => legacy}/config/abis/anvil/GuardianModule.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferModule.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferModuleManager.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferOracle.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferOracleV2.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferProtocol.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferVault.json (100%) rename lib/{ => legacy}/config/abis/anvil/PufferVaultV2.json (100%) rename lib/{ => legacy}/config/abis/anvil/RestakingOperator.json (100%) rename lib/{ => legacy}/config/abis/anvil/ValidatorTicket.json (100%) rename lib/{ => legacy}/config/abis/anvil/addresses.json (100%) rename lib/{ => legacy}/config/abis/holesky/GuardianModule.json (100%) rename lib/{ => legacy}/config/abis/holesky/PufferModule.json (100%) rename lib/{ => legacy}/config/abis/holesky/PufferModuleManager.json (100%) rename lib/{ => legacy}/config/abis/holesky/PufferOracle.json (100%) rename lib/{ => legacy}/config/abis/holesky/PufferOracleV2.json (100%) rename lib/{ => legacy}/config/abis/holesky/PufferProtocol.json (100%) rename lib/{ => legacy}/config/abis/holesky/PufferVaultV2.json (100%) rename lib/{ => legacy}/config/abis/holesky/RestakingOperator.json (100%) rename lib/{ => legacy}/config/abis/holesky/ValidatorTicket.json (100%) rename lib/{ => legacy}/config/abis/mainnet/EnclaveVerifier.json (100%) rename lib/{ => legacy}/config/abis/mainnet/GuardianModule.json (100%) rename lib/{ => legacy}/config/abis/mainnet/OperationsCoordinator.json (100%) rename lib/{ => legacy}/config/abis/mainnet/PufferDepositor.json (100%) rename lib/{ => legacy}/config/abis/mainnet/PufferModule.json (100%) rename lib/{ => legacy}/config/abis/mainnet/PufferModuleManager.json (100%) rename lib/{ => legacy}/config/abis/mainnet/PufferOracleV2.json (100%) rename lib/{ => legacy}/config/abis/mainnet/PufferProtocol.json (100%) rename lib/{ => legacy}/config/abis/mainnet/PufferVaultV2.json (100%) rename lib/{ => legacy}/config/abis/mainnet/RestakingOperator.json (100%) rename lib/{ => legacy}/config/abis/mainnet/Timelock.json (100%) rename lib/{ => legacy}/config/abis/mainnet/ValidatorTicket.json (100%) rename lib/{ => legacy}/config/addresses.ts (100%) rename lib/{ => legacy}/config/addresses/anvil.json (100%) rename lib/{ => legacy}/config/addresses/holesky.json (100%) rename lib/{ => legacy}/config/addresses/mainnet.json (100%) rename lib/{ => legacy}/config/networks.ts (100%) rename lib/{ => legacy}/config/networks/anvil.ts (100%) rename lib/{ => legacy}/config/networks/default.ts (100%) rename lib/{ => legacy}/config/networks/holesky.ts (100%) rename lib/{ => legacy}/config/networks/mainnet.ts (100%) rename lib/{ => legacy}/config/protocol.ts (100%) rename lib/{ => legacy}/react/context/NetworkConfig.tsx (100%) rename lib/{ => legacy}/react/context/Web3Context.tsx (100%) rename lib/{ => legacy}/react/hooks/useContracts.ts (100%) rename lib/{ => legacy}/react/hooks/usePufETHModule.ts (100%) rename lib/{ => legacy}/react/hooks/usePufferProtocol.ts (100%) rename lib/{ => legacy}/react/hooks/useVTModule.ts (100%) rename lib/{ => legacy}/react/hooks/useVerifySignature.ts (100%) rename lib/{ => legacy}/types/error.ts (100%) rename lib/{ => legacy}/types/networkConfig.ts (100%) rename lib/{ => legacy}/types/node.ts (100%) rename lib/{ => legacy}/types/registration.ts (100%) rename lib/{ => legacy}/types/system.ts (100%) rename lib/{ => legacy}/types/validator.ts (100%) rename lib/{ => legacy}/types/web3Context.ts (100%) rename lib/{ => legacy}/utils/ERC20Permit.ts (100%) rename lib/{ => legacy}/utils/ErrorPrepration.ts (100%) rename lib/{ => legacy}/utils/Key.ts (100%) rename lib/{ => legacy}/utils/localStorage.ts (100%) diff --git a/lib/config/abis/ERC20PermitABI.ts b/lib/legacy/config/abis/ERC20PermitABI.ts similarity index 100% rename from lib/config/abis/ERC20PermitABI.ts rename to lib/legacy/config/abis/ERC20PermitABI.ts diff --git a/lib/config/abis/anvil/GuardianModule.json b/lib/legacy/config/abis/anvil/GuardianModule.json similarity index 100% rename from lib/config/abis/anvil/GuardianModule.json rename to lib/legacy/config/abis/anvil/GuardianModule.json diff --git a/lib/config/abis/anvil/PufferModule.json b/lib/legacy/config/abis/anvil/PufferModule.json similarity index 100% rename from lib/config/abis/anvil/PufferModule.json rename to lib/legacy/config/abis/anvil/PufferModule.json diff --git a/lib/config/abis/anvil/PufferModuleManager.json b/lib/legacy/config/abis/anvil/PufferModuleManager.json similarity index 100% rename from lib/config/abis/anvil/PufferModuleManager.json rename to lib/legacy/config/abis/anvil/PufferModuleManager.json diff --git a/lib/config/abis/anvil/PufferOracle.json b/lib/legacy/config/abis/anvil/PufferOracle.json similarity index 100% rename from lib/config/abis/anvil/PufferOracle.json rename to lib/legacy/config/abis/anvil/PufferOracle.json diff --git a/lib/config/abis/anvil/PufferOracleV2.json b/lib/legacy/config/abis/anvil/PufferOracleV2.json similarity index 100% rename from lib/config/abis/anvil/PufferOracleV2.json rename to lib/legacy/config/abis/anvil/PufferOracleV2.json diff --git a/lib/config/abis/anvil/PufferProtocol.json b/lib/legacy/config/abis/anvil/PufferProtocol.json similarity index 100% rename from lib/config/abis/anvil/PufferProtocol.json rename to lib/legacy/config/abis/anvil/PufferProtocol.json diff --git a/lib/config/abis/anvil/PufferVault.json b/lib/legacy/config/abis/anvil/PufferVault.json similarity index 100% rename from lib/config/abis/anvil/PufferVault.json rename to lib/legacy/config/abis/anvil/PufferVault.json diff --git a/lib/config/abis/anvil/PufferVaultV2.json b/lib/legacy/config/abis/anvil/PufferVaultV2.json similarity index 100% rename from lib/config/abis/anvil/PufferVaultV2.json rename to lib/legacy/config/abis/anvil/PufferVaultV2.json diff --git a/lib/config/abis/anvil/RestakingOperator.json b/lib/legacy/config/abis/anvil/RestakingOperator.json similarity index 100% rename from lib/config/abis/anvil/RestakingOperator.json rename to lib/legacy/config/abis/anvil/RestakingOperator.json diff --git a/lib/config/abis/anvil/ValidatorTicket.json b/lib/legacy/config/abis/anvil/ValidatorTicket.json similarity index 100% rename from lib/config/abis/anvil/ValidatorTicket.json rename to lib/legacy/config/abis/anvil/ValidatorTicket.json diff --git a/lib/config/abis/anvil/addresses.json b/lib/legacy/config/abis/anvil/addresses.json similarity index 100% rename from lib/config/abis/anvil/addresses.json rename to lib/legacy/config/abis/anvil/addresses.json diff --git a/lib/config/abis/holesky/GuardianModule.json b/lib/legacy/config/abis/holesky/GuardianModule.json similarity index 100% rename from lib/config/abis/holesky/GuardianModule.json rename to lib/legacy/config/abis/holesky/GuardianModule.json diff --git a/lib/config/abis/holesky/PufferModule.json b/lib/legacy/config/abis/holesky/PufferModule.json similarity index 100% rename from lib/config/abis/holesky/PufferModule.json rename to lib/legacy/config/abis/holesky/PufferModule.json diff --git a/lib/config/abis/holesky/PufferModuleManager.json b/lib/legacy/config/abis/holesky/PufferModuleManager.json similarity index 100% rename from lib/config/abis/holesky/PufferModuleManager.json rename to lib/legacy/config/abis/holesky/PufferModuleManager.json diff --git a/lib/config/abis/holesky/PufferOracle.json b/lib/legacy/config/abis/holesky/PufferOracle.json similarity index 100% rename from lib/config/abis/holesky/PufferOracle.json rename to lib/legacy/config/abis/holesky/PufferOracle.json diff --git a/lib/config/abis/holesky/PufferOracleV2.json b/lib/legacy/config/abis/holesky/PufferOracleV2.json similarity index 100% rename from lib/config/abis/holesky/PufferOracleV2.json rename to lib/legacy/config/abis/holesky/PufferOracleV2.json diff --git a/lib/config/abis/holesky/PufferProtocol.json b/lib/legacy/config/abis/holesky/PufferProtocol.json similarity index 100% rename from lib/config/abis/holesky/PufferProtocol.json rename to lib/legacy/config/abis/holesky/PufferProtocol.json diff --git a/lib/config/abis/holesky/PufferVaultV2.json b/lib/legacy/config/abis/holesky/PufferVaultV2.json similarity index 100% rename from lib/config/abis/holesky/PufferVaultV2.json rename to lib/legacy/config/abis/holesky/PufferVaultV2.json diff --git a/lib/config/abis/holesky/RestakingOperator.json b/lib/legacy/config/abis/holesky/RestakingOperator.json similarity index 100% rename from lib/config/abis/holesky/RestakingOperator.json rename to lib/legacy/config/abis/holesky/RestakingOperator.json diff --git a/lib/config/abis/holesky/ValidatorTicket.json b/lib/legacy/config/abis/holesky/ValidatorTicket.json similarity index 100% rename from lib/config/abis/holesky/ValidatorTicket.json rename to lib/legacy/config/abis/holesky/ValidatorTicket.json diff --git a/lib/config/abis/mainnet/EnclaveVerifier.json b/lib/legacy/config/abis/mainnet/EnclaveVerifier.json similarity index 100% rename from lib/config/abis/mainnet/EnclaveVerifier.json rename to lib/legacy/config/abis/mainnet/EnclaveVerifier.json diff --git a/lib/config/abis/mainnet/GuardianModule.json b/lib/legacy/config/abis/mainnet/GuardianModule.json similarity index 100% rename from lib/config/abis/mainnet/GuardianModule.json rename to lib/legacy/config/abis/mainnet/GuardianModule.json diff --git a/lib/config/abis/mainnet/OperationsCoordinator.json b/lib/legacy/config/abis/mainnet/OperationsCoordinator.json similarity index 100% rename from lib/config/abis/mainnet/OperationsCoordinator.json rename to lib/legacy/config/abis/mainnet/OperationsCoordinator.json diff --git a/lib/config/abis/mainnet/PufferDepositor.json b/lib/legacy/config/abis/mainnet/PufferDepositor.json similarity index 100% rename from lib/config/abis/mainnet/PufferDepositor.json rename to lib/legacy/config/abis/mainnet/PufferDepositor.json diff --git a/lib/config/abis/mainnet/PufferModule.json b/lib/legacy/config/abis/mainnet/PufferModule.json similarity index 100% rename from lib/config/abis/mainnet/PufferModule.json rename to lib/legacy/config/abis/mainnet/PufferModule.json diff --git a/lib/config/abis/mainnet/PufferModuleManager.json b/lib/legacy/config/abis/mainnet/PufferModuleManager.json similarity index 100% rename from lib/config/abis/mainnet/PufferModuleManager.json rename to lib/legacy/config/abis/mainnet/PufferModuleManager.json diff --git a/lib/config/abis/mainnet/PufferOracleV2.json b/lib/legacy/config/abis/mainnet/PufferOracleV2.json similarity index 100% rename from lib/config/abis/mainnet/PufferOracleV2.json rename to lib/legacy/config/abis/mainnet/PufferOracleV2.json diff --git a/lib/config/abis/mainnet/PufferProtocol.json b/lib/legacy/config/abis/mainnet/PufferProtocol.json similarity index 100% rename from lib/config/abis/mainnet/PufferProtocol.json rename to lib/legacy/config/abis/mainnet/PufferProtocol.json diff --git a/lib/config/abis/mainnet/PufferVaultV2.json b/lib/legacy/config/abis/mainnet/PufferVaultV2.json similarity index 100% rename from lib/config/abis/mainnet/PufferVaultV2.json rename to lib/legacy/config/abis/mainnet/PufferVaultV2.json diff --git a/lib/config/abis/mainnet/RestakingOperator.json b/lib/legacy/config/abis/mainnet/RestakingOperator.json similarity index 100% rename from lib/config/abis/mainnet/RestakingOperator.json rename to lib/legacy/config/abis/mainnet/RestakingOperator.json diff --git a/lib/config/abis/mainnet/Timelock.json b/lib/legacy/config/abis/mainnet/Timelock.json similarity index 100% rename from lib/config/abis/mainnet/Timelock.json rename to lib/legacy/config/abis/mainnet/Timelock.json diff --git a/lib/config/abis/mainnet/ValidatorTicket.json b/lib/legacy/config/abis/mainnet/ValidatorTicket.json similarity index 100% rename from lib/config/abis/mainnet/ValidatorTicket.json rename to lib/legacy/config/abis/mainnet/ValidatorTicket.json diff --git a/lib/config/addresses.ts b/lib/legacy/config/addresses.ts similarity index 100% rename from lib/config/addresses.ts rename to lib/legacy/config/addresses.ts diff --git a/lib/config/addresses/anvil.json b/lib/legacy/config/addresses/anvil.json similarity index 100% rename from lib/config/addresses/anvil.json rename to lib/legacy/config/addresses/anvil.json diff --git a/lib/config/addresses/holesky.json b/lib/legacy/config/addresses/holesky.json similarity index 100% rename from lib/config/addresses/holesky.json rename to lib/legacy/config/addresses/holesky.json diff --git a/lib/config/addresses/mainnet.json b/lib/legacy/config/addresses/mainnet.json similarity index 100% rename from lib/config/addresses/mainnet.json rename to lib/legacy/config/addresses/mainnet.json diff --git a/lib/config/networks.ts b/lib/legacy/config/networks.ts similarity index 100% rename from lib/config/networks.ts rename to lib/legacy/config/networks.ts diff --git a/lib/config/networks/anvil.ts b/lib/legacy/config/networks/anvil.ts similarity index 100% rename from lib/config/networks/anvil.ts rename to lib/legacy/config/networks/anvil.ts diff --git a/lib/config/networks/default.ts b/lib/legacy/config/networks/default.ts similarity index 100% rename from lib/config/networks/default.ts rename to lib/legacy/config/networks/default.ts diff --git a/lib/config/networks/holesky.ts b/lib/legacy/config/networks/holesky.ts similarity index 100% rename from lib/config/networks/holesky.ts rename to lib/legacy/config/networks/holesky.ts diff --git a/lib/config/networks/mainnet.ts b/lib/legacy/config/networks/mainnet.ts similarity index 100% rename from lib/config/networks/mainnet.ts rename to lib/legacy/config/networks/mainnet.ts diff --git a/lib/config/protocol.ts b/lib/legacy/config/protocol.ts similarity index 100% rename from lib/config/protocol.ts rename to lib/legacy/config/protocol.ts diff --git a/lib/react/context/NetworkConfig.tsx b/lib/legacy/react/context/NetworkConfig.tsx similarity index 100% rename from lib/react/context/NetworkConfig.tsx rename to lib/legacy/react/context/NetworkConfig.tsx diff --git a/lib/react/context/Web3Context.tsx b/lib/legacy/react/context/Web3Context.tsx similarity index 100% rename from lib/react/context/Web3Context.tsx rename to lib/legacy/react/context/Web3Context.tsx diff --git a/lib/react/hooks/useContracts.ts b/lib/legacy/react/hooks/useContracts.ts similarity index 100% rename from lib/react/hooks/useContracts.ts rename to lib/legacy/react/hooks/useContracts.ts diff --git a/lib/react/hooks/usePufETHModule.ts b/lib/legacy/react/hooks/usePufETHModule.ts similarity index 100% rename from lib/react/hooks/usePufETHModule.ts rename to lib/legacy/react/hooks/usePufETHModule.ts diff --git a/lib/react/hooks/usePufferProtocol.ts b/lib/legacy/react/hooks/usePufferProtocol.ts similarity index 100% rename from lib/react/hooks/usePufferProtocol.ts rename to lib/legacy/react/hooks/usePufferProtocol.ts diff --git a/lib/react/hooks/useVTModule.ts b/lib/legacy/react/hooks/useVTModule.ts similarity index 100% rename from lib/react/hooks/useVTModule.ts rename to lib/legacy/react/hooks/useVTModule.ts diff --git a/lib/react/hooks/useVerifySignature.ts b/lib/legacy/react/hooks/useVerifySignature.ts similarity index 100% rename from lib/react/hooks/useVerifySignature.ts rename to lib/legacy/react/hooks/useVerifySignature.ts diff --git a/lib/types/error.ts b/lib/legacy/types/error.ts similarity index 100% rename from lib/types/error.ts rename to lib/legacy/types/error.ts diff --git a/lib/types/networkConfig.ts b/lib/legacy/types/networkConfig.ts similarity index 100% rename from lib/types/networkConfig.ts rename to lib/legacy/types/networkConfig.ts diff --git a/lib/types/node.ts b/lib/legacy/types/node.ts similarity index 100% rename from lib/types/node.ts rename to lib/legacy/types/node.ts diff --git a/lib/types/registration.ts b/lib/legacy/types/registration.ts similarity index 100% rename from lib/types/registration.ts rename to lib/legacy/types/registration.ts diff --git a/lib/types/system.ts b/lib/legacy/types/system.ts similarity index 100% rename from lib/types/system.ts rename to lib/legacy/types/system.ts diff --git a/lib/types/validator.ts b/lib/legacy/types/validator.ts similarity index 100% rename from lib/types/validator.ts rename to lib/legacy/types/validator.ts diff --git a/lib/types/web3Context.ts b/lib/legacy/types/web3Context.ts similarity index 100% rename from lib/types/web3Context.ts rename to lib/legacy/types/web3Context.ts diff --git a/lib/utils/ERC20Permit.ts b/lib/legacy/utils/ERC20Permit.ts similarity index 100% rename from lib/utils/ERC20Permit.ts rename to lib/legacy/utils/ERC20Permit.ts diff --git a/lib/utils/ErrorPrepration.ts b/lib/legacy/utils/ErrorPrepration.ts similarity index 100% rename from lib/utils/ErrorPrepration.ts rename to lib/legacy/utils/ErrorPrepration.ts diff --git a/lib/utils/Key.ts b/lib/legacy/utils/Key.ts similarity index 100% rename from lib/utils/Key.ts rename to lib/legacy/utils/Key.ts diff --git a/lib/utils/localStorage.ts b/lib/legacy/utils/localStorage.ts similarity index 100% rename from lib/utils/localStorage.ts rename to lib/legacy/utils/localStorage.ts From 4c935696309a4431ef6b1580cfb6e1cf4a07ae1c Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Thu, 16 May 2024 19:59:37 +0200 Subject: [PATCH 02/14] Add viem and handle multiple chains --- lib/chains/constants.ts | 14 + lib/contracts/abis/holesky/PufferVaultV2.ts | 1783 +++++++++++++++++++ lib/vite-env.d.ts | 1 + package.json | 1 + pnpm-lock.yaml | 89 + 5 files changed, 1888 insertions(+) create mode 100644 lib/chains/constants.ts create mode 100644 lib/contracts/abis/holesky/PufferVaultV2.ts diff --git a/lib/chains/constants.ts b/lib/chains/constants.ts new file mode 100644 index 0000000..384bd81 --- /dev/null +++ b/lib/chains/constants.ts @@ -0,0 +1,14 @@ +import { Chain as ViemChain } from 'viem'; +import { mainnet, anvil, holesky } from 'viem/chains'; + +export enum Chain { + Mainnet = 'mainnet', + Holesky = 'holesky', + Anvil = 'anvil', +} + +export const Chains: { [key in Chain]: ViemChain } = { + [Chain.Mainnet]: mainnet, + [Chain.Holesky]: holesky, + [Chain.Anvil]: anvil, +}; diff --git a/lib/contracts/abis/holesky/PufferVaultV2.ts b/lib/contracts/abis/holesky/PufferVaultV2.ts new file mode 100644 index 0000000..dfdfd28 --- /dev/null +++ b/lib/contracts/abis/holesky/PufferVaultV2.ts @@ -0,0 +1,1783 @@ +export const PufferVaultV2 = [ + { + type: 'constructor', + inputs: [ + { + name: 'stETH', + type: 'address', + internalType: 'contract IStETH', + }, + { + name: 'weth', + type: 'address', + internalType: 'contract IWETH', + }, + { + name: 'lidoWithdrawalQueue', + type: 'address', + internalType: 'contract ILidoWithdrawalQueue', + }, + { + name: 'stETHStrategy', + type: 'address', + internalType: 'contract IStrategy', + }, + { + name: 'eigenStrategyManager', + type: 'address', + internalType: 'contract IEigenLayer', + }, + { + name: 'oracle', + type: 'address', + internalType: 'contract IPufferOracle', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'receive', + stateMutability: 'payable', + }, + { + type: 'function', + name: 'DOMAIN_SEPARATOR', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'PUFFER_ORACLE', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IPufferOracle', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'UPGRADE_INTERFACE_VERSION', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + 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: 'authority', + 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: 'burn', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalFromEigenLayer', + inputs: [ + { + name: 'queuedWithdrawal', + type: 'tuple', + internalType: 'struct IEigenLayer.QueuedWithdrawal', + components: [ + { + name: 'strategies', + type: 'address[]', + internalType: 'contract IStrategy[]', + }, + { + name: 'shares', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'depositor', + type: 'address', + internalType: 'address', + }, + { + name: 'withdrawerAndNonce', + type: 'tuple', + internalType: 'struct IEigenLayer.WithdrawerAndNonce', + components: [ + { + name: 'withdrawer', + type: 'address', + internalType: 'address', + }, + { + name: 'nonce', + type: 'uint96', + internalType: 'uint96', + }, + ], + }, + { + name: 'withdrawalStartBlock', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'delegatedAddress', + type: 'address', + internalType: 'address', + }, + ], + }, + { + name: 'tokens', + type: 'address[]', + internalType: 'contract IERC20[]', + }, + { + name: 'middlewareTimesIndex', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalsFromLido', + inputs: [ + { + name: 'requestIds', + 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: 'convertToShares', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'convertToSharesUp', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'decimals', + inputs: [], + outputs: [ + { + name: '', + type: 'uint8', + internalType: 'uint8', + }, + ], + stateMutability: 'pure', + }, + { + 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: 'depositETH', + inputs: [ + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'depositStETH', + inputs: [ + { + name: 'stETHSharesAmount', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'depositToEigenLayer', + inputs: [ + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'eip712Domain', + inputs: [], + outputs: [ + { + name: 'fields', + type: 'bytes1', + internalType: 'bytes1', + }, + { + name: 'name', + type: 'string', + internalType: 'string', + }, + { + name: 'version', + type: 'string', + internalType: 'string', + }, + { + name: 'chainId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'verifyingContract', + type: 'address', + internalType: 'address', + }, + { + name: 'salt', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'extensions', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getELBackingEthAmount', + inputs: [], + outputs: [ + { + name: 'ethAmount', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getExitFeeBasisPoints', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getPendingLidoETHAmount', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRemainingAssetsDailyWithdrawalLimit', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { + name: 'accessManager', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initiateETHWithdrawalsFromLido', + inputs: [ + { + name: 'amounts', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + outputs: [ + { + name: 'requestIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initiateStETHWithdrawalFromEigenLayer', + inputs: [ + { + name: 'sharesToWithdraw', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'isConsumingScheduledOp', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxDeposit', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxMint', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxRedeem', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxShares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxWithdraw', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxAssets', + 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: 'name', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'nonces', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'onERC721Received', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + { + name: '', + type: 'address', + internalType: 'address', + }, + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + { + name: '', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [ + { + name: '', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'permit', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'spender', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'v', + type: 'uint8', + internalType: 'uint8', + }, + { + name: 'r', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'previewDeposit', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewMint', + inputs: [ + { + name: 'shares', + 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: 'proxiableUUID', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + 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: 'setAuthority', + inputs: [ + { + name: 'newAuthority', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setDailyWithdrawalLimit', + inputs: [ + { + name: 'newLimit', + type: 'uint96', + internalType: 'uint96', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setExitFeeBasisPoints', + inputs: [ + { + name: 'newExitFeeBasisPoints', + type: 'uint256', + internalType: 'uint256', + }, + ], + 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: '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: 'transferETH', + inputs: [ + { + name: 'to', + type: 'address', + internalType: 'address', + }, + { + name: 'ethAmount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + 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: 'upgradeToAndCall', + inputs: [ + { + name: 'newImplementation', + type: 'address', + internalType: 'address', + }, + { + name: 'data', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + 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: 'AssetsWithdrawnToday', + inputs: [ + { + name: 'withdrawalAmount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AuthorityUpdated', + inputs: [ + { + name: 'authority', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ClaimedWithdrawals', + inputs: [ + { + name: 'requestIds', + type: 'uint256[]', + indexed: false, + internalType: 'uint256[]', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'DailyWithdrawalLimitReset', + inputs: [], + anonymous: false, + }, + { + type: 'event', + name: 'DailyWithdrawalLimitSet', + inputs: [ + { + name: 'oldLimit', + type: 'uint96', + indexed: false, + internalType: 'uint96', + }, + { + name: 'newLimit', + type: 'uint96', + indexed: false, + internalType: 'uint96', + }, + ], + 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: 'EIP712DomainChanged', + inputs: [], + anonymous: false, + }, + { + type: 'event', + name: 'ExitFeeBasisPointsSet', + inputs: [ + { + name: 'previousFee', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'newFee', + 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: 'LidoWithdrawal', + inputs: [ + { + name: 'expectedWithdrawal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'actualWithdrawal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RequestedWithdrawals', + inputs: [ + { + name: 'requestIds', + 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: 'TransferredETH', + inputs: [ + { + name: 'to', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Upgraded', + inputs: [ + { + name: 'implementation', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + 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: 'AccessManagedInvalidAuthority', + inputs: [ + { + name: 'authority', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'AccessManagedRequiredDelay', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + { + name: 'delay', + type: 'uint32', + internalType: 'uint32', + }, + ], + }, + { + type: 'error', + name: 'AccessManagedUnauthorized', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + ], + }, + { + 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: 'DepositAndWithdrawalForbidden', + inputs: [], + }, + { + type: 'error', + name: 'ECDSAInvalidSignature', + inputs: [], + }, + { + type: 'error', + name: 'ECDSAInvalidSignatureLength', + inputs: [ + { + name: 'length', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ECDSAInvalidSignatureS', + inputs: [ + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'ERC1967InvalidImplementation', + inputs: [ + { + name: 'implementation', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ERC1967NonPayable', + 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: 'ERC2612ExpiredSignature', + inputs: [ + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ERC2612InvalidSigner', + inputs: [ + { + name: 'signer', + type: 'address', + internalType: 'address', + }, + { + name: 'owner', + 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: 'ETHTransferFailed', + inputs: [], + }, + { + type: 'error', + name: 'EnumerableMapNonexistentKey', + inputs: [ + { + name: 'key', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'FailedInnerCall', + inputs: [], + }, + { + type: 'error', + name: 'InvalidAccountNonce', + inputs: [ + { + name: 'account', + type: 'address', + internalType: 'address', + }, + { + name: 'currentNonce', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'InvalidExitFeeBasisPoints', + inputs: [], + }, + { + type: 'error', + name: 'InvalidInitialization', + inputs: [], + }, + { + type: 'error', + name: 'InvalidWithdrawal', + inputs: [], + }, + { + type: 'error', + name: 'MathOverflowedMulDiv', + inputs: [], + }, + { + type: 'error', + name: 'NotInitializing', + inputs: [], + }, + { + type: 'error', + name: 'SafeERC20FailedOperation', + inputs: [ + { + name: 'token', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'UUPSUnauthorizedCallContext', + inputs: [], + }, + { + type: 'error', + name: 'UUPSUnsupportedProxiableUUID', + inputs: [ + { + name: 'slot', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'WithdrawalsAreDisabled', + inputs: [], + }, +] as const; diff --git a/lib/vite-env.d.ts b/lib/vite-env.d.ts index 11f02fe..a720f50 100644 --- a/lib/vite-env.d.ts +++ b/lib/vite-env.d.ts @@ -1 +1,2 @@ /// +/// diff --git a/package.json b/package.json index f69949e..ebb664b 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@chainsafe/bls": "^8.1.0", "@chainsafe/ssz": "^0.16.0", "ethers": "^6.12.1", + "viem": "^2.10.8", "web3": "^4.8.0" }, "peerDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a42296..9561b0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: react: specifier: '>= 16' version: 18.3.1 + viem: + specifier: ^2.10.8 + version: 2.10.8(typescript@5.4.5)(zod@3.23.8) web3: specifier: ^4.8.0 version: 4.8.0(typescript@5.4.5)(zod@3.23.8) @@ -63,6 +66,9 @@ importers: packages: + '@adraffy/ens-normalize@1.10.0': + resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + '@adraffy/ens-normalize@1.10.1': resolution: {integrity: sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==} @@ -532,9 +538,15 @@ packages: '@scure/base@1.1.6': resolution: {integrity: sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==} + '@scure/bip32@1.3.2': + resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} + '@scure/bip32@1.3.3': resolution: {integrity: sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==} + '@scure/bip39@1.2.1': + resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} + '@scure/bip39@1.2.2': resolution: {integrity: sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==} @@ -679,6 +691,17 @@ packages: zod: optional: true + abitype@1.0.0: + resolution: {integrity: sha512-NMeMah//6bJ56H5XRj8QCV4AwuW6hB6zqz2LnhhLdcWVQOsXki6/Pn3APeqxCma62nXIcmZWdu1DlHWS74umVQ==} + peerDependencies: + typescript: '>=5.0.4' + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1612,6 +1635,11 @@ packages: peerDependencies: ws: '*' + isows@1.0.4: + resolution: {integrity: sha512-hEzjY+x9u9hPmBom9IIAqdJCwNLax+xrPb51vEPpERoFlIxgmZcHzsT5jKG06nvInKOBGvReAVz80Umed5CczQ==} + peerDependencies: + ws: '*' + issue-parser@7.0.0: resolution: {integrity: sha512-jgAw78HO3gs9UrKqJNQvfDj9Ouy8Mhu40fbEJ8yXff4MW8+/Fcn9iFjyWUQ6SKbX8ipPk3X5A3AyfYHRu6uVLw==} engines: {node: ^18.17 || >=20.6.1} @@ -2418,6 +2446,14 @@ packages: resolution: {integrity: sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==} engines: {node: '>= 0.10'} + viem@2.10.8: + resolution: {integrity: sha512-ttCXlDmjjcZ8M/eJezXFzDtHj+RFOjEQ3elmXnCC7suXo/y8CuIM1LrIoyUFk7LKIE5E+bzmWUErS4u/MQBtpQ==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + vite-plugin-dts@3.9.1: resolution: {integrity: sha512-rVp2KM9Ue22NGWB8dNtWEr+KekN3rIgz1tWD050QnRGlriUCmaDwa7qA5zDEjbXg5lAXhYMSBJtx3q3hQIJZSg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2591,6 +2627,18 @@ packages: write-file-atomic@3.0.3: resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} + ws@8.13.0: + resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.17.0: resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} engines: {node: '>=10.0.0'} @@ -2640,6 +2688,8 @@ packages: snapshots: + '@adraffy/ens-normalize@1.10.0': {} + '@adraffy/ens-normalize@1.10.1': {} '@babel/code-frame@7.24.2': @@ -3045,12 +3095,23 @@ snapshots: '@scure/base@1.1.6': {} + '@scure/bip32@1.3.2': + dependencies: + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.3 + '@scure/base': 1.1.6 + '@scure/bip32@1.3.3': dependencies: '@noble/curves': 1.3.0 '@noble/hashes': 1.3.3 '@scure/base': 1.1.6 + '@scure/bip39@1.2.1': + dependencies: + '@noble/hashes': 1.3.3 + '@scure/base': 1.1.6 + '@scure/bip39@1.2.2': dependencies: '@noble/hashes': 1.3.3 @@ -3229,6 +3290,11 @@ snapshots: optionalDependencies: zod: 3.23.8 + abitype@1.0.0(typescript@5.4.5)(zod@3.23.8): + optionalDependencies: + typescript: 5.4.5 + zod: 3.23.8 + acorn-jsx@5.3.2(acorn@8.11.3): dependencies: acorn: 8.11.3 @@ -4300,6 +4366,10 @@ snapshots: dependencies: ws: 8.17.0 + isows@1.0.4(ws@8.13.0): + dependencies: + ws: 8.13.0 + issue-parser@7.0.0: dependencies: lodash.capitalize: 4.2.1 @@ -5145,6 +5215,23 @@ snapshots: validator@13.11.0: {} + viem@2.10.8(typescript@5.4.5)(zod@3.23.8): + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@scure/bip32': 1.3.2 + '@scure/bip39': 1.2.1 + abitype: 1.0.0(typescript@5.4.5)(zod@3.23.8) + isows: 1.0.4(ws@8.13.0) + ws: 8.13.0 + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + vite-plugin-dts@3.9.1(@types/node@20.12.11)(rollup@4.17.2)(typescript@5.4.5)(vite@5.2.11(@types/node@20.12.11)): dependencies: '@microsoft/api-extractor': 7.43.0(@types/node@20.12.11) @@ -5459,6 +5546,8 @@ snapshots: signal-exit: 3.0.7 typedarray-to-buffer: 3.1.5 + ws@8.13.0: {} + ws@8.17.0: {} ws@8.5.0: {} From 9aeff8ba655baa9078d6554b5d429168214d5084 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Fri, 17 May 2024 15:59:25 +0200 Subject: [PATCH 03/14] Add initial implementation for depositing ETH --- lib/api/puffer-client.ts | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lib/api/puffer-client.ts diff --git a/lib/api/puffer-client.ts b/lib/api/puffer-client.ts new file mode 100644 index 0000000..f7c701f --- /dev/null +++ b/lib/api/puffer-client.ts @@ -0,0 +1,50 @@ +import { + Address, + WalletClient, + createWalletClient, + custom, + getContract, +} from 'viem'; +import { PufferVaultV2 } from '../contracts/abis/holesky/PufferVaultV2'; +import { Chain, VIEM_CHAINS } from '../chains/constants'; +import { CHAIN_ADDRESSES } from '../contracts/addresses/addresses'; + +export class PufferClient { + private chain: Chain; + private walletClient: WalletClient; + + constructor(chain: Chain) { + this.chain = chain; + this.walletClient = createWalletClient({ + chain: VIEM_CHAINS[this.chain], + transport: custom(window.ethereum!), + }); + } + + public async depositETH(value: bigint) { + if (!this.walletClient.account) { + throw new Error('Client account not found'); + } + + const contract = getContract({ + address: CHAIN_ADDRESSES[this.chain].PufferVault as Address, + abi: PufferVaultV2, + client: this.walletClient, + }); + + // Simulating the contract to make sure everything works. + const { request } = await contract.simulate.depositETH( + [this.walletClient.account!.address], + { + account: this.walletClient.account!.address, + chain: VIEM_CHAINS[this.chain], + value, + }, + ); + + return await contract.write.depositETH( + [this.walletClient.account!.address], + request, + ); + } +} From e4496229ce282b34ffeead4ba7421e0d471dd18f Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Fri, 17 May 2024 17:44:55 +0200 Subject: [PATCH 04/14] Setup contract addresses and wallet connector --- lib/api/puffer-client.ts | 39 +- lib/api/wallet-connector.ts | 24 + lib/chains/constants.ts | 4 +- lib/contracts/abis/anvil/PufferVaultV2.ts | 1783 ++++++++++++++++++ lib/contracts/abis/holesky/PufferVaultV2.ts | 4 +- lib/contracts/abis/mainnet/PufferVaultV2.ts | 1860 +++++++++++++++++++ lib/contracts/addresses/addresses.ts | 10 + lib/contracts/addresses/anvil.json | 20 + lib/contracts/addresses/holesky.json | 20 + lib/contracts/addresses/mainnet.json | 14 + lib/main.ts | 4 +- 11 files changed, 3760 insertions(+), 22 deletions(-) create mode 100644 lib/api/wallet-connector.ts create mode 100644 lib/contracts/abis/anvil/PufferVaultV2.ts create mode 100644 lib/contracts/abis/mainnet/PufferVaultV2.ts create mode 100644 lib/contracts/addresses/addresses.ts create mode 100644 lib/contracts/addresses/anvil.json create mode 100644 lib/contracts/addresses/holesky.json create mode 100644 lib/contracts/addresses/mainnet.json diff --git a/lib/api/puffer-client.ts b/lib/api/puffer-client.ts index f7c701f..6b6c255 100644 --- a/lib/api/puffer-client.ts +++ b/lib/api/puffer-client.ts @@ -1,9 +1,12 @@ import { Address, + PublicClient, WalletClient, + createPublicClient, createWalletClient, custom, getContract, + http, } from 'viem'; import { PufferVaultV2 } from '../contracts/abis/holesky/PufferVaultV2'; import { Chain, VIEM_CHAINS } from '../chains/constants'; @@ -12,39 +15,39 @@ import { CHAIN_ADDRESSES } from '../contracts/addresses/addresses'; export class PufferClient { private chain: Chain; private walletClient: WalletClient; + private publicClient: PublicClient; constructor(chain: Chain) { this.chain = chain; + this.walletClient = createWalletClient({ chain: VIEM_CHAINS[this.chain], transport: custom(window.ethereum!), }); + this.publicClient = createPublicClient({ + chain: VIEM_CHAINS[this.chain], + transport: http(), + }); } - public async depositETH(value: bigint) { - if (!this.walletClient.account) { - throw new Error('Client account not found'); - } - + public async depositETH(walletAddress: Address, value: bigint) { const contract = getContract({ address: CHAIN_ADDRESSES[this.chain].PufferVault as Address, abi: PufferVaultV2, - client: this.walletClient, + client: { + wallet: this.walletClient, + // Public client is needed for simulation. + public: this.publicClient, + }, }); // Simulating the contract to make sure everything works. - const { request } = await contract.simulate.depositETH( - [this.walletClient.account!.address], - { - account: this.walletClient.account!.address, - chain: VIEM_CHAINS[this.chain], - value, - }, - ); + const { request } = await contract.simulate.depositETH([walletAddress], { + account: walletAddress, + chain: VIEM_CHAINS[this.chain], + value, + }); - return await contract.write.depositETH( - [this.walletClient.account!.address], - request, - ); + return await contract.write.depositETH([walletAddress], request); } } diff --git a/lib/api/wallet-connector.ts b/lib/api/wallet-connector.ts new file mode 100644 index 0000000..197f921 --- /dev/null +++ b/lib/api/wallet-connector.ts @@ -0,0 +1,24 @@ +import { Address } from 'viem'; + +export class WalletConnector { + constructor() { + this.validateEnvironment(); + } + + public async requestAddresses(): Promise { + return await window.ethereum!.request({ method: 'eth_requestAccounts' }); + } + + public async requestAddress(): Promise
{ + return (await this.requestAddresses())[0]; + } + + /** + * Validates that the browser environment has everything required. + */ + private validateEnvironment() { + if (!window.ethereum) { + throw new Error('JSON-RPC account not accessible.'); + } + } +} diff --git a/lib/chains/constants.ts b/lib/chains/constants.ts index 384bd81..43c714c 100644 --- a/lib/chains/constants.ts +++ b/lib/chains/constants.ts @@ -7,8 +7,10 @@ export enum Chain { Anvil = 'anvil', } -export const Chains: { [key in Chain]: ViemChain } = { +export const VIEM_CHAINS: { [key in Chain]: ViemChain } = { [Chain.Mainnet]: mainnet, [Chain.Holesky]: holesky, [Chain.Anvil]: anvil, }; + +export { type ViemChain }; diff --git a/lib/contracts/abis/anvil/PufferVaultV2.ts b/lib/contracts/abis/anvil/PufferVaultV2.ts new file mode 100644 index 0000000..5f91780 --- /dev/null +++ b/lib/contracts/abis/anvil/PufferVaultV2.ts @@ -0,0 +1,1783 @@ +export const PufferVaultV2 = [ + { + type: 'constructor', + inputs: [ + { + name: 'stETH', + type: 'address', + internalType: 'contract IStETH', + }, + { + name: 'weth', + type: 'address', + internalType: 'contract IWETH', + }, + { + name: 'lidoWithdrawalQueue', + type: 'address', + internalType: 'contract ILidoWithdrawalQueue', + }, + { + name: 'stETHStrategy', + type: 'address', + internalType: 'contract IStrategy', + }, + { + name: 'eigenStrategyManager', + type: 'address', + internalType: 'contract IEigenLayer', + }, + { + name: 'oracle', + type: 'address', + internalType: 'contract IPufferOracle', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'receive', + stateMutability: 'payable', + }, + { + type: 'function', + name: 'DOMAIN_SEPARATOR', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'PUFFER_ORACLE', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IPufferOracle', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'UPGRADE_INTERFACE_VERSION', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + 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: 'authority', + 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: 'burn', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalFromEigenLayer', + inputs: [ + { + name: 'queuedWithdrawal', + type: 'tuple', + internalType: 'struct IEigenLayer.QueuedWithdrawal', + components: [ + { + name: 'strategies', + type: 'address[]', + internalType: 'contract IStrategy[]', + }, + { + name: 'shares', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'depositor', + type: 'address', + internalType: 'address', + }, + { + name: 'withdrawerAndNonce', + type: 'tuple', + internalType: 'struct IEigenLayer.WithdrawerAndNonce', + components: [ + { + name: 'withdrawer', + type: 'address', + internalType: 'address', + }, + { + name: 'nonce', + type: 'uint96', + internalType: 'uint96', + }, + ], + }, + { + name: 'withdrawalStartBlock', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'delegatedAddress', + type: 'address', + internalType: 'address', + }, + ], + }, + { + name: 'tokens', + type: 'address[]', + internalType: 'contract IERC20[]', + }, + { + name: 'middlewareTimesIndex', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalsFromLido', + inputs: [ + { + name: 'requestIds', + 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: 'convertToShares', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'convertToSharesUp', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'decimals', + inputs: [], + outputs: [ + { + name: '', + type: 'uint8', + internalType: 'uint8', + }, + ], + stateMutability: 'pure', + }, + { + 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: 'depositETH', + inputs: [ + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'depositStETH', + inputs: [ + { + name: 'stETHSharesAmount', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'depositToEigenLayer', + inputs: [ + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'eip712Domain', + inputs: [], + outputs: [ + { + name: 'fields', + type: 'bytes1', + internalType: 'bytes1', + }, + { + name: 'name', + type: 'string', + internalType: 'string', + }, + { + name: 'version', + type: 'string', + internalType: 'string', + }, + { + name: 'chainId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'verifyingContract', + type: 'address', + internalType: 'address', + }, + { + name: 'salt', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'extensions', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getELBackingEthAmount', + inputs: [], + outputs: [ + { + name: 'ethAmount', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getExitFeeBasisPoints', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getPendingLidoETHAmount', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRemainingAssetsDailyWithdrawalLimit', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { + name: 'accessManager', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initiateETHWithdrawalsFromLido', + inputs: [ + { + name: 'amounts', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + outputs: [ + { + name: 'requestIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initiateStETHWithdrawalFromEigenLayer', + inputs: [ + { + name: 'sharesToWithdraw', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'isConsumingScheduledOp', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxDeposit', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxMint', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxRedeem', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxShares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxWithdraw', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxAssets', + 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: 'name', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'nonces', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'onERC721Received', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + { + name: '', + type: 'address', + internalType: 'address', + }, + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + { + name: '', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [ + { + name: '', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'permit', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'spender', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'v', + type: 'uint8', + internalType: 'uint8', + }, + { + name: 'r', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'previewDeposit', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewMint', + inputs: [ + { + name: 'shares', + 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: 'proxiableUUID', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + 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: 'setAuthority', + inputs: [ + { + name: 'newAuthority', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setDailyWithdrawalLimit', + inputs: [ + { + name: 'newLimit', + type: 'uint96', + internalType: 'uint96', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setExitFeeBasisPoints', + inputs: [ + { + name: 'newExitFeeBasisPoints', + type: 'uint256', + internalType: 'uint256', + }, + ], + 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: '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: 'transferETH', + inputs: [ + { + name: 'to', + type: 'address', + internalType: 'address', + }, + { + name: 'ethAmount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + 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: 'upgradeToAndCall', + inputs: [ + { + name: 'newImplementation', + type: 'address', + internalType: 'address', + }, + { + name: 'data', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + 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: 'AssetsWithdrawnToday', + inputs: [ + { + name: 'withdrawalAmount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AuthorityUpdated', + inputs: [ + { + name: 'authority', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ClaimedWithdrawals', + inputs: [ + { + name: 'requestIds', + type: 'uint256[]', + indexed: false, + internalType: 'uint256[]', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'DailyWithdrawalLimitReset', + inputs: [], + anonymous: false, + }, + { + type: 'event', + name: 'DailyWithdrawalLimitSet', + inputs: [ + { + name: 'oldLimit', + type: 'uint96', + indexed: false, + internalType: 'uint96', + }, + { + name: 'newLimit', + type: 'uint96', + indexed: false, + internalType: 'uint96', + }, + ], + 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: 'EIP712DomainChanged', + inputs: [], + anonymous: false, + }, + { + type: 'event', + name: 'ExitFeeBasisPointsSet', + inputs: [ + { + name: 'previousFee', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'newFee', + 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: 'LidoWithdrawal', + inputs: [ + { + name: 'expectedWithdrawal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'actualWithdrawal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RequestedWithdrawals', + inputs: [ + { + name: 'requestIds', + 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: 'TransferredETH', + inputs: [ + { + name: 'to', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Upgraded', + inputs: [ + { + name: 'implementation', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + 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: 'AccessManagedInvalidAuthority', + inputs: [ + { + name: 'authority', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'AccessManagedRequiredDelay', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + { + name: 'delay', + type: 'uint32', + internalType: 'uint32', + }, + ], + }, + { + type: 'error', + name: 'AccessManagedUnauthorized', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + ], + }, + { + 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: 'DepositAndWithdrawalForbidden', + inputs: [], + }, + { + type: 'error', + name: 'ECDSAInvalidSignature', + inputs: [], + }, + { + type: 'error', + name: 'ECDSAInvalidSignatureLength', + inputs: [ + { + name: 'length', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ECDSAInvalidSignatureS', + inputs: [ + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'ERC1967InvalidImplementation', + inputs: [ + { + name: 'implementation', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ERC1967NonPayable', + 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: 'ERC2612ExpiredSignature', + inputs: [ + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ERC2612InvalidSigner', + inputs: [ + { + name: 'signer', + type: 'address', + internalType: 'address', + }, + { + name: 'owner', + 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: 'ETHTransferFailed', + inputs: [], + }, + { + type: 'error', + name: 'EnumerableMapNonexistentKey', + inputs: [ + { + name: 'key', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'FailedInnerCall', + inputs: [], + }, + { + type: 'error', + name: 'InvalidAccountNonce', + inputs: [ + { + name: 'account', + type: 'address', + internalType: 'address', + }, + { + name: 'currentNonce', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'InvalidExitFeeBasisPoints', + inputs: [], + }, + { + type: 'error', + name: 'InvalidInitialization', + inputs: [], + }, + { + type: 'error', + name: 'InvalidWithdrawal', + inputs: [], + }, + { + type: 'error', + name: 'MathOverflowedMulDiv', + inputs: [], + }, + { + type: 'error', + name: 'NotInitializing', + inputs: [], + }, + { + type: 'error', + name: 'SafeERC20FailedOperation', + inputs: [ + { + name: 'token', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'UUPSUnauthorizedCallContext', + inputs: [], + }, + { + type: 'error', + name: 'UUPSUnsupportedProxiableUUID', + inputs: [ + { + name: 'slot', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'WithdrawalsAreDisabled', + inputs: [], + }, +]; diff --git a/lib/contracts/abis/holesky/PufferVaultV2.ts b/lib/contracts/abis/holesky/PufferVaultV2.ts index dfdfd28..5f91780 100644 --- a/lib/contracts/abis/holesky/PufferVaultV2.ts +++ b/lib/contracts/abis/holesky/PufferVaultV2.ts @@ -1,4 +1,4 @@ -export const PufferVaultV2 = [ +export const PufferVaultV2 = [ { type: 'constructor', inputs: [ @@ -1780,4 +1780,4 @@ export const PufferVaultV2 = [ name: 'WithdrawalsAreDisabled', inputs: [], }, -] as const; +]; diff --git a/lib/contracts/abis/mainnet/PufferVaultV2.ts b/lib/contracts/abis/mainnet/PufferVaultV2.ts new file mode 100644 index 0000000..966fd3a --- /dev/null +++ b/lib/contracts/abis/mainnet/PufferVaultV2.ts @@ -0,0 +1,1860 @@ +export const PufferVaultV2 = [ + { + type: 'constructor', + inputs: [ + { + name: 'stETH', + type: 'address', + internalType: 'contract IStETH', + }, + { + name: 'weth', + type: 'address', + internalType: 'contract IWETH', + }, + { + name: 'lidoWithdrawalQueue', + type: 'address', + internalType: 'contract ILidoWithdrawalQueue', + }, + { + name: 'stETHStrategy', + type: 'address', + internalType: 'contract IStrategy', + }, + { + name: 'eigenStrategyManager', + type: 'address', + internalType: 'contract IEigenLayer', + }, + { + name: 'oracle', + type: 'address', + internalType: 'contract IPufferOracle', + }, + { + name: 'delegationManager', + type: 'address', + internalType: 'contract IDelegationManager', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'receive', + stateMutability: 'payable', + }, + { + type: 'function', + name: 'DOMAIN_SEPARATOR', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'PUFFER_ORACLE', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IPufferOracle', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'UPGRADE_INTERFACE_VERSION', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + 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: 'authority', + 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: 'burn', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalFromEigenLayer', + inputs: [ + { + name: 'queuedWithdrawal', + type: 'tuple', + internalType: 'struct IEigenLayer.QueuedWithdrawal', + components: [ + { + name: 'strategies', + type: 'address[]', + internalType: 'contract IStrategy[]', + }, + { + name: 'shares', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'depositor', + type: 'address', + internalType: 'address', + }, + { + name: 'withdrawerAndNonce', + type: 'tuple', + internalType: 'struct IEigenLayer.WithdrawerAndNonce', + components: [ + { + name: 'withdrawer', + type: 'address', + internalType: 'address', + }, + { + name: 'nonce', + type: 'uint96', + internalType: 'uint96', + }, + ], + }, + { + name: 'withdrawalStartBlock', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'delegatedAddress', + type: 'address', + internalType: 'address', + }, + ], + }, + { + name: 'tokens', + type: 'address[]', + internalType: 'contract IERC20[]', + }, + { + name: 'middlewareTimesIndex', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalFromEigenLayerM2', + inputs: [ + { + name: 'queuedWithdrawal', + type: 'tuple', + internalType: 'struct IEigenLayer.QueuedWithdrawal', + components: [ + { + name: 'strategies', + type: 'address[]', + internalType: 'contract IStrategy[]', + }, + { + name: 'shares', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'depositor', + type: 'address', + internalType: 'address', + }, + { + name: 'withdrawerAndNonce', + type: 'tuple', + internalType: 'struct IEigenLayer.WithdrawerAndNonce', + components: [ + { + name: 'withdrawer', + type: 'address', + internalType: 'address', + }, + { + name: 'nonce', + type: 'uint96', + internalType: 'uint96', + }, + ], + }, + { + name: 'withdrawalStartBlock', + type: 'uint32', + internalType: 'uint32', + }, + { + name: 'delegatedAddress', + type: 'address', + internalType: 'address', + }, + ], + }, + { + name: 'tokens', + type: 'address[]', + internalType: 'contract IERC20[]', + }, + { + name: 'middlewareTimesIndex', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'nonce', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimWithdrawalsFromLido', + inputs: [ + { + name: 'requestIds', + 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: 'convertToShares', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'convertToSharesUp', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'decimals', + inputs: [], + outputs: [ + { + name: '', + type: 'uint8', + internalType: 'uint8', + }, + ], + stateMutability: 'pure', + }, + { + 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: 'depositETH', + inputs: [ + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'payable', + }, + { + type: 'function', + name: 'depositStETH', + inputs: [ + { + name: 'stETHSharesAmount', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'depositToEigenLayer', + inputs: [ + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'eip712Domain', + inputs: [], + outputs: [ + { + name: 'fields', + type: 'bytes1', + internalType: 'bytes1', + }, + { + name: 'name', + type: 'string', + internalType: 'string', + }, + { + name: 'version', + type: 'string', + internalType: 'string', + }, + { + name: 'chainId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'verifyingContract', + type: 'address', + internalType: 'address', + }, + { + name: 'salt', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'extensions', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getELBackingEthAmount', + inputs: [], + outputs: [ + { + name: 'ethAmount', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getExitFeeBasisPoints', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getPendingLidoETHAmount', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getRemainingAssetsDailyWithdrawalLimit', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'initialize', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initialize', + inputs: [ + { + name: 'accessManager', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initiateETHWithdrawalsFromLido', + inputs: [ + { + name: 'amounts', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + outputs: [ + { + name: 'requestIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'initiateStETHWithdrawalFromEigenLayer', + inputs: [ + { + name: 'sharesToWithdraw', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'isConsumingScheduledOp', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxDeposit', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxMint', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxRedeem', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxShares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxWithdraw', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxAssets', + 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: 'name', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'nonces', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'onERC721Received', + inputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + { + name: '', + type: 'address', + internalType: 'address', + }, + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + { + name: '', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [ + { + name: '', + type: 'bytes4', + internalType: 'bytes4', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'permit', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'spender', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'v', + type: 'uint8', + internalType: 'uint8', + }, + { + name: 'r', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'previewDeposit', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewMint', + inputs: [ + { + name: 'shares', + 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: 'proxiableUUID', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + 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: 'setAuthority', + inputs: [ + { + name: 'newAuthority', + type: 'address', + internalType: 'address', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setDailyWithdrawalLimit', + inputs: [ + { + name: 'newLimit', + type: 'uint96', + internalType: 'uint96', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'setExitFeeBasisPoints', + inputs: [ + { + name: 'newExitFeeBasisPoints', + type: 'uint256', + internalType: 'uint256', + }, + ], + 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: '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: 'transferETH', + inputs: [ + { + name: 'to', + type: 'address', + internalType: 'address', + }, + { + name: 'ethAmount', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [], + 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: 'upgradeToAndCall', + inputs: [ + { + name: 'newImplementation', + type: 'address', + internalType: 'address', + }, + { + name: 'data', + type: 'bytes', + internalType: 'bytes', + }, + ], + outputs: [], + stateMutability: 'payable', + }, + { + 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: 'AssetsWithdrawnToday', + inputs: [ + { + name: 'withdrawalAmount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'AuthorityUpdated', + inputs: [ + { + name: 'authority', + type: 'address', + indexed: false, + internalType: 'address', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ClaimedWithdrawals', + inputs: [ + { + name: 'requestIds', + type: 'uint256[]', + indexed: false, + internalType: 'uint256[]', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'DailyWithdrawalLimitReset', + inputs: [], + anonymous: false, + }, + { + type: 'event', + name: 'DailyWithdrawalLimitSet', + inputs: [ + { + name: 'oldLimit', + type: 'uint96', + indexed: false, + internalType: 'uint96', + }, + { + name: 'newLimit', + type: 'uint96', + indexed: false, + internalType: 'uint96', + }, + ], + 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: 'EIP712DomainChanged', + inputs: [], + anonymous: false, + }, + { + type: 'event', + name: 'ExitFeeBasisPointsSet', + inputs: [ + { + name: 'previousFee', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'newFee', + 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: 'LidoWithdrawal', + inputs: [ + { + name: 'expectedWithdrawal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'actualWithdrawal', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RequestedWithdrawals', + inputs: [ + { + name: 'requestIds', + 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: 'TransferredETH', + inputs: [ + { + name: 'to', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Upgraded', + inputs: [ + { + name: 'implementation', + type: 'address', + indexed: true, + internalType: 'address', + }, + ], + 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: 'AccessManagedInvalidAuthority', + inputs: [ + { + name: 'authority', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'AccessManagedRequiredDelay', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + { + name: 'delay', + type: 'uint32', + internalType: 'uint32', + }, + ], + }, + { + type: 'error', + name: 'AccessManagedUnauthorized', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + ], + }, + { + 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: 'DepositAndWithdrawalForbidden', + inputs: [], + }, + { + type: 'error', + name: 'ECDSAInvalidSignature', + inputs: [], + }, + { + type: 'error', + name: 'ECDSAInvalidSignatureLength', + inputs: [ + { + name: 'length', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ECDSAInvalidSignatureS', + inputs: [ + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'ERC1967InvalidImplementation', + inputs: [ + { + name: 'implementation', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'ERC1967NonPayable', + 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: 'ERC2612ExpiredSignature', + inputs: [ + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'ERC2612InvalidSigner', + inputs: [ + { + name: 'signer', + type: 'address', + internalType: 'address', + }, + { + name: 'owner', + 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: 'ETHTransferFailed', + inputs: [], + }, + { + type: 'error', + name: 'EnumerableMapNonexistentKey', + inputs: [ + { + name: 'key', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'FailedInnerCall', + inputs: [], + }, + { + type: 'error', + name: 'InvalidAccountNonce', + inputs: [ + { + name: 'account', + type: 'address', + internalType: 'address', + }, + { + name: 'currentNonce', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + { + type: 'error', + name: 'InvalidExitFeeBasisPoints', + inputs: [], + }, + { + type: 'error', + name: 'InvalidInitialization', + inputs: [], + }, + { + type: 'error', + name: 'InvalidWithdrawal', + inputs: [], + }, + { + type: 'error', + name: 'MathOverflowedMulDiv', + inputs: [], + }, + { + type: 'error', + name: 'NotInitializing', + inputs: [], + }, + { + type: 'error', + name: 'SafeERC20FailedOperation', + inputs: [ + { + name: 'token', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'UUPSUnauthorizedCallContext', + inputs: [], + }, + { + type: 'error', + name: 'UUPSUnsupportedProxiableUUID', + inputs: [ + { + name: 'slot', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + type: 'error', + name: 'WithdrawalsAreDisabled', + inputs: [], + }, +]; diff --git a/lib/contracts/addresses/addresses.ts b/lib/contracts/addresses/addresses.ts new file mode 100644 index 0000000..9234610 --- /dev/null +++ b/lib/contracts/addresses/addresses.ts @@ -0,0 +1,10 @@ +import { Chain } from '../../chains/constants'; +import mainnetAddresses from './anvil.json'; +import holeskyAddresses from './anvil.json'; +import anvilAddresses from './anvil.json'; + +export const CHAIN_ADDRESSES = { + [Chain.Mainnet]: mainnetAddresses, + [Chain.Holesky]: holeskyAddresses, + [Chain.Anvil]: anvilAddresses, +}; diff --git a/lib/contracts/addresses/anvil.json b/lib/contracts/addresses/anvil.json new file mode 100644 index 0000000..d6c6b00 --- /dev/null +++ b/lib/contracts/addresses/anvil.json @@ -0,0 +1,20 @@ +{ + "": "", + "PufferDepositor": "0x7023ac919031431874e905aBED5DB587082f76C0", + "PufferDepositorImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", + "PufferVault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", + "PufferVaultImplementation": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0", + "accessManager": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "dao": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "depositor": "0x7023ac919031431874e905aBED5DB587082f76C0", + "enclaveVerifier": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", + "guardianModule": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", + "moduleBeacon": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", + "moduleManager": "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB", + "oracle": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c", + "protocol": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E", + "stETH/stETH Mock": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "validatorTicket": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F", + "vault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", + "weth/weth Mock": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" +} diff --git a/lib/contracts/addresses/holesky.json b/lib/contracts/addresses/holesky.json new file mode 100644 index 0000000..3268822 --- /dev/null +++ b/lib/contracts/addresses/holesky.json @@ -0,0 +1,20 @@ +{ + "": "", + "PufferDepositor": "0x9BEF4B8E025ecc91FE5Ee865f4880b106F106e5a", + "PufferDepositorImplementation": "0x335b6C8F5aA0073849A174c73EbA985b851d18e6", + "PufferVault": "0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa", + "PufferVaultImplementation": "0x2937fCae8d2E14bAD487db0AaD535751EE955961", + "accessManager": "0xA6c916f85DAfeb6f726E03a1Ce8d08cf835138fF", + "dao": "0xDDDeAfB492752FC64220ddB3E7C9f1d5CcCdFdF0", + "depositor": "0x9BEF4B8E025ecc91FE5Ee865f4880b106F106e5a", + "enclaveVerifier": "0x79200dE6299F27b7354Ca95A09a9C3978DBEDf24", + "guardianModule": "0xD349FdCD0e4451381bfE7cba3ac28773E176b326", + "moduleBeacon": "0x5B81A4579f466fB17af4d8CC0ED51256b94c61D4", + "moduleManager": "0xe4695ab93163F91665Ce5b96527408336f070a71", + "oracle": "0xEf93AA29F627465A7f58A1F25980c90116f27b74", + "protocol": "0x705E27D6A6A0c77081D32C07DbDE5A1E139D3F14", + "stETH/stETH Mock": "0x06ea70844bAdEac532ba750de1c4C853903fb542", + "validatorTicket": "0xA143c6bFAff0B25B485454a9a8DB94dC469F8c3b", + "vault": "0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa", + "weth/weth Mock": "0x67cAE813C252a5B911Da0EA476997661E39C4d87" +} diff --git a/lib/contracts/addresses/mainnet.json b/lib/contracts/addresses/mainnet.json new file mode 100644 index 0000000..97fd171 --- /dev/null +++ b/lib/contracts/addresses/mainnet.json @@ -0,0 +1,14 @@ +{ + "": "", + "PufferDepositor": "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff", + "PufferVault": "0xD9A442856C234a39a81a089C06451EBAa4306a72", + "accessManager": "0x8c1686069474410E6243425f4a10177a94EBEE11", + "depositor": "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff", + "enclaveVerifier": "0x1d03e4bCC928795B1EEac1205fa9dDC4a3241D95", + "guardianModule": "0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2", + "moduleManager": "0x9E1E4fCb49931df5743e659ad910d331735C3860", + "oracle": "0x8eFd1Dc43AD073232F3e2924e22F173879119489", + "pufferProtocolProxy": "0xf7b6B32492c2e13799D921E84202450131bd238B", + "validatorTicketProxy": "0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A", + "vault": "0xD9A442856C234a39a81a089C06451EBAa4306a72" +} diff --git a/lib/main.ts b/lib/main.ts index bc81dd5..03689d4 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -1 +1,3 @@ -export const add = (a: number, b: number) => a + b; +export * from './api/puffer-client'; +export * from './api/wallet-connector'; +export * from './chains/constants'; From 0406bc489d5a812fb79099da986fec47e5731029 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Fri, 17 May 2024 20:03:31 +0200 Subject: [PATCH 05/14] Remove wallet connector and don't simulate depositETH --- lib/api/puffer-client.ts | 28 +++++++++++++++++++++------- lib/api/wallet-connector.ts | 24 ------------------------ lib/main.ts | 1 - 3 files changed, 21 insertions(+), 32 deletions(-) delete mode 100644 lib/api/wallet-connector.ts diff --git a/lib/api/puffer-client.ts b/lib/api/puffer-client.ts index 6b6c255..e911798 100644 --- a/lib/api/puffer-client.ts +++ b/lib/api/puffer-client.ts @@ -9,27 +9,35 @@ import { http, } from 'viem'; import { PufferVaultV2 } from '../contracts/abis/holesky/PufferVaultV2'; -import { Chain, VIEM_CHAINS } from '../chains/constants'; +import { Chain, VIEM_CHAINS, ViemChain } from '../chains/constants'; import { CHAIN_ADDRESSES } from '../contracts/addresses/addresses'; export class PufferClient { private chain: Chain; + private viemChain: ViemChain; private walletClient: WalletClient; private publicClient: PublicClient; constructor(chain: Chain) { + this.validateEnvironment(); + this.chain = chain; + this.viemChain = VIEM_CHAINS[this.chain]; this.walletClient = createWalletClient({ - chain: VIEM_CHAINS[this.chain], + chain: this.viemChain, transport: custom(window.ethereum!), }); this.publicClient = createPublicClient({ - chain: VIEM_CHAINS[this.chain], + chain: this.viemChain, transport: http(), }); } + public async requestAddresses() { + return await this.walletClient.requestAddresses(); + } + public async depositETH(walletAddress: Address, value: bigint) { const contract = getContract({ address: CHAIN_ADDRESSES[this.chain].PufferVault as Address, @@ -41,13 +49,19 @@ export class PufferClient { }, }); - // Simulating the contract to make sure everything works. - const { request } = await contract.simulate.depositETH([walletAddress], { + return await contract.write.depositETH([walletAddress], { account: walletAddress, - chain: VIEM_CHAINS[this.chain], + chain: this.viemChain, value, }); + } - return await contract.write.depositETH([walletAddress], request); + /** + * Validates that the browser environment is correct. + */ + private validateEnvironment() { + if (!window.ethereum) { + throw new Error('JSON-RPC account not accessible.'); + } } } diff --git a/lib/api/wallet-connector.ts b/lib/api/wallet-connector.ts deleted file mode 100644 index 197f921..0000000 --- a/lib/api/wallet-connector.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Address } from 'viem'; - -export class WalletConnector { - constructor() { - this.validateEnvironment(); - } - - public async requestAddresses(): Promise { - return await window.ethereum!.request({ method: 'eth_requestAccounts' }); - } - - public async requestAddress(): Promise
{ - return (await this.requestAddresses())[0]; - } - - /** - * Validates that the browser environment has everything required. - */ - private validateEnvironment() { - if (!window.ethereum) { - throw new Error('JSON-RPC account not accessible.'); - } - } -} diff --git a/lib/main.ts b/lib/main.ts index 03689d4..649e1e4 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -1,3 +1,2 @@ export * from './api/puffer-client'; -export * from './api/wallet-connector'; export * from './chains/constants'; From 97910563f2df7763c52472833740048d78f552aa Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Fri, 17 May 2024 20:34:10 +0200 Subject: [PATCH 06/14] Directly use wallet to process contract --- lib/api/puffer-client.ts | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/api/puffer-client.ts b/lib/api/puffer-client.ts index e911798..20a8e02 100644 --- a/lib/api/puffer-client.ts +++ b/lib/api/puffer-client.ts @@ -5,15 +5,17 @@ import { createPublicClient, createWalletClient, custom, - getContract, http, } from 'viem'; -import { PufferVaultV2 } from '../contracts/abis/holesky/PufferVaultV2'; import { Chain, VIEM_CHAINS, ViemChain } from '../chains/constants'; import { CHAIN_ADDRESSES } from '../contracts/addresses/addresses'; +import { ValueOf } from '../utils/types'; +import { CHAIN_ABIS } from '../contracts/abis/abis'; export class PufferClient { - private chain: Chain; + private chainAddresses: ValueOf; + private chainAbis: ValueOf; + private viemChain: ViemChain; private walletClient: WalletClient; private publicClient: PublicClient; @@ -21,8 +23,9 @@ export class PufferClient { constructor(chain: Chain) { this.validateEnvironment(); - this.chain = chain; - this.viemChain = VIEM_CHAINS[this.chain]; + this.chainAddresses = CHAIN_ADDRESSES[chain]; + this.chainAbis = CHAIN_ABIS[chain]; + this.viemChain = VIEM_CHAINS[chain]; this.walletClient = createWalletClient({ chain: this.viemChain, @@ -38,20 +41,25 @@ export class PufferClient { return await this.walletClient.requestAddresses(); } - public async depositETH(walletAddress: Address, value: bigint) { - const contract = getContract({ - address: CHAIN_ADDRESSES[this.chain].PufferVault as Address, - abi: PufferVaultV2, - client: { - wallet: this.walletClient, - // Public client is needed for simulation. - public: this.publicClient, - }, + public async estimateGas(walletAddress: Address, value: bigint) { + return await this.publicClient.estimateContractGas({ + address: this.chainAddresses.PufferVault as Address, + account: walletAddress, + abi: this.chainAbis.PufferVaultV2, + functionName: 'depositETH', + args: [walletAddress], + value, }); + } - return await contract.write.depositETH([walletAddress], { + public async depositETH(walletAddress: Address, value: bigint) { + return await this.walletClient.writeContract({ + address: this.chainAddresses.PufferVault as Address, account: walletAddress, + abi: this.chainAbis.PufferVaultV2, chain: this.viemChain, + functionName: 'depositETH', + args: [walletAddress], value, }); } From 203a1fca69c3d6d94ea474704dadc1b4963b9ffc Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Fri, 17 May 2024 20:58:04 +0200 Subject: [PATCH 07/14] Implement a newer way to estimate and transact a function --- lib/api/puffer-client.ts | 38 +++++++++++++++++++++----------------- lib/contracts/abis/abis.ts | 16 ++++++++++++++++ lib/utils/types.ts | 1 + 3 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 lib/contracts/abis/abis.ts create mode 100644 lib/utils/types.ts diff --git a/lib/api/puffer-client.ts b/lib/api/puffer-client.ts index 20a8e02..d0c2d71 100644 --- a/lib/api/puffer-client.ts +++ b/lib/api/puffer-client.ts @@ -5,6 +5,7 @@ import { createPublicClient, createWalletClient, custom, + getContract, http, } from 'viem'; import { Chain, VIEM_CHAINS, ViemChain } from '../chains/constants'; @@ -41,27 +42,30 @@ export class PufferClient { return await this.walletClient.requestAddresses(); } - public async estimateGas(walletAddress: Address, value: bigint) { - return await this.publicClient.estimateContractGas({ + public depositETH(walletAddress: Address) { + const contract = getContract({ address: this.chainAddresses.PufferVault as Address, - account: walletAddress, abi: this.chainAbis.PufferVaultV2, - functionName: 'depositETH', - args: [walletAddress], - value, + client: { + wallet: this.walletClient, + // Public client is needed for simulation. + public: this.publicClient, + }, }); - } - public async depositETH(walletAddress: Address, value: bigint) { - return await this.walletClient.writeContract({ - address: this.chainAddresses.PufferVault as Address, - account: walletAddress, - abi: this.chainAbis.PufferVaultV2, - chain: this.viemChain, - functionName: 'depositETH', - args: [walletAddress], - value, - }); + const transact = async (value: bigint) => + await contract.write.depositETH([walletAddress], { + account: walletAddress, + chain: this.viemChain, + value, + }); + + const estimate = async () => + await contract.estimateGas.depositETH([walletAddress], { + account: walletAddress, + }); + + return { transact, estimate }; } /** diff --git a/lib/contracts/abis/abis.ts b/lib/contracts/abis/abis.ts new file mode 100644 index 0000000..c960b2e --- /dev/null +++ b/lib/contracts/abis/abis.ts @@ -0,0 +1,16 @@ +import { Chain } from '../../chains/constants'; +import { PufferVaultV2 as MainNetPufferVaultV2 } from './mainnet/PufferVaultV2'; +import { PufferVaultV2 as HoleskyPufferVaultV2 } from './holesky/PufferVaultV2'; +import { PufferVaultV2 as AnvilPufferVaultV2 } from './anvil/PufferVaultV2'; + +export const CHAIN_ABIS = { + [Chain.Mainnet]: { + PufferVaultV2: MainNetPufferVaultV2, + }, + [Chain.Holesky]: { + PufferVaultV2: HoleskyPufferVaultV2, + }, + [Chain.Anvil]: { + PufferVaultV2: AnvilPufferVaultV2, + }, +}; diff --git a/lib/utils/types.ts b/lib/utils/types.ts new file mode 100644 index 0000000..5f2cf2c --- /dev/null +++ b/lib/utils/types.ts @@ -0,0 +1 @@ +export type ValueOf = T[keyof T]; From 235b5769c92a585d88ba83069eac2019b77ed697 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 20 May 2024 12:29:48 +0200 Subject: [PATCH 08/14] Rename the library to puffer-sdk --- README.md | 10 +++++----- package.json | 4 ++-- vite.config.ts | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 316728e..39044fb 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,12 @@ There are multiple ways to use the package. Install the dependency through GitHub URL. ```sh -npm install github:pufferfinance/puffer-smart-contract-lib -pnpm install github:pufferfinance/puffer-smart-contract-lib -yarn add github:pufferfinance/puffer-smart-contract-lib +npm install github:pufferfinance/puffer-sdk +pnpm install github:pufferfinance/puffer-sdk +yarn add github:pufferfinance/puffer-sdk ``` -Add `#` (for example, `github:pufferfinance/puffer-smart-contract-lib#1.0.0`) at the end to use a different published tag from GitHub (). +Add `#` (for example, `github:pufferfinance/puffer-sdk#1.0.0`) at the end to use a different published tag from GitHub (). ### GitHub Packages @@ -60,4 +60,4 @@ pnpm dev ## Release -The release is automated using [release-it](https://github.com/release-it/release-it) and the [`publish.yml`](./.github/workflows/publish.yml) GitHub action. The action can be [dispatched manually](https://github.com/PufferFinance/puffer-smart-contract-lib/actions/workflows/publish.yml) to make the release. +The release is automated using [release-it](https://github.com/release-it/release-it) and the [`publish.yml`](./.github/workflows/publish.yml) GitHub action. The action can be [dispatched manually](https://github.com/PufferFinance/puffer-sdk/actions/workflows/publish.yml) to make the release. diff --git a/package.json b/package.json index ebb664b..97078dd 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "@pufferfinance/smart-contract-lib", + "name": "@pufferfinance/puffer-sdk", "description": "Library for Puffer smart contract interactions", "version": "0.0.4-0", "repository": { "type": "git", - "url": "https://github.com/PufferFinance/puffer-smart-contract-lib.git" + "url": "https://github.com/PufferFinance/puffer-sdk.git" }, "type": "module", "main": "./dist/main.cjs", diff --git a/vite.config.ts b/vite.config.ts index ef547dd..e40712e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,8 +4,9 @@ import dts from 'vite-plugin-dts'; export default defineConfig({ build: { + sourcemap: true, lib: { - name: 'puffer-smart-contract-lib', + name: 'puffer-sdk', entry: resolve(__dirname, './lib/main.ts'), fileName: 'main', formats: ['es', 'cjs'], From fd2e9e20b982c210e2576b5e54d556a5775dc1b3 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 20 May 2024 12:40:09 +0200 Subject: [PATCH 09/14] Move addresses to typescript and throw specific errors --- lib/api/puffer-client.ts | 7 +++++-- lib/contracts/addresses.ts | 14 ++++++++++++++ lib/contracts/addresses/addresses.ts | 10 ---------- lib/contracts/addresses/anvil.json | 20 -------------------- lib/contracts/addresses/holesky.json | 20 -------------------- lib/contracts/addresses/mainnet.json | 14 -------------- lib/errors/types.ts | 4 ++++ lib/errors/validation-errors.ts | 15 +++++++++++++++ 8 files changed, 38 insertions(+), 66 deletions(-) create mode 100644 lib/contracts/addresses.ts delete mode 100644 lib/contracts/addresses/addresses.ts delete mode 100644 lib/contracts/addresses/anvil.json delete mode 100644 lib/contracts/addresses/holesky.json delete mode 100644 lib/contracts/addresses/mainnet.json create mode 100644 lib/errors/types.ts create mode 100644 lib/errors/validation-errors.ts diff --git a/lib/api/puffer-client.ts b/lib/api/puffer-client.ts index d0c2d71..b48fa6b 100644 --- a/lib/api/puffer-client.ts +++ b/lib/api/puffer-client.ts @@ -9,9 +9,10 @@ import { http, } from 'viem'; import { Chain, VIEM_CHAINS, ViemChain } from '../chains/constants'; -import { CHAIN_ADDRESSES } from '../contracts/addresses/addresses'; +import { CHAIN_ADDRESSES } from '../contracts/addresses'; import { ValueOf } from '../utils/types'; import { CHAIN_ABIS } from '../contracts/abis/abis'; +import { AccountError } from '../errors/validation-errors'; export class PufferClient { private chainAddresses: ValueOf; @@ -73,7 +74,9 @@ export class PufferClient { */ private validateEnvironment() { if (!window.ethereum) { - throw new Error('JSON-RPC account not accessible.'); + throw new AccountError('JSON-RPC account not accessible.', { + fixMessage: 'Make sure a JSON-RPC wallet is set up in the browser.', + }); } } } diff --git a/lib/contracts/addresses.ts b/lib/contracts/addresses.ts new file mode 100644 index 0000000..7ad0185 --- /dev/null +++ b/lib/contracts/addresses.ts @@ -0,0 +1,14 @@ +import { Chain } from '../chains/constants'; + +// Source of truth: https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments +export const CHAIN_ADDRESSES = { + [Chain.Mainnet]: { + PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72', + }, + [Chain.Holesky]: { + PufferVault: '0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa', + }, + [Chain.Anvil]: { + PufferVault: '0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371', + }, +}; diff --git a/lib/contracts/addresses/addresses.ts b/lib/contracts/addresses/addresses.ts deleted file mode 100644 index 9234610..0000000 --- a/lib/contracts/addresses/addresses.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Chain } from '../../chains/constants'; -import mainnetAddresses from './anvil.json'; -import holeskyAddresses from './anvil.json'; -import anvilAddresses from './anvil.json'; - -export const CHAIN_ADDRESSES = { - [Chain.Mainnet]: mainnetAddresses, - [Chain.Holesky]: holeskyAddresses, - [Chain.Anvil]: anvilAddresses, -}; diff --git a/lib/contracts/addresses/anvil.json b/lib/contracts/addresses/anvil.json deleted file mode 100644 index d6c6b00..0000000 --- a/lib/contracts/addresses/anvil.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x7023ac919031431874e905aBED5DB587082f76C0", - "PufferDepositorImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", - "PufferVault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", - "PufferVaultImplementation": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0", - "accessManager": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", - "dao": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "depositor": "0x7023ac919031431874e905aBED5DB587082f76C0", - "enclaveVerifier": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", - "guardianModule": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", - "moduleBeacon": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", - "moduleManager": "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB", - "oracle": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c", - "protocol": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E", - "stETH/stETH Mock": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", - "validatorTicket": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F", - "vault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", - "weth/weth Mock": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" -} diff --git a/lib/contracts/addresses/holesky.json b/lib/contracts/addresses/holesky.json deleted file mode 100644 index 3268822..0000000 --- a/lib/contracts/addresses/holesky.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x9BEF4B8E025ecc91FE5Ee865f4880b106F106e5a", - "PufferDepositorImplementation": "0x335b6C8F5aA0073849A174c73EbA985b851d18e6", - "PufferVault": "0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa", - "PufferVaultImplementation": "0x2937fCae8d2E14bAD487db0AaD535751EE955961", - "accessManager": "0xA6c916f85DAfeb6f726E03a1Ce8d08cf835138fF", - "dao": "0xDDDeAfB492752FC64220ddB3E7C9f1d5CcCdFdF0", - "depositor": "0x9BEF4B8E025ecc91FE5Ee865f4880b106F106e5a", - "enclaveVerifier": "0x79200dE6299F27b7354Ca95A09a9C3978DBEDf24", - "guardianModule": "0xD349FdCD0e4451381bfE7cba3ac28773E176b326", - "moduleBeacon": "0x5B81A4579f466fB17af4d8CC0ED51256b94c61D4", - "moduleManager": "0xe4695ab93163F91665Ce5b96527408336f070a71", - "oracle": "0xEf93AA29F627465A7f58A1F25980c90116f27b74", - "protocol": "0x705E27D6A6A0c77081D32C07DbDE5A1E139D3F14", - "stETH/stETH Mock": "0x06ea70844bAdEac532ba750de1c4C853903fb542", - "validatorTicket": "0xA143c6bFAff0B25B485454a9a8DB94dC469F8c3b", - "vault": "0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa", - "weth/weth Mock": "0x67cAE813C252a5B911Da0EA476997661E39C4d87" -} diff --git a/lib/contracts/addresses/mainnet.json b/lib/contracts/addresses/mainnet.json deleted file mode 100644 index 97fd171..0000000 --- a/lib/contracts/addresses/mainnet.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff", - "PufferVault": "0xD9A442856C234a39a81a089C06451EBAa4306a72", - "accessManager": "0x8c1686069474410E6243425f4a10177a94EBEE11", - "depositor": "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff", - "enclaveVerifier": "0x1d03e4bCC928795B1EEac1205fa9dDC4a3241D95", - "guardianModule": "0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2", - "moduleManager": "0x9E1E4fCb49931df5743e659ad910d331735C3860", - "oracle": "0x8eFd1Dc43AD073232F3e2924e22F173879119489", - "pufferProtocolProxy": "0xf7b6B32492c2e13799D921E84202450131bd238B", - "validatorTicketProxy": "0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A", - "vault": "0xD9A442856C234a39a81a089C06451EBAa4306a72" -} diff --git a/lib/errors/types.ts b/lib/errors/types.ts new file mode 100644 index 0000000..c59c10b --- /dev/null +++ b/lib/errors/types.ts @@ -0,0 +1,4 @@ +export type ErrorBaseParameters = { + docsPath?: string; + fixMessage?: string; +}; diff --git a/lib/errors/validation-errors.ts b/lib/errors/validation-errors.ts new file mode 100644 index 0000000..7072f70 --- /dev/null +++ b/lib/errors/validation-errors.ts @@ -0,0 +1,15 @@ +import { ErrorBaseParameters } from './types'; + +export class AccountError extends Error { + constructor(message: string, params?: ErrorBaseParameters) { + super(message); + + this.message = [ + message, + '', + ...(params + ? Object.entries(params).map(([key, value]) => `${key}: ${value}`) + : []), + ].join('\n'); + } +} From 694283228fd853d2d1acc86b92d4c12991b8665d Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 20 May 2024 12:57:32 +0200 Subject: [PATCH 10/14] Handle errors better --- lib/errors/base-error.ts | 25 +++++++++++++++++++++++++ lib/errors/validation-errors.ts | 16 ++-------------- lib/utils/version.ts | 3 +++ 3 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 lib/errors/base-error.ts create mode 100644 lib/utils/version.ts diff --git a/lib/errors/base-error.ts b/lib/errors/base-error.ts new file mode 100644 index 0000000..f06663b --- /dev/null +++ b/lib/errors/base-error.ts @@ -0,0 +1,25 @@ +import { version } from '../utils/version'; +import { ErrorBaseParameters } from './types'; + +// The parameters for the error can be extended for specific error types +// to include more information. +export abstract class BaseError< + T extends { [key: string]: string } = ErrorBaseParameters, +> extends Error { + constructor(message: string, params: T) { + super(message); + this.message = this.compileMessage(message, params); + } + + protected compileMessage(message: string, params: T) { + return [ + message, + ...(params ? [''] : []), + ...(params + ? Object.entries(params).map(([key, value]) => `${key}: ${value}`) + : []), + '', + `v${version}`, + ].join('\n'); + } +} diff --git a/lib/errors/validation-errors.ts b/lib/errors/validation-errors.ts index 7072f70..c1fc40a 100644 --- a/lib/errors/validation-errors.ts +++ b/lib/errors/validation-errors.ts @@ -1,15 +1,3 @@ -import { ErrorBaseParameters } from './types'; +import { BaseError } from "./base-error"; -export class AccountError extends Error { - constructor(message: string, params?: ErrorBaseParameters) { - super(message); - - this.message = [ - message, - '', - ...(params - ? Object.entries(params).map(([key, value]) => `${key}: ${value}`) - : []), - ].join('\n'); - } -} +export class AccountError extends BaseError {} diff --git a/lib/utils/version.ts b/lib/utils/version.ts new file mode 100644 index 0000000..7594f94 --- /dev/null +++ b/lib/utils/version.ts @@ -0,0 +1,3 @@ +import { version as packageVersion } from '../../package.json'; + +export const version = packageVersion; From ad35d4ad41e6008ef82fb416c571b06053e5d3d7 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 20 May 2024 12:59:21 +0200 Subject: [PATCH 11/14] Use puffer-sdk instead of smart-contract-lib as package name --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 39044fb..1d03d33 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# @pufferfinance/smart-contract-lib +# @pufferfinance/puffer-sdk Library for interacting with puffer smart contract interface. @@ -28,7 +28,7 @@ Add `#` (for example, `github:pufferfinance/puffer-sdk#1.0.0`) at the end t The package is published privately to GitHub Packages. It can be installed by authenticating to GitHub Packages. Please check [GitHub guide for installing a private package](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package). -Use `@pufferfinance` as the organization name and `@pufferfinance/smart-contract-lib` as the complete dependency name. +Use `@pufferfinance` as the organization name and `@pufferfinance/puffer-sdk` as the complete dependency name. ### Local @@ -41,7 +41,7 @@ pnpm link --global In the project where you want to use this package as a dependency, run the following command. ```sh -pnpm link --global @pufferfinance/smart-contract-lib +pnpm link --global @pufferfinance/puffer-sdk ``` ## Setup From 97dd740f5e1ae3ab31dd9cac56d21c0809791b5d Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 20 May 2024 13:47:48 +0200 Subject: [PATCH 12/14] Remove legacy code --- lib/contracts/addresses.ts | 3 +- lib/legacy/config/abis/ERC20PermitABI.ts | 520 ----- .../config/abis/anvil/GuardianModule.json | 742 ------- .../config/abis/anvil/PufferModule.json | 817 -------- .../abis/anvil/PufferModuleManager.json | 1013 --------- .../config/abis/anvil/PufferOracle.json | 179 -- .../config/abis/anvil/PufferOracleV2.json | 314 --- .../config/abis/anvil/PufferProtocol.json | 1401 ------------- lib/legacy/config/abis/anvil/PufferVault.json | 1740 --------------- .../config/abis/anvil/PufferVaultV2.json | 1783 ---------------- .../config/abis/anvil/RestakingOperator.json | 281 --- .../config/abis/anvil/ValidatorTicket.json | 1031 --------- lib/legacy/config/abis/anvil/addresses.json | 20 - .../config/abis/holesky/GuardianModule.json | 742 ------- .../config/abis/holesky/PufferModule.json | 787 ------- .../abis/holesky/PufferModuleManager.json | 1067 ---------- .../config/abis/holesky/PufferOracle.json | 179 -- .../config/abis/holesky/PufferOracleV2.json | 314 --- .../config/abis/holesky/PufferProtocol.json | 1401 ------------- .../config/abis/holesky/PufferVaultV2.json | 1783 ---------------- .../abis/holesky/RestakingOperator.json | 350 ---- .../config/abis/holesky/ValidatorTicket.json | 1031 --------- .../config/abis/mainnet/EnclaveVerifier.json | 457 ---- .../config/abis/mainnet/GuardianModule.json | 742 ------- .../abis/mainnet/OperationsCoordinator.json | 200 -- .../config/abis/mainnet/PufferDepositor.json | 373 ---- .../config/abis/mainnet/PufferModule.json | 792 ------- .../abis/mainnet/PufferModuleManager.json | 1508 ------------- .../config/abis/mainnet/PufferOracleV2.json | 226 -- .../config/abis/mainnet/PufferProtocol.json | 1470 ------------- .../config/abis/mainnet/PufferVaultV2.json | 1860 ----------------- .../abis/mainnet/RestakingOperator.json | 631 ------ lib/legacy/config/abis/mainnet/Timelock.json | 440 ---- .../config/abis/mainnet/ValidatorTicket.json | 1031 --------- lib/legacy/config/addresses.ts | 29 - lib/legacy/config/addresses/anvil.json | 20 - lib/legacy/config/addresses/holesky.json | 20 - lib/legacy/config/addresses/mainnet.json | 14 - lib/legacy/config/networks.ts | 19 - lib/legacy/config/networks/anvil.ts | 15 - lib/legacy/config/networks/default.ts | 15 - lib/legacy/config/networks/holesky.ts | 15 - lib/legacy/config/networks/mainnet.ts | 15 - lib/legacy/config/protocol.ts | 3 - lib/legacy/react/context/NetworkConfig.tsx | 55 - lib/legacy/react/context/Web3Context.tsx | 163 -- lib/legacy/react/hooks/useContracts.ts | 53 - lib/legacy/react/hooks/usePufETHModule.ts | 181 -- lib/legacy/react/hooks/usePufferProtocol.ts | 371 ---- lib/legacy/react/hooks/useVTModule.ts | 172 -- lib/legacy/react/hooks/useVerifySignature.ts | 148 -- lib/legacy/types/error.ts | 6 - lib/legacy/types/networkConfig.ts | 8 - lib/legacy/types/node.ts | 5 - lib/legacy/types/registration.ts | 25 - lib/legacy/types/system.ts | 6 - lib/legacy/types/validator.ts | 151 -- lib/legacy/types/web3Context.ts | 15 - lib/legacy/utils/ERC20Permit.ts | 68 - lib/legacy/utils/ErrorPrepration.ts | 3 - lib/legacy/utils/Key.ts | 48 - lib/legacy/utils/localStorage.ts | 23 - 62 files changed, 2 insertions(+), 28892 deletions(-) delete mode 100644 lib/legacy/config/abis/ERC20PermitABI.ts delete mode 100644 lib/legacy/config/abis/anvil/GuardianModule.json delete mode 100644 lib/legacy/config/abis/anvil/PufferModule.json delete mode 100644 lib/legacy/config/abis/anvil/PufferModuleManager.json delete mode 100644 lib/legacy/config/abis/anvil/PufferOracle.json delete mode 100644 lib/legacy/config/abis/anvil/PufferOracleV2.json delete mode 100644 lib/legacy/config/abis/anvil/PufferProtocol.json delete mode 100644 lib/legacy/config/abis/anvil/PufferVault.json delete mode 100644 lib/legacy/config/abis/anvil/PufferVaultV2.json delete mode 100644 lib/legacy/config/abis/anvil/RestakingOperator.json delete mode 100644 lib/legacy/config/abis/anvil/ValidatorTicket.json delete mode 100644 lib/legacy/config/abis/anvil/addresses.json delete mode 100644 lib/legacy/config/abis/holesky/GuardianModule.json delete mode 100644 lib/legacy/config/abis/holesky/PufferModule.json delete mode 100644 lib/legacy/config/abis/holesky/PufferModuleManager.json delete mode 100644 lib/legacy/config/abis/holesky/PufferOracle.json delete mode 100644 lib/legacy/config/abis/holesky/PufferOracleV2.json delete mode 100644 lib/legacy/config/abis/holesky/PufferProtocol.json delete mode 100644 lib/legacy/config/abis/holesky/PufferVaultV2.json delete mode 100644 lib/legacy/config/abis/holesky/RestakingOperator.json delete mode 100644 lib/legacy/config/abis/holesky/ValidatorTicket.json delete mode 100644 lib/legacy/config/abis/mainnet/EnclaveVerifier.json delete mode 100644 lib/legacy/config/abis/mainnet/GuardianModule.json delete mode 100644 lib/legacy/config/abis/mainnet/OperationsCoordinator.json delete mode 100644 lib/legacy/config/abis/mainnet/PufferDepositor.json delete mode 100644 lib/legacy/config/abis/mainnet/PufferModule.json delete mode 100644 lib/legacy/config/abis/mainnet/PufferModuleManager.json delete mode 100644 lib/legacy/config/abis/mainnet/PufferOracleV2.json delete mode 100644 lib/legacy/config/abis/mainnet/PufferProtocol.json delete mode 100644 lib/legacy/config/abis/mainnet/PufferVaultV2.json delete mode 100644 lib/legacy/config/abis/mainnet/RestakingOperator.json delete mode 100644 lib/legacy/config/abis/mainnet/Timelock.json delete mode 100644 lib/legacy/config/abis/mainnet/ValidatorTicket.json delete mode 100644 lib/legacy/config/addresses.ts delete mode 100644 lib/legacy/config/addresses/anvil.json delete mode 100644 lib/legacy/config/addresses/holesky.json delete mode 100644 lib/legacy/config/addresses/mainnet.json delete mode 100644 lib/legacy/config/networks.ts delete mode 100644 lib/legacy/config/networks/anvil.ts delete mode 100644 lib/legacy/config/networks/default.ts delete mode 100644 lib/legacy/config/networks/holesky.ts delete mode 100644 lib/legacy/config/networks/mainnet.ts delete mode 100644 lib/legacy/config/protocol.ts delete mode 100644 lib/legacy/react/context/NetworkConfig.tsx delete mode 100644 lib/legacy/react/context/Web3Context.tsx delete mode 100644 lib/legacy/react/hooks/useContracts.ts delete mode 100644 lib/legacy/react/hooks/usePufETHModule.ts delete mode 100644 lib/legacy/react/hooks/usePufferProtocol.ts delete mode 100644 lib/legacy/react/hooks/useVTModule.ts delete mode 100644 lib/legacy/react/hooks/useVerifySignature.ts delete mode 100644 lib/legacy/types/error.ts delete mode 100644 lib/legacy/types/networkConfig.ts delete mode 100644 lib/legacy/types/node.ts delete mode 100644 lib/legacy/types/registration.ts delete mode 100644 lib/legacy/types/system.ts delete mode 100644 lib/legacy/types/validator.ts delete mode 100644 lib/legacy/types/web3Context.ts delete mode 100644 lib/legacy/utils/ERC20Permit.ts delete mode 100644 lib/legacy/utils/ErrorPrepration.ts delete mode 100644 lib/legacy/utils/Key.ts delete mode 100644 lib/legacy/utils/localStorage.ts diff --git a/lib/contracts/addresses.ts b/lib/contracts/addresses.ts index 7ad0185..5649d9e 100644 --- a/lib/contracts/addresses.ts +++ b/lib/contracts/addresses.ts @@ -1,6 +1,7 @@ import { Chain } from '../chains/constants'; -// Source of truth: https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments +// Source of truth: +// https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments export const CHAIN_ADDRESSES = { [Chain.Mainnet]: { PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72', diff --git a/lib/legacy/config/abis/ERC20PermitABI.ts b/lib/legacy/config/abis/ERC20PermitABI.ts deleted file mode 100644 index 928aa56..0000000 --- a/lib/legacy/config/abis/ERC20PermitABI.ts +++ /dev/null @@ -1,520 +0,0 @@ -export const ERC20Permit_ABI = [ - { - type: 'function', - name: 'DOMAIN_SEPARATOR', - inputs: [], - outputs: [ - { - name: '', - type: 'bytes32', - internalType: 'bytes32', - }, - ], - stateMutability: 'view', - }, - { - 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: 'balanceOf', - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - }, - ], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - stateMutability: 'view', - }, - { - type: 'function', - name: 'decimals', - inputs: [], - outputs: [ - { - name: '', - type: 'uint8', - internalType: 'uint8', - }, - ], - stateMutability: 'view', - }, - { - type: 'function', - name: 'eip712Domain', - inputs: [], - outputs: [ - { - name: 'fields', - type: 'bytes1', - internalType: 'bytes1', - }, - { - name: 'name', - type: 'string', - internalType: 'string', - }, - { - name: 'version', - type: 'string', - internalType: 'string', - }, - { - name: 'chainId', - type: 'uint256', - internalType: 'uint256', - }, - { - name: 'verifyingContract', - type: 'address', - internalType: 'address', - }, - { - name: 'salt', - type: 'bytes32', - internalType: 'bytes32', - }, - { - name: 'extensions', - type: 'uint256[]', - internalType: 'uint256[]', - }, - ], - stateMutability: 'view', - }, - { - type: 'function', - name: 'name', - inputs: [], - outputs: [ - { - name: '', - type: 'string', - internalType: 'string', - }, - ], - stateMutability: 'view', - }, - { - type: 'function', - name: 'nonces', - inputs: [ - { - name: 'owner', - type: 'address', - internalType: 'address', - }, - ], - outputs: [ - { - name: '', - type: 'uint256', - internalType: 'uint256', - }, - ], - stateMutability: 'view', - }, - { - type: 'function', - name: 'permit', - inputs: [ - { - name: 'owner', - type: 'address', - internalType: 'address', - }, - { - name: 'spender', - type: 'address', - internalType: 'address', - }, - { - name: 'value', - type: 'uint256', - internalType: 'uint256', - }, - { - name: 'deadline', - type: 'uint256', - internalType: 'uint256', - }, - { - name: 'v', - type: 'uint8', - internalType: 'uint8', - }, - { - name: 'r', - type: 'bytes32', - internalType: 'bytes32', - }, - { - name: 's', - type: 'bytes32', - internalType: 'bytes32', - }, - ], - outputs: [], - stateMutability: 'nonpayable', - }, - { - type: 'function', - name: 'symbol', - inputs: [], - outputs: [ - { - name: '', - type: 'string', - internalType: 'string', - }, - ], - 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: '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: 'EIP712DomainChanged', - inputs: [], - 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: 'error', - name: 'ECDSAInvalidSignature', - inputs: [], - }, - { - type: 'error', - name: 'ECDSAInvalidSignatureLength', - inputs: [ - { - name: 'length', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, - { - type: 'error', - name: 'ECDSAInvalidSignatureS', - inputs: [ - { - name: 's', - type: 'bytes32', - internalType: 'bytes32', - }, - ], - }, - { - 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: 'ERC2612ExpiredSignature', - inputs: [ - { - name: 'deadline', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, - { - type: 'error', - name: 'ERC2612InvalidSigner', - inputs: [ - { - name: 'signer', - type: 'address', - internalType: 'address', - }, - { - name: 'owner', - type: 'address', - internalType: 'address', - }, - ], - }, - { - type: 'error', - name: 'InvalidAccountNonce', - inputs: [ - { - name: 'account', - type: 'address', - internalType: 'address', - }, - { - name: 'currentNonce', - type: 'uint256', - internalType: 'uint256', - }, - ], - }, - { - type: 'error', - name: 'InvalidShortString', - inputs: [], - }, - { - type: 'error', - name: 'StringTooLong', - inputs: [ - { - name: 'str', - type: 'string', - internalType: 'string', - }, - ], - }, -]; diff --git a/lib/legacy/config/abis/anvil/GuardianModule.json b/lib/legacy/config/abis/anvil/GuardianModule.json deleted file mode 100644 index 9b25c28..0000000 --- a/lib/legacy/config/abis/anvil/GuardianModule.json +++ /dev/null @@ -1,742 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "contract IEnclaveVerifier" - }, - { - "name": "guardians", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "threshold", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pufferAuthority", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "ENCLAVE_VERIFIER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IEnclaveVerifier" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addGuardian", - "inputs": [ - { - "name": "newGuardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getEjectionThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardians", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclaveAddress", - "inputs": [ - { - "name": "guardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclaveAddresses", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclavePubkeys", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMrenclave", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMrsigner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isGuardian", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeGuardian", - "inputs": [ - { - "name": "guardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rotateGuardianKey", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "evidence", - "type": "tuple", - "internalType": "struct RaveEvidence", - "components": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "leafX509CertDigest", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setEjectionThreshold", - "inputs": [ - { - "name": "newThreshold", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGuardianEnclaveMeasurements", - "inputs": [ - { - "name": "newMrEnclave", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "newMrSigner", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setThreshold", - "inputs": [ - { - "name": "newThreshold", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "splitGuardianFunds", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "validateBatchWithdrawals", - "inputs": [ - { - "name": "validatorInfos", - "type": "tuple[]", - "internalType": "struct StoppedValidatorInfo[]", - "components": [ - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "startEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wasSlashed", - "type": "bool", - "internalType": "bool" - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "withdrawalAmount", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateGuardiansEOASignatures", - "inputs": [ - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "signedMessageHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateGuardiansEnclaveSignatures", - "inputs": [ - { - "name": "enclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "signedMessageHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateProvisionNode", - "inputs": [ - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "withdrawalCredentials", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "enclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateSkipProvisioning", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "skippedIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateTotalNumberOfValidators", - "inputs": [ - { - "name": "newNumberOfValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EjectionThresholdChanged", - "inputs": [ - { - "name": "oldThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GuardianAdded", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GuardianRemoved", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MrEnclaveChanged", - "inputs": [ - { - "name": "oldMrEnclave", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "newMrEnclave", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MrSignerChanged", - "inputs": [ - { - "name": "oldMrSigner", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "newMrSigner", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RotatedGuardianKey", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "guardianEnclave", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThresholdChanged", - "inputs": [ - { - "name": "oldThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidECDSAPubKey", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidRAVE", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidThreshold", - "inputs": [ - { - "name": "threshold", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferModule.json b/lib/legacy/config/abis/anvil/PufferModule.json deleted file mode 100644 index ff53c20..0000000 --- a/lib/legacy/config/abis/anvil/PufferModule.json +++ /dev/null @@ -1,817 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "protocol", - "type": "address", - "internalType": "contract IPufferProtocol" - }, - { - "name": "eigenPodManager", - "type": "address", - "internalType": "address" - }, - { - "name": "eigenWithdrawalRouter", - "type": "address", - "internalType": "contract IDelayedWithdrawalRouter" - }, - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "EIGEN_DELEGATION_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_POD_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IEigenPodManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_WITHDRAWAL_ROUTER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelayedWithdrawalRouter" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "NAME", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferProtocol" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "call", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "success", - "type": "bool", - "internalType": "bool" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callDelegateTo", - "inputs": [ - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approverSignatureAndExpiry", - "type": "tuple", - "internalType": "struct ISignatureUtils.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": "callStake", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "callUndelegate", - "inputs": [], - "outputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "collectRewards", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "blockNumbers", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "merkleProofs", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "completeQueuedWithdrawals", - "inputs": [ - { - "name": "withdrawals", - "type": "tuple[]", - "internalType": "struct IDelegationManager.Withdrawal[]", - "components": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatedTo", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "tokens", - "type": "address[][]", - "internalType": "contract IERC20[][]" - }, - { - "name": "middlewareTimesIndexes", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getEigenPod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLastProofOfRewardsBlock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWithdrawalCredentials", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "initialAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "postRewardsRoot", - "inputs": [ - { - "name": "root", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardianSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "queueWithdrawals", - "inputs": [ - { - "name": "shareAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyAndProcessWithdrawals", - "inputs": [ - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "withdrawalProofs", - "type": "tuple[]", - "internalType": "struct BeaconChainProofs.WithdrawalProof[]", - "components": [ - { - "name": "withdrawalProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "slotProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "executionPayloadProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestampProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "historicalSummaryBlockRootProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "blockRootIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "historicalSummaryIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "withdrawalIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "blockRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "slotRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "timestampRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "executionPayloadRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyWithdrawalCredentials", - "inputs": [ - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "internalType": "uint40[]" - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawNonBeaconChainETHBalanceWei", - "inputs": [ - { - "name": "amountToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsClaimed", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsRootPosted", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "root", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalQueued", - "inputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "withdrawalParams", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.QueuedWithdrawalParams", - "components": [ - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - } - ] - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AlreadyClaimed", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "node", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBlockNumber", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NothingToClaim", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferModuleManager.json b/lib/legacy/config/abis/anvil/PufferModuleManager.json deleted file mode 100644 index 99f44fe..0000000 --- a/lib/legacy/config/abis/anvil/PufferModuleManager.json +++ /dev/null @@ -1,1013 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferModuleBeacon", - "type": "address", - "internalType": "address" - }, - { - "name": "restakingOperatorBeacon", - "type": "address", - "internalType": "address" - }, - { - "name": "pufferProtocol", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "PUFFER_MODULE_BEACON", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESTAKING_OPERATOR_BEACON", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "callCompleteQueuedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "withdrawals", - "type": "tuple[]", - "internalType": "struct IDelegationManager.Withdrawal[]", - "components": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatedTo", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "tokens", - "type": "address[][]", - "internalType": "contract IERC20[][]" - }, - { - "name": "middlewareTimesIndexes", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callDelegateTo", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approverSignatureAndExpiry", - "type": "tuple", - "internalType": "struct ISignatureUtils.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": "callModifyOperatorDetails", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "newOperatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callOptIntoSlashing", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "slasher", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callQueueWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "sharesAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUndelegate", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUpdateMetadataURI", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callVerifyAndProcessWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "withdrawalProofs", - "type": "tuple[]", - "internalType": "struct BeaconChainProofs.WithdrawalProof[]", - "components": [ - { - "name": "withdrawalProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "slotProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "executionPayloadProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestampProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "historicalSummaryBlockRootProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "blockRootIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "historicalSummaryIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "withdrawalIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "blockRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "slotRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "timestampRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "executionPayloadRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callVerifyWithdrawalCredentials", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "internalType": "uint40[]" - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callWithdrawNonBeaconChainETHBalanceWei", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createNewPufferModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModule" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createNewRestakingOperator", - "inputs": [ - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IRestakingOperator" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CompleteQueuedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "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": "NonBeaconChainETHBalanceWithdrawn", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PufferModuleDelegated", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "operator", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PufferModuleUndelegated", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorCreated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "operatorDetails", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorMetadataURIUpdated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "metadataURI", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorModified", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOperatorDetails", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorOptedInSlasher", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "slasher", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorCredentialsVerified", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "indexed": false, - "internalType": "uint40[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VerifyAndProcessWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "indexed": false, - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "indexed": false, - "internalType": "bytes32[][]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalsQueued", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "shareAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "Create2EmptyBytecode", - "inputs": [] - }, - { - "type": "error", - "name": "Create2FailedDeployment", - "inputs": [] - }, - { - "type": "error", - "name": "Create2InsufficientBalance", - "inputs": [ - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferOracle.json b/lib/legacy/config/abis/anvil/PufferOracle.json deleted file mode 100644 index 9c2da8b..0000000 --- a/lib/legacy/config/abis/anvil/PufferOracle.json +++ /dev/null @@ -1,179 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLockedEthAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getValidatorTicketPrice", - "inputs": [], - "outputs": [ - { - "name": "pricePerVT", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isOverBurstThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMintPrice", - "inputs": [ - { - "name": "newPrice", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketMintPriceUpdated", - "inputs": [ - { - "name": "oldPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "InvalidValidatorTicketPrice", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferOracleV2.json b/lib/legacy/config/abis/anvil/PufferOracleV2.json deleted file mode 100644 index f970882..0000000 --- a/lib/legacy/config/abis/anvil/PufferOracleV2.json +++ /dev/null @@ -1,314 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "guardianModule", - "type": "address", - "internalType": "contract IGuardianModule" - }, - { - "name": "vault", - "type": "address", - "internalType": "address payable" - }, - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IGuardianModule" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "exitValidators", - "inputs": [ - { - "name": "numberOfExits", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getLockedEthAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTotalNumberOfValidators", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorTicketPrice", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isOverBurstThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "provisionNode", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMintPrice", - "inputs": [ - { - "name": "newPrice", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setTotalNumberOfValidators", - "inputs": [ - { - "name": "newTotalNumberOfValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberOfActiveValidators", - "inputs": [ - { - "name": "numberOfActivePufferValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TotalNumberOfValidatorsUpdated", - "inputs": [ - { - "name": "oldNumberOfValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newNumberOfValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketMintPriceUpdated", - "inputs": [ - { - "name": "oldPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "InvalidUpdate", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidValidatorTicketPrice", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferProtocol.json b/lib/legacy/config/abis/anvil/PufferProtocol.json deleted file mode 100644 index ea4d169..0000000 --- a/lib/legacy/config/abis/anvil/PufferProtocol.json +++ /dev/null @@ -1,1401 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferVault", - "type": "address", - "internalType": "contract PufferVaultV2" - }, - { - "name": "guardianModule", - "type": "address", - "internalType": "contract IGuardianModule" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "address" - }, - { - "name": "validatorTicket", - "type": "address", - "internalType": "contract ValidatorTicket" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracleV2" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IGuardianModule" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracleV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract PufferVaultV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "VALIDATOR_TICKET", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ValidatorTicket" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "batchHandleWithdrawals", - "inputs": [ - { - "name": "validatorInfos", - "type": "tuple[]", - "internalType": "struct StoppedValidatorInfo[]", - "components": [ - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "startEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wasSlashed", - "type": "bool", - "internalType": "bool" - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "withdrawalAmount", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "changeMinimumVTAmount", - "inputs": [ - { - "name": "newMinimumVTAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createPufferModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositValidatorTickets", - "inputs": [ - { - "name": "permit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "node", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getDepositDataRoot", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "withdrawalCredentials", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getMinimumVtAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleAddress", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleSelectIndex", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleWeights", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNextValidatorToBeProvisionedIndex", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNextValidatorToProvision", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeInfo", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct NodeInfo", - "components": [ - { - "name": "activeValidatorCount", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pendingValidatorCount", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "vtBalance", - "type": "uint96", - "internalType": "uint96" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPayload", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "usingEnclave", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingValidatorIndex", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getVTPenalty", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorInfo", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct Validator", - "components": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "bond", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorTicketsBalance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidators", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct Validator[]", - "components": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "bond", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWithdrawalCredentials", - "inputs": [ - { - "name": "module", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "provisionNode", - "inputs": [ - { - "name": "guardianEnclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorSignature", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "registerValidatorKey", - "inputs": [ - { - "name": "data", - "type": "tuple", - "internalType": "struct ValidatorKeyData", - "components": [ - { - "name": "blsPubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "blsEncryptedPrivKeyShares", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "blsPubKeySet", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "raveEvidence", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufETHPermit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "vtPermit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "revertIfPaused", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setModuleWeights", - "inputs": [ - { - "name": "newModuleWeights", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setVTPenalty", - "inputs": [ - { - "name": "newPenaltyAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setValidatorLimitPerModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "limit", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "skipProvisioning", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "withdrawValidatorTickets", - "inputs": [ - { - "name": "amount", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MinimumVTAmountChanged", - "inputs": [ - { - "name": "oldMinimumNumberOfDays", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newMinimumNumberOfDays", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ModuleWeightsChanged", - "inputs": [ - { - "name": "oldWeights", - "type": "bytes32[]", - "indexed": false, - "internalType": "bytes32[]" - }, - { - "name": "newWeights", - "type": "bytes32[]", - "indexed": false, - "internalType": "bytes32[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NewPufferModuleCreated", - "inputs": [ - { - "name": "module", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "withdrawalCredentials", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberOfActiveValidatorsChanged", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newNumberOfActiveValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SuccessfullyProvisioned", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VTPenaltyChanged", - "inputs": [ - { - "name": "oldPenalty", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPenalty", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorExited", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "pufETHBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "vtBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorKeyRegistered", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "usingEnclave", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorLimitPerModuleChanged", - "inputs": [ - { - "name": "oldLimit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newLimit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorSkipped", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketsDeposited", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "depositor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketsWithdrawn", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ActiveOrPendingValidatorsExist", - "inputs": [] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPrivateKeyShares", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPubKey", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPublicKeySet", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidETHAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidVTAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidValidatorState", - "inputs": [ - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - } - ] - }, - { - "type": "error", - "name": "ModuleAlreadyExists", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ValidatorLimitForModuleReached", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferVault.json b/lib/legacy/config/abis/anvil/PufferVault.json deleted file mode 100644 index 29e0935..0000000 --- a/lib/legacy/config/abis/anvil/PufferVault.json +++ /dev/null @@ -1,1740 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "stETH", - "type": "address", - "internalType": "contract IStETH" - }, - { - "name": "weth", - "type": "address", - "internalType": "contract IWETH" - }, - { - "name": "lidoWithdrawalQueue", - "type": "address", - "internalType": "contract ILidoWithdrawalQueue" - }, - { - "name": "stETHStrategy", - "type": "address", - "internalType": "contract IStrategy" - }, - { - "name": "eigenStrategyManager", - "type": "address", - "internalType": "contract IEigenLayer" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "queuedWithdrawal", - "type": "tuple", - "internalType": "struct IEigenLayer.QueuedWithdrawal", - "components": [ - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "depositor", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawerAndNonce", - "type": "tuple", - "internalType": "struct IEigenLayer.WithdrawerAndNonce", - "components": [ - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint96", - "internalType": "uint96" - } - ] - }, - { - "name": "withdrawalStartBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "delegatedAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "tokens", - "type": "address[]", - "internalType": "contract IERC20[]" - }, - { - "name": "middlewareTimesIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalsFromLido", - "inputs": [ - { - "name": "requestIds", - "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": "convertToShares", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "pure" - }, - { - "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": "depositETH", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositToEigenLayer", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getELBackingEthAmount", - "inputs": [], - "outputs": [ - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getExitFeeBasisPoints", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingLidoETHAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRemainingAssetsDailyWithdrawalLimit", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateETHWithdrawalsFromLido", - "inputs": [ - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateStETHWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "sharesToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxDeposit", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxMint", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxRedeem", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxShares", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxWithdraw", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxAssets", - "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": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "onERC721Received", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "previewDeposit", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewMint", - "inputs": [ - { - "name": "shares", - "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": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "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": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDailyWithdrawalLimit", - "inputs": [ - { - "name": "newLimit", - "type": "uint96", - "internalType": "uint96" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setExitFeeBasisPoints", - "inputs": [ - { - "name": "newExitFeeBasisPoints", - "type": "uint256", - "internalType": "uint256" - } - ], - "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": "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": "transferETH", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ClaimedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "indexed": false, - "internalType": "uint256[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitSet", - "inputs": [ - { - "name": "oldLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - }, - { - "name": "newLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - } - ], - "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": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "ExitFeeBasisPointsSet", - "inputs": [ - { - "name": "previousFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFee", - "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": "LidoWithdrawal", - "inputs": [ - { - "name": "expectedWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "actualWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RequestedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "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": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "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": "ETHTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "EnumerableMapNonexistentKey", - "inputs": [ - { - "name": "key", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidExitFeeBasisPoints", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidWithdrawal", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "WithdrawalsAreDisabled", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/PufferVaultV2.json b/lib/legacy/config/abis/anvil/PufferVaultV2.json deleted file mode 100644 index 71e4b61..0000000 --- a/lib/legacy/config/abis/anvil/PufferVaultV2.json +++ /dev/null @@ -1,1783 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "stETH", - "type": "address", - "internalType": "contract IStETH" - }, - { - "name": "weth", - "type": "address", - "internalType": "contract IWETH" - }, - { - "name": "lidoWithdrawalQueue", - "type": "address", - "internalType": "contract ILidoWithdrawalQueue" - }, - { - "name": "stETHStrategy", - "type": "address", - "internalType": "contract IStrategy" - }, - { - "name": "eigenStrategyManager", - "type": "address", - "internalType": "contract IEigenLayer" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "queuedWithdrawal", - "type": "tuple", - "internalType": "struct IEigenLayer.QueuedWithdrawal", - "components": [ - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "depositor", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawerAndNonce", - "type": "tuple", - "internalType": "struct IEigenLayer.WithdrawerAndNonce", - "components": [ - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint96", - "internalType": "uint96" - } - ] - }, - { - "name": "withdrawalStartBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "delegatedAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "tokens", - "type": "address[]", - "internalType": "contract IERC20[]" - }, - { - "name": "middlewareTimesIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalsFromLido", - "inputs": [ - { - "name": "requestIds", - "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": "convertToShares", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "convertToSharesUp", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "pure" - }, - { - "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": "depositETH", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "stETHSharesAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositToEigenLayer", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getELBackingEthAmount", - "inputs": [], - "outputs": [ - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getExitFeeBasisPoints", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingLidoETHAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRemainingAssetsDailyWithdrawalLimit", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateETHWithdrawalsFromLido", - "inputs": [ - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateStETHWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "sharesToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxDeposit", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxMint", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxRedeem", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxShares", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxWithdraw", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxAssets", - "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": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "onERC721Received", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "previewDeposit", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewMint", - "inputs": [ - { - "name": "shares", - "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": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "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": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDailyWithdrawalLimit", - "inputs": [ - { - "name": "newLimit", - "type": "uint96", - "internalType": "uint96" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setExitFeeBasisPoints", - "inputs": [ - { - "name": "newExitFeeBasisPoints", - "type": "uint256", - "internalType": "uint256" - } - ], - "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": "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": "transferETH", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AssetsWithdrawnToday", - "inputs": [ - { - "name": "withdrawalAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ClaimedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "indexed": false, - "internalType": "uint256[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitReset", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitSet", - "inputs": [ - { - "name": "oldLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - }, - { - "name": "newLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - } - ], - "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": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "ExitFeeBasisPointsSet", - "inputs": [ - { - "name": "previousFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFee", - "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": "LidoWithdrawal", - "inputs": [ - { - "name": "expectedWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "actualWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RequestedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "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": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "DepositAndWithdrawalForbidden", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "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": "ETHTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "EnumerableMapNonexistentKey", - "inputs": [ - { - "name": "key", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidExitFeeBasisPoints", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidWithdrawal", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "WithdrawalsAreDisabled", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/RestakingOperator.json b/lib/legacy/config/abis/anvil/RestakingOperator.json deleted file mode 100644 index 5bc6399..0000000 --- a/lib/legacy/config/abis/anvil/RestakingOperator.json +++ /dev/null @@ -1,281 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - }, - { - "name": "slasher", - "type": "address", - "internalType": "contract ISlasher" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "EIGEN_DELEGATION_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_SLASHER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ISlasher" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "initialAuthority", - "type": "address", - "internalType": "address" - }, - { - "name": "operatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "modifyOperatorDetails", - "inputs": [ - { - "name": "newOperatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "optIntoSlashing", - "inputs": [ - { - "name": "slasher", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateOperatorMetadataURI", - "inputs": [ - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/anvil/ValidatorTicket.json b/lib/legacy/config/abis/anvil/ValidatorTicket.json deleted file mode 100644 index 197e149..0000000 --- a/lib/legacy/config/abis/anvil/ValidatorTicket.json +++ /dev/null @@ -1,1031 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "guardianModule", - "type": "address", - "internalType": "address payable" - }, - { - "name": "treasury", - "type": "address", - "internalType": "address payable" - }, - { - "name": "pufferVault", - "type": "address", - "internalType": "address payable" - }, - { - "name": "pufferOracle", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "TREASURY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProtocolFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - }, - { - "name": "treasuryFeeRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardiansFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "purchaseValidatorTicket", - "inputs": [ - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "mintedAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGuardiansFeeRate", - "inputs": [ - { - "name": "newGuardiansFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setProtocolFeeRate", - "inputs": [ - { - "name": "newProtocolFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DispersedETH", - "inputs": [ - { - "name": "treasury", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "guardians", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "vault", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "GuardiansFeeChanged", - "inputs": [ - { - "name": "oldGuardiansFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newGuardiansFee", - "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": "ProtocolFeeChanged", - "inputs": [ - { - "name": "oldTreasuryFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newTreasuryFee", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidData", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/lib/legacy/config/abis/anvil/addresses.json b/lib/legacy/config/abis/anvil/addresses.json deleted file mode 100644 index d6c6b00..0000000 --- a/lib/legacy/config/abis/anvil/addresses.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x7023ac919031431874e905aBED5DB587082f76C0", - "PufferDepositorImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", - "PufferVault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", - "PufferVaultImplementation": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0", - "accessManager": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", - "dao": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "depositor": "0x7023ac919031431874e905aBED5DB587082f76C0", - "enclaveVerifier": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", - "guardianModule": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", - "moduleBeacon": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", - "moduleManager": "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB", - "oracle": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c", - "protocol": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E", - "stETH/stETH Mock": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", - "validatorTicket": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F", - "vault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", - "weth/weth Mock": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" -} diff --git a/lib/legacy/config/abis/holesky/GuardianModule.json b/lib/legacy/config/abis/holesky/GuardianModule.json deleted file mode 100644 index 9b25c28..0000000 --- a/lib/legacy/config/abis/holesky/GuardianModule.json +++ /dev/null @@ -1,742 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "contract IEnclaveVerifier" - }, - { - "name": "guardians", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "threshold", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pufferAuthority", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "ENCLAVE_VERIFIER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IEnclaveVerifier" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addGuardian", - "inputs": [ - { - "name": "newGuardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getEjectionThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardians", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclaveAddress", - "inputs": [ - { - "name": "guardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclaveAddresses", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclavePubkeys", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMrenclave", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMrsigner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isGuardian", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeGuardian", - "inputs": [ - { - "name": "guardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rotateGuardianKey", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "evidence", - "type": "tuple", - "internalType": "struct RaveEvidence", - "components": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "leafX509CertDigest", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setEjectionThreshold", - "inputs": [ - { - "name": "newThreshold", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGuardianEnclaveMeasurements", - "inputs": [ - { - "name": "newMrEnclave", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "newMrSigner", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setThreshold", - "inputs": [ - { - "name": "newThreshold", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "splitGuardianFunds", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "validateBatchWithdrawals", - "inputs": [ - { - "name": "validatorInfos", - "type": "tuple[]", - "internalType": "struct StoppedValidatorInfo[]", - "components": [ - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "startEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wasSlashed", - "type": "bool", - "internalType": "bool" - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "withdrawalAmount", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateGuardiansEOASignatures", - "inputs": [ - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "signedMessageHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateGuardiansEnclaveSignatures", - "inputs": [ - { - "name": "enclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "signedMessageHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateProvisionNode", - "inputs": [ - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "withdrawalCredentials", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "enclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateSkipProvisioning", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "skippedIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateTotalNumberOfValidators", - "inputs": [ - { - "name": "newNumberOfValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EjectionThresholdChanged", - "inputs": [ - { - "name": "oldThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GuardianAdded", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GuardianRemoved", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MrEnclaveChanged", - "inputs": [ - { - "name": "oldMrEnclave", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "newMrEnclave", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MrSignerChanged", - "inputs": [ - { - "name": "oldMrSigner", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "newMrSigner", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RotatedGuardianKey", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "guardianEnclave", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThresholdChanged", - "inputs": [ - { - "name": "oldThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidECDSAPubKey", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidRAVE", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidThreshold", - "inputs": [ - { - "name": "threshold", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/PufferModule.json b/lib/legacy/config/abis/holesky/PufferModule.json deleted file mode 100644 index 5aebbf1..0000000 --- a/lib/legacy/config/abis/holesky/PufferModule.json +++ /dev/null @@ -1,787 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "protocol", - "type": "address", - "internalType": "contract IPufferProtocol" - }, - { - "name": "eigenPodManager", - "type": "address", - "internalType": "address" - }, - { - "name": "eigenWithdrawalRouter", - "type": "address", - "internalType": "contract IDelayedWithdrawalRouter" - }, - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "EIGEN_DELEGATION_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_POD_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IEigenPodManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_WITHDRAWAL_ROUTER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelayedWithdrawalRouter" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "NAME", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferProtocol" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "call", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "success", - "type": "bool", - "internalType": "bool" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callDelegateTo", - "inputs": [ - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approverSignatureAndExpiry", - "type": "tuple", - "internalType": "struct ISignatureUtils.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": "callStake", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "callUndelegate", - "inputs": [], - "outputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "collectRewards", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "blockNumbers", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "merkleProofs", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "completeQueuedWithdrawals", - "inputs": [ - { - "name": "withdrawals", - "type": "tuple[]", - "internalType": "struct IDelegationManager.Withdrawal[]", - "components": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatedTo", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "tokens", - "type": "address[][]", - "internalType": "contract IERC20[][]" - }, - { - "name": "middlewareTimesIndexes", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getEigenPod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLastProofOfRewardsBlock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWithdrawalCredentials", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "initialAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "postRewardsRoot", - "inputs": [ - { - "name": "root", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardianSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "queueWithdrawals", - "inputs": [ - { - "name": "shareAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyAndProcessWithdrawals", - "inputs": [ - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "withdrawalProofs", - "type": "tuple[]", - "internalType": "struct BeaconChainProofs.WithdrawalProof[]", - "components": [ - { - "name": "withdrawalProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "slotProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "executionPayloadProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestampProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "historicalSummaryBlockRootProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "blockRootIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "historicalSummaryIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "withdrawalIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "blockRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "slotRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "timestampRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "executionPayloadRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyWithdrawalCredentials", - "inputs": [ - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "internalType": "uint40[]" - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawNonBeaconChainETHBalanceWei", - "inputs": [ - { - "name": "amountToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsClaimed", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsRootPosted", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "root", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AlreadyClaimed", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "node", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBlockNumber", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NothingToClaim", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/PufferModuleManager.json b/lib/legacy/config/abis/holesky/PufferModuleManager.json deleted file mode 100644 index e88f6b4..0000000 --- a/lib/legacy/config/abis/holesky/PufferModuleManager.json +++ /dev/null @@ -1,1067 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferModuleBeacon", - "type": "address", - "internalType": "address" - }, - { - "name": "restakingOperatorBeacon", - "type": "address", - "internalType": "address" - }, - { - "name": "pufferProtocol", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "PUFFER_MODULE_BEACON", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESTAKING_OPERATOR_BEACON", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "callCompleteQueuedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "withdrawals", - "type": "tuple[]", - "internalType": "struct IDelegationManager.Withdrawal[]", - "components": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatedTo", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "tokens", - "type": "address[][]", - "internalType": "contract IERC20[][]" - }, - { - "name": "middlewareTimesIndexes", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callDelegateTo", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approverSignatureAndExpiry", - "type": "tuple", - "internalType": "struct ISignatureUtils.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": "callModifyOperatorDetails", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "newOperatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callOptIntoSlashing", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "slasher", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callQueueWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "sharesAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUndelegate", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUpdateMetadataURI", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callVerifyAndProcessWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "withdrawalProofs", - "type": "tuple[]", - "internalType": "struct BeaconChainProofs.WithdrawalProof[]", - "components": [ - { - "name": "withdrawalProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "slotProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "executionPayloadProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestampProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "historicalSummaryBlockRootProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "blockRootIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "historicalSummaryIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "withdrawalIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "blockRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "slotRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "timestampRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "executionPayloadRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callVerifyWithdrawalCredentials", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "internalType": "uint40[]" - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callWithdrawNonBeaconChainETHBalanceWei", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createNewPufferModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModule" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createNewRestakingOperator", - "inputs": [ - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IRestakingOperator" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateAVSRegistrationSignatureProof", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "digestHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "signer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "AVSRegistrationSignatureProofUpdated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "digestHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "signer", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CompletedQueuedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "sharesWithdrawn", - "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": "NonBeaconChainETHBalanceWithdrawn", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PufferModuleDelegated", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "operator", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PufferModuleUndelegated", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorCreated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "operatorDetails", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorMetadataURIUpdated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "metadataURI", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorModified", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOperatorDetails", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorOptedInSlasher", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "slasher", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorCredentialsVerified", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "indexed": false, - "internalType": "uint40[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VerifiedAndProcessedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "indexed": false, - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "indexed": false, - "internalType": "bytes32[][]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalsQueued", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "shareAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "withdrawalRoot", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "Create2EmptyBytecode", - "inputs": [] - }, - { - "type": "error", - "name": "Create2FailedDeployment", - "inputs": [] - }, - { - "type": "error", - "name": "Create2InsufficientBalance", - "inputs": [ - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/PufferOracle.json b/lib/legacy/config/abis/holesky/PufferOracle.json deleted file mode 100644 index 9c2da8b..0000000 --- a/lib/legacy/config/abis/holesky/PufferOracle.json +++ /dev/null @@ -1,179 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLockedEthAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getValidatorTicketPrice", - "inputs": [], - "outputs": [ - { - "name": "pricePerVT", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isOverBurstThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMintPrice", - "inputs": [ - { - "name": "newPrice", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketMintPriceUpdated", - "inputs": [ - { - "name": "oldPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "InvalidValidatorTicketPrice", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/PufferOracleV2.json b/lib/legacy/config/abis/holesky/PufferOracleV2.json deleted file mode 100644 index f970882..0000000 --- a/lib/legacy/config/abis/holesky/PufferOracleV2.json +++ /dev/null @@ -1,314 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "guardianModule", - "type": "address", - "internalType": "contract IGuardianModule" - }, - { - "name": "vault", - "type": "address", - "internalType": "address payable" - }, - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IGuardianModule" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "exitValidators", - "inputs": [ - { - "name": "numberOfExits", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getLockedEthAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTotalNumberOfValidators", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorTicketPrice", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isOverBurstThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "provisionNode", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMintPrice", - "inputs": [ - { - "name": "newPrice", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setTotalNumberOfValidators", - "inputs": [ - { - "name": "newTotalNumberOfValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberOfActiveValidators", - "inputs": [ - { - "name": "numberOfActivePufferValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TotalNumberOfValidatorsUpdated", - "inputs": [ - { - "name": "oldNumberOfValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newNumberOfValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketMintPriceUpdated", - "inputs": [ - { - "name": "oldPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPrice", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "InvalidUpdate", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidValidatorTicketPrice", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/PufferProtocol.json b/lib/legacy/config/abis/holesky/PufferProtocol.json deleted file mode 100644 index ea4d169..0000000 --- a/lib/legacy/config/abis/holesky/PufferProtocol.json +++ /dev/null @@ -1,1401 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferVault", - "type": "address", - "internalType": "contract PufferVaultV2" - }, - { - "name": "guardianModule", - "type": "address", - "internalType": "contract IGuardianModule" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "address" - }, - { - "name": "validatorTicket", - "type": "address", - "internalType": "contract ValidatorTicket" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracleV2" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IGuardianModule" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracleV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract PufferVaultV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "VALIDATOR_TICKET", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ValidatorTicket" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "batchHandleWithdrawals", - "inputs": [ - { - "name": "validatorInfos", - "type": "tuple[]", - "internalType": "struct StoppedValidatorInfo[]", - "components": [ - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "startEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wasSlashed", - "type": "bool", - "internalType": "bool" - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "withdrawalAmount", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "changeMinimumVTAmount", - "inputs": [ - { - "name": "newMinimumVTAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createPufferModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositValidatorTickets", - "inputs": [ - { - "name": "permit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "node", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getDepositDataRoot", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "withdrawalCredentials", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getMinimumVtAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleAddress", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleSelectIndex", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleWeights", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNextValidatorToBeProvisionedIndex", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNextValidatorToProvision", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeInfo", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct NodeInfo", - "components": [ - { - "name": "activeValidatorCount", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pendingValidatorCount", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "vtBalance", - "type": "uint96", - "internalType": "uint96" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPayload", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "usingEnclave", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingValidatorIndex", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getVTPenalty", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorInfo", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct Validator", - "components": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "bond", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorTicketsBalance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidators", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct Validator[]", - "components": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "bond", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWithdrawalCredentials", - "inputs": [ - { - "name": "module", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "provisionNode", - "inputs": [ - { - "name": "guardianEnclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorSignature", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "registerValidatorKey", - "inputs": [ - { - "name": "data", - "type": "tuple", - "internalType": "struct ValidatorKeyData", - "components": [ - { - "name": "blsPubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "blsEncryptedPrivKeyShares", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "blsPubKeySet", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "raveEvidence", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufETHPermit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "vtPermit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "revertIfPaused", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setModuleWeights", - "inputs": [ - { - "name": "newModuleWeights", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setVTPenalty", - "inputs": [ - { - "name": "newPenaltyAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setValidatorLimitPerModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "limit", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "skipProvisioning", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "withdrawValidatorTickets", - "inputs": [ - { - "name": "amount", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MinimumVTAmountChanged", - "inputs": [ - { - "name": "oldMinimumNumberOfDays", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newMinimumNumberOfDays", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ModuleWeightsChanged", - "inputs": [ - { - "name": "oldWeights", - "type": "bytes32[]", - "indexed": false, - "internalType": "bytes32[]" - }, - { - "name": "newWeights", - "type": "bytes32[]", - "indexed": false, - "internalType": "bytes32[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NewPufferModuleCreated", - "inputs": [ - { - "name": "module", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "withdrawalCredentials", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberOfActiveValidatorsChanged", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newNumberOfActiveValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SuccessfullyProvisioned", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VTPenaltyChanged", - "inputs": [ - { - "name": "oldPenalty", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPenalty", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorExited", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "pufETHBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "vtBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorKeyRegistered", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "usingEnclave", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorLimitPerModuleChanged", - "inputs": [ - { - "name": "oldLimit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newLimit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorSkipped", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": true, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketsDeposited", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "depositor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketsWithdrawn", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ActiveOrPendingValidatorsExist", - "inputs": [] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPrivateKeyShares", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPubKey", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPublicKeySet", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidETHAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidVTAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidValidatorState", - "inputs": [ - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - } - ] - }, - { - "type": "error", - "name": "ModuleAlreadyExists", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ValidatorLimitForModuleReached", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/PufferVaultV2.json b/lib/legacy/config/abis/holesky/PufferVaultV2.json deleted file mode 100644 index 71e4b61..0000000 --- a/lib/legacy/config/abis/holesky/PufferVaultV2.json +++ /dev/null @@ -1,1783 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "stETH", - "type": "address", - "internalType": "contract IStETH" - }, - { - "name": "weth", - "type": "address", - "internalType": "contract IWETH" - }, - { - "name": "lidoWithdrawalQueue", - "type": "address", - "internalType": "contract ILidoWithdrawalQueue" - }, - { - "name": "stETHStrategy", - "type": "address", - "internalType": "contract IStrategy" - }, - { - "name": "eigenStrategyManager", - "type": "address", - "internalType": "contract IEigenLayer" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "queuedWithdrawal", - "type": "tuple", - "internalType": "struct IEigenLayer.QueuedWithdrawal", - "components": [ - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "depositor", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawerAndNonce", - "type": "tuple", - "internalType": "struct IEigenLayer.WithdrawerAndNonce", - "components": [ - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint96", - "internalType": "uint96" - } - ] - }, - { - "name": "withdrawalStartBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "delegatedAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "tokens", - "type": "address[]", - "internalType": "contract IERC20[]" - }, - { - "name": "middlewareTimesIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalsFromLido", - "inputs": [ - { - "name": "requestIds", - "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": "convertToShares", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "convertToSharesUp", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "pure" - }, - { - "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": "depositETH", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "stETHSharesAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositToEigenLayer", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getELBackingEthAmount", - "inputs": [], - "outputs": [ - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getExitFeeBasisPoints", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingLidoETHAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRemainingAssetsDailyWithdrawalLimit", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateETHWithdrawalsFromLido", - "inputs": [ - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateStETHWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "sharesToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxDeposit", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxMint", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxRedeem", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxShares", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxWithdraw", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxAssets", - "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": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "onERC721Received", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "previewDeposit", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewMint", - "inputs": [ - { - "name": "shares", - "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": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "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": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDailyWithdrawalLimit", - "inputs": [ - { - "name": "newLimit", - "type": "uint96", - "internalType": "uint96" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setExitFeeBasisPoints", - "inputs": [ - { - "name": "newExitFeeBasisPoints", - "type": "uint256", - "internalType": "uint256" - } - ], - "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": "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": "transferETH", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AssetsWithdrawnToday", - "inputs": [ - { - "name": "withdrawalAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ClaimedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "indexed": false, - "internalType": "uint256[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitReset", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitSet", - "inputs": [ - { - "name": "oldLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - }, - { - "name": "newLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - } - ], - "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": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "ExitFeeBasisPointsSet", - "inputs": [ - { - "name": "previousFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFee", - "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": "LidoWithdrawal", - "inputs": [ - { - "name": "expectedWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "actualWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RequestedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "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": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "DepositAndWithdrawalForbidden", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "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": "ETHTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "EnumerableMapNonexistentKey", - "inputs": [ - { - "name": "key", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidExitFeeBasisPoints", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidWithdrawal", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "WithdrawalsAreDisabled", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/RestakingOperator.json b/lib/legacy/config/abis/holesky/RestakingOperator.json deleted file mode 100644 index f550b6a..0000000 --- a/lib/legacy/config/abis/holesky/RestakingOperator.json +++ /dev/null @@ -1,350 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - }, - { - "name": "slasher", - "type": "address", - "internalType": "contract ISlasher" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "EIGEN_DELEGATION_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_SLASHER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ISlasher" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "initialAuthority", - "type": "address", - "internalType": "address" - }, - { - "name": "operatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isValidSignature", - "inputs": [ - { - "name": "digestHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "modifyOperatorDetails", - "inputs": [ - { - "name": "newOperatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "optIntoSlashing", - "inputs": [ - { - "name": "slasher", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateOperatorMetadataURI", - "inputs": [ - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateSignatureProof", - "inputs": [ - { - "name": "digestHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "signer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/holesky/ValidatorTicket.json b/lib/legacy/config/abis/holesky/ValidatorTicket.json deleted file mode 100644 index 197e149..0000000 --- a/lib/legacy/config/abis/holesky/ValidatorTicket.json +++ /dev/null @@ -1,1031 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "guardianModule", - "type": "address", - "internalType": "address payable" - }, - { - "name": "treasury", - "type": "address", - "internalType": "address payable" - }, - { - "name": "pufferVault", - "type": "address", - "internalType": "address payable" - }, - { - "name": "pufferOracle", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "TREASURY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProtocolFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - }, - { - "name": "treasuryFeeRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardiansFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "purchaseValidatorTicket", - "inputs": [ - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "mintedAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGuardiansFeeRate", - "inputs": [ - { - "name": "newGuardiansFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setProtocolFeeRate", - "inputs": [ - { - "name": "newProtocolFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DispersedETH", - "inputs": [ - { - "name": "treasury", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "guardians", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "vault", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "GuardiansFeeChanged", - "inputs": [ - { - "name": "oldGuardiansFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newGuardiansFee", - "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": "ProtocolFeeChanged", - "inputs": [ - { - "name": "oldTreasuryFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newTreasuryFee", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidData", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/lib/legacy/config/abis/mainnet/EnclaveVerifier.json b/lib/legacy/config/abis/mainnet/EnclaveVerifier.json deleted file mode 100644 index 0228f64..0000000 --- a/lib/legacy/config/abis/mainnet/EnclaveVerifier.json +++ /dev/null @@ -1,457 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "freshnessBlocks", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "FRESHNESS_BLOCKS", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addLeafX509", - "inputs": [ - { - "name": "leafX509Cert", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "buildJSON", - "inputs": [ - { - "name": "values", - "type": "tuple", - "internalType": "struct JSONBuilder.Values", - "components": [ - { - "name": "id", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestamp", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "version", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "epidPseudonym", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "advisoryURL", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "advisoryIDs", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "isvEnclaveQuoteStatus", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "isvEnclaveQuoteBody", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "outputs": [ - { - "name": "json", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getIntelRootCAPubKey", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IEnclaveVerifier.RSAPubKey", - "components": [ - { - "name": "modulus", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "exponent", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "rave", - "inputs": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "sig", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "leafX509Cert", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signingMod", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signingExp", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "mrenclave", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mrsigner", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "payload", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeLeafX509", - "inputs": [ - { - "name": "hashedCert", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyEvidence", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "raveCommitment", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "evidence", - "type": "tuple", - "internalType": "struct RaveEvidence", - "components": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "leafX509CertDigest", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "mrenclave", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mrsigner", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "verifyRemoteAttestation", - "inputs": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "sig", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signingMod", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signingExp", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "mrenclave", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mrsigner", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "payload", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "verifyReportSignature", - "inputs": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "sig", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signingMod", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signingExp", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AddedPubKey", - "inputs": [ - { - "name": "pubKeyHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RemovedPubKey", - "inputs": [ - { - "name": "pubKeyHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "BadReportSignature", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "StaleEvidence", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/GuardianModule.json b/lib/legacy/config/abis/mainnet/GuardianModule.json deleted file mode 100644 index 9b25c28..0000000 --- a/lib/legacy/config/abis/mainnet/GuardianModule.json +++ /dev/null @@ -1,742 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "verifier", - "type": "address", - "internalType": "contract IEnclaveVerifier" - }, - { - "name": "guardians", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "threshold", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pufferAuthority", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "ENCLAVE_VERIFIER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IEnclaveVerifier" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addGuardian", - "inputs": [ - { - "name": "newGuardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getEjectionThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardians", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclaveAddress", - "inputs": [ - { - "name": "guardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclaveAddresses", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansEnclavePubkeys", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMrenclave", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMrsigner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getThreshold", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isGuardian", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeGuardian", - "inputs": [ - { - "name": "guardian", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rotateGuardianKey", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "evidence", - "type": "tuple", - "internalType": "struct RaveEvidence", - "components": [ - { - "name": "report", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "leafX509CertDigest", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setEjectionThreshold", - "inputs": [ - { - "name": "newThreshold", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGuardianEnclaveMeasurements", - "inputs": [ - { - "name": "newMrEnclave", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "newMrSigner", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setThreshold", - "inputs": [ - { - "name": "newThreshold", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "splitGuardianFunds", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "validateBatchWithdrawals", - "inputs": [ - { - "name": "validatorInfos", - "type": "tuple[]", - "internalType": "struct StoppedValidatorInfo[]", - "components": [ - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "startEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wasSlashed", - "type": "bool", - "internalType": "bool" - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "withdrawalAmount", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateGuardiansEOASignatures", - "inputs": [ - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "signedMessageHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateGuardiansEnclaveSignatures", - "inputs": [ - { - "name": "enclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "signedMessageHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateProvisionNode", - "inputs": [ - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "withdrawalCredentials", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "enclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateSkipProvisioning", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "skippedIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "function", - "name": "validateTotalNumberOfValidators", - "inputs": [ - { - "name": "newNumberOfValidators", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "epochNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "eoaSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EjectionThresholdChanged", - "inputs": [ - { - "name": "oldThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GuardianAdded", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GuardianRemoved", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MrEnclaveChanged", - "inputs": [ - { - "name": "oldMrEnclave", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "newMrEnclave", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MrSignerChanged", - "inputs": [ - { - "name": "oldMrSigner", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "newMrSigner", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RotatedGuardianKey", - "inputs": [ - { - "name": "guardian", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "guardianEnclave", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ThresholdChanged", - "inputs": [ - { - "name": "oldThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidECDSAPubKey", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidRAVE", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidThreshold", - "inputs": [ - { - "name": "threshold", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/OperationsCoordinator.json b/lib/legacy/config/abis/mainnet/OperationsCoordinator.json deleted file mode 100644 index 833c8a0..0000000 --- a/lib/legacy/config/abis/mainnet/OperationsCoordinator.json +++ /dev/null @@ -1,200 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "oracle", - "type": "address", - "internalType": "contract PufferOracleV2" - }, - { - "name": "accessManager", - "type": "address", - "internalType": "address" - }, - { - "name": "priceChangeToleranceBps", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPriceChangeToleranceBps", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isWithinRange", - "inputs": [ - { - "name": "newPrice", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPriceChangeToleranceBps", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setValidatorTicketMintPrice", - "inputs": [ - { - "name": "newPrice", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PriceChangeToleranceBPSUpdated", - "inputs": [ - { - "name": "oldValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "InvalidPrice", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidPriceChangeToleranceBPS", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/PufferDepositor.json b/lib/legacy/config/abis/mainnet/PufferDepositor.json deleted file mode 100644 index 214d76f..0000000 --- a/lib/legacy/config/abis/mainnet/PufferDepositor.json +++ /dev/null @@ -1,373 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferVault", - "type": "address", - "internalType": "contract PufferVaultV2" - }, - { - "name": "stETH", - "type": "address", - "internalType": "contract IStETH" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract PufferVaultV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "permitData", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "pufETHAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositWstETH", - "inputs": [ - { - "name": "permitData", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "pufETHAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/lib/legacy/config/abis/mainnet/PufferModule.json b/lib/legacy/config/abis/mainnet/PufferModule.json deleted file mode 100644 index 7659ad4..0000000 --- a/lib/legacy/config/abis/mainnet/PufferModule.json +++ /dev/null @@ -1,792 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "protocol", - "type": "address", - "internalType": "contract IPufferProtocol" - }, - { - "name": "eigenPodManager", - "type": "address", - "internalType": "address" - }, - { - "name": "eigenWithdrawalRouter", - "type": "address", - "internalType": "contract IDelayedWithdrawalRouter" - }, - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "payable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "EIGEN_DELEGATION_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_POD_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IEigenPodManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_WITHDRAWAL_ROUTER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelayedWithdrawalRouter" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "NAME", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferProtocol" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "call", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "success", - "type": "bool", - "internalType": "bool" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callDelegateTo", - "inputs": [ - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approverSignatureAndExpiry", - "type": "tuple", - "internalType": "struct ISignatureUtils.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": "callStake", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "callUndelegate", - "inputs": [], - "outputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "collectRewards", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "blockNumbers", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "merkleProofs", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "completeQueuedWithdrawals", - "inputs": [ - { - "name": "withdrawals", - "type": "tuple[]", - "internalType": "struct IDelegationManager.Withdrawal[]", - "components": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatedTo", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "tokens", - "type": "address[][]", - "internalType": "contract IERC20[][]" - }, - { - "name": "middlewareTimesIndexes", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "receiveAsTokens", - "type": "bool[]", - "internalType": "bool[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getEigenPod", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLastProofOfRewardsBlock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWithdrawalCredentials", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "initialAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "postRewardsRoot", - "inputs": [ - { - "name": "root", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardianSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "queueWithdrawals", - "inputs": [ - { - "name": "shareAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyAndProcessWithdrawals", - "inputs": [ - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "withdrawalProofs", - "type": "tuple[]", - "internalType": "struct BeaconChainProofs.WithdrawalProof[]", - "components": [ - { - "name": "withdrawalProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "slotProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "executionPayloadProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestampProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "historicalSummaryBlockRootProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "blockRootIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "historicalSummaryIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "withdrawalIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "blockRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "slotRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "timestampRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "executionPayloadRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "verifyWithdrawalCredentials", - "inputs": [ - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "internalType": "uint40[]" - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawNonBeaconChainETHBalanceWei", - "inputs": [ - { - "name": "amountToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsClaimed", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RewardsRootPosted", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "root", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AlreadyClaimed", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "node", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBlockNumber", - "inputs": [ - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "NothingToClaim", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/PufferModuleManager.json b/lib/legacy/config/abis/mainnet/PufferModuleManager.json deleted file mode 100644 index d25c3c2..0000000 --- a/lib/legacy/config/abis/mainnet/PufferModuleManager.json +++ /dev/null @@ -1,1508 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferModuleBeacon", - "type": "address", - "internalType": "address" - }, - { - "name": "restakingOperatorBeacon", - "type": "address", - "internalType": "address" - }, - { - "name": "pufferProtocol", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "PUFFER_MODULE_BEACON", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESTAKING_OPERATOR_BEACON", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "callCompleteQueuedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "withdrawals", - "type": "tuple[]", - "internalType": "struct IDelegationManager.Withdrawal[]", - "components": [ - { - "name": "staker", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatedTo", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "startBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - } - ] - }, - { - "name": "tokens", - "type": "address[][]", - "internalType": "contract IERC20[][]" - }, - { - "name": "middlewareTimesIndexes", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "receiveAsTokens", - "type": "bool[]", - "internalType": "bool[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callDelegateTo", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - }, - { - "name": "approverSignatureAndExpiry", - "type": "tuple", - "internalType": "struct ISignatureUtils.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": "callDeregisterOperatorFromAVS", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callModifyOperatorDetails", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "newOperatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callOptIntoSlashing", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "slasher", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callQueueWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "sharesAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callRegisterOperatorToAVS", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "socket", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "tuple", - "internalType": "struct IBLSApkRegistry.PubkeyRegistrationParams", - "components": [ - { - "name": "pubkeyRegistrationSignature", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG1", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG2", - "type": "tuple", - "internalType": "struct BN254.G2Point", - "components": [ - { - "name": "X", - "type": "uint256[2]", - "internalType": "uint256[2]" - }, - { - "name": "Y", - "type": "uint256[2]", - "internalType": "uint256[2]" - } - ] - } - ] - }, - { - "name": "operatorSignature", - "type": "tuple", - "internalType": "struct ISignatureUtils.SignatureWithSaltAndExpiry", - "components": [ - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "expiry", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callRegisterOperatorToAVSWithChurn", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "socket", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "tuple", - "internalType": "struct IBLSApkRegistry.PubkeyRegistrationParams", - "components": [ - { - "name": "pubkeyRegistrationSignature", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG1", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG2", - "type": "tuple", - "internalType": "struct BN254.G2Point", - "components": [ - { - "name": "X", - "type": "uint256[2]", - "internalType": "uint256[2]" - }, - { - "name": "Y", - "type": "uint256[2]", - "internalType": "uint256[2]" - } - ] - } - ] - }, - { - "name": "operatorKickParams", - "type": "tuple[]", - "internalType": "struct IRegistryCoordinator.OperatorKickParam[]", - "components": [ - { - "name": "quorumNumber", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "churnApproverSignature", - "type": "tuple", - "internalType": "struct ISignatureUtils.SignatureWithSaltAndExpiry", - "components": [ - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "expiry", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "operatorSignature", - "type": "tuple", - "internalType": "struct ISignatureUtils.SignatureWithSaltAndExpiry", - "components": [ - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "expiry", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUndelegate", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "withdrawalRoot", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUpdateMetadataURI", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callUpdateOperatorAVSSocket", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "socket", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callVerifyAndProcessWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "withdrawalProofs", - "type": "tuple[]", - "internalType": "struct BeaconChainProofs.WithdrawalProof[]", - "components": [ - { - "name": "withdrawalProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "slotProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "executionPayloadProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "timestampProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "historicalSummaryBlockRootProof", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "blockRootIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "historicalSummaryIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "withdrawalIndex", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "blockRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "slotRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "timestampRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "executionPayloadRoot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callVerifyWithdrawalCredentials", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracleTimestamp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "stateRootProof", - "type": "tuple", - "internalType": "struct BeaconChainProofs.StateRootProof", - "components": [ - { - "name": "beaconStateRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "proof", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "internalType": "uint40[]" - }, - { - "name": "validatorFieldsProofs", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "internalType": "bytes32[][]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "callWithdrawNonBeaconChainETHBalanceWei", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createNewPufferModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModule" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createNewRestakingOperator", - "inputs": [ - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IRestakingOperator" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateAVSRegistrationSignatureProof", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "internalType": "contract IRestakingOperator" - }, - { - "name": "digestHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "signer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "AVSRegistrationSignatureProofUpdated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "digestHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "signer", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CompletedQueuedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "sharesWithdrawn", - "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": "NonBeaconChainETHBalanceWithdrawn", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "amountToWithdraw", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PufferModuleDelegated", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "operator", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PufferModuleUndelegated", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorAVSSocketUpdated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": false, - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "socket", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorCreated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "operatorDetails", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorDeregisteredFromAVS", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": false, - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorMetadataURIUpdated", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "metadataURI", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorModified", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOperatorDetails", - "type": "tuple", - "indexed": false, - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorOptedInSlasher", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "slasher", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorRegisteredToAVS", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": false, - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "socket", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RestakingOperatorRegisteredToAVSWithChurn", - "inputs": [ - { - "name": "restakingOperator", - "type": "address", - "indexed": false, - "internalType": "contract IRestakingOperator" - }, - { - "name": "avsRegistryCoordinator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "socket", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "operatorKickParams", - "type": "tuple[]", - "indexed": false, - "internalType": "struct IRegistryCoordinator.OperatorKickParam[]", - "components": [ - { - "name": "quorumNumber", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorCredentialsVerified", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "validatorIndices", - "type": "uint40[]", - "indexed": false, - "internalType": "uint40[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VerifiedAndProcessedWithdrawals", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "validatorFields", - "type": "bytes32[][]", - "indexed": false, - "internalType": "bytes32[][]" - }, - { - "name": "withdrawalFields", - "type": "bytes32[][]", - "indexed": false, - "internalType": "bytes32[][]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalsQueued", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "shareAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "withdrawalRoot", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "Create2EmptyBytecode", - "inputs": [] - }, - { - "type": "error", - "name": "Create2FailedDeployment", - "inputs": [] - }, - { - "type": "error", - "name": "Create2InsufficientBalance", - "inputs": [ - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "ForbiddenModuleName", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/PufferOracleV2.json b/lib/legacy/config/abis/mainnet/PufferOracleV2.json deleted file mode 100644 index 4e9603c..0000000 --- a/lib/legacy/config/abis/mainnet/PufferOracleV2.json +++ /dev/null @@ -1,226 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IGuardianModule", - "name": "guardianModule", - "type": "address" - }, - { "internalType": "address payable", "name": "vault", "type": "address" }, - { "internalType": "address", "name": "accessManager", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { "internalType": "address", "name": "authority", "type": "address" } - ], - "name": "AccessManagedInvalidAuthority", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "caller", "type": "address" }, - { "internalType": "uint32", "name": "delay", "type": "uint32" } - ], - "name": "AccessManagedRequiredDelay", - "type": "error" - }, - { - "inputs": [ - { "internalType": "address", "name": "caller", "type": "address" } - ], - "name": "AccessManagedUnauthorized", - "type": "error" - }, - { "inputs": [], "name": "InvalidUpdate", "type": "error" }, - { "inputs": [], "name": "InvalidValidatorTicketPrice", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "authority", - "type": "address" - } - ], - "name": "AuthorityUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "numberOfActivePufferValidators", - "type": "uint256" - } - ], - "name": "NumberOfActiveValidators", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldNumberOfValidators", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newNumberOfValidators", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "epochNumber", - "type": "uint256" - } - ], - "name": "TotalNumberOfValidatorsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldPrice", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPrice", - "type": "uint256" - } - ], - "name": "ValidatorTicketMintPriceUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "GUARDIAN_MODULE", - "outputs": [ - { - "internalType": "contract IGuardianModule", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PUFFER_VAULT", - "outputs": [ - { "internalType": "address payable", "name": "", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "authority", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "numberOfExits", "type": "uint256" } - ], - "name": "exitValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getLockedEthAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalNumberOfValidators", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getValidatorTicketPrice", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isConsumingScheduledOp", - "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isOverBurstThreshold", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "provisionNode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newAuthority", "type": "address" } - ], - "name": "setAuthority", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "newPrice", "type": "uint256" } - ], - "name": "setMintPrice", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newTotalNumberOfValidators", - "type": "uint256" - }, - { "internalType": "uint256", "name": "epochNumber", "type": "uint256" }, - { - "internalType": "bytes[]", - "name": "guardianEOASignatures", - "type": "bytes[]" - } - ], - "name": "setTotalNumberOfValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/lib/legacy/config/abis/mainnet/PufferProtocol.json b/lib/legacy/config/abis/mainnet/PufferProtocol.json deleted file mode 100644 index e71f7c3..0000000 --- a/lib/legacy/config/abis/mainnet/PufferProtocol.json +++ /dev/null @@ -1,1470 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pufferVault", - "type": "address", - "internalType": "contract PufferVaultV2" - }, - { - "name": "guardianModule", - "type": "address", - "internalType": "contract IGuardianModule" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "address" - }, - { - "name": "validatorTicket", - "type": "address", - "internalType": "contract ValidatorTicket" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracleV2" - }, - { - "name": "beaconDepositContract", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "BEACON_DEPOSIT_CONTRACT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IBeaconDepositContract" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IGuardianModule" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracleV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract PufferVaultV2" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "VALIDATOR_TICKET", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ValidatorTicket" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "batchHandleWithdrawals", - "inputs": [ - { - "name": "validatorInfos", - "type": "tuple[]", - "internalType": "struct StoppedValidatorInfo[]", - "components": [ - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "startEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endEpoch", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "wasSlashed", - "type": "bool", - "internalType": "bool" - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "withdrawalAmount", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "changeMinimumVTAmount", - "inputs": [ - { - "name": "newMinimumVTAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "createPufferModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositValidatorTickets", - "inputs": [ - { - "name": "permit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "node", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getDepositDataRoot", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "withdrawalCredentials", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getMinimumVtAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleAddress", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleLimitInformation", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "info", - "type": "tuple", - "internalType": "struct ModuleLimit", - "components": [ - { - "name": "allowedLimit", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "numberOfRegisteredValidators", - "type": "uint128", - "internalType": "uint128" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleSelectIndex", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getModuleWeights", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNextValidatorToBeProvisionedIndex", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNextValidatorToProvision", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getNodeInfo", - "inputs": [ - { - "name": "node", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct NodeInfo", - "components": [ - { - "name": "activeValidatorCount", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pendingValidatorCount", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "vtBalance", - "type": "uint96", - "internalType": "uint96" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPayload", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "usingEnclave", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingValidatorIndex", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getVTPenalty", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorInfo", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct Validator", - "components": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "bond", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidatorTicketsBalance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getValidators", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct Validator[]", - "components": [ - { - "name": "node", - "type": "address", - "internalType": "address" - }, - { - "name": "bond", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "module", - "type": "address", - "internalType": "address" - }, - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - }, - { - "name": "pubKey", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWithdrawalCredentials", - "inputs": [ - { - "name": "module", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "provisionNode", - "inputs": [ - { - "name": "guardianEnclaveSignatures", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "validatorSignature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositRootHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "registerValidatorKey", - "inputs": [ - { - "name": "data", - "type": "tuple", - "internalType": "struct ValidatorKeyData", - "components": [ - { - "name": "blsPubKey", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "depositDataRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "blsEncryptedPrivKeyShares", - "type": "bytes[]", - "internalType": "bytes[]" - }, - { - "name": "blsPubKeySet", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "raveEvidence", - "type": "bytes", - "internalType": "bytes" - } - ] - }, - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "pufETHPermit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "name": "vtPermit", - "type": "tuple", - "internalType": "struct Permit", - "components": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "revertIfPaused", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setModuleWeights", - "inputs": [ - { - "name": "newModuleWeights", - "type": "bytes32[]", - "internalType": "bytes32[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setVTPenalty", - "inputs": [ - { - "name": "newPenaltyAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setValidatorLimitPerModule", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "limit", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "skipProvisioning", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "guardianEOASignatures", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "withdrawValidatorTickets", - "inputs": [ - { - "name": "amount", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MinimumVTAmountChanged", - "inputs": [ - { - "name": "oldMinimumNumberOfDays", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newMinimumNumberOfDays", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ModuleWeightsChanged", - "inputs": [ - { - "name": "oldWeights", - "type": "bytes32[]", - "indexed": false, - "internalType": "bytes32[]" - }, - { - "name": "newWeights", - "type": "bytes32[]", - "indexed": false, - "internalType": "bytes32[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NewPufferModuleCreated", - "inputs": [ - { - "name": "module", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "withdrawalCredentials", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberOfRegisteredValidatorsChanged", - "inputs": [ - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newNumberOfRegisteredValidators", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SuccessfullyProvisioned", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VTPenaltyChanged", - "inputs": [ - { - "name": "oldPenalty", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPenalty", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorExited", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "pufETHBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "vtBurnAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorKeyRegistered", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "usingEnclave", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorLimitPerModuleChanged", - "inputs": [ - { - "name": "oldLimit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newLimit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorSkipped", - "inputs": [ - { - "name": "pubKey", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "pufferModuleIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "moduleName", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketsDeposited", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "depositor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ValidatorTicketsWithdrawn", - "inputs": [ - { - "name": "node", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ActiveOrPendingValidatorsExist", - "inputs": [] - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "Failed", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPrivateKeyShares", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPubKey", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBLSPublicKeySet", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidDepositRootHash", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidETHAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidVTAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidValidatorState", - "inputs": [ - { - "name": "status", - "type": "uint8", - "internalType": "enum Status" - } - ] - }, - { - "type": "error", - "name": "ModuleAlreadyExists", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ValidatorLimitForModuleReached", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/PufferVaultV2.json b/lib/legacy/config/abis/mainnet/PufferVaultV2.json deleted file mode 100644 index 245c8cf..0000000 --- a/lib/legacy/config/abis/mainnet/PufferVaultV2.json +++ /dev/null @@ -1,1860 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "stETH", - "type": "address", - "internalType": "contract IStETH" - }, - { - "name": "weth", - "type": "address", - "internalType": "contract IWETH" - }, - { - "name": "lidoWithdrawalQueue", - "type": "address", - "internalType": "contract ILidoWithdrawalQueue" - }, - { - "name": "stETHStrategy", - "type": "address", - "internalType": "contract IStrategy" - }, - { - "name": "eigenStrategyManager", - "type": "address", - "internalType": "contract IEigenLayer" - }, - { - "name": "oracle", - "type": "address", - "internalType": "contract IPufferOracle" - }, - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "queuedWithdrawal", - "type": "tuple", - "internalType": "struct IEigenLayer.QueuedWithdrawal", - "components": [ - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "depositor", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawerAndNonce", - "type": "tuple", - "internalType": "struct IEigenLayer.WithdrawerAndNonce", - "components": [ - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint96", - "internalType": "uint96" - } - ] - }, - { - "name": "withdrawalStartBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "delegatedAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "tokens", - "type": "address[]", - "internalType": "contract IERC20[]" - }, - { - "name": "middlewareTimesIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalFromEigenLayerM2", - "inputs": [ - { - "name": "queuedWithdrawal", - "type": "tuple", - "internalType": "struct IEigenLayer.QueuedWithdrawal", - "components": [ - { - "name": "strategies", - "type": "address[]", - "internalType": "contract IStrategy[]" - }, - { - "name": "shares", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "depositor", - "type": "address", - "internalType": "address" - }, - { - "name": "withdrawerAndNonce", - "type": "tuple", - "internalType": "struct IEigenLayer.WithdrawerAndNonce", - "components": [ - { - "name": "withdrawer", - "type": "address", - "internalType": "address" - }, - { - "name": "nonce", - "type": "uint96", - "internalType": "uint96" - } - ] - }, - { - "name": "withdrawalStartBlock", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "delegatedAddress", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "tokens", - "type": "address[]", - "internalType": "contract IERC20[]" - }, - { - "name": "middlewareTimesIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "nonce", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "claimWithdrawalsFromLido", - "inputs": [ - { - "name": "requestIds", - "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": "convertToShares", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "convertToSharesUp", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "pure" - }, - { - "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": "depositETH", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "depositStETH", - "inputs": [ - { - "name": "stETHSharesAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "depositToEigenLayer", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getELBackingEthAmount", - "inputs": [], - "outputs": [ - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getExitFeeBasisPoints", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingLidoETHAmount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRemainingAssetsDailyWithdrawalLimit", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateETHWithdrawalsFromLido", - "inputs": [ - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initiateStETHWithdrawalFromEigenLayer", - "inputs": [ - { - "name": "sharesToWithdraw", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxDeposit", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxMint", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxRedeem", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxShares", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxWithdraw", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "maxAssets", - "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": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "onERC721Received", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "previewDeposit", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewMint", - "inputs": [ - { - "name": "shares", - "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": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "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": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDailyWithdrawalLimit", - "inputs": [ - { - "name": "newLimit", - "type": "uint96", - "internalType": "uint96" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setExitFeeBasisPoints", - "inputs": [ - { - "name": "newExitFeeBasisPoints", - "type": "uint256", - "internalType": "uint256" - } - ], - "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": "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": "transferETH", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "ethAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AssetsWithdrawnToday", - "inputs": [ - { - "name": "withdrawalAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ClaimedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "type": "uint256[]", - "indexed": false, - "internalType": "uint256[]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitReset", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "DailyWithdrawalLimitSet", - "inputs": [ - { - "name": "oldLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - }, - { - "name": "newLimit", - "type": "uint96", - "indexed": false, - "internalType": "uint96" - } - ], - "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": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "ExitFeeBasisPointsSet", - "inputs": [ - { - "name": "previousFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFee", - "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": "LidoWithdrawal", - "inputs": [ - { - "name": "expectedWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "actualWithdrawal", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RequestedWithdrawals", - "inputs": [ - { - "name": "requestIds", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "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": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "DepositAndWithdrawalForbidden", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "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": "ETHTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "EnumerableMapNonexistentKey", - "inputs": [ - { - "name": "key", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidExitFeeBasisPoints", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidWithdrawal", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "WithdrawalsAreDisabled", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/RestakingOperator.json b/lib/legacy/config/abis/mainnet/RestakingOperator.json deleted file mode 100644 index 3561367..0000000 --- a/lib/legacy/config/abis/mainnet/RestakingOperator.json +++ /dev/null @@ -1,631 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "delegationManager", - "type": "address", - "internalType": "contract IDelegationManager" - }, - { - "name": "slasher", - "type": "address", - "internalType": "contract ISlasher" - }, - { - "name": "moduleManager", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "EIGEN_DELEGATION_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IDelegationManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIGEN_SLASHER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ISlasher" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_MODULE_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferModuleManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "authority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "deregisterOperatorFromAVS", - "inputs": [ - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "initialAuthority", - "type": "address", - "internalType": "address" - }, - { - "name": "operatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isValidSignature", - "inputs": [ - { - "name": "digestHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "modifyOperatorDetails", - "inputs": [ - { - "name": "newOperatorDetails", - "type": "tuple", - "internalType": "struct IDelegationManager.OperatorDetails", - "components": [ - { - "name": "earningsReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "delegationApprover", - "type": "address", - "internalType": "address" - }, - { - "name": "stakerOptOutWindowBlocks", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "optIntoSlashing", - "inputs": [ - { - "name": "slasher", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "registerOperatorToAVS", - "inputs": [ - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "socket", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "tuple", - "internalType": "struct IBLSApkRegistry.PubkeyRegistrationParams", - "components": [ - { - "name": "pubkeyRegistrationSignature", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG1", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG2", - "type": "tuple", - "internalType": "struct BN254.G2Point", - "components": [ - { - "name": "X", - "type": "uint256[2]", - "internalType": "uint256[2]" - }, - { - "name": "Y", - "type": "uint256[2]", - "internalType": "uint256[2]" - } - ] - } - ] - }, - { - "name": "operatorSignature", - "type": "tuple", - "internalType": "struct ISignatureUtils.SignatureWithSaltAndExpiry", - "components": [ - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "expiry", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "registerOperatorToAVSWithChurn", - "inputs": [ - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "quorumNumbers", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "socket", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "tuple", - "internalType": "struct IBLSApkRegistry.PubkeyRegistrationParams", - "components": [ - { - "name": "pubkeyRegistrationSignature", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG1", - "type": "tuple", - "internalType": "struct BN254.G1Point", - "components": [ - { - "name": "X", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "Y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "pubkeyG2", - "type": "tuple", - "internalType": "struct BN254.G2Point", - "components": [ - { - "name": "X", - "type": "uint256[2]", - "internalType": "uint256[2]" - }, - { - "name": "Y", - "type": "uint256[2]", - "internalType": "uint256[2]" - } - ] - } - ] - }, - { - "name": "operatorKickParams", - "type": "tuple[]", - "internalType": "struct IRegistryCoordinator.OperatorKickParam[]", - "components": [ - { - "name": "quorumNumber", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "operator", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "churnApproverSignature", - "type": "tuple", - "internalType": "struct ISignatureUtils.SignatureWithSaltAndExpiry", - "components": [ - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "expiry", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "operatorSignature", - "type": "tuple", - "internalType": "struct ISignatureUtils.SignatureWithSaltAndExpiry", - "components": [ - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "expiry", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateOperatorAVSSocket", - "inputs": [ - { - "name": "avsRegistryCoordinator", - "type": "address", - "internalType": "address" - }, - { - "name": "socket", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateOperatorMetadataURI", - "inputs": [ - { - "name": "metadataURI", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateSignatureProof", - "inputs": [ - { - "name": "digestHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "signer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/Timelock.json b/lib/legacy/config/abis/mainnet/Timelock.json deleted file mode 100644 index 72cf3a4..0000000 --- a/lib/legacy/config/abis/mainnet/Timelock.json +++ /dev/null @@ -1,440 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "communityMultisig", - "type": "address", - "internalType": "address" - }, - { - "name": "operationsMultisig", - "type": "address", - "internalType": "address" - }, - { - "name": "pauser", - "type": "address", - "internalType": "address" - }, - { - "name": "accessManager", - "type": "address", - "internalType": "address" - }, - { - "name": "initialDelay", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ACCESS_MANAGER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract AccessManager" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "COMMUNITY_MULTISIG", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MINIMUM_DELAY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "OPERATIONS_MULTISIG", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "cancelTransaction", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - }, - { - "name": "callData", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "operationId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "delay", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "executeTransaction", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - }, - { - "name": "callData", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "operationId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "success", - "type": "bool", - "internalType": "bool" - }, - { - "name": "returnData", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pause", - "inputs": [ - { - "name": "targets", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "pauserMultisig", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queue", - "inputs": [ - { - "name": "transactionHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "lockedUntil", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queueTransaction", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - }, - { - "name": "callData", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "operationId", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDelay", - "inputs": [ - { - "name": "newDelay", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPauser", - "inputs": [ - { - "name": "newPauser", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "DelayChanged", - "inputs": [ - { - "name": "oldDelay", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newDelay", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PauserChanged", - "inputs": [ - { - "name": "oldPauser", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "newPauser", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TransactionCanceled", - "inputs": [ - { - "name": "txHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "target", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "callData", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "operationId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TransactionExecuted", - "inputs": [ - { - "name": "txHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "target", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "callData", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "operationId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TransactionQueued", - "inputs": [ - { - "name": "txHash", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "target", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "callData", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - }, - { - "name": "operationId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "lockedUntil", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "BadAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidDelay", - "inputs": [ - { - "name": "delay", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidTransaction", - "inputs": [ - { - "name": "txHash", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Locked", - "inputs": [ - { - "name": "txHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "lockedUntil", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } -] diff --git a/lib/legacy/config/abis/mainnet/ValidatorTicket.json b/lib/legacy/config/abis/mainnet/ValidatorTicket.json deleted file mode 100644 index 197e149..0000000 --- a/lib/legacy/config/abis/mainnet/ValidatorTicket.json +++ /dev/null @@ -1,1031 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "guardianModule", - "type": "address", - "internalType": "address payable" - }, - { - "name": "treasury", - "type": "address", - "internalType": "address payable" - }, - { - "name": "pufferVault", - "type": "address", - "internalType": "address payable" - }, - { - "name": "pufferOracle", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "GUARDIAN_MODULE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_ORACLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPufferOracle" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PUFFER_VAULT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "TREASURY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address payable" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "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": "authority", - "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": "burn", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], - "outputs": [ - { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGuardiansFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getProtocolFeeRate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "accessManager", - "type": "address", - "internalType": "address" - }, - { - "name": "treasuryFeeRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "guardiansFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isConsumingScheduledOp", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "purchaseValidatorTicket", - "inputs": [ - { - "name": "recipient", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "mintedAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "setAuthority", - "inputs": [ - { - "name": "newAuthority", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGuardiansFeeRate", - "inputs": [ - { - "name": "newGuardiansFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setProtocolFeeRate", - "inputs": [ - { - "name": "newProtocolFeeRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "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": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "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": "AuthorityUpdated", - "inputs": [ - { - "name": "authority", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DispersedETH", - "inputs": [ - { - "name": "treasury", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "guardians", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "vault", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "GuardiansFeeChanged", - "inputs": [ - { - "name": "oldGuardiansFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newGuardiansFee", - "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": "ProtocolFeeChanged", - "inputs": [ - { - "name": "oldTreasuryFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newTreasuryFee", - "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": "TransferredETH", - "inputs": [ - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AccessManagedInvalidAuthority", - "inputs": [ - { - "name": "authority", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AccessManagedRequiredDelay", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "delay", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "type": "error", - "name": "AccessManagedUnauthorized", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - } - ] - }, - { - "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": "ECDSAInvalidSignature", - "inputs": [] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "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": "ERC2612ExpiredSignature", - "inputs": [ - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC2612InvalidSigner", - "inputs": [ - { - "name": "signer", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidData", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/lib/legacy/config/addresses.ts b/lib/legacy/config/addresses.ts deleted file mode 100644 index 3cdd22d..0000000 --- a/lib/legacy/config/addresses.ts +++ /dev/null @@ -1,29 +0,0 @@ -import mainnetAddresses from './addresses/mainnet.json'; -import holeskyAddresses from './addresses/holesky.json'; -import anvilAddresses from './addresses/anvil.json'; - -// Mainnet Addresses -export const MAINNET_PUFFER_VAULT_CONTRACT_ADDRESS = mainnetAddresses.vault; -export const MAINNET_PUFFER_PROTOCOL_CONTRACT_ADDRESS = - mainnetAddresses.pufferProtocolProxy; -export const MAINNET_VALIDATOR_TICKET_CONTRACT_ADDRESS = - mainnetAddresses.validatorTicketProxy; -export const MAINNET_PUFFER_ORACLE_CONTRACT_ADDRESS = mainnetAddresses.oracle; -export const MAINNET_GUARDIAN_MODULE_ADDRESS = mainnetAddresses.guardianModule; - -// Holesky Addresses -export const HOLESKY_PUFFER_VAULT_CONTRACT_ADDRESS = holeskyAddresses.vault; -export const HOLESKY_PUFFER_PROTOCOL_CONTRACT_ADDRESS = - holeskyAddresses.protocol; -export const HOLESKY_VALIDATOR_TICKET_CONTRACT_ADDRESS = - holeskyAddresses.validatorTicket; -export const HOLESKY_PUFFER_ORACLE_CONTRACT_ADDRESS = holeskyAddresses.oracle; -export const HOLESKY_GUARDIAN_MODULE_ADDRESS = holeskyAddresses.guardianModule; - -// Anvil Addresses -export const ANVIL_PUFFER_VAULT_CONTRACT_ADDRESS = anvilAddresses.vault; -export const ANVIL_PUFFER_PROTOCOL_CONTRACT_ADDRESS = anvilAddresses.protocol; -export const ANVIL_VALIDATOR_TICKET_CONTRACT_ADDRESS = - anvilAddresses.validatorTicket; -export const ANVIL_PUFFER_ORACLE_CONTRACT_ADDRESS = anvilAddresses.oracle; -export const ANVIL_GUARDIAN_MODULE_ADDRESS = anvilAddresses.guardianModule; diff --git a/lib/legacy/config/addresses/anvil.json b/lib/legacy/config/addresses/anvil.json deleted file mode 100644 index d6c6b00..0000000 --- a/lib/legacy/config/addresses/anvil.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x7023ac919031431874e905aBED5DB587082f76C0", - "PufferDepositorImplementation": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", - "PufferVault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", - "PufferVaultImplementation": "0xA51c1fc2f0D1a1b8494Ed1FE312d7C3a78Ed91C0", - "accessManager": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", - "dao": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", - "depositor": "0x7023ac919031431874e905aBED5DB587082f76C0", - "enclaveVerifier": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE", - "guardianModule": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", - "moduleBeacon": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8", - "moduleManager": "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB", - "oracle": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c", - "protocol": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E", - "stETH/stETH Mock": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", - "validatorTicket": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F", - "vault": "0xf770bF9384c5aaD8b8a6EFAb5951CF089656A371", - "weth/weth Mock": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" -} diff --git a/lib/legacy/config/addresses/holesky.json b/lib/legacy/config/addresses/holesky.json deleted file mode 100644 index 3268822..0000000 --- a/lib/legacy/config/addresses/holesky.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x9BEF4B8E025ecc91FE5Ee865f4880b106F106e5a", - "PufferDepositorImplementation": "0x335b6C8F5aA0073849A174c73EbA985b851d18e6", - "PufferVault": "0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa", - "PufferVaultImplementation": "0x2937fCae8d2E14bAD487db0AaD535751EE955961", - "accessManager": "0xA6c916f85DAfeb6f726E03a1Ce8d08cf835138fF", - "dao": "0xDDDeAfB492752FC64220ddB3E7C9f1d5CcCdFdF0", - "depositor": "0x9BEF4B8E025ecc91FE5Ee865f4880b106F106e5a", - "enclaveVerifier": "0x79200dE6299F27b7354Ca95A09a9C3978DBEDf24", - "guardianModule": "0xD349FdCD0e4451381bfE7cba3ac28773E176b326", - "moduleBeacon": "0x5B81A4579f466fB17af4d8CC0ED51256b94c61D4", - "moduleManager": "0xe4695ab93163F91665Ce5b96527408336f070a71", - "oracle": "0xEf93AA29F627465A7f58A1F25980c90116f27b74", - "protocol": "0x705E27D6A6A0c77081D32C07DbDE5A1E139D3F14", - "stETH/stETH Mock": "0x06ea70844bAdEac532ba750de1c4C853903fb542", - "validatorTicket": "0xA143c6bFAff0B25B485454a9a8DB94dC469F8c3b", - "vault": "0x98408eadD0C7cC9AebbFB2AD2787c7473Db7A1fa", - "weth/weth Mock": "0x67cAE813C252a5B911Da0EA476997661E39C4d87" -} diff --git a/lib/legacy/config/addresses/mainnet.json b/lib/legacy/config/addresses/mainnet.json deleted file mode 100644 index 97fd171..0000000 --- a/lib/legacy/config/addresses/mainnet.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "": "", - "PufferDepositor": "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff", - "PufferVault": "0xD9A442856C234a39a81a089C06451EBAa4306a72", - "accessManager": "0x8c1686069474410E6243425f4a10177a94EBEE11", - "depositor": "0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff", - "enclaveVerifier": "0x1d03e4bCC928795B1EEac1205fa9dDC4a3241D95", - "guardianModule": "0x628b183F248a142A598AA2dcCCD6f7E480a7CcF2", - "moduleManager": "0x9E1E4fCb49931df5743e659ad910d331735C3860", - "oracle": "0x8eFd1Dc43AD073232F3e2924e22F173879119489", - "pufferProtocolProxy": "0xf7b6B32492c2e13799D921E84202450131bd238B", - "validatorTicketProxy": "0x7D26AD6F6BA9D6bA1de0218Ae5e20CD3a273a55A", - "vault": "0xD9A442856C234a39a81a089C06451EBAa4306a72" -} diff --git a/lib/legacy/config/networks.ts b/lib/legacy/config/networks.ts deleted file mode 100644 index 3b255a8..0000000 --- a/lib/legacy/config/networks.ts +++ /dev/null @@ -1,19 +0,0 @@ -export enum Network { - None = 0, - Holesky = 1, - Mainnet = 2, - Anvil = 3, -} - -export const networkEnumToString = (selector: Network): string => { - switch (selector) { - case Network.Holesky: - return 'Holesky'; - case Network.Mainnet: - return 'Mainnet'; - case Network.Anvil: - return 'Localhost'; - default: - return 'Invalid Network'; - } -}; diff --git a/lib/legacy/config/networks/anvil.ts b/lib/legacy/config/networks/anvil.ts deleted file mode 100644 index 071ce15..0000000 --- a/lib/legacy/config/networks/anvil.ts +++ /dev/null @@ -1,15 +0,0 @@ -import anvilAddresses from '../addresses/anvil.json'; - -const anvilConfig = { - // Siren API base URL - sirenApiBaseUrl: - 'http://staging-console-969568480.eu-west-1.elb.amazonaws.com/siren/api/', - // Smart contract addresses - PUFFER_VAULT_CONTRACT_ADDRESS: anvilAddresses.vault, - PUFFER_PROTOCOL_CONTRACT_ADDRESS: anvilAddresses.protocol, - VALIDATOR_TICKET_CONTRACT_ADDRESS: anvilAddresses.validatorTicket, - PUFFER_ORACLE_CONTRACT_ADDRESS: anvilAddresses.oracle, - GUARDIAN_MODULE_ADDRESS: anvilAddresses.guardianModule, -}; - -export default anvilConfig; diff --git a/lib/legacy/config/networks/default.ts b/lib/legacy/config/networks/default.ts deleted file mode 100644 index cdf0028..0000000 --- a/lib/legacy/config/networks/default.ts +++ /dev/null @@ -1,15 +0,0 @@ -import mainnetAddresses from '../addresses/mainnet.json'; - -const defaultConfig = { - // Siren API base URL - sirenApiBaseUrl: 'https://api.puffer.fi/siren/api/', - - // Smart contract addresses - PUFFER_VAULT_CONTRACT_ADDRESS: mainnetAddresses.PufferVault, - PUFFER_PROTOCOL_CONTRACT_ADDRESS: mainnetAddresses.pufferProtocolProxy, - VALIDATOR_TICKET_CONTRACT_ADDRESS: mainnetAddresses.validatorTicketProxy, - PUFFER_ORACLE_CONTRACT_ADDRESS: mainnetAddresses.oracle, - GUARDIAN_MODULE_ADDRESS: mainnetAddresses.guardianModule, -}; - -export default defaultConfig; diff --git a/lib/legacy/config/networks/holesky.ts b/lib/legacy/config/networks/holesky.ts deleted file mode 100644 index 32cd830..0000000 --- a/lib/legacy/config/networks/holesky.ts +++ /dev/null @@ -1,15 +0,0 @@ -import holeskyAddresses from '../addresses/holesky.json'; - -const testnetConfig = { - // Siren API base URL - sirenApiBaseUrl: 'https://staging-api.puffer.fi/siren/api/', - - // Smart contract addresses - PUFFER_VAULT_CONTRACT_ADDRESS: holeskyAddresses.vault, - PUFFER_PROTOCOL_CONTRACT_ADDRESS: holeskyAddresses.protocol, - VALIDATOR_TICKET_CONTRACT_ADDRESS: holeskyAddresses.validatorTicket, - PUFFER_ORACLE_CONTRACT_ADDRESS: holeskyAddresses.oracle, - GUARDIAN_MODULE_ADDRESS: holeskyAddresses.guardianModule, -}; - -export default testnetConfig; diff --git a/lib/legacy/config/networks/mainnet.ts b/lib/legacy/config/networks/mainnet.ts deleted file mode 100644 index 37d4123..0000000 --- a/lib/legacy/config/networks/mainnet.ts +++ /dev/null @@ -1,15 +0,0 @@ -import mainnetAddresses from '../addresses/mainnet.json'; - -const mainnetConfig = { - // Siren API base URL - sirenApiBaseUrl: 'https://api.puffer.fi/siren/api/', - - // Smart contract addresses - PUFFER_VAULT_CONTRACT_ADDRESS: mainnetAddresses.PufferVault, - PUFFER_PROTOCOL_CONTRACT_ADDRESS: mainnetAddresses.pufferProtocolProxy, - VALIDATOR_TICKET_CONTRACT_ADDRESS: mainnetAddresses.validatorTicketProxy, - PUFFER_ORACLE_CONTRACT_ADDRESS: mainnetAddresses.oracle, - GUARDIAN_MODULE_ADDRESS: mainnetAddresses.guardianModule, -}; - -export default mainnetConfig; diff --git a/lib/legacy/config/protocol.ts b/lib/legacy/config/protocol.ts deleted file mode 100644 index 6cc1465..0000000 --- a/lib/legacy/config/protocol.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const ENCLAVE_VALIDATOR_BOND = 1e18; -export const NO_ENCLAVE_VALIDATOR_BOND = 2e18; -export const MIN_VT_DAYS = 28; diff --git a/lib/legacy/react/context/NetworkConfig.tsx b/lib/legacy/react/context/NetworkConfig.tsx deleted file mode 100644 index e9047d4..0000000 --- a/lib/legacy/react/context/NetworkConfig.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React, { createContext, useContext, useEffect, useState } from 'react'; - -import { useWeb3 } from './Web3Context'; - -import defaultConfig from '../../config/networks/default'; -import { networkEnumToString } from '../../config/networks'; -import { NetworkConfig } from '../../types/networkConfig'; - -const NetworkConfigContext = createContext(null); - -export const NetworkConfigProvider: React.FC<{ children: React.ReactNode }> = ({ - children, -}) => { - const { isConnected, networkName } = useWeb3(); - const [config, setConfig] = useState(null); - - useEffect(() => { - async function loadConfig() { - if (isConnected) { - const network = networkEnumToString(networkName).toLowerCase(); - const importedModule = await import(`../config/${network}.ts`).catch( - () => ({ default: defaultConfig }), - ); - setConfig(importedModule.default); - } else { - setConfig(defaultConfig); // Set default config if not connected - } - } - - loadConfig(); - }, [networkName, isConnected]); - - // Optionally, render a loading screen or spinner while config is null - // (this needs designer attention if decided to keep) - if (!config) { - return
Loading configuration...
; - } - - return ( - - {children} - - ); -}; - -export const useNetworkConfig = () => { - const config = useContext(NetworkConfigContext); - if (config === null) { - throw new Error( - 'Cannot use useNetworkConfig without the NetworkConfigProvider.', - ); - } - - return config; -}; diff --git a/lib/legacy/react/context/Web3Context.tsx b/lib/legacy/react/context/Web3Context.tsx deleted file mode 100644 index d39c750..0000000 --- a/lib/legacy/react/context/Web3Context.tsx +++ /dev/null @@ -1,163 +0,0 @@ -import { ethers } from 'ethers'; -import React, { - createContext, - useContext, - useState, - useEffect, - ReactNode, -} from 'react'; -import Web3 from 'web3'; - -import { Network } from '../../config/networks'; -import { IWeb3Context } from '../../types/web3Context'; -import { del, get, set } from '../../utils/localStorage'; - -interface Web3ContextProps extends IWeb3Context { - loading: boolean; - hasMetamask: boolean; -} - -const Web3Context = createContext(undefined); - -interface Web3ProviderProps { - children: ReactNode; - mainnetFallback: ReactNode; -} - -export const Web3Provider: React.FC = ({ - children, - mainnetFallback, -}) => { - const [web3, setWeb3] = useState(null); - const [loading, setLoading] = useState(true); - const [walletAddress, setWalletAddress] = useState(''); - const [isConnected, setIsConnected] = useState(false); - const [networkName, setNetworkName] = useState(Network.None); - const [ethersProvider, setEthersProvider] = - useState(null); - const [isAllowed, setIsAllowed] = useState(false); - const [hasMetamask, setHasMetamask] = useState(false); - - // Flag to determine if developer mode is enabled - // const developerMode = false; - const developerMode = true; - - useEffect(() => { - setLoading(true); - - const loadProvider = async () => { - const wallet = get('account'); - if (wallet) { - setWalletAddress(wallet); - setIsConnected(true); - } - - try { - const provider = (window as any).ethereum; - if (provider.isMetaMask) { - setHasMetamask(true); - } else { - console.error('Please install MetaMask!'); - } - if (provider) { - const web3Instance = new Web3(provider); - setWeb3(web3Instance); - setupEthersProvider(provider); - const chainID = await web3Instance.eth.getChainId(); - setNetworkName(determineNetwork(chainID)); - if (isMainnet && !developerMode) { - setIsAllowed(true); // Show modal when on Mainnet - } - } else { - console.error('Please install MetaMask!'); - } - } catch (error) { - console.error('Error loading provider:', error); - } finally { - setLoading(false); - } - }; - - loadProvider(); - }, [isConnected, networkName, developerMode]); - - // useEffect(() => { - // const attemptSwitchNetwork = async () => { - // if (web3 && networkName === Network.None) { - // switchNetwork(BigInt(17000)); // change to Holesky - // setIsAllowed(false); - // } - // }; - - // attemptSwitchNetwork(); - // }, [web3, networkName]); - - const isMainnet = networkName === Network.Mainnet; - - const determineNetwork = (chainID: bigint) => { - switch (chainID) { - case BigInt(1): - return Network.Mainnet; - case BigInt(17000): - return Network.Holesky; - case BigInt(31337): - return Network.Anvil; - default: - return Network.None; - } - }; - - const connectWallet = async () => { - if (web3) { - try { - const accounts = await web3.eth.requestAccounts(); - if (accounts.length > 0) { - setWalletAddress(accounts[0]); - set('account', accounts[0]); - setIsConnected(true); - } - } catch (error) { - console.error('Error connecting wallet:', error); - } - } - }; - - const setupEthersProvider = (provider: any) => { - const ethersProvider = new ethers.BrowserProvider(provider); - setEthersProvider(ethersProvider); - }; - - const disconnectWallet = () => { - setWalletAddress(''); - del('account'); - setIsConnected(false); - }; - - return ( - - {isAllowed && mainnetFallback} - {children} - - ); -}; - -export const useWeb3 = () => { - const context = useContext(Web3Context); - if (context === undefined) { - throw new Error('useWeb3 must be used within a Web3Provider'); - } - return context; -}; diff --git a/lib/legacy/react/hooks/useContracts.ts b/lib/legacy/react/hooks/useContracts.ts deleted file mode 100644 index 33b3769..0000000 --- a/lib/legacy/react/hooks/useContracts.ts +++ /dev/null @@ -1,53 +0,0 @@ -import Web3, { Contract } from 'web3'; - -import { Network, networkEnumToString } from '../../config/networks'; -import { useNetworkConfig } from '../context/NetworkConfig'; -import { useWeb3 } from '../context/Web3Context'; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const useContracts = (web3: Web3, _selector: Network) => { - const { networkName } = useWeb3(); - const config = useNetworkConfig(); - - const loadContract = async ( - contractName: string, - address: string, - ): Promise> => { - if (!config) { - throw new Error('Network configuration is not available.'); - } - const network = networkEnumToString(networkName).toLowerCase(); - const path = `../constants/abis/${network}/${contractName}.json`; - - try { - const module = await import( - `../constants/abis/${network}/${contractName}.json` - ); - const abi = module.default ? module.default : module; - return new web3.eth.Contract(abi, address); - } catch (error) { - throw new Error(`Failed to load ABI from path: ${path}`); - } - }; - - const guardianModuleContract = (): Promise> => - loadContract('GuardianModule', config.GUARDIAN_MODULE_ADDRESS); - const pufferProtocolContract = (): Promise> => - loadContract('PufferProtocol', config.PUFFER_PROTOCOL_CONTRACT_ADDRESS); - const validatorTicketContract = (): Promise> => - loadContract('ValidatorTicket', config.VALIDATOR_TICKET_CONTRACT_ADDRESS); - const pufETHContract = (): Promise> => - loadContract('PufferVaultV2', config.PUFFER_VAULT_CONTRACT_ADDRESS); - const pufferOracleContract = (): Promise> => - loadContract('PufferOracleV2', config.PUFFER_ORACLE_CONTRACT_ADDRESS); - - return { - guardianModuleContract, - pufferProtocolContract, - validatorTicketContract, - pufETHContract, - pufferOracleContract, - }; -}; - -export default useContracts; diff --git a/lib/legacy/react/hooks/usePufETHModule.ts b/lib/legacy/react/hooks/usePufETHModule.ts deleted file mode 100644 index 10339b4..0000000 --- a/lib/legacy/react/hooks/usePufETHModule.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { useState } from 'react'; -import Web3 from 'web3'; - -import useContracts from './useContracts'; - -import { Network } from '../../config/networks'; -import { - ENCLAVE_VALIDATOR_BOND, - NO_ENCLAVE_VALIDATOR_BOND, -} from '../../config/protocol'; -import { ErrorProps } from '../../types/error'; - -const usePufETHModule = (web3: Web3, selector: Network) => { - const [loading, setLoading] = useState(false); - const { pufETHContract } = useContracts(web3, selector); - const [pufETHError, setError] = useState(null); - - const addError = (newError: ErrorProps) => { - setError(newError); - }; - - // ETH cost paid mint pufETHs - const canAffordPufETH = async ( - walletAddress: any, - ethDeposit: bigint, - ): Promise<[boolean, bigint]> => { - setLoading(true); - try { - const ethBalance = await web3.eth.getBalance(walletAddress); - const mintable = BigInt( - await (await pufETHContract()).methods - .previewDeposit(ethBalance) - .call(), - ); - const mintAmount = BigInt( - await (await pufETHContract()).methods - .previewDeposit(ethDeposit) - .call(), - ); - return [mintAmount <= mintable, mintAmount]; - } catch (error) { - let errorMessage = - 'Failed to determine if wallet can afford pufETH: Unknown error'; - if (error instanceof Error) { - errorMessage = `Failed to determine if wallet can afford pufETH: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return [false, BigInt(0)]; - } finally { - setLoading(false); - } - }; - - // ETH to pufETHs ratio - const getPufETHToEthRate = async (): Promise => { - setLoading(true); - try { - const ratio = BigInt( - await (await pufETHContract()).methods.previewDeposit(1e18).call(), - ); - return ratio; - } catch (error) { - let errorMessage = - 'Failed to determine pufETH to ETH rate: Unknown error'; - if (error instanceof Error) { - errorMessage = `Failed to determine pufETH to ETH rate: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - // Amount of gas to call mint pufETH tx - const getPufETHGas = async (walletAddress: any): Promise => { - setLoading(true); - try { - return await (await pufETHContract()).methods - .depositETH(walletAddress) - .estimateGas(); - } catch (error) { - let errorMessage = - 'Failed to determine gas for pufETH mint: Unknown error'; - if (error instanceof Error) { - errorMessage = `Failed to determine gas for pufETH mint: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - // The requesting wallet addresses's pufETH ERC20 balance (18 decimals) - const getPufETHBalance = async (walletAddress: any): Promise => { - setLoading(true); - try { - return await (await pufETHContract()).methods - .balanceOf(walletAddress) - .call(); - } catch (error) { - let errorMessage = 'Failed to determine pufETH balance: Unknown error'; - if (error instanceof Error) { - errorMessage = `Failed to determine pufETH balance: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - const enoughPufETH = async ( - walletAddress: any, - isEnclave: boolean, - ): Promise => { - setLoading(true); - try { - if (!web3.provider) return BigInt(0); - const enclaveValidatorEthBond = isEnclave - ? ENCLAVE_VALIDATOR_BOND - : NO_ENCLAVE_VALIDATOR_BOND; - const bondInPufETH = BigInt( - await (await pufETHContract()).methods - .convertToShares(enclaveValidatorEthBond) - .call(), - ); - const scaledBondInPufETH: bigint = bondInPufETH; - const balance = await getPufETHBalance(walletAddress); - return balance >= scaledBondInPufETH; - } catch (error) { - let errorMessage = 'Failed to determine pufETH balance: Unknown error'; - if (error instanceof Error) { - errorMessage = `Failed to determine pufETH balance: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return BigInt(0); - } finally { - setLoading(false); - } - }; - - const purchasePufETH = async ( - walletAddress: any, - ethAmount: bigint, - ): Promise => { - setLoading(true); - try { - const purchaseTransaction = await (await pufETHContract()).methods - .depositETH(walletAddress) - .send({ - from: walletAddress, - value: ethAmount.toString(), - }); - return purchaseTransaction; - } catch (error) { - let errorMessage = 'Failed to mint pufETH: Unknown error'; - if (error instanceof Error) { - errorMessage = `Failed to mint pufETH: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - return { - loading, - getPufETHToEthRate, - getPufETHGas, - purchasePufETH, - getPufETHBalance, - enoughPufETH, - canAffordPufETH, - pufETHError, - }; -}; - -export default usePufETHModule; diff --git a/lib/legacy/react/hooks/usePufferProtocol.ts b/lib/legacy/react/hooks/usePufferProtocol.ts deleted file mode 100644 index 2deef90..0000000 --- a/lib/legacy/react/hooks/usePufferProtocol.ts +++ /dev/null @@ -1,371 +0,0 @@ -import { Signature, ethers } from 'ethers'; -import { useState } from 'react'; -import Web3 from 'web3'; - -import useContracts from './useContracts'; - -import { Network } from '../../config/networks'; -import { - ENCLAVE_VALIDATOR_BOND, - NO_ENCLAVE_VALIDATOR_BOND, -} from '../../config/protocol'; -import { useNetworkConfig } from '../context/NetworkConfig'; -import { ErrorProps } from '../../types/error'; -import { NodeInfo } from '../../types/node'; -import { ValidatorKeyData } from '../../types/registration'; -import { getPermitSignature } from '../../utils/ERC20Permit'; -import { shortenString } from '../../utils/ErrorPrepration'; -import { add0xPrefix } from '../../utils/Key'; - -const usePufferProtocol = ( - web3: Web3, - ethersProvider: ethers.BrowserProvider, - selector: Network, -) => { - const { - guardianModuleContract, - pufferProtocolContract, - validatorTicketContract, - pufETHContract, - } = useContracts(web3, selector); - - const [pufferProtocolError, setError] = useState(null); - const config = useNetworkConfig(); - - const addError = (newError: ErrorProps) => { - setError({ - message: newError.message, - type: newError.type, - }); - }; - - const pufferProtocolContractAddress = config.PUFFER_PROTOCOL_CONTRACT_ADDRESS; - - const guardianThreshold = async (): Promise => { - try { - return (await guardianModuleContract()).methods.getThreshold().call(); - } catch (error) { - let errorMessage = 'Can not get guardian threshhold: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get guardian threshhold: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const guardianPubKeys = async () => { - try { - const pks: string[] = await (await guardianModuleContract()).methods - .getGuardiansEnclavePubkeys() - .call(); - return pks.join(','); - } catch (error) { - let errorMessage = - 'Can not get guardians Enclave public keys: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get guardians Enclave public keys: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const nextModuleAndWithdrawalCredentials = async (): Promise< - [string, string] | null - > => { - try { - // Returns the index of the next PufferModule to be provisioned - const nextModuleSelect: bigint = await ( - await pufferProtocolContract() - ).methods - .getModuleSelectIndex() - .call(); - - // Returns the index of the next PufferModule to be provisioned - const moduleWeights: string[] = await ( - await pufferProtocolContract() - ).methods - .getModuleWeights() - .call(); - - // Get the moduleName - let moduleName: string = ''; - if (moduleWeights.length > 0) { - moduleName = - moduleWeights[Number(nextModuleSelect) % moduleWeights.length]; - } - - // cast moduleName to bytes32 - const nextProvisionModuleNameBytes32 = web3.eth.abi.encodeParameter( - 'bytes32', - moduleName, - ); - - // get module's address - const nextProvisionModuleAddress = await ( - await pufferProtocolContract() - ).methods - .getModuleAddress(nextProvisionModuleNameBytes32) - .call(); - - // get module's withdrawal credentials - const withdrawalCredentials: string = await ( - await pufferProtocolContract() - ).methods - .getWithdrawalCredentials(nextProvisionModuleAddress) - .call(); - - return [moduleName, withdrawalCredentials]; - } catch (error) { - let errorMessage = 'Can not get withdrawal credentials: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get withdrawal credentials: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const getValidatorTicketBalanceInProtocol = async ( - walletAddress: any, - ): Promise => { - try { - return (await pufferProtocolContract()).methods - .getValidatorTicketsBalance(walletAddress) - .call(); - } catch (error) { - let errorMessage = 'Can not get VT balance in protocol: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get VT balance in protocol: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const depositVTs = async (walletAddress: any, numDays: number) => { - try { - const signedVTPermit = await permitVT(walletAddress, numDays); - if (signedVTPermit == null) { - return null; - } - const sendTransaction = await (await pufferProtocolContract()).methods - .depositValidatorTickets(signedVTPermit, walletAddress) - .send({ - from: walletAddress, - value: '0', - }); - - return sendTransaction; - } catch (error) { - let errorMessage = 'Can not deposit VTs: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not deposit VTs: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const withdrawVTs = async (walletAddress: any, numberOfDays: number) => { - try { - const amount = numberOfDays * 1e18; - const sendTransaction = await ( - await pufferProtocolContract() - ).methods - .withdrawValidatorTickets( - amount, - walletAddress, // withdraw to the same address - ) - .send({ - from: walletAddress, - value: '0', - }); - - return sendTransaction; - } catch (error) { - let errorMessage = 'Can not withdraw VTs: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not withdraw VTs: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const registerValidator = async ( - walletAddress: any, - validatorKeyData: ValidatorKeyData, - moduleName: any, - pufETHPermit: any, - vtPermit: any, - ) => { - try { - const prefixedModuleName = add0xPrefix(moduleName); - - const sendTransaction = await (await pufferProtocolContract()).methods - .registerValidatorKey( - validatorKeyData, - prefixedModuleName, - pufETHPermit, - vtPermit, - ) - .send({ - from: walletAddress, - value: '0', - }); - - return sendTransaction; - } catch (error) { - let errorMessage = 'Can not register validator: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not register validator: ${shortenString( - error.message, - )}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - const permitPufETH = async (walletAddress: any, isEnclave: boolean) => { - try { - const enclaveValidatorEthBond = isEnclave - ? ENCLAVE_VALIDATOR_BOND - : NO_ENCLAVE_VALIDATOR_BOND; - - const bondInPufETH = BigInt( - await (await pufETHContract()).methods - .convertToShares(enclaveValidatorEthBond) - .call(), - ); - - // Construct pufETH permit - const { signature, deadline } = await getPermitSignature( - web3, - ethersProvider, - await pufETHContract(), - walletAddress, - bondInPufETH, - pufferProtocolContractAddress, - ); - - // Get the signature from wallet - const pufETHSignature = await Signature.from(signature); - - // Return formatted permit to be sent - const pufETHPermit = { - owner: walletAddress, - deadline: deadline, - amount: bondInPufETH, - v: pufETHSignature.v, - r: pufETHSignature.r, - s: pufETHSignature.s, - }; - - return pufETHPermit; - } catch (error) { - let errorMessage = 'Can not permit pufETH: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not permit pufETH: ${shortenString(error.message)}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - throw new Error(errorMessage); - } - }; - - const permitVT = async ( - walletAddress: any, - numDays: number, - ): Promise => { - try { - const vtAmount = BigInt(numDays) * BigInt(1e18); - - // Construct VT permit - const { signature: vtSignatureString, deadline: vtDeadline } = - await getPermitSignature( - web3, - ethersProvider, - await validatorTicketContract(), - walletAddress, - vtAmount, - pufferProtocolContractAddress, - ); - - const vtSignature = Signature.from(vtSignatureString); - - const vtPermit = { - owner: walletAddress, - deadline: vtDeadline, - amount: vtAmount, - v: vtSignature.v, - r: vtSignature.r, - s: vtSignature.s, - }; - - return vtPermit; - } catch (error) { - let errorMessage = 'Can not permit VT: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not permit VT: ${shortenString(error.message)}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - throw new Error(errorMessage); - } - }; - - const nodeRequiredVTAmount = async (walletAddress: any): Promise => { - const minVTPerValidator: bigint = await ( - await pufferProtocolContract() - ).methods - .getMinimumVtAmount() - .call(); - - const node: NodeInfo = await (await pufferProtocolContract()).methods - .getNodeInfo(walletAddress) - .call(); - - const numValidators: bigint = - node.activeValidatorCount + node.pendingValidatorCount; - - return BigInt(numValidators * minVTPerValidator); - }; - - const nodeCanWithdraw = async ( - walletAddress: any, - ): Promise => { - try { - const nodeInfo = (await (await pufferProtocolContract()).methods - .getNodeInfo(walletAddress) - .call()) as NodeInfo; - const validatorCount = - nodeInfo.activeValidatorCount + nodeInfo.pendingValidatorCount; - return validatorCount == BigInt(0); - } catch (error) { - let errorMessage = - 'Can not calculate if node can withdraw: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not calculate if node can withdraw: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } - }; - - return { - guardianThreshold, - guardianPubKeys, - nextModuleAndWithdrawalCredentials, - getValidatorTicketBalanceInProtocol, - depositVTs, - withdrawVTs, - permitVT, - permitPufETH, - registerValidator, - nodeRequiredVTAmount, - nodeCanWithdraw, - pufferProtocolError, - }; -}; -export default usePufferProtocol; diff --git a/lib/legacy/react/hooks/useVTModule.ts b/lib/legacy/react/hooks/useVTModule.ts deleted file mode 100644 index 0f09bcf..0000000 --- a/lib/legacy/react/hooks/useVTModule.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { useState } from 'react'; -import Web3 from 'web3'; - -import useContracts from './useContracts'; - -import { Network } from '../../config/networks'; -import { ErrorProps } from '../../types/error'; - -const useVTModule = (web3: Web3, selector: Network) => { - const [loading, setLoading] = useState(false); - const { validatorTicketContract, pufferOracleContract } = useContracts( - web3, - selector, - ); - const [VTModuleError, setError] = useState(null); - - const addError = (newError: ErrorProps) => { - setError(newError); - }; - - // ETH cost paid mint VTs - const getValidatorTicketPrice = async (): Promise => { - setLoading(true); - try { - return BigInt( - await (await pufferOracleContract()).methods - .getValidatorTicketPrice() - .call(), - ); - } catch (error) { - let errorMessage = 'Can not get VT price: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get VT price: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - // Amount of gas to call mint VT tx - const getValidatorTicketGas = async ( - walletAddress: any, - ): Promise => { - setLoading(true); - try { - return await (await validatorTicketContract()).methods - .purchaseValidatorTicket(walletAddress) - .estimateGas(); - } catch (error) { - let errorMessage = 'Can not get VT gas: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get VT gas: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - // The requesting wallet addresses's ValidatorTicket ERC20 balance (18 decimals) - const getValidatorTicketBalance = async ( - walletAddress: any, - ): Promise => { - setLoading(true); - try { - return (await validatorTicketContract()).methods - .balanceOf(walletAddress) - .call(); - } catch (error) { - let errorMessage = 'Can not get VT balance: Unknown error'; - if (error instanceof Error) { - errorMessage = `Can not get VT balance: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - const canAffordVTs = async ( - walletAddress: any, - numDays: number, - ): Promise => { - setLoading(true); - try { - const price: bigint = (await getValidatorTicketPrice()) as bigint; - - // get user eth balance - const ethBalance: bigint = (await web3.eth.getBalance( - walletAddress, - )) as bigint; - - // return true if user can afford - return ethBalance >= price * BigInt(numDays); - } catch (error) { - let errorMessage = `Can not calculate if user can afford ${numDays} VT(s): Unknown error`; - if (error instanceof Error) { - errorMessage = `Can not calculate if user can afford ${numDays} VT(s): ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - const hasEnoughVTs = async ( - walletAddress: any, - numDays: number, - ): Promise => { - setLoading(true); - try { - const balance: bigint = await (await validatorTicketContract()).methods - .balanceOf(walletAddress) - .call(); - const required: bigint = BigInt(numDays) * BigInt(1e18); - return balance >= required; - } catch (error) { - let errorMessage = `Can not calculate if user has enough VTs: Unknown error`; - if (error instanceof Error) { - errorMessage = `Can not calculate if user has enough VTs: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - const purchaseValidatorTicket = async ( - walletAddress: any, - numDays: number, - ): Promise => { - setLoading(true); - try { - const vtWei = (await getValidatorTicketPrice()) as bigint; - const value = BigInt(numDays) * BigInt(vtWei); - const sendTransaction = await (await validatorTicketContract()).methods - .purchaseValidatorTicket(walletAddress) - .send({ - from: walletAddress, - value: value.toString(), - }); - return sendTransaction; - } catch (error) { - let errorMessage = `Can not purchase VTs: Unknown error`; - if (error instanceof Error) { - errorMessage = `Can not purchase VTs: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return null; - } finally { - setLoading(false); - } - }; - - return { - loading, - getValidatorTicketPrice, - getValidatorTicketGas, - purchaseValidatorTicket, - getValidatorTicketBalance, - canAffordVTs, - hasEnoughVTs, - VTModuleError, - }; -}; -export default useVTModule; diff --git a/lib/legacy/react/hooks/useVerifySignature.ts b/lib/legacy/react/hooks/useVerifySignature.ts deleted file mode 100644 index 7cf3702..0000000 --- a/lib/legacy/react/hooks/useVerifySignature.ts +++ /dev/null @@ -1,148 +0,0 @@ -import bls from '@chainsafe/bls/herumi'; -import { ContainerType, ByteVectorType, UintNumberType } from '@chainsafe/ssz'; -import { ethers } from 'ethers'; -import { useState } from 'react'; - -import { ErrorProps } from '../../types/error'; -import { ValidatorRegistrationData } from '../../types/registration'; -import { bufferHex } from '../../utils/Key'; -import { useWeb3 } from '../context/Web3Context'; - -const HOLESKY_DEPOSIT_DOMAIN = - '030000005b83a23759c560b2d0c64576e1dcfc34ea94c4988f3e0d9f77f05387'; -const MAINNET_DEPOSIT_DOMAIN = - '03000000f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a9'; - -const useVerifySignature = () => { - const [signatureError, setError] = useState(null); - - const { isMainnet } = useWeb3(); - - const addError = (newError: ErrorProps) => { - setError(newError); - }; - - const DepositMessage = new ContainerType({ - pubkey: new ByteVectorType(48), - withdrawal_credentials: new ByteVectorType(32), - amount: new UintNumberType(8), - }); - - const DepositData = new ContainerType({ - pubkey: new ByteVectorType(48), - withdrawal_credentials: new ByteVectorType(32), - amount: new UintNumberType(8), - signature: new ByteVectorType(96), - }); - - const SigningData = new ContainerType({ - object_root: new ByteVectorType(32), - domain: new ByteVectorType(32), - }); - - const buildDepositMessage = ( - jsonObject: ValidatorRegistrationData, - ): Uint8Array => { - const bls_pubkey_bytes = bufferHex(jsonObject.bls_pub_key); - const withdrawal_credentials_bytes = bufferHex( - jsonObject.withdrawal_credentials, - ); - - // DepositMessage - const message = DepositMessage.defaultValue(); - message.pubkey = bls_pubkey_bytes; - message.withdrawal_credentials = withdrawal_credentials_bytes; - message.amount = 32000000000; - - // SigningRoot - const signing_data = SigningData.defaultValue(); - signing_data.object_root = DepositMessage.hashTreeRoot(message); - - // Precomputed domain depending on network - if (isMainnet) { - signing_data.domain = bufferHex(MAINNET_DEPOSIT_DOMAIN); - } else { - signing_data.domain = bufferHex(HOLESKY_DEPOSIT_DOMAIN); - } - - const root = SigningData.hashTreeRoot(signing_data); - - return root; - }; - - const validateBLSSignature = async ( - jsonObject: ValidatorRegistrationData, - deposit_message_root: Uint8Array, - ): Promise => { - try { - const bls_pubkey_bytes = bufferHex(jsonObject.bls_pub_key); - const signature_bytes = bufferHex(jsonObject.signature); - const withdrawal_credentials_bytes = bufferHex( - jsonObject.withdrawal_credentials, - ); - const deposit_data_root_bytes = bufferHex(jsonObject.deposit_data_root); - - // Verify signature is valid - const sigValid = bls.verify( - bls_pubkey_bytes, - deposit_message_root, - signature_bytes, - ); - - // Construct expected DepositDataRoot - const depositData = DepositData.defaultValue(); - depositData.pubkey = bls_pubkey_bytes; - depositData.withdrawal_credentials = withdrawal_credentials_bytes; - depositData.amount = 32000000000; - depositData.signature = signature_bytes; - const depositDataRoot = DepositData.hashTreeRoot(depositData); - - // Verify submitted DepositDataRoot matches expected - const depositDataRootValid = - ethers.hexlify(depositDataRoot) === - ethers.hexlify(deposit_data_root_bytes); - - if (sigValid && depositDataRootValid) { - return true; - } else { - addError({ message: 'Invalid Signature.', type: 'ChainError' }); - return false; - } - } catch (error) { - let errorMessage = 'Error during signature verification: Unknown error'; - if (error instanceof Error) { - errorMessage = `Error during signature verification: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return false; - } - }; - - const handleSignatureVerification = async ( - jsonObject?: ValidatorRegistrationData | null, - ): Promise => { - if (jsonObject === null) { - return false; - } - try { - // build DepositMessage type - const json: ValidatorRegistrationData = - jsonObject as ValidatorRegistrationData; - const deposit_message = buildDepositMessage(json); - // validate the BLS signature - const isValidSignature = validateBLSSignature(json, deposit_message); - return isValidSignature; - } catch (error) { - let errorMessage = 'Error during signature verification: Unknown error'; - if (error instanceof Error) { - errorMessage = `Error during signature verification: ${error.message}`; - } - addError({ message: errorMessage, type: 'ChainError' }); - return false; - } - }; - - return { handleSignatureVerification, signatureError }; -}; - -export default useVerifySignature; diff --git a/lib/legacy/types/error.ts b/lib/legacy/types/error.ts deleted file mode 100644 index 80103bd..0000000 --- a/lib/legacy/types/error.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type ErrorProps = { - message: string; - statusCode?: number; - errorCode?: string; - type?: string; -}; diff --git a/lib/legacy/types/networkConfig.ts b/lib/legacy/types/networkConfig.ts deleted file mode 100644 index a39b0db..0000000 --- a/lib/legacy/types/networkConfig.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type NetworkConfig = { - sirenApiBaseUrl: string; - PUFFER_VAULT_CONTRACT_ADDRESS: string; - PUFFER_PROTOCOL_CONTRACT_ADDRESS: string; - VALIDATOR_TICKET_CONTRACT_ADDRESS: string; - PUFFER_ORACLE_CONTRACT_ADDRESS: string; - GUARDIAN_MODULE_ADDRESS: string; -}; diff --git a/lib/legacy/types/node.ts b/lib/legacy/types/node.ts deleted file mode 100644 index a3965b7..0000000 --- a/lib/legacy/types/node.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type NodeInfo = { - activeValidatorCount: bigint; - pendingValidatorCount: bigint; - vtBalance: bigint; -}; diff --git a/lib/legacy/types/registration.ts b/lib/legacy/types/registration.ts deleted file mode 100644 index 96a27f2..0000000 --- a/lib/legacy/types/registration.ts +++ /dev/null @@ -1,25 +0,0 @@ -export type ValidatorRegistrationData = { - version: string; - module_name: string; - bls_pub_key_set: string; - bls_pub_key: string; - signature: string; - deposit_data_root: string; - bls_enc_priv_key_shares: string[]; - intel_sig: string | null; - intel_report: string | null; - intel_x509: string | null; - guardian_pubkeys: string[]; - withdrawal_credentials: string; - guardian_threshold: number; - fork_version: string; -}; - -export type ValidatorKeyData = { - blsPubKey: Uint8Array; - signature: Uint8Array; - depositDataRoot: Uint8Array; - blsEncryptedPrivKeyShares: Uint8Array[]; - blsPubKeySet: Uint8Array; - raveEvidence: Uint8Array; -}; diff --git a/lib/legacy/types/system.ts b/lib/legacy/types/system.ts deleted file mode 100644 index ad17526..0000000 --- a/lib/legacy/types/system.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ComponentPropsWithoutRef, ElementType } from 'react'; - -export type PolymorphicProps = Props & - Omit, 'as'> & { - as?: Element; - }; diff --git a/lib/legacy/types/validator.ts b/lib/legacy/types/validator.ts deleted file mode 100644 index 1dd7fbc..0000000 --- a/lib/legacy/types/validator.ts +++ /dev/null @@ -1,151 +0,0 @@ -export type ValidatorData = { - node: string; - module: string; - bond: string; - status: ValidatorStatus; - pubKey: string; - signature: string; -}; - -export type ValidatorProp = { - index: number; - data: ValidatorData; -}; - -export enum ValidatorStatus { - UNINITIALIZED = 0, - PENDING = 1, - SKIPPED = 2, - ACTIVE = 3, - FROZEN = 4, -} - -export const findValidatorStatus = (status: bigint): ValidatorStatus => { - switch (status) { - case BigInt(0): - return ValidatorStatus.UNINITIALIZED; - case BigInt(1): - return ValidatorStatus.PENDING; - case BigInt(2): - return ValidatorStatus.SKIPPED; - case BigInt(3): - return ValidatorStatus.ACTIVE; - case BigInt(4): - return ValidatorStatus.FROZEN; - default: - return ValidatorStatus.UNINITIALIZED; - } -}; - -// get string representation of validator status -export const getValidatorStatusString = (status: ValidatorStatus): string => { - switch (status) { - case ValidatorStatus.UNINITIALIZED: - return 'Uninitialized'; - case ValidatorStatus.PENDING: - return 'Pending'; - case ValidatorStatus.SKIPPED: - return 'Skipped'; - case ValidatorStatus.ACTIVE: - return 'Active'; - case ValidatorStatus.FROZEN: - return 'Frozen'; - default: - return ''; - } -}; - -export enum BeaconChainValidatorStatus { - UNINITIALIZED = 0, - PENDING_PUFFER = 1, - SKIPPED_PUFFER = 2, - PENDING_INITIALIZED_BEACON = 4, - PENDING_QUEUED_BEACON = 5, - ACTIVE_ONGOING_BEACON = 6, - ACTIVE_EXITING_BEACON = 7, - ACTIVE_SLASHED_BEACON = 8, - EXITED_UNSLASHED_BEACON = 9, - EXITED_SLASHED_BEACON = 10, - WITHDRAWAL_POSSIBLE_BEACON = 11, - WITHDRAWAL_DONE_BEACON = 12, - PROVISIONED_PUFFER = 13, - FROZEN = 14, -} - -export type Validator = { - /** Address of the Node operator */ - node: string; - - /** Validator bond (pufETH amount) */ - bond: number; - - /** In which module is the Validator participating */ - module: string; - - /** Validator status */ - puffer_status: ValidatorStatus; - - /** Validator public key */ - pubkey: string; - - /** Index of the Validator in the PufferModule */ - puffer_module_index: number; - - /** Name of the PufferModule */ - module_name: string; - - /** Activation epoch of the validator */ - activation_epoch?: number; - - /** Exit epoch of the validator */ - exit_epoch?: number; - - /** Withdrawable epoch of the validator */ - withdrawable_epoch?: number; - - /** Validator balance */ - balance?: number; - - /** Validator effective balance */ - effective_balance?: number; - - /** Validator beacon chain status */ - status?: string; - - /** Withdrawal credentials to filter by */ - withdrawal_credentials?: string; - - /** Validator index on beacon chain to filter by */ - validator_index?: number; - - /** True if validator was slashed on beacon chain */ - slashed?: boolean; -}; - -export type NodeInfo = { - /** Number of active validators for the node */ - active_validator_count: number; - - /** Number of validators pending activation */ - pending_validator_count: number; - - /** Balance of validator tickets */ - vt_balance: number; -}; - -export type NodeProfile = { - /** Node information struct */ - node_info: NodeInfo; - - /** List of pending validators */ - pending_validators: Validator[]; - - /** List of validators that have been skipped */ - skipped_validators: Validator[]; - - /** List of active validators */ - active_validators: Validator[]; - - /** Total validator tickets consumed */ - vts_consumed: number; -}; diff --git a/lib/legacy/types/web3Context.ts b/lib/legacy/types/web3Context.ts deleted file mode 100644 index b3c9985..0000000 --- a/lib/legacy/types/web3Context.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ethers } from 'ethers'; -import Web3 from 'web3'; - -import { Network } from '../config/networks'; - -export type IWeb3Context = { - web3: Web3 | null; - networkName: Network; - walletAddress: string; - isConnected: boolean; - isMainnet: boolean; - ethersProvider: ethers.BrowserProvider | null; - connectWallet: () => Promise; - disconnectWallet: () => void; -}; diff --git a/lib/legacy/utils/ERC20Permit.ts b/lib/legacy/utils/ERC20Permit.ts deleted file mode 100644 index 5a319a3..0000000 --- a/lib/legacy/utils/ERC20Permit.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ethers } from 'ethers'; -import Web3 from 'web3'; - -function calcPermitDuration() { - // returns current timestamp in seconds + 2 hours - return BigInt(Math.floor(Date.now() / 1000) + 3600 * 2); -} - -export const getPermitSignature = async ( - web3: Web3, - ethersProvider: ethers.BrowserProvider, - tokenContract: any, - walletAddress: string, - amt: bigint, - spender: string, -) => { - const tokenName = await tokenContract.methods.name().call(); - const permitVersion = '1'; // todo - get from contract - const tokenAddress = tokenContract._address; - const permitNonce = await tokenContract.methods.nonces(walletAddress).call(); - - const domain = { - name: tokenName, - version: permitVersion, - chainId: await web3.eth.getChainId(), - verifyingContract: tokenAddress, - }; - const values = { - owner: walletAddress, - spender: spender, - value: amt, - nonce: permitNonce, - deadline: calcPermitDuration(), - }; - - const signer = await ethersProvider.getSigner(); - - const signature = await signer.signTypedData( - domain, - { - Permit: [ - { - name: 'owner', - type: 'address', - }, - { - name: 'spender', - type: 'address', - }, - { - name: 'value', - type: 'uint256', - }, - { - name: 'nonce', - type: 'uint256', - }, - { - name: 'deadline', - type: 'uint256', - }, - ], - }, - values, - ); - - return { signature, deadline: values.deadline }; -}; diff --git a/lib/legacy/utils/ErrorPrepration.ts b/lib/legacy/utils/ErrorPrepration.ts deleted file mode 100644 index a494b9f..0000000 --- a/lib/legacy/utils/ErrorPrepration.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const shortenString = (str: string): string => { - return str.length > 20 ? str.slice(0, 60) + '...' : str; -}; diff --git a/lib/legacy/utils/Key.ts b/lib/legacy/utils/Key.ts deleted file mode 100644 index b487b6b..0000000 --- a/lib/legacy/utils/Key.ts +++ /dev/null @@ -1,48 +0,0 @@ -import Web3 from 'web3'; - -// Constants for the right lengths -const BLS_PUB_KEY_SET_CORRECT_LENGTH = 10; -const BLS_ENC_PRIV_KEY_SHARES_CORRECT_LENGTH = 10; -const GUARDIAN_PUBLIC_KEY_CORRECT_LENGTH = 10; - -export const checkKeyLengths = ( - bls_pub_key_set: any[], - bls_enc_priv_key_shares: any[], - guardian_public_key: any, -): boolean => { - const isBlsPubKeySetCorrectLength = - bls_pub_key_set.length === BLS_PUB_KEY_SET_CORRECT_LENGTH; - const isBlsEncPrivKeySharesCorrectLength = - bls_enc_priv_key_shares.length === BLS_ENC_PRIV_KEY_SHARES_CORRECT_LENGTH; - const isGuardianPublicKeyCorrectLength = - guardian_public_key.length === GUARDIAN_PUBLIC_KEY_CORRECT_LENGTH; - - return ( - isBlsPubKeySetCorrectLength && - isBlsEncPrivKeySharesCorrectLength && - isGuardianPublicKeyCorrectLength - ); -}; - -export const bufferHex = (x: string): Uint8Array => { - const hex = x.startsWith('0x') ? x.slice(2) : x; - return Web3.utils.hexToBytes(hex); -}; - -export const stringToBytes = (s: string | null): Uint8Array => { - if (!s) return new Uint8Array(); - return new TextEncoder().encode(s); -}; - -export const bytesToHex = (b?: Uint8Array): string => { - if (!b) return ''; - return Web3.utils.bytesToHex(b); -}; - -export const string0xPrefix = (x: string): string => { - const hex = x.startsWith('0x') ? x.slice(2) : x; - return hex; -}; - -export const add0xPrefix = (x: string): string => - x.startsWith('0x') ? x : '0x' + x; diff --git a/lib/legacy/utils/localStorage.ts b/lib/legacy/utils/localStorage.ts deleted file mode 100644 index 8682b08..0000000 --- a/lib/legacy/utils/localStorage.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const get = (key: string) => { - const value = localStorage.getItem(key); - if (value !== null) { - if (!/\{|\[/.test(value?.charAt(0))) { - return value; - } - try { - return JSON.parse(value); - } catch (e) { - // eslint-disable-next-line no-console - console.warn(e); - } - } -}; -export const set = (key: string, value: unknown) => { - localStorage.setItem( - key, - typeof value === 'string' ? value : JSON.stringify(value), - ); -}; -export const del = (key: string) => { - localStorage.removeItem(key); -}; From 0b0181ef12ebf8c96824176850961170262321d6 Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Mon, 20 May 2024 13:52:00 +0200 Subject: [PATCH 13/14] Fix tiny lint error --- lib/errors/validation-errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/errors/validation-errors.ts b/lib/errors/validation-errors.ts index c1fc40a..8d87938 100644 --- a/lib/errors/validation-errors.ts +++ b/lib/errors/validation-errors.ts @@ -1,3 +1,3 @@ -import { BaseError } from "./base-error"; +import { BaseError } from './base-error'; export class AccountError extends BaseError {} From ffae0501d97eb3e37ab2cf20753abf01a017795b Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Tue, 21 May 2024 14:38:28 +0200 Subject: [PATCH 14/14] Don't update dist --- dist/main.cjs | 5 +---- dist/main.js | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dist/main.cjs b/dist/main.cjs index cbee9a7..771f044 100644 --- a/dist/main.cjs +++ b/dist/main.cjs @@ -1,4 +1 @@ -'use strict'; -Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -const d = (e, t) => e + t; -exports.add = d; +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=(e,t)=>e+t;exports.add=d; diff --git a/dist/main.js b/dist/main.js index 1027d69..f49fa11 100644 --- a/dist/main.js +++ b/dist/main.js @@ -1,2 +1,4 @@ const t = (d, o) => d + o; -export { t as add }; +export { + t as add +};