@wireio/stake 0.0.6 → 0.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 +204 -15
- package/lib/stake.browser.js +69370 -4590
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +17899 -5514
- package/lib/stake.js +70103 -4900
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +69370 -4590
- package/lib/stake.m.js.map +1 -1
- package/package.json +6 -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 +985 -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/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/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/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 +344 -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/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/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/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 +548 -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/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 +1696 -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 +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/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/LiqEthBridge.dbg.json +4 -0
- package/src/assets/ethereum/hoodi/outpost/LiqEthBridge.sol/LiqEthBridge.json +1044 -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/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 +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/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/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/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/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/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/mainnet/liqEth/v1/accounting.sol/Accounting.json +542 -0
- 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/mainnet/liqEth/v1/stakingModule.sol/StakingModule.json +1772 -0
- 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/mainnet/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json +551 -0
- package/src/assets/ethereum/mainnet/outpost/OPP.sol/OPP.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPP.sol/OPP.json +948 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPP.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPP.json +88 -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/IOPPInbound.json +194 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPReceiver.json +29 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPSender.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/IOPPSender.json +36 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/OPPCommon.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPCommon.sol/OPPCommon.json +199 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpoint.sol/OPPEndpoint.json +273 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.json +394 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.json +378 -0
- package/src/assets/ethereum/mainnet/outpost/OPPErrors.sol/OPPErrors.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPErrors.sol/OPPErrors.json +224 -0
- package/src/assets/ethereum/mainnet/outpost/OPPInbound.sol/OPPInbound.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPInbound.sol/OPPInbound.json +1010 -0
- package/src/assets/ethereum/mainnet/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPReceiver.sol/OPPReceiver.json +291 -0
- package/src/assets/ethereum/mainnet/outpost/OPPSender.sol/OPPSender.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OPPSender.sol/OPPSender.json +298 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostErrors.sol/OutpostErrors.json +488 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManaged.sol/OutpostManaged.json +229 -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/OutpostManagerAuthority.sol/OutpostManagerAuthority.json +1432 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostManagerCommon.sol/IOutpostManager.json +130 -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/OutpostManagerCommon.sol/OutpostManagerCommon.json +141 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/OutpostOwnable.sol/OutpostOwnable.json +213 -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/mainnet/outpost/ReceiptNFT.sol/ReceiptNFT.json +2015 -0
- 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/mainnet/outpost/v1/BAR.sol/BAR.json +1871 -0
- 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/mainnet/outpost/v1/OutpostManager.sol/OutpostManager.json +730 -0
- package/src/assets/ethereum/mainnet/outpost/v1/Pool.sol/Pool.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/v1/Pool.sol/Pool.json +936 -0
- package/src/assets/ethereum/mainnet/outpost/v1/Pretoken.sol/Pretoken.dbg.json +4 -0
- package/src/assets/ethereum/mainnet/outpost/v1/Pretoken.sol/Pretoken.json +1665 -0
- 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 +8546 -0
- package/src/assets/solana/devnet/idl/liqsol_token.json +217 -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 +8552 -0
- package/src/assets/solana/devnet/types/liqsol_token.ts +223 -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/mainnet/idl/liqsol_core.json +6678 -0
- 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/mainnet/idl/validator_leaderboard.json +574 -0
- package/src/assets/solana/mainnet/types/liqsol_core.ts +6684 -0
- 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/mainnet/types/validator_leaderboard.ts +580 -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 +7 -8
- package/src/networks/ethereum/clients/convert.client.ts +221 -0
- package/src/networks/ethereum/clients/opp.client.ts +389 -0
- package/src/networks/ethereum/clients/pretoken.client.ts +165 -0
- package/src/networks/ethereum/clients/receipt.client.ts +199 -0
- package/src/networks/ethereum/clients/stake.client.ts +203 -0
- package/src/networks/ethereum/clients/validator.client.ts +61 -0
- package/src/networks/ethereum/contract.ts +438 -58
- package/src/networks/ethereum/ethereum.ts +591 -51
- package/src/networks/ethereum/types.ts +138 -2
- package/src/networks/ethereum/utils.ts +340 -0
- package/src/networks/solana/clients/convert.client.ts +341 -0
- package/src/networks/solana/clients/distribution.client.ts +304 -176
- package/src/networks/solana/clients/leaderboard.client.ts +85 -163
- package/src/networks/solana/clients/outpost.client.ts +325 -0
- package/src/networks/solana/clients/token.client.ts +210 -0
- package/src/networks/solana/constants.ts +152 -69
- package/src/networks/solana/program.ts +397 -102
- package/src/networks/solana/solana.ts +1208 -71
- package/src/networks/solana/types.ts +757 -0
- package/src/networks/solana/utils.ts +542 -93
- package/src/scripts/fetch-artifacts.sh +24 -0
- package/src/scripts/tsconfig.json +17 -0
- package/src/staker.ts +85 -0
- package/src/types.ts +364 -0
- package/src/assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.dbg.json +0 -4
- package/src/assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.json +0 -472
- package/src/assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.dbg.json +0 -4
- package/src/assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.json +0 -330
- package/src/assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.dbg.json +0 -4
- package/src/assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.json +0 -449
- package/src/assets/solana/idl/deposit.json +0 -260
- package/src/assets/solana/idl/distribution.json +0 -736
- package/src/assets/solana/idl/liq_sol_token.json +0 -275
- package/src/assets/solana/idl/stake_controller.json +0 -1788
- package/src/assets/solana/idl/stake_registry.json +0 -435
- package/src/assets/solana/idl/treasury.json +0 -336
- package/src/assets/solana/idl/validator_leaderboard.json +0 -528
- package/src/assets/solana/idl/validator_registry.json +0 -418
- package/src/assets/solana/idl/yield_oracle.json +0 -32
- package/src/assets/solana/types/deposit.ts +0 -266
- package/src/assets/solana/types/distribution.ts +0 -742
- package/src/assets/solana/types/liq_sol_token.ts +0 -281
- package/src/assets/solana/types/stake_controller.ts +0 -1794
- package/src/assets/solana/types/stake_registry.ts +0 -441
- package/src/assets/solana/types/treasury.ts +0 -342
- package/src/assets/solana/types/validator_leaderboard.ts +0 -534
- package/src/assets/solana/types/validator_registry.ts +0 -424
- package/src/assets/solana/types/yield_oracle.ts +0 -38
- package/src/networks/solana/clients/deposit.client.ts +0 -178
- package/src/staker/staker.ts +0 -56
- package/src/staker/types.ts +0 -41
- package/src/utils.ts +0 -9
|
@@ -1,179 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
address: VALIDATOR_LEADERBOARD_PROGRAM_ID.toString(),
|
|
21
|
-
};
|
|
22
|
-
return new Program(idlWithAddress as any, this.provider) as Program<ValidatorLeaderboard>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** Derive the PDA for the leaderboard head */
|
|
26
|
-
deriveHeadPDA(): PublicKey {
|
|
27
|
-
return deriveLeaderboardHeadPDA()[0];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** Derive the PDA for a given validator record */
|
|
31
|
-
deriveRecordPDA(voteAccount: PublicKey): PublicKey {
|
|
32
|
-
return deriveValidatorRecordPDA(voteAccount)[0];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Build the initialize instruction as a Transaction
|
|
37
|
-
*/
|
|
38
|
-
async buildInitializeTransaction(authority: PublicKey): Promise<Transaction> {
|
|
39
|
-
const [headPda] = deriveLeaderboardHeadPDA();
|
|
40
|
-
const ix = await this.program.methods
|
|
41
|
-
.initialize()
|
|
42
|
-
.accounts({
|
|
43
|
-
authority,
|
|
44
|
-
leaderboardHead: headPda,
|
|
45
|
-
systemProgram: SystemProgram.programId,
|
|
46
|
-
} as any)
|
|
47
|
-
.instruction();
|
|
48
|
-
|
|
49
|
-
return new Transaction().add(ix);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Build an updateValidator transaction
|
|
54
|
-
*/
|
|
55
|
-
async buildUpdateValidatorTransaction(params: {
|
|
56
|
-
authority: PublicKey;
|
|
57
|
-
registrant: PublicKey;
|
|
58
|
-
voteAccount: PublicKey;
|
|
59
|
-
vpp: number;
|
|
60
|
-
insertAfter?: PublicKey;
|
|
61
|
-
insertBefore?: PublicKey;
|
|
62
|
-
currentPrev?: PublicKey;
|
|
63
|
-
currentNext?: PublicKey;
|
|
64
|
-
}): Promise<Transaction> {
|
|
65
|
-
const { authority, registrant, voteAccount, vpp, insertAfter, insertBefore, currentPrev, currentNext } = params;
|
|
66
|
-
const [headPda] = deriveLeaderboardHeadPDA();
|
|
67
|
-
const [recPda] = deriveValidatorRecordPDA(voteAccount);
|
|
68
|
-
|
|
69
|
-
const accounts: any = {
|
|
70
|
-
registrant,
|
|
71
|
-
voteAccount,
|
|
72
|
-
validatorRecord: recPda,
|
|
73
|
-
leaderboardHead: headPda,
|
|
74
|
-
systemProgram: SystemProgram.programId,
|
|
75
|
-
...(insertAfter && { insertAfter }),
|
|
76
|
-
...(insertBefore && { insertBefore }),
|
|
77
|
-
...(currentPrev && { currentPrev }),
|
|
78
|
-
...(currentNext && { currentNext }),
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const ix = await this.program.methods
|
|
82
|
-
.updateValidator(new BN(vpp))
|
|
83
|
-
.accounts(accounts)
|
|
84
|
-
.instruction();
|
|
85
|
-
|
|
86
|
-
return new Transaction().add(ix);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Build an updateTop10Cache transaction
|
|
91
|
-
*/
|
|
92
|
-
async buildUpdateTop10CacheTransaction(params: {
|
|
93
|
-
authority: PublicKey;
|
|
94
|
-
top10Validators: PublicKey[];
|
|
95
|
-
}): Promise<Transaction> {
|
|
96
|
-
const { authority, top10Validators } = params;
|
|
97
|
-
if (top10Validators.length !== 10) {
|
|
98
|
-
throw new Error('Must supply exactly 10 validators');
|
|
99
|
-
}
|
|
100
|
-
const [cachePda] = deriveTop10CachePDA();
|
|
101
|
-
const ix = await this.program.methods
|
|
102
|
-
.updateTop10Cache(top10Validators)
|
|
103
|
-
.accounts({ authority, cache: cachePda, systemProgram: SystemProgram.programId } as any)
|
|
104
|
-
.instruction();
|
|
105
|
-
|
|
106
|
-
return new Transaction().add(ix);
|
|
1
|
+
import { AnchorProvider, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
|
3
|
+
|
|
4
|
+
import { SolanaProgramService, ValidatorLeaderboardClientIdl } from '../program';
|
|
5
|
+
import { LeaderboardState, ValidatorRecord } from '../types';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Simple read client for the validator_leaderboard program.
|
|
9
|
+
*
|
|
10
|
+
* Adjust account names/fields to match your IDL (state, validatorRecord, etc).
|
|
11
|
+
*/
|
|
12
|
+
export class LeaderboardClient {
|
|
13
|
+
private program: Program<ValidatorLeaderboardClientIdl>;
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
private readonly provider: AnchorProvider,
|
|
17
|
+
private readonly pgs: SolanaProgramService
|
|
18
|
+
) {
|
|
19
|
+
this.program = pgs.getProgram('validatorLeaderboard');
|
|
107
20
|
}
|
|
108
21
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*/
|
|
112
|
-
async getCachedTop10(): Promise<PublicKey[]> {
|
|
113
|
-
const [cachePda] = deriveTop10CachePDA();
|
|
114
|
-
return this.program.methods
|
|
115
|
-
.getCachedTop10()
|
|
116
|
-
.accounts({ cache: cachePda } as any)
|
|
117
|
-
.view();
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Traverse the on-chain linked list and return the sequence of PublicKeys
|
|
122
|
-
*/
|
|
123
|
-
async getLeaderboard(): Promise<PublicKey[]> {
|
|
124
|
-
const [headPda] = deriveLeaderboardHeadPDA();
|
|
125
|
-
let headAccount;
|
|
22
|
+
async getState(): Promise<LeaderboardState | null> {
|
|
23
|
+
const pda = this.pgs.deriveLeaderboardStatePda();
|
|
126
24
|
try {
|
|
127
|
-
|
|
25
|
+
// Assumes account name "leaderboardState"
|
|
26
|
+
return await this.program.account.leaderboardState.fetch(pda);
|
|
128
27
|
} catch {
|
|
129
|
-
return
|
|
130
|
-
}
|
|
131
|
-
const result: PublicKey[] = [];
|
|
132
|
-
let cursor: PublicKey = headAccount.nextValidator;
|
|
133
|
-
while (cursor && !cursor.equals(PublicKey.default)) {
|
|
134
|
-
result.push(cursor);
|
|
135
|
-
const rec = await this.program.account.validatorRecord.fetch(cursor);
|
|
136
|
-
cursor = rec.nextValidator;
|
|
28
|
+
return null;
|
|
137
29
|
}
|
|
138
|
-
return result;
|
|
139
30
|
}
|
|
140
31
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
*/
|
|
144
|
-
async getRecord(voteAccount: PublicKey): Promise<any | null> {
|
|
145
|
-
const [recPda] = deriveValidatorRecordPDA(voteAccount);
|
|
32
|
+
async getValidatorRecord(voteAccount: PublicKey): Promise<ValidatorRecord | null> {
|
|
33
|
+
const pda = this.pgs.deriveValidatorRecordPda(voteAccount);
|
|
146
34
|
try {
|
|
147
|
-
|
|
35
|
+
// Assumes account name "validatorRecord"
|
|
36
|
+
return await this.program.account.validatorRecord.fetchNullable(pda);
|
|
148
37
|
} catch {
|
|
149
38
|
return null;
|
|
150
39
|
}
|
|
151
40
|
}
|
|
152
41
|
|
|
153
42
|
/**
|
|
154
|
-
*
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Simulate a single-IX Transaction; returns any err + compute units consumed
|
|
43
|
+
* Convenience helper to fetch and return top validators ordered
|
|
44
|
+
* by the on-chain leaderboard scores.
|
|
45
|
+
*
|
|
46
|
+
* Uses:
|
|
47
|
+
* - `leaderboardState.scores`
|
|
48
|
+
* - `leaderboardState.sortedIndices`
|
|
49
|
+
* - `validatorRecord.registryIndex`
|
|
50
|
+
*
|
|
51
|
+
* Fallback: if leaderboardState can't be fetched, we sort by
|
|
52
|
+
* `creditsObserved` descending.
|
|
168
53
|
*/
|
|
169
|
-
async
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
54
|
+
async getTopValidators(limit = 20): Promise<ValidatorRecord[]> {
|
|
55
|
+
// Try to use the leaderboard state first
|
|
56
|
+
try {
|
|
57
|
+
const leaderboardPda = this.pgs.deriveLeaderboardStatePda();
|
|
58
|
+
const leaderboard: LeaderboardState
|
|
59
|
+
= await this.program.account.leaderboardState.fetch(leaderboardPda);
|
|
60
|
+
|
|
61
|
+
const all = await this.program.account.validatorRecord.all();
|
|
62
|
+
const byIndex = new Map<number, ValidatorRecord>();
|
|
63
|
+
|
|
64
|
+
for (const r of all) {
|
|
65
|
+
const vr = r.account;
|
|
66
|
+
byIndex.set(vr.registryIndex, vr);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const max = Math.min(
|
|
70
|
+
limit,
|
|
71
|
+
leaderboard.numValidators,
|
|
72
|
+
leaderboard.sortedIndices.length,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const top: ValidatorRecord[] = [];
|
|
76
|
+
for (let i = 0; i < max; i++) {
|
|
77
|
+
const idx = leaderboard.sortedIndices[i];
|
|
78
|
+
const rec = byIndex.get(idx);
|
|
79
|
+
if (rec) {
|
|
80
|
+
top.push(rec);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return top;
|
|
85
|
+
} catch (e) {
|
|
86
|
+
// Fallback: no leaderboardState available, sort by creditsObserved.
|
|
87
|
+
const all = await this.program.account.validatorRecord.all();
|
|
88
|
+
|
|
89
|
+
all.sort((a, b) => {
|
|
90
|
+
const va = a.account;
|
|
91
|
+
const vb = b.account;
|
|
92
|
+
const ca = va.creditsObserved;
|
|
93
|
+
const cb = vb.creditsObserved;
|
|
94
|
+
// BN.cmp: -1 if a < b, 0 if equal, 1 if a > b
|
|
95
|
+
return cb.cmp(ca);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
return all.slice(0, limit).map(r => r.account);
|
|
99
|
+
}
|
|
178
100
|
}
|
|
179
|
-
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { AnchorProvider, BN, Program } from '@coral-xyz/anchor';
|
|
2
|
+
import {
|
|
3
|
+
PublicKey,
|
|
4
|
+
SystemProgram,
|
|
5
|
+
TransactionInstruction,
|
|
6
|
+
} from '@solana/web3.js';
|
|
7
|
+
import {
|
|
8
|
+
ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
9
|
+
TOKEN_2022_PROGRAM_ID,
|
|
10
|
+
} from '@solana/spl-token';
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
OutpostAccounts,
|
|
14
|
+
buildOutpostAccounts,
|
|
15
|
+
safeFetch,
|
|
16
|
+
} from '../utils';
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
OutpostWireStateSnapshot,
|
|
20
|
+
SharesPreview,
|
|
21
|
+
TrancheState,
|
|
22
|
+
WalletLike,
|
|
23
|
+
} from '../types';
|
|
24
|
+
import { INDEX_SCALE } from '../constants';
|
|
25
|
+
import { LiqsolCoreClientIdl, SolanaProgramService } from '../program';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* OutpostClient
|
|
29
|
+
*
|
|
30
|
+
* Read-only + preview helper for:
|
|
31
|
+
* - Outpost config + per-user pretokens
|
|
32
|
+
* - Tranche ladder snapshot
|
|
33
|
+
* - Pretoken preview math
|
|
34
|
+
*
|
|
35
|
+
* Write helpers:
|
|
36
|
+
* - buildStakeIx → liqsol_core::synd
|
|
37
|
+
* - buildUnstakeIx → liqsol_core::desynd
|
|
38
|
+
*
|
|
39
|
+
* All PDAs / ATAs are sourced via buildOutpostAccounts, which is kept
|
|
40
|
+
* in sync with the on-chain PDAs and capital-staking Wire utils.
|
|
41
|
+
*/
|
|
42
|
+
export class OutpostClient {
|
|
43
|
+
private readonly program: Program<LiqsolCoreClientIdl>;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
private readonly provider: AnchorProvider,
|
|
47
|
+
private readonly pgs: SolanaProgramService,
|
|
48
|
+
) {
|
|
49
|
+
this.program = pgs.getProgram('liqsolCore');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get connection() {
|
|
53
|
+
return this.provider.connection;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get wallet(): WalletLike {
|
|
57
|
+
return this.provider.wallet as unknown as WalletLike;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Build all outpost-related PDAs / ATAs for a given user.
|
|
62
|
+
* Defaults to the connected wallet.
|
|
63
|
+
*/
|
|
64
|
+
async buildAccounts(user?: PublicKey): Promise<OutpostAccounts> {
|
|
65
|
+
const userPk = user ?? this.wallet.publicKey;
|
|
66
|
+
if (!userPk) {
|
|
67
|
+
throw new Error('OutpostClient.buildAccounts: wallet not connected');
|
|
68
|
+
}
|
|
69
|
+
return buildOutpostAccounts(this.connection, userPk, this.pgs);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Internal helper: get raw token balance (BN) for a given ATA.
|
|
74
|
+
*/
|
|
75
|
+
private async getTokenBalance(ata: PublicKey): Promise<BN> {
|
|
76
|
+
const bal = await this.connection.getTokenAccountBalance(ata);
|
|
77
|
+
return new BN(bal.value.amount);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Fetch an OutpostAccount, handling legacy accounts that pre-date the
|
|
82
|
+
* three trailing Option<u64> fields. If the normal decode throws a
|
|
83
|
+
* RangeError we re-fetch the raw data, pad it to the expected size
|
|
84
|
+
* (zeros → Option::None for each missing field), and let Anchor's
|
|
85
|
+
* coder decode the padded buffer.
|
|
86
|
+
*/
|
|
87
|
+
private async fetchOutpostAccount(address: PublicKey) {
|
|
88
|
+
try {
|
|
89
|
+
return await this.program.account.outpostAccount.fetchNullable(address);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
if (!(e instanceof RangeError)) throw e;
|
|
92
|
+
|
|
93
|
+
const info = await this.connection.getAccountInfo(address);
|
|
94
|
+
if (!info) return null;
|
|
95
|
+
|
|
96
|
+
// 3 × Option<u64> encoded as 1-byte tag (0x00 = None) = 3 bytes
|
|
97
|
+
// when present (Some) each is 9 bytes, but None is just 0x00
|
|
98
|
+
const EXPECTED_SIZE = info.data.length + 3;
|
|
99
|
+
const padded = Buffer.alloc(EXPECTED_SIZE);
|
|
100
|
+
info.data.copy(padded);
|
|
101
|
+
// trailing bytes are already 0x00 → Option::None for each field
|
|
102
|
+
|
|
103
|
+
return this.program.coder.accounts.decode(
|
|
104
|
+
'outpostAccount',
|
|
105
|
+
padded,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Fetch the core "Wire state" for Outpost / pretokens for a given user.
|
|
112
|
+
*/
|
|
113
|
+
async fetchWireState(user?: PublicKey): Promise<OutpostWireStateSnapshot> {
|
|
114
|
+
const userPk = user ?? this.wallet.publicKey;
|
|
115
|
+
if (!userPk) throw new Error('OutpostClient.fetchWireState: wallet not connected');
|
|
116
|
+
|
|
117
|
+
const pdas = await this.buildAccounts(userPk);
|
|
118
|
+
const [
|
|
119
|
+
globalState,
|
|
120
|
+
outpostAccount,
|
|
121
|
+
distributionState,
|
|
122
|
+
userPretokenRecord,
|
|
123
|
+
trancheState,
|
|
124
|
+
liqsolPoolBalance,
|
|
125
|
+
userLiqsolBalance,
|
|
126
|
+
] = await Promise.all([
|
|
127
|
+
safeFetch(this.program.account.globalState.fetch(pdas.globalState), 'globalState'),
|
|
128
|
+
safeFetch(this.fetchOutpostAccount(pdas.outpostAccount), 'outpostAccount'),
|
|
129
|
+
safeFetch(this.program.account.distributionState.fetchNullable(pdas.distributionState), 'distributionState'),
|
|
130
|
+
safeFetch(this.program.account.userPretokenRecord.fetchNullable(pdas.userPretokenRecord), 'userPretokenRecord'),
|
|
131
|
+
safeFetch(this.program.account.trancheState.fetchNullable(pdas.trancheState), 'trancheState'),
|
|
132
|
+
safeFetch(this.getTokenBalance(pdas.liqsolPoolAta), 'liqsolPoolAta'),
|
|
133
|
+
safeFetch(this.getTokenBalance(pdas.userAta), 'userAta'),
|
|
134
|
+
]);
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
globalState,
|
|
138
|
+
outpostAccount,
|
|
139
|
+
distributionState,
|
|
140
|
+
trancheState,
|
|
141
|
+
userPretokenRecord,
|
|
142
|
+
liqsolPoolBalance,
|
|
143
|
+
userLiqsolBalance,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
// -------------------------------------------------------------------------
|
|
150
|
+
// Outpost stake / unstake builders (synd / desynd)
|
|
151
|
+
// -------------------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Build the `synd` (stake) instruction:
|
|
155
|
+
* user liqSOL ATA → liqSOL pool ATA
|
|
156
|
+
*/
|
|
157
|
+
async buildStakeIx(
|
|
158
|
+
amountLamports: bigint,
|
|
159
|
+
user: PublicKey = this.wallet.publicKey,
|
|
160
|
+
): Promise<TransactionInstruction> {
|
|
161
|
+
if (!user) {
|
|
162
|
+
throw new Error('OutpostClient.buildStakeIx: wallet not connected');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const a = await this.buildAccounts(user);
|
|
166
|
+
|
|
167
|
+
const globalConfig = this.pgs.deriveGlobalConfigPda();
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
return this.program.methods
|
|
171
|
+
.synd(new BN(amountLamports.toString()))
|
|
172
|
+
.accounts({
|
|
173
|
+
user,
|
|
174
|
+
liqsolMint: a.liqsolMint,
|
|
175
|
+
globalState: a.globalState,
|
|
176
|
+
distributionState: a.distributionState,
|
|
177
|
+
userAta: a.userAta,
|
|
178
|
+
poolAuthority: a.poolAuthority,
|
|
179
|
+
bucketAuthority: a.bucketAuthority,
|
|
180
|
+
bucketTokenAccount: a.bucketTokenAccount,
|
|
181
|
+
bucketUserRecord: a.bucketUserRecord,
|
|
182
|
+
senderUserRecord: a.userUserRecord,
|
|
183
|
+
receiverUserRecord: a.liqsolPoolUserRecord,
|
|
184
|
+
extraAccountMetaList: a.extraAccountMetaList,
|
|
185
|
+
liqsolCoreProgram: this.pgs.PROGRAM_IDS.LIQSOL_CORE,
|
|
186
|
+
transferHookProgram: this.pgs.PROGRAM_IDS.TRANSFER_HOOK,
|
|
187
|
+
liqsolPoolAta: a.liqsolPoolAta,
|
|
188
|
+
outpostAccount: a.outpostAccount,
|
|
189
|
+
tokenProgram: TOKEN_2022_PROGRAM_ID,
|
|
190
|
+
associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
191
|
+
systemProgram: SystemProgram.programId,
|
|
192
|
+
pretokenPurchaseHistory: a.pretokenPurchaseHistory,
|
|
193
|
+
globalConfig: globalConfig,
|
|
194
|
+
} as any)
|
|
195
|
+
.instruction();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Build the `desynd` (unstake) instruction:
|
|
200
|
+
* liqSOL pool ATA → user liqSOL ATA
|
|
201
|
+
*/
|
|
202
|
+
async buildUnstakeIx(
|
|
203
|
+
amountLamports: bigint,
|
|
204
|
+
user?: PublicKey,
|
|
205
|
+
): Promise<TransactionInstruction> {
|
|
206
|
+
const userPk = user ?? this.wallet.publicKey;
|
|
207
|
+
if (!userPk) {
|
|
208
|
+
throw new Error('OutpostClient.buildUnstakeIx: wallet not connected');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const a = await this.buildAccounts(userPk);
|
|
212
|
+
|
|
213
|
+
return this.program.methods
|
|
214
|
+
.desynd(new BN(amountLamports.toString()))
|
|
215
|
+
.accounts({
|
|
216
|
+
user: userPk,
|
|
217
|
+
liqsolMint: a.liqsolMint,
|
|
218
|
+
globalState: a.globalState,
|
|
219
|
+
distributionState: a.distributionState,
|
|
220
|
+
userAta: a.userAta,
|
|
221
|
+
poolAuthority: a.poolAuthority,
|
|
222
|
+
bucketAuthority: a.bucketAuthority,
|
|
223
|
+
bucketTokenAccount: a.bucketTokenAccount,
|
|
224
|
+
bucketUserRecord: a.bucketUserRecord,
|
|
225
|
+
senderUserRecord: a.liqsolPoolUserRecord,
|
|
226
|
+
receiverUserRecord: a.userUserRecord,
|
|
227
|
+
extraAccountMetaList: a.extraAccountMetaList,
|
|
228
|
+
liqsolCoreProgram: this.pgs.PROGRAM_IDS.LIQSOL_CORE,
|
|
229
|
+
transferHookProgram: this.pgs.PROGRAM_IDS.TRANSFER_HOOK,
|
|
230
|
+
liqsolPoolAta: a.liqsolPoolAta,
|
|
231
|
+
outpostAccount: a.outpostAccount,
|
|
232
|
+
tokenProgram: TOKEN_2022_PROGRAM_ID,
|
|
233
|
+
systemProgram: SystemProgram.programId,
|
|
234
|
+
associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
|
|
235
|
+
pretokenPurchaseHistory: a.pretokenPurchaseHistory,
|
|
236
|
+
} as any)
|
|
237
|
+
.instruction();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// -------------------------------------------------------------------------
|
|
241
|
+
// Pretoken preview helper (unchanged)
|
|
242
|
+
// -------------------------------------------------------------------------
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Local preview for "how many pretokens would I get for this liqSOL
|
|
246
|
+
* amount at the current tranche price and SOL/USD price?"
|
|
247
|
+
*
|
|
248
|
+
* SCALE = 1e8
|
|
249
|
+
* usdValue = solAmountLamports * solPriceUsd / 1e9
|
|
250
|
+
* pretokens = usdValue * SCALE / pretokenPriceUsd
|
|
251
|
+
*
|
|
252
|
+
* All values are BN integers; solPriceUsd and pretokenPriceUsd are 1e8 scaled.
|
|
253
|
+
*/
|
|
254
|
+
previewPretokens(params: {
|
|
255
|
+
liqsolAmountLamports: BN;
|
|
256
|
+
solPriceUsd: BN; // 1e8 scale
|
|
257
|
+
trancheState: TrancheState;
|
|
258
|
+
}): SharesPreview {
|
|
259
|
+
const { liqsolAmountLamports, solPriceUsd, trancheState } = params;
|
|
260
|
+
|
|
261
|
+
// Current tranche price in USD (1e8 scale)
|
|
262
|
+
const pretokenPriceUsd = new BN(
|
|
263
|
+
trancheState.currentTranchePriceUsd.toString(),
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
const SCALE = new BN('100000000'); // 1e8
|
|
267
|
+
|
|
268
|
+
// usdValue = (lamports * solPriceUsd) / 1e9
|
|
269
|
+
const usdValue = liqsolAmountLamports
|
|
270
|
+
.mul(solPriceUsd)
|
|
271
|
+
.div(new BN(1_000_000_000));
|
|
272
|
+
|
|
273
|
+
const estimatedPretokens = usdValue.mul(SCALE).div(pretokenPriceUsd);
|
|
274
|
+
|
|
275
|
+
return {
|
|
276
|
+
liqsolAmountLamports,
|
|
277
|
+
solPriceUsd,
|
|
278
|
+
pretokenPriceUsd,
|
|
279
|
+
estimatedPretokens,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Convert liqSOL tokens (lamports) → Outpost “shares”, rounding UP
|
|
285
|
+
* when there is any remainder.
|
|
286
|
+
*
|
|
287
|
+
* This matches the on-chain logic and the capital-staking helper:
|
|
288
|
+
*
|
|
289
|
+
* INDEX_SCALE = 1e12
|
|
290
|
+
* numerator = amount * INDEX_SCALE
|
|
291
|
+
* shares = numerator / currentIndex
|
|
292
|
+
* remainder = numerator % currentIndex
|
|
293
|
+
* if remainder > 0 → shares + 1
|
|
294
|
+
*/
|
|
295
|
+
static tokensToShares(amount: BN, currentIndex: BN): BN {
|
|
296
|
+
const numerator = amount.mul(new BN(INDEX_SCALE));
|
|
297
|
+
const shares = numerator.div(currentIndex);
|
|
298
|
+
const remainder = numerator.mod(currentIndex);
|
|
299
|
+
return remainder.eqn(0) ? shares : shares.addn(1);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Format a 1e8-scaled integer (e.g. USD price, pretokens, etc.)
|
|
304
|
+
* into a fixed 8-decimal string.
|
|
305
|
+
*
|
|
306
|
+
* Examples:
|
|
307
|
+
* 0 -> "0.00000000"
|
|
308
|
+
* 1 -> "0.00000001"
|
|
309
|
+
* 100000000 -> "1.00000000"
|
|
310
|
+
* 123456789 -> "1.23456789"
|
|
311
|
+
*/
|
|
312
|
+
static formatScale8(value: BN): string {
|
|
313
|
+
const decimals = 8;
|
|
314
|
+
const valueStr = value.toString();
|
|
315
|
+
|
|
316
|
+
if (valueStr.length <= decimals) {
|
|
317
|
+
const padding = '0'.repeat(decimals - valueStr.length);
|
|
318
|
+
return `0.${padding}${valueStr}`;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const intPart = valueStr.slice(0, valueStr.length - decimals);
|
|
322
|
+
const decPart = valueStr.slice(valueStr.length - decimals);
|
|
323
|
+
return `${intPart}.${decPart}`;
|
|
324
|
+
}
|
|
325
|
+
}
|