@wireio/stake 2.5.1 → 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 +3 -3
- 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
|
@@ -380,6 +380,66 @@ export class SolanaStakingClient implements IStakingClient {
|
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
+
/** Deposit SOL to liqSOL, then syndicate that liqSOL in one transaction. Requires enough SOL for the deposit fee. */
|
|
384
|
+
async depositAndStake(amountLamports: bigint): Promise<string> {
|
|
385
|
+
this.ensureUser();
|
|
386
|
+
if (!amountLamports || amountLamports <= BigInt(0))
|
|
387
|
+
throw new Error('Amount must be greater than zero.');
|
|
388
|
+
|
|
389
|
+
try {
|
|
390
|
+
const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
|
|
391
|
+
const depositIx = await this.convertClient.buildDepositTx(amountLamports, user);
|
|
392
|
+
const stakeIx = await this.outpostClient.buildStakeIx(amountLamports, user);
|
|
393
|
+
|
|
394
|
+
return !!this.squadsX
|
|
395
|
+
? await this.sendSquadsIxs([depositIx, stakeIx])
|
|
396
|
+
: await this.buildAndSendIx([depositIx, stakeIx]);
|
|
397
|
+
} catch (err) {
|
|
398
|
+
console.log(`Failed to deposit and stake: ${err}`);
|
|
399
|
+
throw err;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** Deposit SOL to liqSOL, then buy pretokens with that liqSOL in one transaction. Requires enough SOL for the deposit fee. */
|
|
404
|
+
async depositAndBuy(amountLamports: bigint): Promise<string> {
|
|
405
|
+
this.ensureUser();
|
|
406
|
+
if (!amountLamports || amountLamports <= BigInt(0))
|
|
407
|
+
throw new Error('Amount must be greater than zero.');
|
|
408
|
+
|
|
409
|
+
try {
|
|
410
|
+
const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
|
|
411
|
+
const depositIx = await this.convertClient.buildDepositTx(amountLamports, user);
|
|
412
|
+
const purchaseIx = await this.tokenClient.buildPurchaseIx(amountLamports, user);
|
|
413
|
+
|
|
414
|
+
return !!this.squadsX
|
|
415
|
+
? await this.sendSquadsIxs([depositIx, purchaseIx])
|
|
416
|
+
: await this.buildAndSendIx([depositIx, purchaseIx]);
|
|
417
|
+
} catch (err) {
|
|
418
|
+
console.log(`Failed to deposit and buy: ${err}`);
|
|
419
|
+
throw err;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/** Desyndicate liqSOL, then request withdraw in one transaction. */
|
|
424
|
+
async unstakeAndWithdraw(amountLamports: bigint): Promise<string> {
|
|
425
|
+
this.ensureUser();
|
|
426
|
+
if (!amountLamports || amountLamports <= BigInt(0))
|
|
427
|
+
throw new Error('Amount must be greater than zero.');
|
|
428
|
+
|
|
429
|
+
try {
|
|
430
|
+
const user = this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
|
|
431
|
+
const unstakeIx = await this.outpostClient.buildUnstakeIx(amountLamports, user);
|
|
432
|
+
const withdrawIx = await this.convertClient.buildWithdrawTx(amountLamports, user);
|
|
433
|
+
|
|
434
|
+
return !!this.squadsX
|
|
435
|
+
? await this.sendSquadsIxs([unstakeIx, withdrawIx])
|
|
436
|
+
: await this.buildAndSendIx([unstakeIx, withdrawIx]);
|
|
437
|
+
} catch (err) {
|
|
438
|
+
console.log(`Failed to unstake and withdraw: ${err}`);
|
|
439
|
+
throw err;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
383
443
|
/**
|
|
384
444
|
* Aggregate view of the user’s balances on Solana:
|
|
385
445
|
* - native: SOL wallet balance
|
|
@@ -567,9 +627,11 @@ export class SolanaStakingClient implements IStakingClient {
|
|
|
567
627
|
return pda[0];
|
|
568
628
|
}
|
|
569
629
|
|
|
570
|
-
|
|
630
|
+
/** Create a Squads vault transaction/proposal for one or more instructions. */
|
|
631
|
+
private async sendSquadsIxs(ix: TransactionInstruction | TransactionInstruction[]): Promise<string> {
|
|
571
632
|
if (!this.squadsX) throw new Error('Attempting to wrap Squads instruction without SquadsX config');
|
|
572
633
|
|
|
634
|
+
const ixs = Array.isArray(ix) ? ix : [ix];
|
|
573
635
|
const multisigPda = this.squadsMultisigPDA!;
|
|
574
636
|
const vaultPda = this.squadsVaultPDA!;
|
|
575
637
|
const vaultIndex = this.squadsX?.vaultIndex ?? 0;
|
|
@@ -579,19 +641,19 @@ export class SolanaStakingClient implements IStakingClient {
|
|
|
579
641
|
const current = BigInt(ms.transactionIndex?.toString() ?? 0);
|
|
580
642
|
const transactionIndex = current + BigInt(1);
|
|
581
643
|
|
|
582
|
-
const altAddress = this.program.PROGRAM_IDS.
|
|
644
|
+
const altAddress = this.program.PROGRAM_IDS.ALT;
|
|
583
645
|
const altAccount = await this.connection.getAddressLookupTable(altAddress);
|
|
584
646
|
if (!altAccount.value) throw new Error("ALT not found on-chain or not yet active.");
|
|
585
647
|
|
|
586
648
|
const lookupTable: AddressLookupTableAccount = altAccount.value;
|
|
587
|
-
const computeLimitIx = ComputeBudgetProgram.setComputeUnitLimit({ units:
|
|
649
|
+
const computeLimitIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 600_000 });
|
|
588
650
|
const computePriceIx = ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 2000 });
|
|
589
651
|
|
|
590
652
|
const { blockhash } = await this.connection.getLatestBlockhash("confirmed");
|
|
591
653
|
const transactionMessage = new TransactionMessage({
|
|
592
654
|
payerKey: vaultPda,
|
|
593
655
|
recentBlockhash: blockhash,
|
|
594
|
-
instructions: [computeLimitIx, computePriceIx,
|
|
656
|
+
instructions: [computeLimitIx, computePriceIx, ...ixs],
|
|
595
657
|
});
|
|
596
658
|
|
|
597
659
|
const createVaultTxIx = await multisig.instructions.vaultTransactionCreate({
|
|
@@ -640,10 +702,33 @@ export class SolanaStakingClient implements IStakingClient {
|
|
|
640
702
|
// ---------------------------------------------------------------------
|
|
641
703
|
|
|
642
704
|
async buildAndSendIx(ix: TransactionInstruction | TransactionInstruction[]): Promise<string> {
|
|
643
|
-
const cuIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 400_000 });
|
|
644
705
|
const ixs = Array.isArray(ix) ? ix : [ix];
|
|
645
|
-
const
|
|
646
|
-
const
|
|
706
|
+
const computeLimitIx = ComputeBudgetProgram.setComputeUnitLimit({ units: 600_000 });
|
|
707
|
+
const computePriceIx = ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 2000 });
|
|
708
|
+
const { blockhash, lastValidBlockHeight } =
|
|
709
|
+
await this.connection.getLatestBlockhash('confirmed');
|
|
710
|
+
|
|
711
|
+
const altAddress = this.program.PROGRAM_IDS.ALT;
|
|
712
|
+
const altAccount = await this.connection.getAddressLookupTable(altAddress);
|
|
713
|
+
const lookupTable = altAccount.value;
|
|
714
|
+
|
|
715
|
+
const instructions = [computeLimitIx, computePriceIx, ...ixs];
|
|
716
|
+
|
|
717
|
+
const tx = lookupTable
|
|
718
|
+
? new VersionedTransaction(
|
|
719
|
+
new TransactionMessage({
|
|
720
|
+
payerKey: this.feePayer,
|
|
721
|
+
recentBlockhash: blockhash,
|
|
722
|
+
instructions,
|
|
723
|
+
}).compileToV0Message([lookupTable]),
|
|
724
|
+
)
|
|
725
|
+
: new Transaction().add(...instructions);
|
|
726
|
+
|
|
727
|
+
const prepared =
|
|
728
|
+
tx instanceof Transaction
|
|
729
|
+
? await this.prepareTx(tx)
|
|
730
|
+
: { tx, blockhash, lastValidBlockHeight };
|
|
731
|
+
|
|
647
732
|
const signed = await this.signTransaction(prepared.tx);
|
|
648
733
|
|
|
649
734
|
return this.sendAndConfirmHttp(signed, prepared);
|
|
@@ -11,8 +11,8 @@ export type SolanaTransaction = Transaction | VersionedTransaction;
|
|
|
11
11
|
|
|
12
12
|
export type WalletLike = {
|
|
13
13
|
publicKey: PublicKey;
|
|
14
|
-
signTransaction: (tx:
|
|
15
|
-
signAllTransactions?: (txs:
|
|
14
|
+
signTransaction: <T extends SolanaTransaction>(tx: T) => Promise<T>;
|
|
15
|
+
signAllTransactions?: <T extends SolanaTransaction>(txs: T[]) => Promise<T[]>;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export type ParsedAccountInfo = {
|
package/src/types.ts
CHANGED
|
@@ -44,7 +44,16 @@ export interface IStakingClient {
|
|
|
44
44
|
claimWithdraw(tokenId: bigint): Promise<string>
|
|
45
45
|
|
|
46
46
|
/** Solana only: claim accrued liqSOL distribution rewards. */
|
|
47
|
-
claimLiqsolRewards?(): Promise<string>
|
|
47
|
+
// claimLiqsolRewards?(): Promise<string>
|
|
48
|
+
|
|
49
|
+
/** Atomically deposit native token to liq token, then stake that liq token. On Solana: amount in lamports. On Ethereum: amount in wei. */
|
|
50
|
+
depositAndStake(amount: bigint): Promise<string>
|
|
51
|
+
|
|
52
|
+
/** Atomically deposit native token to liq token, then buy pretokens with that liq token. On Solana: amount in lamports. On Ethereum: amount in wei. */
|
|
53
|
+
depositAndBuy(amount: bigint): Promise<string>
|
|
54
|
+
|
|
55
|
+
/** Atomically unstake liq token, then request withdrawal. On Solana: amount in lamports. On Ethereum: tokenId (ReceiptNFT ID). */
|
|
56
|
+
unstakeAndWithdraw(amount: bigint): Promise<string>
|
|
48
57
|
|
|
49
58
|
/** Enumerate withdrawal receipt NFTs held by the user (queued/ready/claimed). */
|
|
50
59
|
getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]>
|