@wireio/stake 0.4.3 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/stake.browser.js +12820 -6787
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +353 -209
- package/lib/stake.js +12940 -6886
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +12820 -6787
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/ethereum/ABI/common/Base58.sol/Base58.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/Base58.sol/Base58.json +164 -0
- package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/OpenZepArtifacts.sol/__Dummy_OZ_UUPS__.json +76 -0
- package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/RestrictedCallers.sol/RestrictedCallers.json +10 -0
- package/src/assets/ethereum/ABI/common/iodata.sol/iodata.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/iodata.sol/iodata.json +618 -0
- package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/iodata_util.sol/iodata_util.json +40 -0
- package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_data.sol/sysio_data.json +10 -0
- package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_errors.sol/sysio_errors.json +10 -0
- package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.json +233 -0
- package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_name.sol/sysio_name.json +49 -0
- package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_pubkey.sol/sysio_pubkey.json +64 -0
- package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_read.sol/sysio_read.json +1458 -0
- package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_tester.sol/SysioTester.json +1532 -0
- package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_verify.sol/sysio_verify.json +1525 -0
- package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.dbg.json +4 -0
- package/src/assets/ethereum/ABI/common/sysio_write.sol/sysio_write.json +1076 -0
- package/src/assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +28 -2
- package/src/assets/ethereum/ABI/liqEth/LiqEthAuthority.sol/LiqEthAuthority.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20Pausable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/LiqEthManaged.sol/LiqEthManaged.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20Upgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20PausableUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +2 -15
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +6 -25
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.json +2 -2
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json +6 -25
- package/src/assets/ethereum/ABI/outpost/BAR.sol/BAR.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json +26 -26
- package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/AggregatorV3Interface.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPP.sol/OPP.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPP.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPEndpoint.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPInbound.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPReceiver.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/IOPPSender.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPCommon.sol/OPPCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPEndpoint.sol/OPPEndpoint.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPEndpointManaged.sol/OPPEndpointManaged.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPEndpointOwnable.sol/OPPEndpointOwnable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPErrors.sol/OPPErrors.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPInbound.sol/OPPInbound.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPReceiver.sol/OPPReceiver.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OPPSender.sol/OPPSender.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostErrors.sol/OutpostErrors.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManaged.sol/OutpostManaged.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManager.sol/OutpostManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostManager.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/IOutpostUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostManagerCommon.sol/OutpostManagerCommon.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/OutpostOwnable.sol/OutpostOwnable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Pool.sol/Pool.json +2 -2
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/Pretoken.sol/Pretoken.json +9 -9
- package/src/assets/ethereum/ABI/outpost/ReceiptNFT.sol/ReceiptNFT.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/interfaces/IPretoken.sol/IPretoken.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/interfaces/IWarrant.sol/IWarrant.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/token/ERC721EthEquivalentVotesUpgradeable.sol/ERC721EthEquivalentVotesUpgradeable.dbg.json +1 -1
- package/src/assets/ethereum/ABI/outpost/token/IERC721EthEquivalent.sol/IERC721EthEquivalent.dbg.json +1 -1
- package/src/assets/solana/idl/liqsol_core.json +132 -182
- package/src/assets/solana/types/liqsol_core.ts +132 -182
- package/src/networks/ethereum/clients/convert.client.ts +2 -2
- package/src/networks/ethereum/clients/pretoken.client.ts +8 -9
- package/src/networks/ethereum/clients/stake.client.ts +4 -7
- package/src/networks/ethereum/contract.ts +112 -59
- package/src/networks/ethereum/ethereum.ts +144 -56
- package/src/networks/ethereum/types.ts +26 -17
- package/src/networks/ethereum/utils.ts +8 -8
- package/src/networks/solana/clients/deposit.client.ts +25 -7
- package/src/networks/solana/clients/distribution.client.ts +119 -1
- package/src/networks/solana/clients/outpost.client.ts +34 -28
- package/src/networks/solana/constants.ts +0 -3
- package/src/networks/solana/solana.ts +145 -12
- package/src/networks/solana/types.ts +132 -9
- package/src/networks/solana/utils.ts +14 -7
- package/src/types.ts +19 -11
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZExtras.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZVec48.json +0 -10
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +0 -4
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +0 -291
- package/src/staker/types.ts +0 -62
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides a unified service for interacting with Ethereum smart contracts using ethers.js.
|
|
5
5
|
*/
|
|
6
|
+
|
|
7
|
+
// LiqETH Artifacts
|
|
6
8
|
import AccountingArtifact from '../../assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json';
|
|
7
9
|
import DepositManagerArtifact from '../../assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json';
|
|
8
10
|
import LiqEthArtifact from '../../assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.json';
|
|
9
11
|
import StakingModuleArtifact from '../../assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json';
|
|
10
12
|
import WithdrawalQueueArtifact from '../../assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.json';
|
|
11
13
|
import WithdrawalVaultArtifact from '../../assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json';
|
|
14
|
+
import BeaconStateArtifact from '../../assets/ethereum/ABI/liqEth/BeaconState.sol/BeaconState.json';
|
|
15
|
+
import YieldOracleArtifact from '../../assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json';
|
|
12
16
|
|
|
13
17
|
// Outpost Artifacts
|
|
14
18
|
import DepositorArtifact from '../../assets/ethereum/ABI/outpost/Depositor.sol/Depositor.json';
|
|
@@ -22,7 +26,15 @@ import PretokenArtifact from '../../assets/ethereum/ABI/outpost/Pretoken.sol/Pre
|
|
|
22
26
|
import AggregatorArtifact from '../../assets/ethereum/ABI/outpost/Aggregator.sol/Aggregator.json';
|
|
23
27
|
import EthUsdPriceConsumerArtifact from '../../assets/ethereum/ABI/outpost/EthUsdPriceConsumer.sol/EthUsdPriceConsumer.json';
|
|
24
28
|
import PoolArtifact from '../../assets/ethereum/ABI/outpost/Pool.sol/Pool.json';
|
|
29
|
+
import OutpostManagerAuthorityArtifact from '../../assets/ethereum/ABI/outpost/OutpostManagerAuthority.sol/OutpostManagerAuthority.json';
|
|
30
|
+
|
|
31
|
+
// Common Artifacts
|
|
32
|
+
import IodataArtifact from '../../assets/ethereum/ABI/common/iodata.sol/iodata.json';
|
|
33
|
+
import Base58Artifact from '../../assets/ethereum/ABI/common/Base58.sol/Base58.json';
|
|
34
|
+
import sysio_merkleArtifact from '../../assets/ethereum/ABI/common/sysio_merkle.sol/sysio_merkle.json';
|
|
35
|
+
import sysio_writeArtifact from '../../assets/ethereum/ABI/common/sysio_write.sol/sysio_write.json';
|
|
25
36
|
|
|
37
|
+
// ERC Token Artifacts
|
|
26
38
|
import ERC20Artifact from '../../assets/ethereum/ABI/token/ERC20Token.sol/ERC20Token.json';
|
|
27
39
|
import ERC721Artifact from '../../assets/ethereum/ABI/token/ERC721Token.sol/ERC721Token.json';
|
|
28
40
|
import ERC1155Artifact from '../../assets/ethereum/ABI/token/ERC1155Token.sol/ERC1155Token.json';
|
|
@@ -43,25 +55,33 @@ export const ERC1155Abi = ERC1155Artifact.abi;
|
|
|
43
55
|
// Make sure ContractName in ./types includes all of these keys.
|
|
44
56
|
export const ADDRESSES: AddressBook = {
|
|
45
57
|
// LiqETH contracts
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
LiqEthAuthority: "0x9686E04F30Fa93496B7d7fE0FBc2e4e0aD52891E",
|
|
59
|
+
BeaconState: "0x207b249d7a83F6E9FCa04a1CD9b484D4f4f9aD2D",
|
|
60
|
+
WithdrawalQueue: "0x9a575c7Acce9e616cD07A0BDb2D28866027b75Ae",
|
|
61
|
+
LiqEthToken: "0x5f7192fa756304b255F6F9C1123426Db6A1Db748",
|
|
62
|
+
Accounting: "0xBAbAd5219f022B29282b904ceEaeBB7ab1b069fC",
|
|
63
|
+
DepositManager: "0x2e1986508472805c1649e4BBB424879B89720741",
|
|
64
|
+
WithdrawalVault: "0xC82FAf3Fed135B70A7E797864F504819a98E96c4",
|
|
65
|
+
StakingModule: "0xdd24EffAa4B42f3273E2b44995639119c08daBea",
|
|
66
|
+
YieldOracle: "0x56A27E1d10d4aEc7402dC26693fb7c0Eb66eF802",
|
|
52
67
|
|
|
53
68
|
//Outpost contracts
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
OutpostManagerAuthority: "0xAEcd2aa6EeFa4Aa7Cb9368728aA89Ca59Aa9ea59",
|
|
70
|
+
iodata: "0x2c2ab53F6Bc146bd31B459E832Ce0B9Da78712d8",
|
|
71
|
+
Base58: "0x9F188Ec124c9ad9bF6D195650d8360Fd052F585A",
|
|
72
|
+
sysio_merkle: "0x6eDA3C4c34421Cd667800C17fe33E48f5698e004",
|
|
73
|
+
ReceiptNFT: "0xd083051d9bb8353875abCecAB50C6e4FB5e527a8",
|
|
74
|
+
MockAggregator: "0xFCfc3ddd4CBd9Ad3b3af3A374B8bdA1b66eE6FFF",
|
|
75
|
+
Pool: "0xee5F11aC9b104c18d2423f266c5E737fC95ebA92",
|
|
76
|
+
OutpostManager: "0xB1B6ba7FA156652849069aC7ADB281283D235B9f",
|
|
77
|
+
sysio_write: "0xEfA608136d372349C09a7aA57665C09Fb4a620Ca",
|
|
78
|
+
EthUsdPriceConsumer: "0x6337A23b61f98b1526faF2848385Abe9cB4cFF21",
|
|
79
|
+
BAR: "0x9264eAA449da94caF70Fc18522021a94C8DF32Fb",
|
|
80
|
+
OPPCommon: "0x86A8cA16ce521De3EBdd1C541fAf188795b59FD0",
|
|
81
|
+
OPP: "0x79e8395Bb5131FB285aCEE5329BB43E66f50F88C",
|
|
82
|
+
Pretoken: "0x62f98AF2f9C3EF4eF2fA7bc0245BD5a9315E7541",
|
|
83
|
+
OPPInbound: "0xC85f57Ff069711e0b3472De3963bd2fC2FEfF3e2",
|
|
84
|
+
Depositor: "0xb0BACAb6f13dd96281300be13a6346461b2f35F3"
|
|
65
85
|
};
|
|
66
86
|
|
|
67
87
|
export type Contracts<T extends string = ContractName> = Record<T, ContractConfig>;
|
|
@@ -76,76 +96,109 @@ export type ContractConfig = {
|
|
|
76
96
|
// -----------------------------------------------------------------------------
|
|
77
97
|
|
|
78
98
|
export const CONTRACTS: Contracts<ContractName> = {
|
|
99
|
+
// LiqETH Contracts
|
|
100
|
+
LiqEthAuthority: {
|
|
101
|
+
address: ADDRESSES.LiqEthAuthority,
|
|
102
|
+
abi: LiqEthArtifact.abi as JsonFragment[],
|
|
103
|
+
},
|
|
104
|
+
BeaconState: {
|
|
105
|
+
address: ADDRESSES.BeaconState,
|
|
106
|
+
abi: BeaconStateArtifact.abi as JsonFragment[]
|
|
107
|
+
},
|
|
108
|
+
WithdrawalQueue: {
|
|
109
|
+
address: ADDRESSES.WithdrawalQueue,
|
|
110
|
+
abi: WithdrawalQueueArtifact.abi as JsonFragment[],
|
|
111
|
+
},
|
|
112
|
+
LiqEthToken: {
|
|
113
|
+
address: ADDRESSES.LiqEthToken,
|
|
114
|
+
abi: LiqEthArtifact.abi as JsonFragment[],
|
|
115
|
+
},
|
|
79
116
|
Accounting: {
|
|
80
117
|
address: ADDRESSES.Accounting,
|
|
81
118
|
abi: AccountingArtifact.abi as JsonFragment[],
|
|
82
119
|
},
|
|
83
|
-
LiqEth: {
|
|
84
|
-
address: ADDRESSES.LiqEth,
|
|
85
|
-
abi: LiqEthArtifact.abi as JsonFragment[],
|
|
86
|
-
},
|
|
87
120
|
DepositManager: {
|
|
88
121
|
address: ADDRESSES.DepositManager,
|
|
89
122
|
abi: DepositManagerArtifact.abi as JsonFragment[],
|
|
90
123
|
},
|
|
124
|
+
WithdrawalVault: {
|
|
125
|
+
address: ADDRESSES.WithdrawalVault,
|
|
126
|
+
abi: WithdrawalVaultArtifact.abi as JsonFragment[],
|
|
127
|
+
},
|
|
91
128
|
StakingModule: {
|
|
92
129
|
address: ADDRESSES.StakingModule,
|
|
93
130
|
abi: StakingModuleArtifact.abi as JsonFragment[],
|
|
94
131
|
},
|
|
95
|
-
|
|
96
|
-
address: ADDRESSES.
|
|
97
|
-
abi:
|
|
98
|
-
},
|
|
99
|
-
WithdrawalVault: {
|
|
100
|
-
address: ADDRESSES.WithdrawalVault,
|
|
101
|
-
abi: WithdrawalVaultArtifact.abi as JsonFragment[],
|
|
132
|
+
YieldOracle: {
|
|
133
|
+
address: ADDRESSES.YieldOracle,
|
|
134
|
+
abi: YieldOracleArtifact.abi as JsonFragment[],
|
|
102
135
|
},
|
|
103
136
|
|
|
104
137
|
// Outpost Contracts
|
|
105
|
-
|
|
106
|
-
address: ADDRESSES.
|
|
107
|
-
abi:
|
|
138
|
+
OutpostManagerAuthority: {
|
|
139
|
+
address: ADDRESSES.OutpostManagerAuthority,
|
|
140
|
+
abi: OutpostManagerAuthorityArtifact.abi as JsonFragment[],
|
|
141
|
+
},
|
|
142
|
+
iodata: {
|
|
143
|
+
address: ADDRESSES.iodata,
|
|
144
|
+
abi: IodataArtifact.abi as JsonFragment[],
|
|
145
|
+
},
|
|
146
|
+
Base58: {
|
|
147
|
+
address: ADDRESSES.Base58,
|
|
148
|
+
abi: Base58Artifact.abi as JsonFragment[],
|
|
149
|
+
},
|
|
150
|
+
sysio_merkle: {
|
|
151
|
+
address: ADDRESSES.sysio_merkle,
|
|
152
|
+
abi: sysio_merkleArtifact.abi as JsonFragment[],
|
|
108
153
|
},
|
|
109
154
|
ReceiptNFT: {
|
|
110
155
|
address: ADDRESSES.ReceiptNFT,
|
|
111
156
|
abi: ReceiptNFTArtifact.abi as JsonFragment[],
|
|
112
157
|
},
|
|
158
|
+
MockAggregator: {
|
|
159
|
+
address: ADDRESSES.MockAggregator,
|
|
160
|
+
abi: AggregatorArtifact.abi as JsonFragment[],
|
|
161
|
+
},
|
|
162
|
+
Pool: {
|
|
163
|
+
address: ADDRESSES.Pool,
|
|
164
|
+
abi: PoolArtifact.abi as JsonFragment[],
|
|
165
|
+
},
|
|
113
166
|
OutpostManager: {
|
|
114
167
|
address: ADDRESSES.OutpostManager,
|
|
115
168
|
abi: OutpostManagerArtifact.abi as JsonFragment[],
|
|
116
169
|
},
|
|
170
|
+
sysio_write: {
|
|
171
|
+
address: ADDRESSES.sysio_write,
|
|
172
|
+
abi: sysio_writeArtifact.abi as JsonFragment[],
|
|
173
|
+
},
|
|
174
|
+
EthUsdPriceConsumer: {
|
|
175
|
+
address: ADDRESSES.EthUsdPriceConsumer,
|
|
176
|
+
abi: EthUsdPriceConsumerArtifact.abi as JsonFragment[],
|
|
177
|
+
},
|
|
117
178
|
BAR: {
|
|
118
179
|
address: ADDRESSES.BAR,
|
|
119
180
|
abi: BARArtifact.abi as JsonFragment[],
|
|
120
181
|
},
|
|
121
|
-
OPP: {
|
|
122
|
-
address: ADDRESSES.OPP,
|
|
123
|
-
abi: OPPArtifact.abi as JsonFragment[],
|
|
124
|
-
},
|
|
125
182
|
OPPCommon: {
|
|
126
183
|
address: ADDRESSES.OPPCommon,
|
|
127
184
|
abi: OPPCommonArtifact.abi as JsonFragment[],
|
|
128
185
|
},
|
|
129
|
-
|
|
130
|
-
address: ADDRESSES.
|
|
131
|
-
abi:
|
|
186
|
+
OPP: {
|
|
187
|
+
address: ADDRESSES.OPP,
|
|
188
|
+
abi: OPPArtifact.abi as JsonFragment[],
|
|
132
189
|
},
|
|
133
190
|
Pretoken: {
|
|
134
191
|
address: ADDRESSES.Pretoken,
|
|
135
192
|
abi: PretokenArtifact.abi as JsonFragment[],
|
|
136
193
|
},
|
|
137
|
-
|
|
138
|
-
address: ADDRESSES.
|
|
139
|
-
abi:
|
|
194
|
+
OPPInbound: {
|
|
195
|
+
address: ADDRESSES.OPPInbound,
|
|
196
|
+
abi: OPPInboundArtifact.abi as JsonFragment[],
|
|
140
197
|
},
|
|
141
|
-
|
|
142
|
-
address: ADDRESSES.
|
|
143
|
-
abi:
|
|
198
|
+
Depositor: {
|
|
199
|
+
address: ADDRESSES.Depositor,
|
|
200
|
+
abi: DepositorArtifact.abi as JsonFragment[],
|
|
144
201
|
},
|
|
145
|
-
Pool: {
|
|
146
|
-
address: ADDRESSES.Pool,
|
|
147
|
-
abi: PoolArtifact.abi as JsonFragment[],
|
|
148
|
-
}
|
|
149
202
|
};
|
|
150
203
|
|
|
151
204
|
export interface ContractOptions {
|
|
@@ -228,17 +281,17 @@ export class EthereumContractService {
|
|
|
228
281
|
ERC721Artifact,
|
|
229
282
|
ERC1155Artifact,
|
|
230
283
|
|
|
231
|
-
// liqETH suite
|
|
232
|
-
AccountingArtifact,
|
|
233
|
-
DepositManagerArtifact,
|
|
234
|
-
LiqEthArtifact,
|
|
235
|
-
// LiqEthBurnArtifact,
|
|
236
|
-
// LiqEthMintArtifact,
|
|
237
|
-
// RewardsERC20Artifact,
|
|
238
|
-
StakingModuleArtifact,
|
|
239
|
-
// ValidatorBalanceArtifact,
|
|
240
|
-
WithdrawalQueueArtifact,
|
|
241
|
-
WithdrawalVaultArtifact,
|
|
284
|
+
// // liqETH suite
|
|
285
|
+
// AccountingArtifact,
|
|
286
|
+
// DepositManagerArtifact,
|
|
287
|
+
// LiqEthArtifact,
|
|
288
|
+
// // LiqEthBurnArtifact,
|
|
289
|
+
// // LiqEthMintArtifact,
|
|
290
|
+
// // RewardsERC20Artifact,
|
|
291
|
+
// StakingModuleArtifact,
|
|
292
|
+
// // ValidatorBalanceArtifact,
|
|
293
|
+
// WithdrawalQueueArtifact,
|
|
294
|
+
// WithdrawalVaultArtifact,
|
|
242
295
|
// YieldArtifact,
|
|
243
296
|
];
|
|
244
297
|
|
|
@@ -16,6 +16,8 @@ import { PretokenClient } from './clients/pretoken.client';
|
|
|
16
16
|
import { OPPClient } from './clients/opp.client';
|
|
17
17
|
import { ReceiptClient } from './clients/receipt.client';
|
|
18
18
|
|
|
19
|
+
export const INITIAL_TRANCHE_SUPPLY = 35000;
|
|
20
|
+
|
|
19
21
|
export class EthereumStakingClient implements IStakingClient {
|
|
20
22
|
private readonly provider: ethers.providers.Web3Provider | ethers.providers.JsonRpcProvider;
|
|
21
23
|
public readonly pubKey?: WirePubKey;
|
|
@@ -154,8 +156,8 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
154
156
|
* actual = liqETH token balance (ERC-20)
|
|
155
157
|
* tracked = liqETH tracked balance (protocol/accounting view)
|
|
156
158
|
*/
|
|
157
|
-
async getPortfolio(): Promise<Portfolio> {
|
|
158
|
-
this.
|
|
159
|
+
async getPortfolio(): Promise<Portfolio | null> {
|
|
160
|
+
if (!this.signer) return Promise.resolve(null);
|
|
159
161
|
|
|
160
162
|
const walletAddress = await this.signer!.getAddress();
|
|
161
163
|
|
|
@@ -165,7 +167,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
165
167
|
const nativeSymbol = this.network?.nativeCurrency?.symbol ?? 'ETH';
|
|
166
168
|
|
|
167
169
|
// 2) liqETH ERC-20 balance (actual)
|
|
168
|
-
const liqBalance: ethers.BigNumber = await this.contract.
|
|
170
|
+
const liqBalance: ethers.BigNumber = await this.contract.LiqEthToken.balanceOf(walletAddress);
|
|
169
171
|
const liqSymbol = 'Liq' + (this.network?.nativeCurrency?.symbol ?? 'ETH');
|
|
170
172
|
|
|
171
173
|
// 3) staked liqEth ERC-20 balance (calculate from receipts)
|
|
@@ -199,7 +201,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
199
201
|
currentIndex = BigInt(indexBn.toString());
|
|
200
202
|
totalShares = BigInt(totalSharesBn.toString());
|
|
201
203
|
userShares = BigInt(userSharesBn.toString());
|
|
202
|
-
} catch {}
|
|
204
|
+
} catch { }
|
|
203
205
|
|
|
204
206
|
// sharesToTokens(userShares, currentIndex) = userShares * currentIndex / indexScale
|
|
205
207
|
let estimatedClaim = BigInt(0);
|
|
@@ -287,10 +289,18 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
287
289
|
// READ-ONLY Public Methods
|
|
288
290
|
// ---------------------------------------------------------------------
|
|
289
291
|
|
|
290
|
-
//
|
|
292
|
+
// Protocol-wide ETH staking APY in percent, e.g. 3.0 => "3.00%"
|
|
291
293
|
async getSystemAPY(): Promise<number> {
|
|
294
|
+
// NOTE: despite the name, this value is effectively *annual* BPS on-chain.
|
|
295
|
+
// e.g. 300 => 3% APY
|
|
292
296
|
const annualBpsBn = await this.contract.DepositManager.dailyRateBPS();
|
|
293
|
-
|
|
297
|
+
const annualBps = annualBpsBn.toNumber(); // e.g. 300 for 3%
|
|
298
|
+
|
|
299
|
+
// Convert basis points (1/100 of 1%) to percent:
|
|
300
|
+
// 10,000 bps = 100% ⇒ 100 bps = 1% ⇒ divide by 100.
|
|
301
|
+
const apyPercent = annualBps / 100;
|
|
302
|
+
|
|
303
|
+
return apyPercent; // 3 => "3.00%"
|
|
294
304
|
}
|
|
295
305
|
|
|
296
306
|
// Protocol fee charged for deposit from Native to LIQ
|
|
@@ -304,7 +314,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
304
314
|
}
|
|
305
315
|
|
|
306
316
|
async getEthStats(): Promise<any> {
|
|
307
|
-
let withdrawDelay = await this.contract.
|
|
317
|
+
let withdrawDelay = await this.contract.WithdrawalQueue.withdrawDelay();
|
|
308
318
|
let minDeposit = await this.contract.DepositManager.minDeposit();
|
|
309
319
|
let rewardCooldown = await this.contract.DepositManager.rewardCooldown();
|
|
310
320
|
|
|
@@ -332,55 +342,133 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
332
342
|
} = options ?? {};
|
|
333
343
|
|
|
334
344
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
345
|
+
try {
|
|
346
|
+
|
|
347
|
+
const blockNumber = await this.provider.getBlockNumber();
|
|
348
|
+
const blockTag = { blockTag: blockNumber };
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
// Fetch all required contract data
|
|
352
|
+
const [totalSharesBn, indexBn, trancheNumberBn, trancheSupplyBn, tranchePriceWadBn, totalSupplyBn, supplyGrowthBps, priceGrowthCents, minPriceUsd, maxPriceUsd] = await Promise.all([
|
|
353
|
+
this.contract.Depositor.totalShares(blockTag),
|
|
354
|
+
this.contract.Depositor.index(blockTag),
|
|
355
|
+
this.contract.Pretoken.trancheNumber(blockTag),
|
|
356
|
+
this.contract.Pretoken.trancheSupply(blockTag),
|
|
357
|
+
this.contract.Pretoken.tranchePriceUsd(blockTag),
|
|
358
|
+
this.contract.Pretoken.totalSupply(blockTag),
|
|
359
|
+
this.contract.Pretoken.supplyGrowthBps(blockTag),
|
|
360
|
+
this.contract.Pretoken.priceIncrementUsd(blockTag),
|
|
361
|
+
this.contract.EthUsdPriceConsumer.MIN_PRICE(),
|
|
362
|
+
this.contract.EthUsdPriceConsumer.MAX_PRICE(),
|
|
363
|
+
]);
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
const totalTrancheSupply = BigInt(totalSupplyBn.toString()) / BigInt(1e10);
|
|
367
|
+
const currentTrancheSupply = BigInt(trancheSupplyBn.toString()) / BigInt(1e10);
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
// fetch price and timestamp from aggregator
|
|
371
|
+
const [roundId, answer, startedAt, updatedAt, answeredInRound] = await this.contract.MockAggregator.latestRoundData();
|
|
372
|
+
let ethPriceUsd: bigint = BigInt(answer.toString());
|
|
373
|
+
let nativePriceTimestamp: number = Number(updatedAt);
|
|
374
|
+
|
|
375
|
+
const initialTrancheSupply = BigInt(INITIAL_TRANCHE_SUPPLY) * BigInt(1e8);
|
|
376
|
+
|
|
377
|
+
return buildEthereumTrancheSnapshot({
|
|
378
|
+
chainID,
|
|
379
|
+
totalSharesBn,
|
|
380
|
+
indexBn,
|
|
381
|
+
trancheNumberBn,
|
|
382
|
+
currentTrancheSupply,
|
|
383
|
+
tranchePriceWadBn,
|
|
384
|
+
totalTrancheSupply,
|
|
385
|
+
initialTrancheSupply,
|
|
386
|
+
supplyGrowthBps,
|
|
387
|
+
priceGrowthCents,
|
|
388
|
+
minPriceUsd,
|
|
389
|
+
maxPriceUsd,
|
|
390
|
+
|
|
391
|
+
ethPriceUsd,
|
|
392
|
+
nativePriceTimestamp,
|
|
393
|
+
ladderWindowBefore: windowBefore,
|
|
394
|
+
ladderWindowAfter: windowAfter,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
catch (err: any) {
|
|
398
|
+
console.log(err);
|
|
399
|
+
|
|
400
|
+
throw new Error(`Error fetching Ethereum tranche snapshot: ${err?.message || err}`);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Estimate a conservative native ETH buffer (in wei) to leave in the wallet
|
|
406
|
+
* so the user can pay gas for the current deposit and at least one more tx.
|
|
407
|
+
*
|
|
408
|
+
* Typical usage in UI:
|
|
409
|
+
* const buffer = await client.estimateGasBuffer();
|
|
410
|
+
* const maxSpendable = balanceWei > buffer ? balanceWei - buffer : 0n;
|
|
411
|
+
*
|
|
412
|
+
* @param options.txCount How many transactions to cover (default 2: deposit + 1 more)
|
|
413
|
+
* @param options.safetyMultiplier Additional safety multiplier on top of txCount (default 1.5x)
|
|
414
|
+
* @param options.minBufferWei Optional override minimum buffer (defaults ~0.002 ETH)
|
|
415
|
+
*/
|
|
416
|
+
async estimateGasBuffer(options?: {
|
|
417
|
+
txCount?: number;
|
|
418
|
+
safetyMultiplier?: number;
|
|
419
|
+
minBufferWei?: bigint;
|
|
420
|
+
}): Promise<bigint> {
|
|
421
|
+
this.ensureUser();
|
|
422
|
+
|
|
423
|
+
const walletAddress = await this.signer!.getAddress();
|
|
424
|
+
|
|
425
|
+
// 1) Estimate a baseline gas usage using a simple self-transfer.
|
|
426
|
+
// This is cheap and doesn't depend on your contract ABI at all.
|
|
427
|
+
const baseGas = await this.provider.estimateGas({
|
|
428
|
+
from: walletAddress,
|
|
429
|
+
to: walletAddress,
|
|
430
|
+
value: ethers.constants.Zero,
|
|
383
431
|
});
|
|
432
|
+
|
|
433
|
+
// 2) Fetch current gas price / max fee per gas.
|
|
434
|
+
const feeData = await this.provider.getFeeData();
|
|
435
|
+
let gasPrice =
|
|
436
|
+
feeData.maxFeePerGas ??
|
|
437
|
+
feeData.gasPrice ??
|
|
438
|
+
ethers.utils.parseUnits('20', 'gwei'); // conservative fallback
|
|
439
|
+
|
|
440
|
+
// 3) How many txs do we want to cover?
|
|
441
|
+
// Default: 2 (deposit + one extra action such as stake or small follow-up).
|
|
442
|
+
const txCount = options?.txCount ?? 2;
|
|
443
|
+
|
|
444
|
+
// We also assume that contract interactions are more expensive than a simple transfer.
|
|
445
|
+
// Use a multiplier (e.g., 5x) on baseGas to approximate a more complex tx.
|
|
446
|
+
const COMPLEX_TX_MULTIPLIER = 5; // tuning knob
|
|
447
|
+
const totalGasUnits = baseGas
|
|
448
|
+
.mul(COMPLEX_TX_MULTIPLIER)
|
|
449
|
+
.mul(txCount);
|
|
450
|
+
|
|
451
|
+
const baseCost = totalGasUnits.mul(gasPrice);
|
|
452
|
+
|
|
453
|
+
// 4) Safety multiplier on top of that (e.g. 1.5x).
|
|
454
|
+
const safetyMultiplier = options?.safetyMultiplier ?? 1.5;
|
|
455
|
+
const safetyScaled = Math.round(safetyMultiplier * 100); // e.g. 150
|
|
456
|
+
|
|
457
|
+
const bufferedCost = baseCost
|
|
458
|
+
.mul(safetyScaled)
|
|
459
|
+
.div(100); // apply safety factor
|
|
460
|
+
|
|
461
|
+
let bufferWei = bufferedCost.toBigInt();
|
|
462
|
+
|
|
463
|
+
// 5) Enforce a minimum floor (e.g. ~0.002 ETH).
|
|
464
|
+
const defaultMinBufferWei = BigInt(2_000_000_000_000_000); // 0.002 ETH
|
|
465
|
+
const minBufferWei = options?.minBufferWei ?? defaultMinBufferWei;
|
|
466
|
+
|
|
467
|
+
if (bufferWei < minBufferWei) {
|
|
468
|
+
bufferWei = minBufferWei;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return bufferWei;
|
|
384
472
|
}
|
|
385
473
|
|
|
386
474
|
// ---------------------------------------------------------------------
|
|
@@ -389,7 +477,7 @@ export class EthereumStakingClient implements IStakingClient {
|
|
|
389
477
|
|
|
390
478
|
// ! This is a temporary measure for Hoodi testnet because there is no aggregator deployed
|
|
391
479
|
private async updateMockAggregatorPrice() {
|
|
392
|
-
const aggregator = this.contract.
|
|
480
|
+
const aggregator = this.contract.MockAggregator;
|
|
393
481
|
|
|
394
482
|
// read latest round & compute age
|
|
395
483
|
const [roundId, answer, startedAt, updatedAt, answeredInRound] = await aggregator.latestRoundData();
|
|
@@ -2,25 +2,34 @@ import { BigNumber, ethers } from 'ethers';
|
|
|
2
2
|
import { BalanceView } from '../../types';
|
|
3
3
|
|
|
4
4
|
export const CONTRACT_NAMES = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
// LiqETH contracts
|
|
6
|
+
"LiqEthAuthority",
|
|
7
|
+
"BeaconState",
|
|
8
|
+
"WithdrawalQueue",
|
|
9
|
+
"LiqEthToken",
|
|
10
|
+
"Accounting",
|
|
11
|
+
"DepositManager",
|
|
12
|
+
"WithdrawalVault",
|
|
13
|
+
"StakingModule",
|
|
14
|
+
"YieldOracle",
|
|
11
15
|
|
|
12
16
|
//Outpost contracts
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
"OutpostManagerAuthority",
|
|
18
|
+
"iodata",
|
|
19
|
+
"Base58",
|
|
20
|
+
"sysio_merkle",
|
|
21
|
+
"ReceiptNFT",
|
|
22
|
+
"MockAggregator",
|
|
23
|
+
"Pool",
|
|
24
|
+
"OutpostManager",
|
|
25
|
+
"sysio_write",
|
|
26
|
+
"EthUsdPriceConsumer",
|
|
27
|
+
"BAR",
|
|
28
|
+
"OPPCommon",
|
|
29
|
+
"OPP",
|
|
30
|
+
"Pretoken",
|
|
31
|
+
"OPPInbound",
|
|
32
|
+
"Depositor",
|
|
24
33
|
|
|
25
34
|
] as const;
|
|
26
35
|
|
|
@@ -157,7 +157,7 @@ export function buildEthereumTrancheLadder(options: {
|
|
|
157
157
|
currentTrancheSupply: bigint;
|
|
158
158
|
currentPriceUsd: bigint;
|
|
159
159
|
supplyGrowthBps: number;
|
|
160
|
-
|
|
160
|
+
priceGrowthCents: number;
|
|
161
161
|
windowBefore?: number;
|
|
162
162
|
windowAfter?: number;
|
|
163
163
|
}): TrancheLadderItem[] {
|
|
@@ -167,7 +167,7 @@ export function buildEthereumTrancheLadder(options: {
|
|
|
167
167
|
currentTrancheSupply,
|
|
168
168
|
currentPriceUsd,
|
|
169
169
|
supplyGrowthBps,
|
|
170
|
-
|
|
170
|
+
priceGrowthCents,
|
|
171
171
|
windowBefore = 5,
|
|
172
172
|
windowAfter = 5,
|
|
173
173
|
} = options;
|
|
@@ -190,7 +190,7 @@ export function buildEthereumTrancheLadder(options: {
|
|
|
190
190
|
const prevCap = capacity.get(id - 1)!;
|
|
191
191
|
const prevPrice = price.get(id - 1)!;
|
|
192
192
|
capacity.set(id, growOnce(prevCap, supplyGrowthBps));
|
|
193
|
-
price.set(id, growOnce(prevPrice,
|
|
193
|
+
price.set(id, growOnce(prevPrice, priceGrowthCents));
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
// Backward (past tranches)
|
|
@@ -198,7 +198,7 @@ export function buildEthereumTrancheLadder(options: {
|
|
|
198
198
|
const nextCap = capacity.get(id + 1)!;
|
|
199
199
|
const nextPrice = price.get(id + 1)!;
|
|
200
200
|
capacity.set(id, shrinkOnce(nextCap, supplyGrowthBps));
|
|
201
|
-
price.set(id, shrinkOnce(nextPrice,
|
|
201
|
+
price.set(id, shrinkOnce(nextPrice, priceGrowthCents));
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
const ladder: TrancheLadderItem[] = [];
|
|
@@ -240,7 +240,7 @@ export async function buildEthereumTrancheSnapshot(options: {
|
|
|
240
240
|
totalTrancheSupply;
|
|
241
241
|
initialTrancheSupply;
|
|
242
242
|
supplyGrowthBps;
|
|
243
|
-
|
|
243
|
+
priceGrowthCents;
|
|
244
244
|
minPriceUsd;
|
|
245
245
|
maxPriceUsd;
|
|
246
246
|
|
|
@@ -264,7 +264,7 @@ export async function buildEthereumTrancheSnapshot(options: {
|
|
|
264
264
|
totalTrancheSupply,
|
|
265
265
|
initialTrancheSupply,
|
|
266
266
|
supplyGrowthBps,
|
|
267
|
-
|
|
267
|
+
priceGrowthCents,
|
|
268
268
|
minPriceUsd,
|
|
269
269
|
maxPriceUsd,
|
|
270
270
|
} = options;
|
|
@@ -284,7 +284,7 @@ export async function buildEthereumTrancheSnapshot(options: {
|
|
|
284
284
|
currentTrancheSupply,
|
|
285
285
|
currentPriceUsd,
|
|
286
286
|
supplyGrowthBps,
|
|
287
|
-
|
|
287
|
+
priceGrowthCents,
|
|
288
288
|
windowBefore: ladderWindowBefore,
|
|
289
289
|
windowAfter: ladderWindowAfter,
|
|
290
290
|
});
|
|
@@ -297,7 +297,7 @@ export async function buildEthereumTrancheSnapshot(options: {
|
|
|
297
297
|
currentTranche,
|
|
298
298
|
currentPriceUsd,
|
|
299
299
|
supplyGrowthBps,
|
|
300
|
-
|
|
300
|
+
priceGrowthCents,
|
|
301
301
|
currentTrancheSupply,
|
|
302
302
|
initialTrancheSupply,
|
|
303
303
|
totalPretokensSold: totalTrancheSupply,
|