@wireio/stake 0.1.0 → 0.1.2
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 +57 -0
- package/lib/stake.browser.js +11836 -4103
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +374 -556
- package/lib/stake.js +12089 -4303
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +11836 -4103
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/DepositManager.sol/DepositManager.json +1153 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IAccounting.json +172 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositContract.json +39 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IDepositManager.json +64 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthBurn.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthBurn.json +24 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthMint.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/ILiqEthMint.json +35 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IRewardsERC20.json +213 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IStakingModule.json +138 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IValidatorBalanceVerifier.json +70 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/IWithdrawalRecord.json +64 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/LiqEthCommon.sol/LiqEthCommon.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20.sol/RewardsERC20.json +749 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/RewardsERC20Pausable.sol/RewardsERC20Pausable.json +812 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/BeaconRoots.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/SSZ.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/ValidatorBalanceVerifier.sol/ValidatorBalanceVerifier.json +225 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/BeaconRoots.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/SSZ.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/Yield.sol/YieldOracle.json +813 -0
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/accounting.sol/Accounting.json +651 -0
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/liqEth.sol/LiqEthToken.json +1110 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthBurn.sol/LiqEthBurn.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthBurn.sol/LiqEthBurn.json +391 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthMint.sol/LiqEthMint.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/liqEthMint.sol/LiqEthMint.json +402 -0
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/stakingModule.sol/StakingModule.json +1225 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalQueue.sol/WithdrawalQueue.json +927 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/Uint64BE.json +10 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.dbg.json +4 -0
- package/src/assets/ethereum/ABI/liqEth/withdrawalVault.sol/WithdrawalVault.json +447 -0
- package/src/assets/solana/idl/liqsol_core.json +4239 -0
- package/src/assets/solana/idl/liqsol_token.json +183 -0
- package/src/assets/solana/idl/validator_leaderboard.json +270 -265
- package/src/assets/solana/types/liqsol_core.ts +4245 -0
- package/src/assets/solana/types/liqsol_token.ts +189 -0
- package/src/assets/solana/types/validator_leaderboard.ts +270 -265
- package/src/index.ts +1 -3
- package/src/networks/ethereum/contract.ts +101 -36
- package/src/networks/ethereum/ethereum.ts +141 -45
- package/src/networks/ethereum/types.ts +30 -2
- package/src/networks/solana/clients/deposit.client.ts +71 -109
- package/src/networks/solana/clients/distribution.client.ts +256 -383
- package/src/networks/solana/clients/leaderboard.client.ts +38 -133
- package/src/networks/solana/constants.ts +214 -130
- package/src/networks/solana/program.ts +25 -38
- package/src/networks/solana/solana.ts +120 -105
- package/src/networks/solana/types.ts +37 -47
- package/src/networks/solana/utils.ts +551 -0
- package/src/scripts/tsconfig.json +17 -0
- package/src/staker/staker.ts +10 -6
- package/src/staker/types.ts +14 -9
- package/src/assets/solana/idl/deposit.json +0 -296
- package/src/assets/solana/idl/distribution.json +0 -768
- package/src/assets/solana/idl/liq_sol_token.json +0 -298
- package/src/assets/solana/idl/mint_helper.json +0 -110
- package/src/assets/solana/idl/read_tracked_balance.json +0 -140
- package/src/assets/solana/idl/stake_controller.json +0 -2149
- package/src/assets/solana/idl/treasury.json +0 -110
- package/src/assets/solana/idl/validator_registry.json +0 -487
- package/src/assets/solana/idl/yield_oracle.json +0 -32
- package/src/assets/solana/types/deposit.ts +0 -302
- package/src/assets/solana/types/distribution.ts +0 -774
- package/src/assets/solana/types/liq_sol_token.ts +0 -304
- package/src/assets/solana/types/mint_helper.ts +0 -116
- package/src/assets/solana/types/read_tracked_balance.ts +0 -146
- package/src/assets/solana/types/stake_controller.ts +0 -2155
- package/src/assets/solana/types/stake_registry.ts +0 -441
- package/src/assets/solana/types/treasury.ts +0 -116
- package/src/assets/solana/types/validator_registry.ts +0 -493
- package/src/assets/solana/types/yield_oracle.ts +0 -38
- package/src/common/utils.ts +0 -9
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"address": "98srSwC7RPw2BjUQE5oTuQMEhdWJ2GEK8GBLB4Ei2Awm",
|
|
3
|
-
"metadata": {
|
|
4
|
-
"name": "treasury",
|
|
5
|
-
"version": "0.1.0",
|
|
6
|
-
"spec": "0.1.0"
|
|
7
|
-
},
|
|
8
|
-
"instructions": [
|
|
9
|
-
{
|
|
10
|
-
"name": "initialize_treasury",
|
|
11
|
-
"discriminator": [
|
|
12
|
-
124,
|
|
13
|
-
186,
|
|
14
|
-
211,
|
|
15
|
-
195,
|
|
16
|
-
85,
|
|
17
|
-
165,
|
|
18
|
-
129,
|
|
19
|
-
166
|
|
20
|
-
],
|
|
21
|
-
"accounts": [
|
|
22
|
-
{
|
|
23
|
-
"name": "treasury",
|
|
24
|
-
"writable": true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "payer",
|
|
28
|
-
"writable": true,
|
|
29
|
-
"signer": true
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"name": "system_program",
|
|
33
|
-
"address": "11111111111111111111111111111111"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"args": []
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"name": "pay",
|
|
40
|
-
"discriminator": [
|
|
41
|
-
119,
|
|
42
|
-
18,
|
|
43
|
-
216,
|
|
44
|
-
65,
|
|
45
|
-
192,
|
|
46
|
-
117,
|
|
47
|
-
122,
|
|
48
|
-
220
|
|
49
|
-
],
|
|
50
|
-
"accounts": [
|
|
51
|
-
{
|
|
52
|
-
"name": "admin",
|
|
53
|
-
"signer": true
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "treasury",
|
|
57
|
-
"writable": true,
|
|
58
|
-
"pda": {
|
|
59
|
-
"seeds": [
|
|
60
|
-
{
|
|
61
|
-
"kind": "const",
|
|
62
|
-
"value": [
|
|
63
|
-
116,
|
|
64
|
-
114,
|
|
65
|
-
101,
|
|
66
|
-
97,
|
|
67
|
-
115,
|
|
68
|
-
117,
|
|
69
|
-
114,
|
|
70
|
-
121
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "recipient",
|
|
78
|
-
"writable": true
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"name": "system_program",
|
|
82
|
-
"address": "11111111111111111111111111111111"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"args": [
|
|
86
|
-
{
|
|
87
|
-
"name": "amount",
|
|
88
|
-
"type": "u64"
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"errors": [
|
|
94
|
-
{
|
|
95
|
-
"code": 6000,
|
|
96
|
-
"name": "InvalidPDA",
|
|
97
|
-
"msg": "The treasury PDA is invalid."
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"code": 6001,
|
|
101
|
-
"name": "Unauthorized",
|
|
102
|
-
"msg": "Unauthorized caller."
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"code": 6002,
|
|
106
|
-
"name": "AlreadyInitialized",
|
|
107
|
-
"msg": "Treasury PDA already initialised"
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
}
|
|
@@ -1,487 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"address": "EgUbYv1coMTXsdRc5HBqTv32SNhTcsRS1nPiUDw5LbQK",
|
|
3
|
-
"metadata": {
|
|
4
|
-
"name": "validator_registry",
|
|
5
|
-
"version": "0.1.0",
|
|
6
|
-
"spec": "0.1.0",
|
|
7
|
-
"description": "Created with Anchor"
|
|
8
|
-
},
|
|
9
|
-
"instructions": [
|
|
10
|
-
{
|
|
11
|
-
"name": "add_validator",
|
|
12
|
-
"discriminator": [
|
|
13
|
-
250,
|
|
14
|
-
113,
|
|
15
|
-
53,
|
|
16
|
-
54,
|
|
17
|
-
141,
|
|
18
|
-
117,
|
|
19
|
-
215,
|
|
20
|
-
185
|
|
21
|
-
],
|
|
22
|
-
"accounts": [
|
|
23
|
-
{
|
|
24
|
-
"name": "authority",
|
|
25
|
-
"signer": true
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "validator_registry",
|
|
29
|
-
"writable": true
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"args": [
|
|
33
|
-
{
|
|
34
|
-
"name": "vote_account",
|
|
35
|
-
"type": "pubkey"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "name",
|
|
39
|
-
"type": "string"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "performance_score",
|
|
43
|
-
"type": "u32"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "get_validators",
|
|
49
|
-
"discriminator": [
|
|
50
|
-
74,
|
|
51
|
-
81,
|
|
52
|
-
116,
|
|
53
|
-
129,
|
|
54
|
-
224,
|
|
55
|
-
19,
|
|
56
|
-
17,
|
|
57
|
-
238
|
|
58
|
-
],
|
|
59
|
-
"accounts": [
|
|
60
|
-
{
|
|
61
|
-
"name": "validator_registry"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"args": []
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "initialize",
|
|
68
|
-
"discriminator": [
|
|
69
|
-
175,
|
|
70
|
-
175,
|
|
71
|
-
109,
|
|
72
|
-
31,
|
|
73
|
-
13,
|
|
74
|
-
152,
|
|
75
|
-
155,
|
|
76
|
-
237
|
|
77
|
-
],
|
|
78
|
-
"accounts": [
|
|
79
|
-
{
|
|
80
|
-
"name": "payer",
|
|
81
|
-
"writable": true,
|
|
82
|
-
"signer": true
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "validator_registry",
|
|
86
|
-
"writable": true,
|
|
87
|
-
"pda": {
|
|
88
|
-
"seeds": [
|
|
89
|
-
{
|
|
90
|
-
"kind": "const",
|
|
91
|
-
"value": [
|
|
92
|
-
118,
|
|
93
|
-
97,
|
|
94
|
-
108,
|
|
95
|
-
105,
|
|
96
|
-
100,
|
|
97
|
-
97,
|
|
98
|
-
116,
|
|
99
|
-
111,
|
|
100
|
-
114,
|
|
101
|
-
95,
|
|
102
|
-
114,
|
|
103
|
-
101,
|
|
104
|
-
103,
|
|
105
|
-
105,
|
|
106
|
-
115,
|
|
107
|
-
116,
|
|
108
|
-
114,
|
|
109
|
-
121
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"name": "system_program",
|
|
117
|
-
"address": "11111111111111111111111111111111"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"args": [
|
|
121
|
-
{
|
|
122
|
-
"name": "authority",
|
|
123
|
-
"type": "pubkey"
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"name": "move_transient_to_active",
|
|
129
|
-
"discriminator": [
|
|
130
|
-
140,
|
|
131
|
-
99,
|
|
132
|
-
170,
|
|
133
|
-
186,
|
|
134
|
-
84,
|
|
135
|
-
61,
|
|
136
|
-
184,
|
|
137
|
-
75
|
|
138
|
-
],
|
|
139
|
-
"accounts": [
|
|
140
|
-
{
|
|
141
|
-
"name": "validator_registry",
|
|
142
|
-
"writable": true
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
"args": [
|
|
146
|
-
{
|
|
147
|
-
"name": "vote_account",
|
|
148
|
-
"type": "pubkey"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"name": "amount",
|
|
152
|
-
"type": "u64"
|
|
153
|
-
}
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"name": "sync_validator_scores",
|
|
158
|
-
"discriminator": [
|
|
159
|
-
10,
|
|
160
|
-
26,
|
|
161
|
-
245,
|
|
162
|
-
222,
|
|
163
|
-
183,
|
|
164
|
-
46,
|
|
165
|
-
70,
|
|
166
|
-
181
|
|
167
|
-
],
|
|
168
|
-
"accounts": [
|
|
169
|
-
{
|
|
170
|
-
"name": "authority",
|
|
171
|
-
"signer": true
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"name": "validator_registry",
|
|
175
|
-
"writable": true
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"name": "stake_controller_program"
|
|
179
|
-
}
|
|
180
|
-
],
|
|
181
|
-
"args": [
|
|
182
|
-
{
|
|
183
|
-
"name": "vote_accounts",
|
|
184
|
-
"type": {
|
|
185
|
-
"vec": "pubkey"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"name": "validator_metrics",
|
|
190
|
-
"type": {
|
|
191
|
-
"vec": {
|
|
192
|
-
"defined": {
|
|
193
|
-
"name": "ValidatorMetrics"
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
]
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"name": "update_max_resolved_stake",
|
|
202
|
-
"discriminator": [
|
|
203
|
-
241,
|
|
204
|
-
21,
|
|
205
|
-
28,
|
|
206
|
-
14,
|
|
207
|
-
58,
|
|
208
|
-
11,
|
|
209
|
-
76,
|
|
210
|
-
44
|
|
211
|
-
],
|
|
212
|
-
"accounts": [
|
|
213
|
-
{
|
|
214
|
-
"name": "validator_registry",
|
|
215
|
-
"writable": true
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
"args": [
|
|
219
|
-
{
|
|
220
|
-
"name": "vote_account",
|
|
221
|
-
"type": "pubkey"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"name": "new_value",
|
|
225
|
-
"type": "u64"
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "update_validator_info",
|
|
231
|
-
"discriminator": [
|
|
232
|
-
120,
|
|
233
|
-
41,
|
|
234
|
-
183,
|
|
235
|
-
100,
|
|
236
|
-
13,
|
|
237
|
-
154,
|
|
238
|
-
196,
|
|
239
|
-
200
|
|
240
|
-
],
|
|
241
|
-
"accounts": [
|
|
242
|
-
{
|
|
243
|
-
"name": "validator_registry",
|
|
244
|
-
"writable": true
|
|
245
|
-
}
|
|
246
|
-
],
|
|
247
|
-
"args": [
|
|
248
|
-
{
|
|
249
|
-
"name": "vote_account",
|
|
250
|
-
"type": "pubkey"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"name": "current_active_stake_amount",
|
|
254
|
-
"type": {
|
|
255
|
-
"option": "u64"
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"name": "epoch_reward_amount",
|
|
260
|
-
"type": {
|
|
261
|
-
"option": "u64"
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"name": "transient_active_stake_amount",
|
|
266
|
-
"type": {
|
|
267
|
-
"option": "u64"
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"name": "epoch",
|
|
272
|
-
"type": {
|
|
273
|
-
"option": "u64"
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"name": "performance_score",
|
|
278
|
-
"type": {
|
|
279
|
-
"option": "u32"
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
|
-
}
|
|
284
|
-
],
|
|
285
|
-
"accounts": [
|
|
286
|
-
{
|
|
287
|
-
"name": "ValidatorRegistry",
|
|
288
|
-
"discriminator": [
|
|
289
|
-
168,
|
|
290
|
-
113,
|
|
291
|
-
195,
|
|
292
|
-
186,
|
|
293
|
-
62,
|
|
294
|
-
121,
|
|
295
|
-
163,
|
|
296
|
-
230
|
|
297
|
-
]
|
|
298
|
-
}
|
|
299
|
-
],
|
|
300
|
-
"events": [
|
|
301
|
-
{
|
|
302
|
-
"name": "ValidatorsSyncedEvent",
|
|
303
|
-
"discriminator": [
|
|
304
|
-
119,
|
|
305
|
-
121,
|
|
306
|
-
49,
|
|
307
|
-
120,
|
|
308
|
-
230,
|
|
309
|
-
132,
|
|
310
|
-
109,
|
|
311
|
-
214
|
|
312
|
-
]
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
"errors": [
|
|
316
|
-
{
|
|
317
|
-
"code": 6000,
|
|
318
|
-
"name": "Unauthorized",
|
|
319
|
-
"msg": "Unauthorized access"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"code": 6001,
|
|
323
|
-
"name": "MaxValidatorsReached",
|
|
324
|
-
"msg": "Maximum validators reached"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"code": 6002,
|
|
328
|
-
"name": "ValidatorAlreadyExists",
|
|
329
|
-
"msg": "Validator already exists"
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"code": 6003,
|
|
333
|
-
"name": "ValidatorNotFound",
|
|
334
|
-
"msg": "Validator not found"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"code": 6004,
|
|
338
|
-
"name": "InvalidStakeUpdateType",
|
|
339
|
-
"msg": "Invalid stake update type"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"code": 6005,
|
|
343
|
-
"name": "InvalidVoteAccount",
|
|
344
|
-
"msg": "Invalid vote account provided"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"code": 6006,
|
|
348
|
-
"name": "InvalidInputLength",
|
|
349
|
-
"msg": "Invalid input length - all vectors must have same length"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"code": 6007,
|
|
353
|
-
"name": "InvalidStakeAccount",
|
|
354
|
-
"msg": "Invalid Stake Account"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"code": 6008,
|
|
358
|
-
"name": "ArithmeticOverflow",
|
|
359
|
-
"msg": "Arithmetic overflow"
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"code": 6009,
|
|
363
|
-
"name": "InsufficientTransientStake",
|
|
364
|
-
"msg": "Insufficient transient stake"
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
"types": [
|
|
368
|
-
{
|
|
369
|
-
"name": "ValidatorInfo",
|
|
370
|
-
"type": {
|
|
371
|
-
"kind": "struct",
|
|
372
|
-
"fields": [
|
|
373
|
-
{
|
|
374
|
-
"name": "vote_account",
|
|
375
|
-
"type": "pubkey"
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
"name": "vpp",
|
|
379
|
-
"type": "u32"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"name": "current_active_stake",
|
|
383
|
-
"type": "u64"
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"name": "epoch_reward",
|
|
387
|
-
"type": "u64"
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
"name": "transient_active_stake",
|
|
391
|
-
"type": "u64"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"name": "last_chain_sync_epoch",
|
|
395
|
-
"type": "u64"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"name": "last_updated_slot",
|
|
399
|
-
"type": "u64"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"name": "max_resolved_epoch_deactivations",
|
|
403
|
-
"type": "u64"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
"name": "max_resolved_activating_stake",
|
|
407
|
-
"type": "u64"
|
|
408
|
-
}
|
|
409
|
-
]
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"name": "ValidatorMetrics",
|
|
414
|
-
"type": {
|
|
415
|
-
"kind": "struct",
|
|
416
|
-
"fields": [
|
|
417
|
-
{
|
|
418
|
-
"name": "commission",
|
|
419
|
-
"type": "u8"
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
"name": "skip_rate_bps",
|
|
423
|
-
"type": "u32"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"name": "is_delinquent",
|
|
427
|
-
"type": "bool"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"name": "activated_stake",
|
|
431
|
-
"type": "u64"
|
|
432
|
-
}
|
|
433
|
-
]
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
"name": "ValidatorRegistry",
|
|
438
|
-
"type": {
|
|
439
|
-
"kind": "struct",
|
|
440
|
-
"fields": [
|
|
441
|
-
{
|
|
442
|
-
"name": "authority",
|
|
443
|
-
"type": "pubkey"
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"name": "validators",
|
|
447
|
-
"type": {
|
|
448
|
-
"vec": {
|
|
449
|
-
"defined": {
|
|
450
|
-
"name": "ValidatorInfo"
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
"name": "last_update_epoch",
|
|
457
|
-
"type": "u64"
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
"name": "bump",
|
|
461
|
-
"type": "u8"
|
|
462
|
-
}
|
|
463
|
-
]
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
"name": "ValidatorsSyncedEvent",
|
|
468
|
-
"type": {
|
|
469
|
-
"kind": "struct",
|
|
470
|
-
"fields": [
|
|
471
|
-
{
|
|
472
|
-
"name": "updated_count",
|
|
473
|
-
"type": "u32"
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"name": "not_found_count",
|
|
477
|
-
"type": "u32"
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"name": "epoch",
|
|
481
|
-
"type": "u64"
|
|
482
|
-
}
|
|
483
|
-
]
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
]
|
|
487
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"address": "6eQiRLG19udrDwK3TM17gTsPrHczoXVDusTErdD9pH8h",
|
|
3
|
-
"metadata": {
|
|
4
|
-
"name": "yield_oracle",
|
|
5
|
-
"version": "0.1.0",
|
|
6
|
-
"spec": "0.1.0",
|
|
7
|
-
"description": "Created with Anchor"
|
|
8
|
-
},
|
|
9
|
-
"instructions": [
|
|
10
|
-
{
|
|
11
|
-
"name": "calculate_yield_per_sol",
|
|
12
|
-
"discriminator": [
|
|
13
|
-
51,
|
|
14
|
-
25,
|
|
15
|
-
150,
|
|
16
|
-
38,
|
|
17
|
-
173,
|
|
18
|
-
32,
|
|
19
|
-
27,
|
|
20
|
-
202
|
|
21
|
-
],
|
|
22
|
-
"accounts": [
|
|
23
|
-
{
|
|
24
|
-
"name": "system_program",
|
|
25
|
-
"address": "11111111111111111111111111111111"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"args": [],
|
|
29
|
-
"returns": "u64"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|