@wireio/stake 1.0.0 → 1.0.69
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/README.md +195 -243
- package/lib/stake.browser.js +48207 -10172
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +11368 -978
- package/lib/stake.js +46986 -8778
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +48207 -10172
- package/lib/stake.m.js.map +1 -1
- package/package.json +4 -3
- package/src/assets/ethereum/hoodi/WNS/BucketWNS.sol/BucketWNS.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/BucketWNS.sol/BucketWNS.json +699 -0
- package/src/assets/ethereum/hoodi/WNS/Challenge.sol/Challenge.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/Challenge.sol/Challenge.json +3139 -0
- package/src/assets/ethereum/hoodi/WNS/ChallengeLib.sol/ChallengeLib.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/ChallengeLib.sol/ChallengeLib.json +106 -0
- package/src/assets/ethereum/hoodi/WNS/Errors.sol/WNSErrs.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/Errors.sol/WNSErrs.json +180 -0
- package/src/assets/ethereum/hoodi/WNS/LiqWNS.sol/LiqWNS.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/LiqWNS.sol/LiqWNS.json +470 -0
- package/src/assets/ethereum/hoodi/WNS/SChain.sol/SChain.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/SChain.sol/SChain.json +1983 -0
- package/src/assets/ethereum/hoodi/WNS/UTXO.sol/UTXO.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/UTXO.sol/UTXO.json +1231 -0
- package/src/assets/ethereum/hoodi/WNS/UTXOio.sol/UTXOio.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/UTXOio.sol/UTXOio.json +1524 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IBucketWNS.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IBucketWNS.json +119 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IChallenge.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IChallenge.json +374 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/ISChain.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/ISChain.json +865 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IUTXO.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/IUTXO.json +524 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/WNSCommon.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/WNSCommon.sol/WNSCommon.json +10 -0
- package/src/assets/ethereum/hoodi/WNS/WithdrawBatch.sol/WithdrawBatch.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/WNS/WithdrawBatch.sol/WithdrawBatch.json +1232 -0
- package/src/assets/ethereum/hoodi/common/Base58.sol/Base58.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/iodata.sol/iodata.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/iodata_util.sol/iodata_util.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_data.sol/sysio_data.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_name.sol/sysio_name.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_read.sol/sysio_read.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/common/sysio_write.sol/sysio_write.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/BeaconState.sol/BeaconState.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/DepositManagerV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/DepositManager.sol/DepositManagerV2.json +985 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IAccounting.json +182 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -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/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IStakingModule.json +1 -1
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/LiqEthCommon.json +2 -2
- 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/{ABI → hoodi}/liqEth/LiqEthManaged.sol/LiqEthManaged.json +2 -2
- 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/Yield.sol/YieldOracle.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → hoodi}/liqEth/Yield.sol/YieldOracle.json +2 -2
- package/src/assets/ethereum/hoodi/liqEth/accounting.sol/AccountingV2.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/liqEth/accounting.sol/AccountingV2.json +629 -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 +1779 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/DepositManager.sol/DepositManager.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/DepositManager.sol/DepositManager.json +3 -3
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/LiqEthCommon.sol/IAccounting.json +1 -1
- 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/{ABI/liqEth → hoodi/liqEth/v1}/LiqEthCommon.sol/IRewardsERC20.json +1 -1
- package/src/assets/ethereum/hoodi/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/LiqEthCommon.sol/IRewardsERC20Pausable.json +1 -1
- 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/{ABI/liqEth → hoodi/liqEth/v1}/RewardsERC20.sol/RewardsERC20Upgradeable.json +1 -1
- package/src/assets/ethereum/hoodi/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json +1 -1
- 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 +548 -0
- package/src/assets/ethereum/hoodi/liqEth/v1/liqEth.sol/LiqEthToken.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → hoodi/liqEth/v1}/liqEth.sol/LiqEthToken.json +3 -3
- 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/{ABI → hoodi}/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +2 -2
- package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → hoodi}/liqEth/withdrawalVault.sol/Uint64BE.json +2 -2
- package/src/assets/ethereum/hoodi/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → hoodi}/liqEth/withdrawalVault.sol/WithdrawalVault.json +2 -2
- package/src/assets/ethereum/hoodi/outpost/BAR.sol/BAR.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/BAR.sol/BAR.json +1111 -0
- package/src/assets/ethereum/hoodi/outpost/Depositor.sol/Depositor.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/Depositor.sol/Depositor.json +1590 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +274 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeDepositCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeDepositCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawConfirmCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawConfirmCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawFailedCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/BridgeWithdrawFailedCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/InstaswapBridgeAttestationTypeLib.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/InstaswapBridgeAttestations.sol/InstaswapBridgeAttestationTypeLib.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/IDepositorBridgeHooks.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/IDepositorBridgeHooks.json +29 -0
- package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/LiqEthBridge.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/LiqEthBridge.json +1033 -0
- package/src/assets/ethereum/hoodi/outpost/MockAggregator.sol/MockAggregator.json +97 -0
- package/src/assets/ethereum/hoodi/outpost/OPP.sol/OPP.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPP.sol/OPP.json +1055 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPP.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPP.json +81 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/IOPPInbound.json +330 -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 +41 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPCommon.sol/OPPCommon.json +287 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpoint.sol/OPPEndpoint.json +294 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +415 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +399 -0
- package/src/assets/ethereum/hoodi/outpost/OPPErrors.sol/OPPErrors.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPErrors.sol/OPPErrors.json +245 -0
- package/src/assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPInbound.sol/OPPInbound.json +1204 -0
- package/src/assets/ethereum/hoodi/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPReceiver.sol/OPPReceiver.json +312 -0
- package/src/assets/ethereum/hoodi/outpost/OPPSender.sol/OPPSender.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OPPSender.sol/OPPSender.json +324 -0
- package/src/assets/ethereum/hoodi/outpost/OperatorRegistry.sol/OperatorRegistry.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OperatorRegistry.sol/OperatorRegistry.json +1068 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostErrors.sol/OutpostErrors.json +211 -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/OutpostManager.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostManager.sol/OutpostManager.json +751 -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/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/OutpostReserve.sol/OutpostReserve.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/OutpostReserve.sol/OutpostReserve.json +888 -0
- package/src/assets/ethereum/hoodi/outpost/Pool.sol/Pool.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/Pool.sol/Pool.json +659 -0
- package/src/assets/ethereum/hoodi/outpost/Pretoken.sol/Pretoken.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/Pretoken.sol/Pretoken.json +1393 -0
- package/src/assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/ReceiptNFT.sol/ReceiptNFT.json +1738 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapConfirmCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapConfirmCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapFailedCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapFailedCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapRequestCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapRequestCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapSettlementCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/InstaswapSettlementCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitConfirmCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitConfirmCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitFailedCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitFailedCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitRequestCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalExitRequestCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalStakeDeltaCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/PrincipalStakeDeltaCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAssetCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAssetCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestationTypeLib.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestationTypeLib.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestations.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/WireYieldHubAttestations.json +1437 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/YieldDepositCodec.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/WireYieldHubAttestations.sol/YieldDepositCodec.json +10 -0
- package/src/assets/ethereum/hoodi/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/ERC1155Token.sol/ERC1155Token.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/ERC20Token.sol/ERC20Token.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/ERC721Token.sol/ERC721Token.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/Eman1155.sol/Eman1155.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/Eman1155.sol/Eman1155.json +560 -0
- package/src/assets/ethereum/hoodi/token/Eman20.sol/Eman20.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/Eman20.sol/Eman20.json +460 -0
- package/src/assets/ethereum/hoodi/token/Eman721.sol/Eman721.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/token/Eman721.sol/Eman721.json +624 -0
- package/src/assets/ethereum/mainnet/common/Base58.sol/Base58.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/Base58.sol/Base58.json +164 -0
- package/src/assets/ethereum/mainnet/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +76 -0
- package/src/assets/ethereum/mainnet/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/RestrictedCallers.sol/RestrictedCallers.json +10 -0
- package/src/assets/ethereum/mainnet/common/iodata.sol/iodata.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/iodata.sol/iodata.json +618 -0
- package/src/assets/ethereum/mainnet/common/iodata_util.sol/iodata_util.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/iodata_util.sol/iodata_util.json +40 -0
- package/src/assets/ethereum/mainnet/common/sysio_data.sol/sysio_data.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_data.sol/sysio_data.json +10 -0
- package/src/assets/ethereum/mainnet/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_errors.sol/sysio_errors.json +10 -0
- package/src/assets/ethereum/mainnet/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_merkle.sol/sysio_merkle.json +233 -0
- package/src/assets/ethereum/mainnet/common/sysio_name.sol/sysio_name.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_name.sol/sysio_name.json +49 -0
- package/src/assets/ethereum/mainnet/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_pubkey.sol/sysio_pubkey.json +64 -0
- package/src/assets/ethereum/mainnet/common/sysio_read.sol/sysio_read.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_read.sol/sysio_read.json +1458 -0
- package/src/assets/ethereum/mainnet/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_tester.sol/SysioTester.json +1532 -0
- package/src/assets/ethereum/mainnet/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_verify.sol/sysio_verify.json +1525 -0
- package/src/assets/ethereum/mainnet/common/sysio_write.sol/sysio_write.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/common/sysio_write.sol/sysio_write.json +1076 -0
- package/src/assets/ethereum/mainnet/liqEth/BeaconState.sol/BeaconState.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/BeaconState.sol/BeaconState.json +807 -0
- package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/DepositManagerV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/DepositManagerV2.json +1004 -0
- package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/IStakingModuleBondLocker.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/DepositManager.sol/IStakingModuleBondLocker.json +29 -0
- package/src/assets/ethereum/mainnet/liqEth/KeyBondManager.sol/KeyBondManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/KeyBondManager.sol/KeyBondManager.json +897 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +1289 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositContract.json +39 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IDepositManager.json +64 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IKeyBondManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IKeyBondManager.json +189 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20.json +319 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.json +333 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IStakingModule.json +279 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthCommon.sol/LiqEthCommon.json +10 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthDeepFreeze.sol/LiqEthDeepFreeze.json +236 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/LiqEthManaged.sol/LiqEthManaged.json +229 -0
- package/src/assets/ethereum/mainnet/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/RewardsERC20.sol/RewardsERC20UpgradeableV2.json +957 -0
- package/src/assets/ethereum/mainnet/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeableV2.json +1020 -0
- package/src/assets/ethereum/mainnet/liqEth/StakingLib.sol/StakingLib.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/StakingLib.sol/StakingLib.json +89 -0
- package/src/assets/ethereum/mainnet/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/Yield.sol/YieldOracle.json +1376 -0
- package/src/assets/ethereum/mainnet/liqEth/liqEth.sol/LiqEthTokenV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/liqEth.sol/LiqEthTokenV2.json +1323 -0
- package/src/assets/ethereum/mainnet/liqEth/stakingModule.sol/StakingModuleV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/stakingModule.sol/StakingModuleV2.json +1896 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/DepositManager.sol/DepositManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/DepositManager.sol/DepositManager.json +978 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IAccounting.json +176 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositContract.json +39 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IDepositManager.json +64 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/ILiqEthUpgradeable.json +29 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20.json +249 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IRewardsERC20Pausable.json +263 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IStakingModule.json +344 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IValidatorBalanceVerifier.json +129 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/IWithdrawalRecord.json +66 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/LiqEthCommon.sol/LiqEthCommon.json +10 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20.sol/RewardsERC20Upgradeable.json +874 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.json +937 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/accounting.sol/Accounting.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → mainnet/liqEth/v1}/accounting.sol/Accounting.json +3 -3
- package/src/assets/ethereum/mainnet/liqEth/v1/liqEth.sol/LiqEthToken.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/liqEth.sol/LiqEthToken.json +1233 -0
- package/src/assets/ethereum/mainnet/liqEth/v1/stakingModule.sol/StakingModule.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/liqEth → mainnet/liqEth/v1}/stakingModule.sol/StakingModule.json +3 -3
- package/src/assets/ethereum/mainnet/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +973 -0
- package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/Uint64BE.json +10 -0
- package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/liqEth/withdrawalVault.sol/WithdrawalVault.json +441 -0
- package/src/assets/ethereum/mainnet/outpost/BAR.sol/BARV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/BAR.sol/BARV2.json +1915 -0
- package/src/assets/ethereum/mainnet/outpost/Depositor.sol/DepositorV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/Depositor.sol/DepositorV2.json +1845 -0
- package/src/assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.json +122 -0
- package/src/assets/ethereum/mainnet/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → mainnet}/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +33 -2
- package/src/assets/ethereum/mainnet/outpost/OPP.sol/OPP.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPP.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPEndpoint.json +29 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPSender.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/OPPCommon.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPErrors.sol/OPPErrors.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPInbound.sol/OPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPSender.sol/OPPSender.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostErrors.sol/OutpostErrors.json +33 -2
- package/src/assets/ethereum/mainnet/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManager.sol/OutpostManagerV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManager.sol/OutpostManagerV2.json +737 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.json +29 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/Pool.sol/PoolV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/Pool.sol/PoolV2.json +943 -0
- package/src/assets/ethereum/mainnet/outpost/Pretoken.sol/PretokenV2.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/Pretoken.sol/PretokenV2.json +1703 -0
- package/src/assets/ethereum/mainnet/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +4 -0
- package/src/assets/ethereum/{ABI → mainnet}/outpost/ReceiptNFT.sol/ReceiptNFT.json +33 -2
- package/src/assets/ethereum/mainnet/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/interfaces/IPretoken.sol/IPretoken.json +29 -0
- package/src/assets/ethereum/mainnet/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/interfaces/IWarrant.sol/IWarrant.json +29 -0
- package/src/assets/ethereum/mainnet/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.json +858 -0
- package/src/assets/ethereum/mainnet/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.json +30 -0
- package/src/assets/ethereum/mainnet/outpost/v1/BAR.sol/BAR.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/BAR.sol/BAR.json +34 -3
- package/src/assets/ethereum/mainnet/outpost/v1/Depositor.sol/Depositor.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/v1/Depositor.sol/Depositor.json +1653 -0
- package/src/assets/ethereum/mainnet/outpost/v1/OutpostManager.sol/OutpostManager.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/OutpostManager.sol/OutpostManager.json +3 -3
- package/src/assets/ethereum/mainnet/outpost/v1/Pool.sol/Pool.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/Pool.sol/Pool.json +34 -3
- package/src/assets/ethereum/mainnet/outpost/v1/Pretoken.sol/Pretoken.dbg.json +4 -0
- package/src/assets/ethereum/{ABI/outpost → mainnet/outpost/v1}/Pretoken.sol/Pretoken.json +34 -3
- package/src/assets/ethereum/mainnet/token/ERC1155Token.sol/ERC1155Token.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/token/ERC1155Token.sol/ERC1155Token.json +472 -0
- package/src/assets/ethereum/mainnet/token/ERC20Token.sol/ERC20Token.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/token/ERC20Token.sol/ERC20Token.json +330 -0
- package/src/assets/ethereum/mainnet/token/ERC721Token.sol/ERC721Token.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/token/ERC721Token.sol/ERC721Token.json +449 -0
- package/src/assets/solana/devnet/idl/liqsol_core.json +8566 -0
- package/src/assets/solana/{idl → devnet/idl}/liqsol_token.json +34 -0
- package/src/assets/solana/devnet/idl/transfer_hook.json +490 -0
- package/src/assets/solana/devnet/idl/validator_leaderboard.json +735 -0
- package/src/assets/solana/devnet/types/liqsol_core.ts +8572 -0
- package/src/assets/solana/{types → devnet/types}/liqsol_token.ts +34 -0
- package/src/assets/solana/devnet/types/transfer_hook.ts +496 -0
- package/src/assets/solana/devnet/types/validator_leaderboard.ts +741 -0
- package/src/assets/solana/{idl → mainnet/idl}/liqsol_core.json +542 -30
- package/src/assets/solana/mainnet/idl/liqsol_token.json +217 -0
- package/src/assets/solana/mainnet/idl/transfer_hook.json +479 -0
- package/src/assets/solana/{types → mainnet/types}/liqsol_core.ts +542 -30
- package/src/assets/solana/mainnet/types/liqsol_token.ts +223 -0
- package/src/assets/solana/mainnet/types/transfer_hook.ts +485 -0
- package/src/assets/solana/realdevnet/idl/liqsol_core.json +7112 -0
- package/src/assets/solana/realdevnet/idl/liqsol_token.json +217 -0
- package/src/assets/solana/realdevnet/idl/transfer_hook.json +479 -0
- package/src/assets/solana/realdevnet/idl/validator_leaderboard.json +735 -0
- package/src/assets/solana/realdevnet/types/liqsol_core.ts +7118 -0
- package/src/assets/solana/realdevnet/types/liqsol_token.ts +223 -0
- package/src/assets/solana/realdevnet/types/transfer_hook.ts +485 -0
- package/src/assets/solana/realdevnet/types/validator_leaderboard.ts +741 -0
- package/src/index.ts +4 -2
- package/src/networks/ethereum/clients/convert.client.ts +35 -1
- package/src/networks/ethereum/clients/instaswap.client.ts +432 -0
- package/src/networks/ethereum/clients/opp.client.ts +20 -21
- package/src/networks/ethereum/clients/receipt.client.ts +93 -23
- package/src/networks/ethereum/clients/stake.client.ts +192 -20
- package/src/networks/ethereum/clients/validator.client.ts +61 -0
- package/src/networks/ethereum/contract.ts +423 -239
- package/src/networks/ethereum/ethereum.ts +379 -165
- package/src/networks/ethereum/types.ts +40 -11
- package/src/networks/solana/clients/convert.client.ts +377 -0
- package/src/networks/solana/clients/distribution.client.ts +141 -29
- package/src/networks/solana/clients/instaswap.client.ts +474 -0
- package/src/networks/solana/clients/leaderboard.client.ts +10 -13
- package/src/networks/solana/clients/outpost.client.ts +120 -80
- package/src/networks/solana/clients/token.client.ts +33 -22
- package/src/networks/solana/constants.ts +58 -285
- package/src/networks/solana/program.ts +467 -29
- package/src/networks/solana/solana.ts +529 -222
- package/src/networks/solana/types.ts +41 -15
- package/src/networks/solana/utils.ts +74 -306
- package/src/staker.ts +23 -2
- package/src/types.ts +82 -11
- package/src/assets/ethereum/ABI/common/Base58.sol/Base58.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/iodata.sol/iodata.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.dbg.json +0 -4
- package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/Aggregator.sol/Aggregator.json +0 -82
- package/src/assets/ethereum/ABI/outpost/BAR.sol/BAR.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json +0 -1622
- package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPP.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPInbound.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPSender.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/OPPCommon.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPErrors.sol/OPPErrors.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OPPSender.sol/OPPSender.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostManager.sol/OutpostManager.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +0 -4
- package/src/assets/ethereum/ABI/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +0 -4
- package/src/assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.dbg.json +0 -4
- package/src/assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.dbg.json +0 -4
- package/src/assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.dbg.json +0 -4
- package/src/assets/solana/idl/transfer_hook.json +0 -197
- package/src/assets/solana/types/transfer_hook.ts +0 -203
- package/src/networks/solana/clients/deposit.client.ts +0 -292
- /package/src/assets/ethereum/{ABI → hoodi}/common/Base58.sol/Base58.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/RestrictedCallers.sol/RestrictedCallers.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/iodata.sol/iodata.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/iodata_util.sol/iodata_util.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_data.sol/sysio_data.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_errors.sol/sysio_errors.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_merkle.sol/sysio_merkle.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_name.sol/sysio_name.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_pubkey.sol/sysio_pubkey.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_read.sol/sysio_read.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_tester.sol/SysioTester.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_verify.sol/sysio_verify.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/common/sysio_write.sol/sysio_write.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/BeaconState.sol/BeaconState.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthAuthority.sol/LiqEthAuthority.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IDepositContract.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IDepositManager.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/OPPCommon.sol/IOPPEndpoint.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/interfaces/IPretoken.sol/IPretoken.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/interfaces/IWarrant.sol/IWarrant.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/token/ERC1155Token.sol/ERC1155Token.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/token/ERC20Token.sol/ERC20Token.json +0 -0
- /package/src/assets/ethereum/{ABI → hoodi}/token/ERC721Token.sol/ERC721Token.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPP.sol/OPP.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPP.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPInbound.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPReceiver.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/IOPPSender.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPCommon.sol/OPPCommon.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpoint.sol/OPPEndpoint.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPErrors.sol/OPPErrors.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPInbound.sol/OPPInbound.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPReceiver.sol/OPPReceiver.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OPPSender.sol/OPPSender.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManaged.sol/OutpostManaged.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/IOutpostManager.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.json +0 -0
- /package/src/assets/ethereum/{ABI → mainnet}/outpost/OutpostOwnable.sol/OutpostOwnable.json +0 -0
- /package/src/assets/solana/{idl → mainnet/idl}/validator_leaderboard.json +0 -0
- /package/src/assets/solana/{types → mainnet/types}/validator_leaderboard.ts +0 -0
|
@@ -8,13 +8,15 @@ import {
|
|
|
8
8
|
TrancheSnapshot
|
|
9
9
|
} from '../../types';
|
|
10
10
|
import { EthereumContractService } from './contract';
|
|
11
|
-
import { preLaunchReceipt } from './types';
|
|
12
|
-
import { buildEthereumTrancheSnapshot } from './utils';
|
|
11
|
+
import { preLaunchReceipt, WithdrawReceipt } from './types';
|
|
12
|
+
import { buildEthereumTrancheSnapshot, formatContractErrors } from './utils';
|
|
13
13
|
import { ConvertClient } from './clients/convert.client';
|
|
14
|
+
import { EthereumInstaswapClient } from './clients/instaswap.client';
|
|
14
15
|
import { StakeClient } from './clients/stake.client';
|
|
15
16
|
import { PretokenClient } from './clients/pretoken.client';
|
|
16
17
|
import { OPPClient } from './clients/opp.client';
|
|
17
18
|
import { ReceiptClient } from './clients/receipt.client';
|
|
19
|
+
import { ValidatorClient } from './clients/validator.client';
|
|
18
20
|
|
|
19
21
|
export const INITIAL_TRANCHE_SUPPLY = 35000;
|
|
20
22
|
|
|
@@ -29,10 +31,12 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
29
31
|
private stakeClient: StakeClient;
|
|
30
32
|
private oppClient: OPPClient;
|
|
31
33
|
private receiptClient: ReceiptClient;
|
|
32
|
-
|
|
34
|
+
private validatorClient: ValidatorClient;
|
|
35
|
+
public readonly instaswapClient: EthereumInstaswapClient;
|
|
33
36
|
|
|
34
37
|
get contract() { return this.contractService.contract; }
|
|
35
38
|
get network() { return this.config.network; }
|
|
39
|
+
get address() { return this.signer?.getAddress(); }
|
|
36
40
|
|
|
37
41
|
constructor(private config: StakerConfig) {
|
|
38
42
|
try {
|
|
@@ -48,6 +52,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
48
52
|
this.contractService = new EthereumContractService({
|
|
49
53
|
provider: this.provider,
|
|
50
54
|
signer: this.signer,
|
|
55
|
+
chainId: config.network.chainId as EvmChainID,
|
|
51
56
|
});
|
|
52
57
|
|
|
53
58
|
this.convertClient = new ConvertClient(this.contractService);
|
|
@@ -55,6 +60,13 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
55
60
|
this.stakeClient = new StakeClient(this.contractService);
|
|
56
61
|
this.oppClient = new OPPClient(this.contractService);
|
|
57
62
|
this.receiptClient = new ReceiptClient(this.contractService);
|
|
63
|
+
this.validatorClient = new ValidatorClient(this.contractService);
|
|
64
|
+
this.instaswapClient = new EthereumInstaswapClient(
|
|
65
|
+
this.contractService,
|
|
66
|
+
this.signer,
|
|
67
|
+
config.network.chainId as number,
|
|
68
|
+
config.network.rpcUrls[0],
|
|
69
|
+
);
|
|
58
70
|
}
|
|
59
71
|
catch (error) {
|
|
60
72
|
// console.error('Error initializing EthereumStakingClient:', error);
|
|
@@ -91,26 +103,51 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
91
103
|
async withdraw(amount: bigint): Promise<string> {
|
|
92
104
|
this.ensureUser();
|
|
93
105
|
|
|
94
|
-
const address = await this.
|
|
106
|
+
const address = await this.address!;
|
|
95
107
|
const amountWei = BigNumber.from(amount);
|
|
96
108
|
|
|
97
109
|
const result = await this.convertClient.performWithdraw(address, amountWei)
|
|
98
110
|
return result.txHash;
|
|
99
111
|
}
|
|
100
112
|
|
|
113
|
+
/**
|
|
114
|
+
* List withdrawal queue receipts for a wallet (pending / in-progress exits after safeBurn).
|
|
115
|
+
* @param address Owner to query; defaults to the connected wallet.
|
|
116
|
+
* @returns Withdrawal receipt NFT entries from the protocol view
|
|
117
|
+
*/
|
|
118
|
+
async getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]> {
|
|
119
|
+
this.ensureUser();
|
|
120
|
+
const owner = address ?? await this.address!;
|
|
121
|
+
return await this.receiptClient.fetchWithdrawReceipts(owner);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Claim native ETH for a matured withdrawal using the WithdrawalQueue NFT token id
|
|
126
|
+
* (via DepositManager.claim after the delay has passed).
|
|
127
|
+
* @param tokenId Withdrawal request / queue NFT token id
|
|
128
|
+
* @returns transaction hash
|
|
129
|
+
*/
|
|
130
|
+
async claimWithdraw(tokenId: bigint): Promise<string> {
|
|
131
|
+
this.ensureUser();
|
|
132
|
+
|
|
133
|
+
const tokenIdBigNum = BigNumber.from(tokenId)
|
|
134
|
+
const result = await this.convertClient.claimWithdraw(tokenIdBigNum)
|
|
135
|
+
return result.txHash;
|
|
136
|
+
}
|
|
137
|
+
|
|
101
138
|
|
|
102
139
|
/**
|
|
103
140
|
* Stake liqETH via DepositManager.
|
|
104
141
|
* @param amount Amount in wei - Keep this as a bigint / string in the caller; avoid JS floats.
|
|
105
142
|
* @returns transaction hash
|
|
106
143
|
*/
|
|
107
|
-
async stake(amount: bigint): Promise<string> {
|
|
144
|
+
async stake(amount: bigint, wireAccount?: string): Promise<string> {
|
|
108
145
|
this.ensureUser();
|
|
109
146
|
|
|
110
|
-
const walletAddress = await this.
|
|
147
|
+
const walletAddress = await this.address!;
|
|
111
148
|
const amountWei = BigNumber.from(amount);
|
|
112
149
|
|
|
113
|
-
const result = await this.stakeClient.
|
|
150
|
+
const result = await this.stakeClient.performStakeToWire(amountWei, walletAddress, wireAccount);
|
|
114
151
|
return result.txHash;
|
|
115
152
|
}
|
|
116
153
|
|
|
@@ -120,6 +157,57 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
120
157
|
throw new Error("Method not yet implemented.");
|
|
121
158
|
}
|
|
122
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Deposit ETH to liqETH, then stake the liqETH.
|
|
162
|
+
* @param amountWei Amount in wei.
|
|
163
|
+
* @returns transaction hash
|
|
164
|
+
*/
|
|
165
|
+
async depositAndStake(amount: bigint, wireAccount?: string): Promise<string> {
|
|
166
|
+
this.ensureUser();
|
|
167
|
+
if (!amount || amount <= BigInt(0))
|
|
168
|
+
throw new Error('Amount must be greater than zero.');
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
const walletAddress = await this.address!;
|
|
172
|
+
let amountWei = BigNumber.from(amount);
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
const result = await this.convertClient.performDeposit(amountWei);
|
|
176
|
+
console.log('result of performDeposit()', result);
|
|
177
|
+
|
|
178
|
+
const result2 = await this.stakeClient.performStakeToWire(amountWei, walletAddress, wireAccount);
|
|
179
|
+
console.log('result of performStakeToWire()', result2);
|
|
180
|
+
|
|
181
|
+
// const result = await this.stakeClient.performDepositAndStakeToWire(BigNumber.from(amountWei), wireAccount);
|
|
182
|
+
return result2.txHash;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Deposit ETH to liqETH, then purchase pretokens in a single transaction.
|
|
187
|
+
* @param amountWei Amount in wei.
|
|
188
|
+
* @returns transaction hash
|
|
189
|
+
*/
|
|
190
|
+
async depositAndBuy(amountWei: bigint): Promise<string> {
|
|
191
|
+
this.ensureUser();
|
|
192
|
+
if (!amountWei || amountWei <= BigInt(0))
|
|
193
|
+
throw new Error('Amount must be greater than zero.');
|
|
194
|
+
|
|
195
|
+
const result = await this.stakeClient.performDepositAndPurchase(BigNumber.from(amountWei));
|
|
196
|
+
return result.txHash;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Unstake liqETH, then request a withdrawal in a single transaction.
|
|
201
|
+
* @param tokenId The ReceiptNFT token ID for the stake position
|
|
202
|
+
* @returns transaction hash
|
|
203
|
+
*/
|
|
204
|
+
async unstakeAndWithdraw(tokenId: bigint): Promise<string> {
|
|
205
|
+
this.ensureUser();
|
|
206
|
+
|
|
207
|
+
const result = await this.stakeClient.performUnstakeAndRequestWithdraw(BigNumber.from(tokenId));
|
|
208
|
+
return result.txHash;
|
|
209
|
+
}
|
|
210
|
+
|
|
123
211
|
|
|
124
212
|
/**
|
|
125
213
|
* ETH Prelaunch function to unstake liqEth
|
|
@@ -139,19 +227,55 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
139
227
|
async buy(amount: bigint): Promise<string> {
|
|
140
228
|
this.ensureUser();
|
|
141
229
|
|
|
142
|
-
const buyer = await this.
|
|
143
|
-
|
|
144
|
-
// ! Hoodi only - check if the mock aggregator price is stale, and if so, update it before submitting the buy request
|
|
145
|
-
// const network = await this.provider.getNetwork();
|
|
146
|
-
// const chainId = network.chainId;
|
|
147
|
-
// const allowedTestChains = new Set([560048]);
|
|
148
|
-
// if (allowedTestChains.has(chainId)) await this.updateMockAggregatorPrice();
|
|
230
|
+
const buyer = await this.address!;
|
|
149
231
|
|
|
150
232
|
let result = await this.pretokenClient.purchasePretokensWithLiqETH(amount, buyer);
|
|
151
233
|
return result && result.txHash ? result.txHash : "Error - no resulting txHash";
|
|
152
234
|
}
|
|
153
235
|
|
|
154
236
|
|
|
237
|
+
/**
|
|
238
|
+
* Validator functions
|
|
239
|
+
*/
|
|
240
|
+
async validatorDeposit(): Promise<string> {
|
|
241
|
+
this.ensureUser();
|
|
242
|
+
|
|
243
|
+
let result = await this.validatorClient.validatorDepositAndLockBond();
|
|
244
|
+
return result && result.txHash ? result.txHash : "Error - no resulting txHash";
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
// ! Testnet only - check if the mock aggregator price is stale, and if so, update it before submitting the buy request
|
|
252
|
+
// async crankTestnetAggregator(): Promise<string> {
|
|
253
|
+
// this.ensureUser();
|
|
254
|
+
|
|
255
|
+
// const network = await this.provider.getNetwork();
|
|
256
|
+
// const chainId = network.chainId;
|
|
257
|
+
// const allowedTestChains = new Set([560048, 31337]);
|
|
258
|
+
// if (!allowedTestChains.has(chainId)) return "Testnet crank is only intended for test/local networks - current chain is "+chainId+". Skipping aggregator update";
|
|
259
|
+
|
|
260
|
+
// const [agg, opp] = await Promise.allSettled([
|
|
261
|
+
// this.updateMockAggregatorPrice(),
|
|
262
|
+
// this.fixOppTooManyAttestations(),
|
|
263
|
+
// ]);
|
|
264
|
+
|
|
265
|
+
// const fmt = (name: string, r: PromiseSettledResult<unknown>) => {
|
|
266
|
+
// if (r.status === 'fulfilled') {
|
|
267
|
+
// const suffix = r.value !== undefined ? ` (${String(r.value)})` : '';
|
|
268
|
+
// return `${name}: ok${suffix}`;
|
|
269
|
+
// }
|
|
270
|
+
// return `${name}: failed (${String(r.reason)})`;
|
|
271
|
+
// };
|
|
272
|
+
|
|
273
|
+
// console.log('crankTestnetAggregator()', { agg, opp });
|
|
274
|
+
// return `${fmt('updateMockAggregatorPrice', agg)}; ${fmt('fixOppTooManyAttestations', opp)}`;
|
|
275
|
+
// }
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
155
279
|
/**
|
|
156
280
|
* Resolve the user's ETH + liqETH balances.
|
|
157
281
|
*
|
|
@@ -159,101 +283,107 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
159
283
|
* actual = liqETH token balance (ERC-20)
|
|
160
284
|
* tracked = liqETH tracked balance (protocol/accounting view)
|
|
161
285
|
*/
|
|
162
|
-
async getPortfolio(): Promise<Portfolio | null> {
|
|
163
|
-
|
|
286
|
+
async getPortfolio(address?: string): Promise<Portfolio | null> {
|
|
287
|
+
|
|
288
|
+
try {
|
|
289
|
+
if (!this.signer) return Promise.resolve(null);
|
|
164
290
|
|
|
165
|
-
|
|
291
|
+
const walletAddress = address ?? await this.address!;
|
|
166
292
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
293
|
+
// 1) Native ETH balance
|
|
294
|
+
const nativeBalance = await this.provider.getBalance(walletAddress);
|
|
295
|
+
const nativeDecimals = this.network?.nativeCurrency?.decimals ?? 18;
|
|
296
|
+
const nativeSymbol = this.network?.nativeCurrency?.symbol ?? 'ETH';
|
|
171
297
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
298
|
+
// 2) liqETH ERC-20 balance (actual)
|
|
299
|
+
const liqBalance: ethers.BigNumber = await this.contract.LiqEthToken.balanceOf(walletAddress);
|
|
300
|
+
const liqSymbol = 'Liq' + (this.network?.nativeCurrency?.symbol ?? 'ETH');
|
|
175
301
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
302
|
+
// 3) staked liqEth ERC-20 balance (calculate from receipts)
|
|
303
|
+
let stakeReceipts = await this.receiptClient.stakeReceipts(walletAddress);
|
|
304
|
+
|
|
305
|
+
let stakeBalanceBN = BigNumber.from(0);
|
|
306
|
+
for (let r of stakeReceipts) {
|
|
307
|
+
stakeBalanceBN = stakeBalanceBN.add(BigNumber.from(r.receipt.principal.amount));
|
|
308
|
+
}
|
|
309
|
+
let stakeSharesBN = BigNumber.from(0);
|
|
310
|
+
for (let r of stakeReceipts) {
|
|
311
|
+
stakeSharesBN = stakeSharesBN.add(BigNumber.from(r.receipt.shares.amount));
|
|
312
|
+
}
|
|
186
313
|
|
|
187
|
-
|
|
188
|
-
|
|
314
|
+
// 4) WIRE pretoken balance
|
|
315
|
+
const wireBalance: ethers.BigNumber = await this.contract.Pretoken.balanceOf(walletAddress);
|
|
316
|
+
|
|
317
|
+
// 5) Calculate staking yield
|
|
318
|
+
let currentIndex = BigInt(0);
|
|
319
|
+
let totalShares = BigInt(0);
|
|
320
|
+
let userShares = BigInt(0);
|
|
321
|
+
const indexScale = BigInt(1e27);
|
|
322
|
+
try {
|
|
323
|
+
// These may throw if not implemented on contract
|
|
324
|
+
const [indexBn, totalSharesBn] = await Promise.all([
|
|
325
|
+
this.contract.Depositor.index().catch(() => BigNumber.from(0)),
|
|
326
|
+
this.contract.Depositor.totalShares().catch(() => BigNumber.from(0)),
|
|
327
|
+
]);
|
|
328
|
+
|
|
329
|
+
const userSharesBn = stakeSharesBN;
|
|
330
|
+
currentIndex = BigInt(indexBn.toString());
|
|
331
|
+
totalShares = BigInt(totalSharesBn.toString());
|
|
332
|
+
userShares = BigInt(userSharesBn.toString());
|
|
333
|
+
} catch (error) {
|
|
334
|
+
console.log('Error fetching staking index/shares:', error);
|
|
335
|
+
}
|
|
189
336
|
|
|
337
|
+
// sharesToTokens(userShares, currentIndex) = userShares * currentIndex / indexScale
|
|
338
|
+
let estimatedClaim = BigInt(0);
|
|
339
|
+
let estimatedYield = BigInt(0);
|
|
340
|
+
|
|
341
|
+
if (userShares > BigInt(0) && currentIndex > BigInt(0)) {
|
|
342
|
+
estimatedClaim = (userShares * currentIndex) / indexScale;
|
|
343
|
+
if (estimatedClaim > stakeBalanceBN.toBigInt()) {
|
|
344
|
+
estimatedYield = estimatedClaim - stakeBalanceBN.toBigInt();
|
|
345
|
+
}
|
|
346
|
+
}
|
|
190
347
|
|
|
191
|
-
// 5) Calculate staking yield
|
|
192
|
-
let currentIndex = BigInt(0);
|
|
193
|
-
let totalShares = BigInt(0);
|
|
194
|
-
let userShares = BigInt(0);
|
|
195
|
-
const indexScale = BigInt(1e27);
|
|
196
|
-
try {
|
|
197
|
-
// These may throw if not implemented on contract
|
|
198
|
-
const [indexBn, totalSharesBn] = await Promise.all([
|
|
199
|
-
this.contract.Depositor.index().catch(() => BigNumber.from(0)),
|
|
200
|
-
this.contract.Depositor.totalShares().catch(() => BigNumber.from(0)),
|
|
201
|
-
]);
|
|
202
348
|
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
wire: {
|
|
241
|
-
amount: wireBalance.toBigInt(),
|
|
242
|
-
decimals: 18,
|
|
243
|
-
symbol: '$WIRE',
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
yield: {
|
|
247
|
-
currentIndex,
|
|
248
|
-
indexScale,
|
|
249
|
-
totalShares,
|
|
250
|
-
userShares,
|
|
251
|
-
estimatedClaim,
|
|
252
|
-
estimatedYield,
|
|
253
|
-
},
|
|
254
|
-
chainID: this.network.chainId
|
|
349
|
+
const portfolio: Portfolio = {
|
|
350
|
+
native: {
|
|
351
|
+
amount: nativeBalance.toBigInt(),
|
|
352
|
+
decimals: nativeDecimals,
|
|
353
|
+
symbol: nativeSymbol,
|
|
354
|
+
},
|
|
355
|
+
liq: {
|
|
356
|
+
amount: liqBalance.toBigInt(),
|
|
357
|
+
decimals: nativeDecimals,
|
|
358
|
+
symbol: liqSymbol,
|
|
359
|
+
},
|
|
360
|
+
staked: {
|
|
361
|
+
amount: stakeBalanceBN.toBigInt(),
|
|
362
|
+
decimals: nativeDecimals,
|
|
363
|
+
symbol: liqSymbol,
|
|
364
|
+
},
|
|
365
|
+
wire: {
|
|
366
|
+
amount: wireBalance.toBigInt(),
|
|
367
|
+
decimals: 18,
|
|
368
|
+
symbol: '$WIRE',
|
|
369
|
+
},
|
|
370
|
+
|
|
371
|
+
yield: {
|
|
372
|
+
currentIndex,
|
|
373
|
+
indexScale,
|
|
374
|
+
totalShares,
|
|
375
|
+
userShares,
|
|
376
|
+
estimatedClaim,
|
|
377
|
+
estimatedYield,
|
|
378
|
+
},
|
|
379
|
+
chainID: this.network.chainId
|
|
380
|
+
}
|
|
381
|
+
return portfolio;
|
|
382
|
+
}
|
|
383
|
+
catch (error) {
|
|
384
|
+
// console.log('Error fetching Ethereum portfolio:', error);
|
|
385
|
+
throw error;
|
|
255
386
|
}
|
|
256
|
-
return portfolio;
|
|
257
387
|
}
|
|
258
388
|
|
|
259
389
|
/**
|
|
@@ -264,7 +394,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
264
394
|
async fetchPrelaunchReceipts(address?: string): Promise<preLaunchReceipt[]> {
|
|
265
395
|
this.ensureUser();
|
|
266
396
|
|
|
267
|
-
if (address === undefined) address = await this.
|
|
397
|
+
if (address === undefined) address = await this.address!;
|
|
268
398
|
|
|
269
399
|
//default to stake receipts
|
|
270
400
|
return await this.receiptClient.stakeReceipts(address);
|
|
@@ -273,11 +403,13 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
273
403
|
async getOPPMessages(address?: string): Promise<OPPAssertion[]> {
|
|
274
404
|
this.ensureUser();
|
|
275
405
|
|
|
276
|
-
if (!address) address = await this.
|
|
406
|
+
if (!address) address = await this.address!;
|
|
277
407
|
|
|
278
408
|
return await this.oppClient.getMessages(address);
|
|
279
409
|
}
|
|
280
410
|
|
|
411
|
+
|
|
412
|
+
|
|
281
413
|
// Ensure that signer wallet is available for write operations
|
|
282
414
|
private ensureUser() {
|
|
283
415
|
if (!this.signer) {
|
|
@@ -333,24 +465,11 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
333
465
|
*
|
|
334
466
|
* SUPPORTS READ-ONLY ACcESS
|
|
335
467
|
*/
|
|
336
|
-
async getTrancheSnapshot(
|
|
337
|
-
chainID?: ChainID;
|
|
338
|
-
windowBefore?: number;
|
|
339
|
-
windowAfter?: number;
|
|
340
|
-
}): Promise<TrancheSnapshot> {
|
|
341
|
-
const {
|
|
342
|
-
chainID = EvmChainID.Ethereum,
|
|
343
|
-
windowBefore,
|
|
344
|
-
windowAfter,
|
|
345
|
-
} = options ?? {};
|
|
346
|
-
|
|
347
|
-
|
|
468
|
+
async getTrancheSnapshot(chainID: ChainID): Promise<TrancheSnapshot> {
|
|
348
469
|
try {
|
|
349
|
-
|
|
350
470
|
const blockNumber = await this.provider.getBlockNumber();
|
|
351
471
|
const blockTag = { blockTag: blockNumber };
|
|
352
472
|
|
|
353
|
-
|
|
354
473
|
// Fetch all required contract data
|
|
355
474
|
const [totalSharesBn, indexBn, trancheNumberBn, trancheSupplyBn, tranchePriceUsdBn, totalSupplyBn, supplyGrowthBps, priceGrowthCents, minPriceUsd, maxPriceUsd] = await Promise.all([
|
|
356
475
|
this.contract.Depositor.totalShares(blockTag),
|
|
@@ -368,7 +487,6 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
368
487
|
const totalTrancheSupply = BigInt(totalSupplyBn.toString()) / BigInt(1e10);
|
|
369
488
|
const currentTrancheSupply = BigInt(trancheSupplyBn.toString()) / BigInt(1e10);
|
|
370
489
|
|
|
371
|
-
|
|
372
490
|
// fetch price and timestamp from aggregator
|
|
373
491
|
// const [roundId, answer, startedAt, updatedAt, answeredInRound] = await this.contract.MockAggregator.latestRoundData();
|
|
374
492
|
//originally fetched ethPrice from aggregator - pulling from EthUsdPriceConsumer instead - this is where the actual price gets pulled from when purchasing pretokens.
|
|
@@ -394,11 +512,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
394
512
|
priceGrowthCents,
|
|
395
513
|
minPriceUsd,
|
|
396
514
|
maxPriceUsd,
|
|
397
|
-
|
|
398
515
|
ethPriceUsd,
|
|
399
|
-
// nativePriceTimestamp,
|
|
400
|
-
ladderWindowBefore: windowBefore,
|
|
401
|
-
ladderWindowAfter: windowAfter,
|
|
402
516
|
});
|
|
403
517
|
}
|
|
404
518
|
catch (err: any) {
|
|
@@ -422,11 +536,11 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
422
536
|
txCount?: number;
|
|
423
537
|
safetyMultiplier?: number;
|
|
424
538
|
minBufferWei?: bigint;
|
|
425
|
-
balanceOverrideLamports?: bigint;
|
|
539
|
+
balanceOverrideLamports?: bigint;
|
|
426
540
|
}): Promise<bigint> {
|
|
427
541
|
this.ensureUser();
|
|
428
542
|
|
|
429
|
-
const walletAddress = await this.
|
|
543
|
+
const walletAddress = await this.address!;
|
|
430
544
|
|
|
431
545
|
// 1) Estimate a baseline gas usage using a simple self-transfer.
|
|
432
546
|
// This is cheap and doesn't depend on your contract ABI at all.
|
|
@@ -481,50 +595,150 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
481
595
|
// Internal ETH Staking client helper functions
|
|
482
596
|
// ---------------------------------------------------------------------
|
|
483
597
|
|
|
484
|
-
// ! This is a temporary measure for
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
598
|
+
// ! This is a temporary measure for testnet because there is no aggregator deployed
|
|
599
|
+
/*
|
|
600
|
+
private async updateMockAggregatorPrice() {
|
|
601
|
+
const aggregator = this.contract.MockAggregator;
|
|
602
|
+
|
|
603
|
+
// read latest round & compute age
|
|
604
|
+
const [roundId, answer, startedAt, updatedAt, answeredInRound] = await aggregator.latestRoundData();
|
|
605
|
+
const now = (await this.provider.getBlock("latest")).timestamp;
|
|
606
|
+
const ageSec = Number(now) - Number(updatedAt);
|
|
607
|
+
|
|
608
|
+
const ONE_HOUR = 1 * 3600;
|
|
609
|
+
// const ONE_HOUR = 10;
|
|
610
|
+
if (ageSec > ONE_HOUR) {
|
|
611
|
+
console.log('Attempt to run updateMockAggregatorPrice - MockAggregator price is stale by', ageSec, 'seconds - updating price before proceeding with buy...');
|
|
612
|
+
|
|
613
|
+
// safety check - only run in non-production contexts
|
|
614
|
+
const network = await this.provider.getNetwork();
|
|
615
|
+
const chainId = network.chainId;
|
|
616
|
+
const allowedTestChains = new Set([560048, 31337]);
|
|
617
|
+
if (!allowedTestChains.has(chainId)) {
|
|
618
|
+
console.warn(`MockAggregator is stale (${ageSec}s) but chainId ${chainId} is not a test/local network — skipping update.`);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
504
621
|
|
|
505
622
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
623
|
+
//fetch the current ETH / USD price
|
|
624
|
+
const res = await fetch('https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd');
|
|
625
|
+
const data = await res.json();
|
|
626
|
+
const ethUsd = data.ethereum.usd;
|
|
510
627
|
|
|
511
|
-
|
|
628
|
+
const currentEthPrice = ethers.utils.parseUnits(ethUsd.toString(), 8);
|
|
512
629
|
|
|
513
|
-
|
|
514
|
-
// //update to be intentionally stale
|
|
515
|
-
// // const alttx = await aggregator.updateStale(currentEthPrice, now - 7200);
|
|
516
|
-
// // const altreceipt = await alttx.wait(1);
|
|
517
|
-
// // console.log('stale update receipt', altreceipt)
|
|
630
|
+
console.log('currentEthPrice', currentEthPrice.toString())
|
|
518
631
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
632
|
+
try {
|
|
633
|
+
//update to be intentionally stale
|
|
634
|
+
// const alttx = await aggregator.updateStale(currentEthPrice, now - 7200);
|
|
635
|
+
// const altreceipt = await alttx.wait(1);
|
|
636
|
+
// console.log('stale update receipt', altreceipt)
|
|
637
|
+
|
|
638
|
+
//update answer with current timestamp
|
|
639
|
+
const tx = await aggregator.updateAnswer(currentEthPrice);
|
|
640
|
+
const txreceipt = await tx.wait(1);
|
|
641
|
+
console.log('MockAggregator answer updated - receipt:', txreceipt)
|
|
642
|
+
return txreceipt
|
|
643
|
+
} catch (err: any) {
|
|
644
|
+
console.error('MockAggregator updateAnswer failed', err?.message || err);
|
|
645
|
+
}
|
|
646
|
+
} else {
|
|
647
|
+
console.log(`MockAggregator updated ${ageSec}s ago — no update needed`);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
private async fixOppTooManyAttestations() {
|
|
653
|
+
const opp = this.contract.OPP;
|
|
654
|
+
const outpostManager = this.contract.OutpostManager;
|
|
655
|
+
|
|
656
|
+
const [authority, pendingCountRaw, maxRaw, sendModeTagRaw] = await Promise.all([
|
|
657
|
+
opp.authority(),
|
|
658
|
+
opp.pendingAttestationCount(),
|
|
659
|
+
opp.MESSAGE_EPOCH_MAX_ATTESTATIONS(),
|
|
660
|
+
opp.sendModeTag(),
|
|
661
|
+
]);
|
|
662
|
+
|
|
663
|
+
const toBigInt = (v: any) => (typeof v === "bigint" ? v : BigInt(v.toString()));
|
|
664
|
+
const pendingCount = toBigInt(pendingCountRaw);
|
|
665
|
+
const maxAttestations = toBigInt(maxRaw);
|
|
666
|
+
const sendModeTag = toBigInt(sendModeTagRaw);
|
|
667
|
+
|
|
668
|
+
console.log(`OPP status: authority=${authority}, pendingAttestationCount=${pendingCount}, MESSAGE_EPOCH_MAX_ATTESTATIONS=${maxAttestations}, sendModeTag=${sendModeTag}`);
|
|
669
|
+
|
|
670
|
+
if (sendModeTag === 0n) {
|
|
671
|
+
console.log("OPP is not in send mode.");
|
|
672
|
+
// return;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
const shouldBumpMax = maxAttestations === 1n || pendingCount > maxAttestations;
|
|
676
|
+
if (!shouldBumpMax) {
|
|
677
|
+
console.log(
|
|
678
|
+
`No fix needed: pendingAttestationCount=${pendingCount} <= MESSAGE_EPOCH_MAX_ATTESTATIONS=${maxAttestations}`,
|
|
679
|
+
);
|
|
680
|
+
// return;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
console.log(
|
|
684
|
+
`OPP bump needed (pending=${pendingCount}, max=${maxAttestations}) — attempting to set new max and ${sendModeTag === 0n ? 'skip' : 'call'} exitSendMode(${sendModeTag})...`
|
|
685
|
+
);
|
|
686
|
+
|
|
687
|
+
console.log(await this.provider.getNetwork());
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
// safety check to only run in testnet
|
|
692
|
+
const network = await this.provider.getNetwork();
|
|
693
|
+
const chainId = toBigInt(network.chainId);
|
|
694
|
+
const allowedTestChains = new Set<bigint>([560048n, 31337n]);
|
|
695
|
+
if (!allowedTestChains.has(chainId)) {
|
|
696
|
+
console.warn(
|
|
697
|
+
`Refusing to modify OPP config on chainId ${chainId}. Add it to allowedTestChains if this is expected.`
|
|
698
|
+
);
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// minimal bump bump: set max to pendingCount (or a small default when max was 1) + buffer.
|
|
703
|
+
const base = pendingCount > 0n ? pendingCount : 1n;
|
|
704
|
+
// const newMax = base + 2n; // add a small buffer to prevent immediate recurrence
|
|
705
|
+
const newMax = 1n; // add a small buffer to prevent immediate recurrence
|
|
706
|
+
|
|
707
|
+
const encodeOppCall = (fn: string, args: any[]) =>
|
|
708
|
+
opp.interface.encodeFunctionData(fn, args);
|
|
709
|
+
|
|
710
|
+
try {
|
|
711
|
+
const data = encodeOppCall('setMessageEpochMaxAttestations', [newMax]);
|
|
712
|
+
await outpostManager.callStatic.execute(opp.address, data);
|
|
713
|
+
console.log('OutpostManager.execute(callStatic) setMessageEpochMaxAttestations passed');
|
|
714
|
+
} catch (e) {
|
|
715
|
+
console.error('OutpostManager.execute(callStatic) setMessageEpochMaxAttestations revert:', e);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
try {
|
|
720
|
+
const data1 = encodeOppCall('setMessageEpochMaxAttestations', [newMax]);
|
|
721
|
+
const tx1 = await outpostManager.execute(opp.address, data1, {
|
|
722
|
+
gasLimit: 500_000,
|
|
723
|
+
});
|
|
724
|
+
const receipt1 = await tx1.wait(1);
|
|
725
|
+
console.log("setMessageEpochMaxAttestations confirmed:", receipt1);
|
|
726
|
+
|
|
727
|
+
if (sendModeTag !== 0n) {
|
|
728
|
+
const data2 = encodeOppCall('exitSendMode', [sendModeTag]);
|
|
729
|
+
const tx2 = await outpostManager.execute(opp.address, data2, {
|
|
730
|
+
gasLimit: 500_000,
|
|
731
|
+
});
|
|
732
|
+
const receipt2 = await tx2.wait(1);
|
|
733
|
+
console.log("exitSendMode confirmed:", receipt2);
|
|
734
|
+
return { setMaxReceipt: receipt1, exitReceipt: receipt2 };
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
return { setMaxReceipt: receipt1 };
|
|
738
|
+
} catch (err: any) {
|
|
739
|
+
let errorObj = formatContractErrors(err);
|
|
740
|
+
console.error("fixOppTooManyAttestations failed:", err?.message || err, errorObj);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
*/
|
|
744
|
+
}
|