@wireio/stake 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/stake.browser.js +28102 -730
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +53 -11
- package/lib/stake.js +28126 -730
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +28102 -730
- package/lib/stake.m.js.map +1 -1
- package/package.json +2 -2
- package/src/assets/ethereum/hoodi/common/Base58.sol/Base58.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/Base58.sol/Base58.json +164 -0
- package/src/assets/ethereum/hoodi/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +76 -0
- package/src/assets/ethereum/hoodi/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/RestrictedCallers.sol/RestrictedCallers.json +10 -0
- package/src/assets/ethereum/hoodi/common/iodata.sol/iodata.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/iodata.sol/iodata.json +618 -0
- package/src/assets/ethereum/hoodi/common/iodata_util.sol/iodata_util.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/iodata_util.sol/iodata_util.json +40 -0
- package/src/assets/ethereum/hoodi/common/sysio_data.sol/sysio_data.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_data.sol/sysio_data.json +10 -0
- package/src/assets/ethereum/hoodi/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_errors.sol/sysio_errors.json +10 -0
- package/src/assets/ethereum/hoodi/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_merkle.sol/sysio_merkle.json +233 -0
- package/src/assets/ethereum/hoodi/common/sysio_name.sol/sysio_name.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_name.sol/sysio_name.json +49 -0
- package/src/assets/ethereum/hoodi/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_pubkey.sol/sysio_pubkey.json +64 -0
- package/src/assets/ethereum/hoodi/common/sysio_read.sol/sysio_read.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_read.sol/sysio_read.json +1458 -0
- package/src/assets/ethereum/hoodi/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_tester.sol/SysioTester.json +1532 -0
- package/src/assets/ethereum/hoodi/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_verify.sol/sysio_verify.json +1525 -0
- package/src/assets/ethereum/hoodi/common/sysio_write.sol/sysio_write.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_write.sol/sysio_write.json +1076 -0
- package/src/assets/ethereum/hoodi/liqEth/BeaconState.sol/BeaconState.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/BeaconState.sol/BeaconState.json +807 -0
- package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/DepositManagerV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/DepositManagerV2.json +1004 -0
- package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/IStakingModuleBondLocker.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/IStakingModuleBondLocker.json +29 -0
- package/src/assets/ethereum/hoodi/liqEth/KeyBondManager.sol/KeyBondManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/KeyBondManager.sol/KeyBondManager.json +897 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +1289 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositContract.json +39 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositManager.json +64 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IKeyBondManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IKeyBondManager.json +189 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20.json +319 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.json +333 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IStakingModule.json +279 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/LiqEthCommon.json +10 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.json +236 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthManaged.sol/LiqEthManaged.json +229 -0
- package/src/assets/ethereum/hoodi/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.json +957 -0
- package/src/assets/ethereum/hoodi/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.json +1020 -0
- package/src/assets/ethereum/hoodi/liqEth/StakingLib.sol/StakingLib.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/StakingLib.sol/StakingLib.json +89 -0
- package/src/assets/ethereum/hoodi/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/Yield.sol/YieldOracle.json +1376 -0
- package/src/assets/ethereum/hoodi/liqEth/liqEth.sol/LiqEthTokenV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/liqEth.sol/LiqEthTokenV2.json +1323 -0
- package/src/assets/ethereum/hoodi/liqEth/stakingModule.sol/StakingModuleV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/stakingModule.sol/StakingModuleV2.json +1896 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/DepositManager.sol/DepositManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/DepositManager.sol/DepositManager.json +978 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IAccounting.json +176 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositContract.json +39 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IDepositManager.json +64 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.json +249 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.json +263 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IStakingModule.json +344 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.json +10 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.json +874 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json +937 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/accounting.sol/Accounting.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/accounting.sol/Accounting.json +542 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/liqEth.sol/LiqEthToken.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/liqEth.sol/LiqEthToken.json +1233 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/stakingModule.sol/StakingModule.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/stakingModule.sol/StakingModule.json +1772 -0
- package/src/assets/ethereum/hoodi/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +973 -0
- package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/Uint64BE.json +10 -0
- package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/WithdrawalVault.json +441 -0
- package/src/assets/ethereum/hoodi/outpost/BAR.sol/BARV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/BAR.sol/BARV2.json +1915 -0
- package/src/assets/ethereum/hoodi/outpost/Depositor.sol/DepositorV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/Depositor.sol/DepositorV2.json +1845 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.json +122 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +551 -0
- package/src/assets/ethereum/hoodi/outpost/OPP.sol/OPP.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPP.sol/OPP.json +948 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPP.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPP.json +88 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPEndpoint.json +29 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPInbound.json +194 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPReceiver.json +29 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPSender.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPSender.json +36 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.json +199 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpoint.sol/OPPEndpoint.json +273 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +394 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +378 -0
- package/src/assets/ethereum/hoodi/outpost/OPPErrors.sol/OPPErrors.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPErrors.sol/OPPErrors.json +224 -0
- package/src/assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.json +1010 -0
- package/src/assets/ethereum/hoodi/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPReceiver.sol/OPPReceiver.json +291 -0
- package/src/assets/ethereum/hoodi/outpost/OPPSender.sol/OPPSender.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPSender.sol/OPPSender.json +298 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostErrors.sol/OutpostErrors.json +488 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManaged.sol/OutpostManaged.json +229 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManager.sol/OutpostManagerV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManager.sol/OutpostManagerV2.json +737 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json +1432 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostManager.json +130 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.json +29 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.json +141 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostOwnable.sol/OutpostOwnable.json +213 -0
- package/src/assets/ethereum/hoodi/outpost/Pool.sol/PoolV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/Pool.sol/PoolV2.json +943 -0
- package/src/assets/ethereum/hoodi/outpost/Pretoken.sol/PretokenV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/Pretoken.sol/PretokenV2.json +1703 -0
- package/src/assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.json +2015 -0
- package/src/assets/ethereum/hoodi/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/interfaces/IPretoken.sol/IPretoken.json +29 -0
- package/src/assets/ethereum/hoodi/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/interfaces/IWarrant.sol/IWarrant.json +29 -0
- package/src/assets/ethereum/hoodi/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.json +858 -0
- package/src/assets/ethereum/hoodi/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.json +30 -0
- package/src/assets/ethereum/hoodi/outpost/v1/BAR.sol/BAR.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/v1/BAR.sol/BAR.json +1871 -0
- package/src/assets/ethereum/hoodi/outpost/v1/Depositor.sol/Depositor.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/v1/Depositor.sol/Depositor.json +1653 -0
- package/src/assets/ethereum/hoodi/outpost/v1/OutpostManager.sol/OutpostManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/v1/OutpostManager.sol/OutpostManager.json +730 -0
- package/src/assets/ethereum/hoodi/outpost/v1/Pool.sol/Pool.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/v1/Pool.sol/Pool.json +936 -0
- package/src/assets/ethereum/hoodi/outpost/v1/Pretoken.sol/Pretoken.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/v1/Pretoken.sol/Pretoken.json +1665 -0
- package/src/assets/ethereum/hoodi/token/ERC1155Token.sol/ERC1155Token.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/ERC1155Token.sol/ERC1155Token.json +472 -0
- package/src/assets/ethereum/hoodi/token/ERC20Token.sol/ERC20Token.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/ERC20Token.sol/ERC20Token.json +330 -0
- package/src/assets/ethereum/hoodi/token/ERC721Token.sol/ERC721Token.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/ERC721Token.sol/ERC721Token.json +449 -0
- package/src/networks/ethereum/clients/stake.client.ts +81 -7
- package/src/networks/ethereum/contract.ts +189 -81
- package/src/networks/ethereum/ethereum.ts +47 -6
- package/src/networks/ethereum/types.ts +10 -0
- package/src/networks/solana/constants.ts +3 -3
- package/src/networks/solana/solana.ts +92 -7
- package/src/networks/solana/types.ts +2 -2
- package/src/types.ts +10 -1
|
@@ -4,40 +4,62 @@
|
|
|
4
4
|
* Provides a unified service for interacting with Ethereum smart contracts using ethers.js.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
7
|
+
// Mainnet artifacts
|
|
8
|
+
import MainnetAccountingArtifact from '../../assets/ethereum/mainnet/liqEth/accounting.sol/Accounting.json';
|
|
9
|
+
import MainnetDepositManagerArtifact from '../../assets/ethereum/mainnet/liqEth/DepositManager.sol/DepositManager.json';
|
|
10
|
+
import MainnetLiqEthArtifact from '../../assets/ethereum/mainnet/liqEth/liqEth.sol/LiqEthToken.json';
|
|
11
|
+
import MainnetStakingModuleArtifact from '../../assets/ethereum/mainnet/liqEth/stakingModule.sol/StakingModule.json';
|
|
12
|
+
import MainnetWithdrawalQueueArtifact from '../../assets/ethereum/mainnet/liqEth/withdrawalQueue.sol/WithdrawalQueue.json';
|
|
13
|
+
import MainnetWithdrawalVaultArtifact from '../../assets/ethereum/mainnet/liqEth/withdrawalVault.sol/WithdrawalVault.json';
|
|
14
|
+
import MainnetBeaconStateArtifact from '../../assets/ethereum/mainnet/liqEth/BeaconState.sol/BeaconState.json';
|
|
15
|
+
import MainnetYieldOracleArtifact from '../../assets/ethereum/mainnet/liqEth/Yield.sol/YieldOracle.json';
|
|
16
|
+
import MainnetDepositorArtifact from '../../assets/ethereum/mainnet/outpost/Depositor.sol/Depositor.json';
|
|
17
|
+
import MainnetReceiptNFTArtifact from '../../assets/ethereum/mainnet/outpost/ReceiptNFT.sol/ReceiptNFT.json';
|
|
18
|
+
import MainnetOutpostManagerArtifact from '../../assets/ethereum/mainnet/outpost/OutpostManager.sol/OutpostManager.json';
|
|
19
|
+
import MainnetBARArtifact from '../../assets/ethereum/mainnet/outpost/BAR.sol/BAR.json';
|
|
20
|
+
import MainnetOPPArtifact from '../../assets/ethereum/mainnet/outpost/OPP.sol/OPP.json';
|
|
21
|
+
import MainnetOPPCommonArtifact from '../../assets/ethereum/mainnet/outpost/OPPCommon.sol/OPPCommon.json';
|
|
22
|
+
import MainnetOPPInboundArtifact from '../../assets/ethereum/mainnet/outpost/OPPInbound.sol/OPPInbound.json';
|
|
23
|
+
import MainnetPretokenArtifact from '../../assets/ethereum/mainnet/outpost/Pretoken.sol/Pretoken.json';
|
|
24
|
+
import MainnetAggregatorArtifact from '../../assets/ethereum/mainnet/outpost/Aggregator.sol/Aggregator.json';
|
|
25
|
+
import MainnetEthUsdPriceConsumerArtifact from '../../assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json';
|
|
26
|
+
import MainnetPoolArtifact from '../../assets/ethereum/mainnet/outpost/Pool.sol/Pool.json';
|
|
27
|
+
import MainnetOutpostManagerAuthorityArtifact from '../../assets/ethereum/mainnet/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json';
|
|
28
|
+
import MainnetIodataArtifact from '../../assets/ethereum/mainnet/common/iodata.sol/iodata.json';
|
|
29
|
+
import MainnetBase58Artifact from '../../assets/ethereum/mainnet/common/Base58.sol/Base58.json';
|
|
30
|
+
import MainnetSysioMerkleArtifact from '../../assets/ethereum/mainnet/common/sysio_merkle.sol/sysio_merkle.json';
|
|
31
|
+
import MainnetSysioWriteArtifact from '../../assets/ethereum/mainnet/common/sysio_write.sol/sysio_write.json';
|
|
32
|
+
import MainnetERC20Artifact from '../../assets/ethereum/mainnet/token/ERC20Token.sol/ERC20Token.json';
|
|
33
|
+
import MainnetERC721Artifact from '../../assets/ethereum/mainnet/token/ERC721Token.sol/ERC721Token.json';
|
|
34
|
+
import MainnetERC1155Artifact from '../../assets/ethereum/mainnet/token/ERC1155Token.sol/ERC1155Token.json';
|
|
35
|
+
|
|
36
|
+
// Hoodi artifacts
|
|
37
|
+
import HoodiAccountingArtifact from '../../assets/ethereum/hoodi/liqEth/v1/accounting.sol/Accounting.json';
|
|
38
|
+
import HoodiDepositManagerArtifact from '../../assets/ethereum/hoodi/liqEth/v1/DepositManager.sol/DepositManager.json';
|
|
39
|
+
import HoodiLiqEthArtifact from '../../assets/ethereum/hoodi/liqEth/v1/liqEth.sol/LiqEthToken.json';
|
|
40
|
+
import HoodiStakingModuleArtifact from '../../assets/ethereum/hoodi/liqEth/v1/stakingModule.sol/StakingModule.json';
|
|
41
|
+
import HoodiWithdrawalQueueArtifact from '../../assets/ethereum/hoodi/liqEth/withdrawalQueue.sol/WithdrawalQueue.json';
|
|
42
|
+
import HoodiWithdrawalVaultArtifact from '../../assets/ethereum/hoodi/liqEth/withdrawalVault.sol/WithdrawalVault.json';
|
|
43
|
+
import HoodiBeaconStateArtifact from '../../assets/ethereum/hoodi/liqEth/BeaconState.sol/BeaconState.json';
|
|
44
|
+
import HoodiYieldOracleArtifact from '../../assets/ethereum/hoodi/liqEth/Yield.sol/YieldOracle.json';
|
|
45
|
+
import HoodiDepositorArtifact from '../../assets/ethereum/hoodi/outpost/Depositor.sol/DepositorV2.json';
|
|
46
|
+
import HoodiReceiptNFTArtifact from '../../assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.json';
|
|
47
|
+
import HoodiOutpostManagerArtifact from '../../assets/ethereum/hoodi/outpost/OutpostManager.sol/OutpostManagerV2.json';
|
|
48
|
+
import HoodiBARArtifact from '../../assets/ethereum/hoodi/outpost/BAR.sol/BARV2.json';
|
|
49
|
+
import HoodiOPPArtifact from '../../assets/ethereum/hoodi/outpost/OPP.sol/OPP.json';
|
|
50
|
+
import HoodiOPPCommonArtifact from '../../assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.json';
|
|
51
|
+
import HoodiOPPInboundArtifact from '../../assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.json';
|
|
52
|
+
import HoodiPretokenArtifact from '../../assets/ethereum/hoodi/outpost/Pretoken.sol/PretokenV2.json';
|
|
53
|
+
import HoodiEthUsdPriceConsumerArtifact from '../../assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json';
|
|
54
|
+
import HoodiPoolArtifact from '../../assets/ethereum/hoodi/outpost/Pool.sol/PoolV2.json';
|
|
55
|
+
import HoodiOutpostManagerAuthorityArtifact from '../../assets/ethereum/hoodi/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json';
|
|
56
|
+
import HoodiIodataArtifact from '../../assets/ethereum/hoodi/common/iodata.sol/iodata.json';
|
|
57
|
+
import HoodiBase58Artifact from '../../assets/ethereum/hoodi/common/Base58.sol/Base58.json';
|
|
58
|
+
import HoodiSysioMerkleArtifact from '../../assets/ethereum/hoodi/common/sysio_merkle.sol/sysio_merkle.json';
|
|
59
|
+
import HoodiSysioWriteArtifact from '../../assets/ethereum/hoodi/common/sysio_write.sol/sysio_write.json';
|
|
60
|
+
import HoodiERC20Artifact from '../../assets/ethereum/hoodi/token/ERC20Token.sol/ERC20Token.json';
|
|
61
|
+
import HoodiERC721Artifact from '../../assets/ethereum/hoodi/token/ERC721Token.sol/ERC721Token.json';
|
|
62
|
+
import HoodiERC1155Artifact from '../../assets/ethereum/hoodi/token/ERC1155Token.sol/ERC1155Token.json';
|
|
41
63
|
|
|
42
64
|
import { AddressBook, ContractName } from './types';
|
|
43
65
|
import { Contract, ethers, providers, Signer } from 'ethers';
|
|
@@ -46,9 +68,102 @@ import { ErrorDescription } from '@ethersproject/abi/lib/interface';
|
|
|
46
68
|
import { EvmChainID } from '@wireio/core';
|
|
47
69
|
import { SupportedEvmChainID } from '../../types';
|
|
48
70
|
|
|
49
|
-
export const ERC20Abi =
|
|
50
|
-
export const ERC721Abi =
|
|
51
|
-
export const ERC1155Abi =
|
|
71
|
+
export const ERC20Abi = MainnetERC20Artifact.abi;
|
|
72
|
+
export const ERC721Abi = MainnetERC721Artifact.abi;
|
|
73
|
+
export const ERC1155Abi = MainnetERC1155Artifact.abi;
|
|
74
|
+
|
|
75
|
+
type AbiArtifact = { abi: JsonFragment[] };
|
|
76
|
+
|
|
77
|
+
type ArtifactBundle = {
|
|
78
|
+
Accounting: AbiArtifact;
|
|
79
|
+
DepositManager: AbiArtifact;
|
|
80
|
+
LiqEthToken: AbiArtifact;
|
|
81
|
+
StakingModule: AbiArtifact;
|
|
82
|
+
WithdrawalQueue: AbiArtifact;
|
|
83
|
+
WithdrawalVault: AbiArtifact;
|
|
84
|
+
BeaconState: AbiArtifact;
|
|
85
|
+
YieldOracle: AbiArtifact;
|
|
86
|
+
Depositor: AbiArtifact;
|
|
87
|
+
ReceiptNFT: AbiArtifact;
|
|
88
|
+
OutpostManager: AbiArtifact;
|
|
89
|
+
BAR: AbiArtifact;
|
|
90
|
+
OPP: AbiArtifact;
|
|
91
|
+
OPPCommon: AbiArtifact;
|
|
92
|
+
OPPInbound: AbiArtifact;
|
|
93
|
+
Pretoken: AbiArtifact;
|
|
94
|
+
Aggregator: AbiArtifact;
|
|
95
|
+
EthUsdPriceConsumer: AbiArtifact;
|
|
96
|
+
Pool: AbiArtifact;
|
|
97
|
+
OutpostManagerAuthority: AbiArtifact;
|
|
98
|
+
iodata: AbiArtifact;
|
|
99
|
+
Base58: AbiArtifact;
|
|
100
|
+
sysio_merkle: AbiArtifact;
|
|
101
|
+
sysio_write: AbiArtifact;
|
|
102
|
+
ERC20: AbiArtifact;
|
|
103
|
+
ERC721: AbiArtifact;
|
|
104
|
+
ERC1155: AbiArtifact;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const MAINNET_ARTIFACTS: ArtifactBundle = {
|
|
108
|
+
Accounting: MainnetAccountingArtifact as AbiArtifact,
|
|
109
|
+
DepositManager: MainnetDepositManagerArtifact as AbiArtifact,
|
|
110
|
+
LiqEthToken: MainnetLiqEthArtifact as AbiArtifact,
|
|
111
|
+
StakingModule: MainnetStakingModuleArtifact as AbiArtifact,
|
|
112
|
+
WithdrawalQueue: MainnetWithdrawalQueueArtifact as AbiArtifact,
|
|
113
|
+
WithdrawalVault: MainnetWithdrawalVaultArtifact as AbiArtifact,
|
|
114
|
+
BeaconState: MainnetBeaconStateArtifact as AbiArtifact,
|
|
115
|
+
YieldOracle: MainnetYieldOracleArtifact as AbiArtifact,
|
|
116
|
+
Depositor: MainnetDepositorArtifact as AbiArtifact,
|
|
117
|
+
ReceiptNFT: MainnetReceiptNFTArtifact as AbiArtifact,
|
|
118
|
+
OutpostManager: MainnetOutpostManagerArtifact as AbiArtifact,
|
|
119
|
+
BAR: MainnetBARArtifact as AbiArtifact,
|
|
120
|
+
OPP: MainnetOPPArtifact as AbiArtifact,
|
|
121
|
+
OPPCommon: MainnetOPPCommonArtifact as AbiArtifact,
|
|
122
|
+
OPPInbound: MainnetOPPInboundArtifact as AbiArtifact,
|
|
123
|
+
Pretoken: MainnetPretokenArtifact as AbiArtifact,
|
|
124
|
+
Aggregator: MainnetAggregatorArtifact as AbiArtifact,
|
|
125
|
+
EthUsdPriceConsumer: MainnetEthUsdPriceConsumerArtifact as AbiArtifact,
|
|
126
|
+
Pool: MainnetPoolArtifact as AbiArtifact,
|
|
127
|
+
OutpostManagerAuthority: MainnetOutpostManagerAuthorityArtifact as AbiArtifact,
|
|
128
|
+
iodata: MainnetIodataArtifact as AbiArtifact,
|
|
129
|
+
Base58: MainnetBase58Artifact as AbiArtifact,
|
|
130
|
+
sysio_merkle: MainnetSysioMerkleArtifact as AbiArtifact,
|
|
131
|
+
sysio_write: MainnetSysioWriteArtifact as AbiArtifact,
|
|
132
|
+
ERC20: MainnetERC20Artifact as AbiArtifact,
|
|
133
|
+
ERC721: MainnetERC721Artifact as AbiArtifact,
|
|
134
|
+
ERC1155: MainnetERC1155Artifact as AbiArtifact,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const HOODI_ARTIFACTS: ArtifactBundle = {
|
|
138
|
+
Accounting: HoodiAccountingArtifact as AbiArtifact,
|
|
139
|
+
DepositManager: HoodiDepositManagerArtifact as AbiArtifact,
|
|
140
|
+
LiqEthToken: HoodiLiqEthArtifact as AbiArtifact,
|
|
141
|
+
StakingModule: HoodiStakingModuleArtifact as AbiArtifact,
|
|
142
|
+
WithdrawalQueue: HoodiWithdrawalQueueArtifact as AbiArtifact,
|
|
143
|
+
WithdrawalVault: HoodiWithdrawalVaultArtifact as AbiArtifact,
|
|
144
|
+
BeaconState: HoodiBeaconStateArtifact as AbiArtifact,
|
|
145
|
+
YieldOracle: HoodiYieldOracleArtifact as AbiArtifact,
|
|
146
|
+
Depositor: HoodiDepositorArtifact as AbiArtifact,
|
|
147
|
+
ReceiptNFT: HoodiReceiptNFTArtifact as AbiArtifact,
|
|
148
|
+
OutpostManager: HoodiOutpostManagerArtifact as AbiArtifact,
|
|
149
|
+
BAR: HoodiBARArtifact as AbiArtifact,
|
|
150
|
+
OPP: HoodiOPPArtifact as AbiArtifact,
|
|
151
|
+
OPPCommon: HoodiOPPCommonArtifact as AbiArtifact,
|
|
152
|
+
OPPInbound: HoodiOPPInboundArtifact as AbiArtifact,
|
|
153
|
+
Pretoken: HoodiPretokenArtifact as AbiArtifact,
|
|
154
|
+
// No hoodi Aggregator artifact currently exists in assets; keep ABI compatibility with mainnet artifact.
|
|
155
|
+
Aggregator: MainnetAggregatorArtifact as AbiArtifact,
|
|
156
|
+
EthUsdPriceConsumer: HoodiEthUsdPriceConsumerArtifact as AbiArtifact,
|
|
157
|
+
Pool: HoodiPoolArtifact as AbiArtifact,
|
|
158
|
+
OutpostManagerAuthority: HoodiOutpostManagerAuthorityArtifact as AbiArtifact,
|
|
159
|
+
iodata: HoodiIodataArtifact as AbiArtifact,
|
|
160
|
+
Base58: HoodiBase58Artifact as AbiArtifact,
|
|
161
|
+
sysio_merkle: HoodiSysioMerkleArtifact as AbiArtifact,
|
|
162
|
+
sysio_write: HoodiSysioWriteArtifact as AbiArtifact,
|
|
163
|
+
ERC20: HoodiERC20Artifact as AbiArtifact,
|
|
164
|
+
ERC721: HoodiERC721Artifact as AbiArtifact,
|
|
165
|
+
ERC1155: HoodiERC1155Artifact as AbiArtifact,
|
|
166
|
+
};
|
|
52
167
|
|
|
53
168
|
// -----------------------------------------------------------------------------
|
|
54
169
|
// Address books (per-chain)
|
|
@@ -93,7 +208,7 @@ export const MAINNET_ADDRESSES: AddressBook = {
|
|
|
93
208
|
|
|
94
209
|
/**
|
|
95
210
|
* HOODI TESTNET LATEST
|
|
96
|
-
*
|
|
211
|
+
* 3/25/26
|
|
97
212
|
*/
|
|
98
213
|
export const HOODI_ADDRESSES: AddressBook = {
|
|
99
214
|
// LiqETH contracts
|
|
@@ -147,118 +262,118 @@ export type ContractConfig = {
|
|
|
147
262
|
|
|
148
263
|
export type Contracts<T extends string = ContractName> = Record<T, ContractConfig>;
|
|
149
264
|
|
|
150
|
-
function buildContracts(addresses: AddressBook): Contracts<ContractName> {
|
|
265
|
+
function buildContracts(addresses: AddressBook, artifacts: ArtifactBundle): Contracts<ContractName> {
|
|
151
266
|
return {
|
|
152
267
|
// LiqETH Contracts
|
|
153
268
|
LiqEthAuthority: {
|
|
154
269
|
address: addresses.LiqEthAuthority,
|
|
155
|
-
abi:
|
|
270
|
+
abi: artifacts.LiqEthToken.abi as JsonFragment[],
|
|
156
271
|
},
|
|
157
272
|
BeaconState: {
|
|
158
273
|
address: addresses.BeaconState,
|
|
159
|
-
abi:
|
|
274
|
+
abi: artifacts.BeaconState.abi as JsonFragment[],
|
|
160
275
|
},
|
|
161
276
|
WithdrawalQueue: {
|
|
162
277
|
address: addresses.WithdrawalQueue,
|
|
163
|
-
abi:
|
|
278
|
+
abi: artifacts.WithdrawalQueue.abi as JsonFragment[],
|
|
164
279
|
},
|
|
165
280
|
LiqEthToken: {
|
|
166
281
|
address: addresses.LiqEthToken,
|
|
167
|
-
abi:
|
|
282
|
+
abi: artifacts.LiqEthToken.abi as JsonFragment[],
|
|
168
283
|
},
|
|
169
284
|
Accounting: {
|
|
170
285
|
address: addresses.Accounting,
|
|
171
|
-
abi:
|
|
286
|
+
abi: artifacts.Accounting.abi as JsonFragment[],
|
|
172
287
|
},
|
|
173
288
|
DepositManager: {
|
|
174
289
|
address: addresses.DepositManager,
|
|
175
|
-
abi:
|
|
290
|
+
abi: artifacts.DepositManager.abi as JsonFragment[],
|
|
176
291
|
},
|
|
177
292
|
WithdrawalVault: {
|
|
178
293
|
address: addresses.WithdrawalVault,
|
|
179
|
-
abi:
|
|
294
|
+
abi: artifacts.WithdrawalVault.abi as JsonFragment[],
|
|
180
295
|
},
|
|
181
296
|
StakingModule: {
|
|
182
297
|
address: addresses.StakingModule,
|
|
183
|
-
abi:
|
|
298
|
+
abi: artifacts.StakingModule.abi as JsonFragment[],
|
|
184
299
|
},
|
|
185
300
|
// YieldOracle: {
|
|
186
301
|
// address: addresses.YieldOracle,
|
|
187
|
-
// abi:
|
|
302
|
+
// abi: artifacts.YieldOracle.abi as JsonFragment[],
|
|
188
303
|
// },
|
|
189
304
|
|
|
190
305
|
// Outpost Contracts
|
|
191
306
|
OutpostManagerAuthority: {
|
|
192
307
|
address: addresses.OutpostManagerAuthority,
|
|
193
|
-
abi:
|
|
308
|
+
abi: artifacts.OutpostManagerAuthority.abi as JsonFragment[],
|
|
194
309
|
},
|
|
195
310
|
iodata: {
|
|
196
311
|
address: addresses.iodata,
|
|
197
|
-
abi:
|
|
312
|
+
abi: artifacts.iodata.abi as JsonFragment[],
|
|
198
313
|
},
|
|
199
314
|
Base58: {
|
|
200
315
|
address: addresses.Base58,
|
|
201
|
-
abi:
|
|
316
|
+
abi: artifacts.Base58.abi as JsonFragment[],
|
|
202
317
|
},
|
|
203
318
|
sysio_merkle: {
|
|
204
319
|
address: addresses.sysio_merkle,
|
|
205
|
-
abi:
|
|
320
|
+
abi: artifacts.sysio_merkle.abi as JsonFragment[],
|
|
206
321
|
},
|
|
207
322
|
ReceiptNFT: {
|
|
208
323
|
address: addresses.ReceiptNFT,
|
|
209
|
-
abi:
|
|
324
|
+
abi: artifacts.ReceiptNFT.abi as JsonFragment[],
|
|
210
325
|
},
|
|
211
326
|
Pool: {
|
|
212
327
|
address: addresses.Pool,
|
|
213
|
-
abi:
|
|
328
|
+
abi: artifacts.Pool.abi as JsonFragment[],
|
|
214
329
|
},
|
|
215
330
|
OutpostManager: {
|
|
216
331
|
address: addresses.OutpostManager,
|
|
217
|
-
abi:
|
|
332
|
+
abi: artifacts.OutpostManager.abi as JsonFragment[],
|
|
218
333
|
},
|
|
219
334
|
sysio_write: {
|
|
220
335
|
address: addresses.sysio_write,
|
|
221
|
-
abi:
|
|
336
|
+
abi: artifacts.sysio_write.abi as JsonFragment[],
|
|
222
337
|
},
|
|
223
338
|
EthUsdPriceConsumer: {
|
|
224
339
|
address: addresses.EthUsdPriceConsumer,
|
|
225
|
-
abi:
|
|
340
|
+
abi: artifacts.EthUsdPriceConsumer.abi as JsonFragment[],
|
|
226
341
|
},
|
|
227
342
|
BAR: {
|
|
228
343
|
address: addresses.BAR,
|
|
229
|
-
abi:
|
|
344
|
+
abi: artifacts.BAR.abi as JsonFragment[],
|
|
230
345
|
},
|
|
231
346
|
OPPCommon: {
|
|
232
347
|
address: addresses.OPPCommon,
|
|
233
|
-
abi:
|
|
348
|
+
abi: artifacts.OPPCommon.abi as JsonFragment[],
|
|
234
349
|
},
|
|
235
350
|
OPP: {
|
|
236
351
|
address: addresses.OPP,
|
|
237
|
-
abi:
|
|
352
|
+
abi: artifacts.OPP.abi as JsonFragment[],
|
|
238
353
|
},
|
|
239
354
|
Pretoken: {
|
|
240
355
|
address: addresses.Pretoken,
|
|
241
|
-
abi:
|
|
356
|
+
abi: artifacts.Pretoken.abi as JsonFragment[],
|
|
242
357
|
},
|
|
243
358
|
OPPInbound: {
|
|
244
359
|
address: addresses.OPPInbound,
|
|
245
|
-
abi:
|
|
360
|
+
abi: artifacts.OPPInbound.abi as JsonFragment[],
|
|
246
361
|
},
|
|
247
362
|
Depositor: {
|
|
248
363
|
address: addresses.Depositor,
|
|
249
|
-
abi:
|
|
364
|
+
abi: artifacts.Depositor.abi as JsonFragment[],
|
|
250
365
|
},
|
|
251
366
|
|
|
252
367
|
MockAggregator: {
|
|
253
368
|
address: addresses.MockAggregator,
|
|
254
|
-
abi:
|
|
369
|
+
abi: artifacts.Aggregator.abi as JsonFragment[],
|
|
255
370
|
},
|
|
256
371
|
};
|
|
257
372
|
}
|
|
258
373
|
|
|
259
374
|
export const CONTRACTS_BY_CHAIN: Record<SupportedEvmChainID, Contracts<ContractName>> = {
|
|
260
|
-
[EvmChainID.Ethereum]: buildContracts(MAINNET_ADDRESSES),
|
|
261
|
-
[EvmChainID.Hoodi]: buildContracts(HOODI_ADDRESSES),
|
|
375
|
+
[EvmChainID.Ethereum]: buildContracts(MAINNET_ADDRESSES, MAINNET_ARTIFACTS),
|
|
376
|
+
[EvmChainID.Hoodi]: buildContracts(HOODI_ADDRESSES, HOODI_ARTIFACTS),
|
|
262
377
|
};
|
|
263
378
|
|
|
264
379
|
// -----------------------------------------------------------------------------
|
|
@@ -274,6 +389,11 @@ export interface ContractOptions {
|
|
|
274
389
|
signer?: Signer;
|
|
275
390
|
}
|
|
276
391
|
|
|
392
|
+
const ARTIFACTS_BY_CHAIN: Record<SupportedEvmChainID, ArtifactBundle> = {
|
|
393
|
+
[EvmChainID.Ethereum]: MAINNET_ARTIFACTS,
|
|
394
|
+
[EvmChainID.Hoodi]: HOODI_ARTIFACTS,
|
|
395
|
+
};
|
|
396
|
+
|
|
277
397
|
export class EthereumContractService {
|
|
278
398
|
private provider?: providers.Provider;
|
|
279
399
|
private signer?: Signer;
|
|
@@ -351,20 +471,8 @@ export class EthereumContractService {
|
|
|
351
471
|
public get omniInterface(): ethers.utils.Interface {
|
|
352
472
|
const all: any[] = [];
|
|
353
473
|
|
|
354
|
-
const
|
|
355
|
-
|
|
356
|
-
ERC721Artifact,
|
|
357
|
-
ERC1155Artifact,
|
|
358
|
-
|
|
359
|
-
// If you want, you can gradually re-enable protocol ABIs here
|
|
360
|
-
// AccountingArtifact,
|
|
361
|
-
// DepositManagerArtifact,
|
|
362
|
-
// LiqEthArtifact,
|
|
363
|
-
// StakingModuleArtifact,
|
|
364
|
-
// WithdrawalQueueArtifact,
|
|
365
|
-
// WithdrawalVaultArtifact,
|
|
366
|
-
// YieldOracleArtifact,
|
|
367
|
-
];
|
|
474
|
+
const artifacts : ArtifactBundle = ARTIFACTS_BY_CHAIN[this.chainId];
|
|
475
|
+
const allArtifacts = Object.values(artifacts);
|
|
368
476
|
|
|
369
477
|
allArtifacts.forEach((artifact) => {
|
|
370
478
|
if (artifact && artifact.abi) {
|
|
@@ -400,4 +508,4 @@ export class EthereumContractService {
|
|
|
400
508
|
throw new Error(`Unable to parse error data: ${revertData}`);
|
|
401
509
|
}
|
|
402
510
|
}
|
|
403
|
-
}
|
|
511
|
+
}
|
|
@@ -103,9 +103,9 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
107
|
-
* @param
|
|
108
|
-
* @returns
|
|
106
|
+
* List withdrawal queue receipts for a wallet (pending / in-progress exits after safeBurn).
|
|
107
|
+
* @param address Owner to query; defaults to the connected wallet.
|
|
108
|
+
* @returns Withdrawal receipt NFT entries from the protocol view
|
|
109
109
|
*/
|
|
110
110
|
async getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]> {
|
|
111
111
|
this.ensureUser();
|
|
@@ -114,8 +114,9 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
117
|
+
* Claim native ETH for a matured withdrawal using the WithdrawalQueue NFT token id
|
|
118
|
+
* (via DepositManager.claim after the delay has passed).
|
|
119
|
+
* @param tokenId Withdrawal request / queue NFT token id
|
|
119
120
|
* @returns transaction hash
|
|
120
121
|
*/
|
|
121
122
|
async claimWithdraw(tokenId: bigint): Promise<string> {
|
|
@@ -148,6 +149,46 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
148
149
|
throw new Error("Method not yet implemented.");
|
|
149
150
|
}
|
|
150
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Deposit ETH to liqETH, then stake liqETH in a single transaction.
|
|
154
|
+
* @param amountWei Amount in wei.
|
|
155
|
+
* @returns transaction hash
|
|
156
|
+
*/
|
|
157
|
+
async depositAndStake(amountWei: bigint): Promise<string> {
|
|
158
|
+
this.ensureUser();
|
|
159
|
+
if (!amountWei || amountWei <= BigInt(0))
|
|
160
|
+
throw new Error('Amount must be greater than zero.');
|
|
161
|
+
|
|
162
|
+
const result = await this.stakeClient.performDepositAndStake(BigNumber.from(amountWei));
|
|
163
|
+
return result.txHash;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Deposit ETH to liqETH, then purchase pretokens in a single transaction.
|
|
168
|
+
* @param amountWei Amount in wei.
|
|
169
|
+
* @returns transaction hash
|
|
170
|
+
*/
|
|
171
|
+
async depositAndBuy(amountWei: bigint): Promise<string> {
|
|
172
|
+
this.ensureUser();
|
|
173
|
+
if (!amountWei || amountWei <= BigInt(0))
|
|
174
|
+
throw new Error('Amount must be greater than zero.');
|
|
175
|
+
|
|
176
|
+
const result = await this.stakeClient.performDepositAndPurchase(BigNumber.from(amountWei));
|
|
177
|
+
return result.txHash;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Unstake liqETH, then request a withdrawal in a single transaction.
|
|
182
|
+
* @param tokenId The ReceiptNFT token ID for the stake position
|
|
183
|
+
* @returns transaction hash
|
|
184
|
+
*/
|
|
185
|
+
async unstakeAndWithdraw(tokenId: bigint): Promise<string> {
|
|
186
|
+
this.ensureUser();
|
|
187
|
+
|
|
188
|
+
const result = await this.stakeClient.performUnstakeAndRequestWithdraw(BigNumber.from(tokenId));
|
|
189
|
+
return result.txHash;
|
|
190
|
+
}
|
|
191
|
+
|
|
151
192
|
|
|
152
193
|
/**
|
|
153
194
|
* ETH Prelaunch function to unstake liqEth
|
|
@@ -560,4 +601,4 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
560
601
|
// console.log(`MockAggregator updated ${ageSec}s ago — no update needed`);
|
|
561
602
|
// }
|
|
562
603
|
// }
|
|
563
|
-
}
|
|
604
|
+
}
|
|
@@ -90,7 +90,17 @@ export interface WithdrawnStakeEvent {
|
|
|
90
90
|
export interface WithdrawnStakeResult extends Result {
|
|
91
91
|
/** Parsed WithdrawnStake event, if present */
|
|
92
92
|
withdrawnstake?: WithdrawnStakeEvent;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface DepositAndStakeResult extends Result {
|
|
96
|
+
/** Parsed Staked event, if present */
|
|
97
|
+
staked?: StakedEvent;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface DepositAndPurchaseResult extends Result {
|
|
101
|
+
}
|
|
93
102
|
|
|
103
|
+
export interface UnstakeAndWithdrawResult extends Result {
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
export interface SharesBurnedEvent {
|
|
@@ -21,7 +21,7 @@ export type SolanaProgramIds = {
|
|
|
21
21
|
LIQSOL_TOKEN: PublicKey;
|
|
22
22
|
VALIDATOR_LEADERBOARD: PublicKey;
|
|
23
23
|
TRANSFER_HOOK: PublicKey;
|
|
24
|
-
|
|
24
|
+
ALT: PublicKey;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const MAINNET_PROGRAM_IDS: SolanaProgramIds = {
|
|
@@ -29,7 +29,7 @@ const MAINNET_PROGRAM_IDS: SolanaProgramIds = {
|
|
|
29
29
|
LIQSOL_TOKEN: new PublicKey(mainnetLiqSolTokenIDL.address),
|
|
30
30
|
VALIDATOR_LEADERBOARD: new PublicKey(mainnetValidatorLeaderboardIDL.address),
|
|
31
31
|
TRANSFER_HOOK: new PublicKey(mainnetTransferHookIDL.address),
|
|
32
|
-
|
|
32
|
+
ALT: new PublicKey("AQXTHwkdNBEiXeQuVA5uCoxvzgYUmudRxthQY4vWKCPS")
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const DEVNET_PROGRAM_IDS: SolanaProgramIds = {
|
|
@@ -37,7 +37,7 @@ const DEVNET_PROGRAM_IDS: SolanaProgramIds = {
|
|
|
37
37
|
LIQSOL_TOKEN: new PublicKey(devnetLiqSolTokenIDL.address),
|
|
38
38
|
VALIDATOR_LEADERBOARD: new PublicKey(devnetValidatorLeaderboardIDL.address),
|
|
39
39
|
TRANSFER_HOOK: new PublicKey(devnetTransferHookIDL.address),
|
|
40
|
-
|
|
40
|
+
ALT: new PublicKey("AZQmTbacBuAsJpncg2N2AwcZsLG1Sxeohbau9vjezmTz")
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export const PROGRAM_IDS_BY_CHAIN: Record<SupportedSolChainID, SolanaProgramIds> = {
|