@alephium/powfi-sdk 0.0.1-rc.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.
Files changed (146) hide show
  1. package/README.md +4 -0
  2. package/clmm/artifacts/BitmapWord.ral.json +125 -0
  3. package/clmm/artifacts/BitmapWordDeployer.ral.json +31 -0
  4. package/clmm/artifacts/CreateConfig.ral.json +37 -0
  5. package/clmm/artifacts/CreateLiquidPool.ral.json +55 -0
  6. package/clmm/artifacts/DexAccount.ral.json +110 -0
  7. package/clmm/artifacts/LiquidityAmountsTest.ral.json +161 -0
  8. package/clmm/artifacts/LiquidityManagmentTest.ral.json +384 -0
  9. package/clmm/artifacts/Pool.ral.json +1530 -0
  10. package/clmm/artifacts/PoolConfig.ral.json +31 -0
  11. package/clmm/artifacts/PoolFactory.ral.json +300 -0
  12. package/clmm/artifacts/PoolRouterDemo.ral.json +49 -0
  13. package/clmm/artifacts/PoolUser.ral.json +89 -0
  14. package/clmm/artifacts/Position.ral.json +183 -0
  15. package/clmm/artifacts/PositionManager.ral.json +416 -0
  16. package/clmm/artifacts/SwapWithoutAccount.ral.json +46 -0
  17. package/clmm/artifacts/TestToken.ral.json +68 -0
  18. package/clmm/artifacts/Tick.ral.json +161 -0
  19. package/clmm/artifacts/TickBitmapTest.ral.json +220 -0
  20. package/clmm/artifacts/constants.ral.json +81 -0
  21. package/clmm/artifacts/structs.ral.json +335 -0
  22. package/clmm/artifacts/ts/BitmapWord.ts +337 -0
  23. package/clmm/artifacts/ts/BitmapWordDeployer.ts +164 -0
  24. package/clmm/artifacts/ts/DexAccount.ts +330 -0
  25. package/clmm/artifacts/ts/LiquidityAmountsTest.ts +464 -0
  26. package/clmm/artifacts/ts/LiquidityManagmentTest.ts +859 -0
  27. package/clmm/artifacts/ts/Pool.ts +2535 -0
  28. package/clmm/artifacts/ts/PoolConfig.ts +179 -0
  29. package/clmm/artifacts/ts/PoolFactory.ts +640 -0
  30. package/clmm/artifacts/ts/PoolUser.ts +237 -0
  31. package/clmm/artifacts/ts/Position.ts +440 -0
  32. package/clmm/artifacts/ts/PositionManager.ts +929 -0
  33. package/clmm/artifacts/ts/TestToken.ts +277 -0
  34. package/clmm/artifacts/ts/Tick.ts +351 -0
  35. package/clmm/artifacts/ts/TickBitmapTest.ts +512 -0
  36. package/clmm/artifacts/ts/constants.ts +17 -0
  37. package/clmm/artifacts/ts/contracts.ts +26 -0
  38. package/clmm/artifacts/ts/deployments.ts +160 -0
  39. package/clmm/artifacts/ts/index.ts +20 -0
  40. package/clmm/artifacts/ts/scripts.ts +76 -0
  41. package/clmm/artifacts/ts/types.ts +105 -0
  42. package/clmm/deployments/.deployments.devnet.json +350 -0
  43. package/clmm/deployments/.deployments.testnet.json +350 -0
  44. package/cpmm/artifacts/dex/DexAccount.ral.json +110 -0
  45. package/cpmm/artifacts/dex/Router.ral.json +361 -0
  46. package/cpmm/artifacts/dex/TokenPair.ral.json +512 -0
  47. package/cpmm/artifacts/dex/TokenPairFactory.ral.json +297 -0
  48. package/cpmm/artifacts/examples/ExampleOracleSimple.ral.json +192 -0
  49. package/cpmm/artifacts/examples/FeeCollectorFactoryImpl.ral.json +185 -0
  50. package/cpmm/artifacts/examples/FeeCollectorPerTokenPairImpl.ral.json +216 -0
  51. package/cpmm/artifacts/examples/FullMathTest.ral.json +123 -0
  52. package/cpmm/artifacts/scripts/AddLiquidity.ral.json +46 -0
  53. package/cpmm/artifacts/scripts/Burn.ral.json +31 -0
  54. package/cpmm/artifacts/scripts/CollectFee.ral.json +25 -0
  55. package/cpmm/artifacts/scripts/CreatePair.ral.json +37 -0
  56. package/cpmm/artifacts/scripts/CreatePairAndAddLiquidity.ral.json +43 -0
  57. package/cpmm/artifacts/scripts/EnableFeeCollector.ral.json +28 -0
  58. package/cpmm/artifacts/scripts/Mint.ral.json +34 -0
  59. package/cpmm/artifacts/scripts/RemoveLiquidity.ral.json +43 -0
  60. package/cpmm/artifacts/scripts/SetFeeCollectorFactory.ral.json +28 -0
  61. package/cpmm/artifacts/scripts/Swap.ral.json +46 -0
  62. package/cpmm/artifacts/scripts/SwapMaxIn.ral.json +46 -0
  63. package/cpmm/artifacts/scripts/SwapMinOut.ral.json +46 -0
  64. package/cpmm/artifacts/test/GetToken.ral.json +31 -0
  65. package/cpmm/artifacts/test/MathTest.ral.json +49 -0
  66. package/cpmm/artifacts/test/TestToken.ral.json +87 -0
  67. package/cpmm/artifacts/ts/DexAccount.ts +329 -0
  68. package/cpmm/artifacts/ts/ExampleOracleSimple.ts +383 -0
  69. package/cpmm/artifacts/ts/FeeCollectorFactoryImpl.ts +227 -0
  70. package/cpmm/artifacts/ts/FeeCollectorPerTokenPairImpl.ts +327 -0
  71. package/cpmm/artifacts/ts/FullMathTest.ts +251 -0
  72. package/cpmm/artifacts/ts/MathTest.ts +183 -0
  73. package/cpmm/artifacts/ts/Router.ts +554 -0
  74. package/cpmm/artifacts/ts/TestToken.ts +312 -0
  75. package/cpmm/artifacts/ts/TokenPair.ts +947 -0
  76. package/cpmm/artifacts/ts/TokenPairFactory.ts +501 -0
  77. package/cpmm/artifacts/ts/contracts.ts +26 -0
  78. package/cpmm/artifacts/ts/deployments.ts +109 -0
  79. package/cpmm/artifacts/ts/index.ts +16 -0
  80. package/cpmm/artifacts/ts/scripts.ts +142 -0
  81. package/cpmm/deployments/.deployments.devnet.json +77 -0
  82. package/cpmm/deployments/.deployments.testnet.json +79 -0
  83. package/lib/index.d.mts +8800 -0
  84. package/lib/index.d.ts +8800 -0
  85. package/lib/index.js +21769 -0
  86. package/lib/index.js.map +1 -0
  87. package/lib/index.mjs +22118 -0
  88. package/lib/index.mjs.map +1 -0
  89. package/package.json +80 -0
  90. package/src/clmm/clmm.ts +607 -0
  91. package/src/clmm/constants.ts +7 -0
  92. package/src/clmm/index.ts +6 -0
  93. package/src/clmm/liquidity.ts +163 -0
  94. package/src/clmm/pool.ts +154 -0
  95. package/src/clmm/tick.ts +335 -0
  96. package/src/clmm/types.ts +155 -0
  97. package/src/common/constants.ts +1 -0
  98. package/src/common/error.ts +46 -0
  99. package/src/common/index.ts +7 -0
  100. package/src/common/logger.ts +82 -0
  101. package/src/common/math.ts +88 -0
  102. package/src/common/numeric.ts +64 -0
  103. package/src/common/types.ts +49 -0
  104. package/src/common/utils.ts +3 -0
  105. package/src/cpmm/constants.ts +2 -0
  106. package/src/cpmm/cpmm.ts +631 -0
  107. package/src/cpmm/index.ts +3 -0
  108. package/src/cpmm/types.ts +113 -0
  109. package/src/index.ts +25 -0
  110. package/src/moduleBase.ts +64 -0
  111. package/src/staking/index.ts +4 -0
  112. package/src/staking/settings.ts +38 -0
  113. package/src/staking/staking.ts +277 -0
  114. package/src/staking/types.ts +15 -0
  115. package/src/staking/utils.ts +25 -0
  116. package/src/token/index.ts +1 -0
  117. package/src/token/token.ts +163 -0
  118. package/src/zeta.ts +105 -0
  119. package/staking/artifacts/AlphStakeAndLock.ral.json +31 -0
  120. package/staking/artifacts/AlphUnstakeVault.ral.json +151 -0
  121. package/staking/artifacts/XAlphStakeVault.ral.json +559 -0
  122. package/staking/artifacts/XAlphToken.ral.json +404 -0
  123. package/staking/artifacts/XAlphUnlockAndStartUnstake.ral.json +31 -0
  124. package/staking/artifacts/examples/GovernanceDemo.ral.json +282 -0
  125. package/staking/artifacts/examples/RewardSharingVault.ral.json +253 -0
  126. package/staking/artifacts/structs.ral.json +47 -0
  127. package/staking/artifacts/ts/AlphUnstakeVault.ts +354 -0
  128. package/staking/artifacts/ts/FullMathTest.ts +175 -0
  129. package/staking/artifacts/ts/GovernanceDemo.ts +726 -0
  130. package/staking/artifacts/ts/RewardSharingVault.ts +559 -0
  131. package/staking/artifacts/ts/TestDynamicArrayByteVec32.ts +431 -0
  132. package/staking/artifacts/ts/TestDynamicSortedArrayForU256.ts +516 -0
  133. package/staking/artifacts/ts/TestMerkleProof.ts +343 -0
  134. package/staking/artifacts/ts/XAlphStakeVault.ts +1120 -0
  135. package/staking/artifacts/ts/XAlphToken.ts +835 -0
  136. package/staking/artifacts/ts/contracts.ts +26 -0
  137. package/staking/artifacts/ts/deployments.ts +109 -0
  138. package/staking/artifacts/ts/index.ts +15 -0
  139. package/staking/artifacts/ts/scripts.ts +35 -0
  140. package/staking/artifacts/ts/types.ts +19 -0
  141. package/staking/artifacts/utils/FullMathTest.ral.json +57 -0
  142. package/staking/artifacts/utils/TestDynamicArrayByteVec32.ral.json +165 -0
  143. package/staking/artifacts/utils/TestDynamicSortedArrayForU256.ral.json +189 -0
  144. package/staking/artifacts/utils/TestMerkleProof.ral.json +134 -0
  145. package/staking/deployments/.deployments.devnet.json +77 -0
  146. package/staking/deployments/.deployments.testnet.json +78 -0
@@ -0,0 +1,404 @@
1
+ {
2
+ "version": "v4.2.5",
3
+ "name": "XAlphToken",
4
+ "bytecode": "091109121b40244051407a40ac40ca411741474165417341a6427842b242d4435d010000000102ce0002010000000102ce0102010000000102ce0202010000000102a00002010002040115d3cee9319416011600000a311342277b160113202c170216001602160213202a62170316037102010002030114d33cd5e72916004313202e0c2f1342267b16004313202d1702160016010c1602000802010002030119d32cabd28216004313202e0c2f1342267b160016010005170216020b244c031600024a05160016023d00090201000202010ed31bc25d3416004313202e0c2f1342267b160016016b44020000040601402a16021603344c020b02160216032a0e2d17041600160400041705160516012f4c0316043f0216051601314c091600160116040d2a16030008024a061600160116021604000802010002030118d34b2e25b716011600000a311342277b160113202c170216000c1602621600160213202a16004362440201000101010ed30041471116004313202e0c2f1342267b16004313202d02010000000103d3676c3c3314000201010102001bd3d63c543cb41701160148130a7b16000c33130e7b1601b11600ab16011600a9a00016002aa10005160116005f01010106014069d33538a49fb41701160148130a7bce050c33130c7b16000c33130e7ba0010d2aa101140a5f5f6d61705f5f305f5f16014744cbc54c1d0c0d0d140a5f5f6d61705f5f305f5f16014744cb010117021602000ace0431130b7b1602a00100070c0e0c140a5f5f6d61705f5f305f5f16014744cb01024a09ca140a5f5f6d61705f5f305f5f16014744b1a0016bd201011601b11600acb11601160056ce051305640c13016417041703b21600a2160147a0014044ce0316031604c11705a00016002ba10006160116005f160502010001010115d38072397d140a5f5f6d61705f5f305f5f16004744cbc5194c021400020c0d0d140a5f5f6d61705f5f305f5f16004744cb010102010002030111d3fd3d3af616004716014044cb17021602c5130d7b0c0d160201020201000206004040d38bb32147b4170216024716004044cb170316010c33130e7b16010d0d16030103170416044c40290c0d0d140a5f5f6d61705f5f305f5f16024744cb01011600000617051605430c2f4c0a16020d0c140a5f5f6d61705f5f305f5f16024744cb01034a0a16050c0e0c140a5f5f6d61705f5f305f5f16024744cb01020c0c16030104",
5
+ "codeHash": "5f95704fd2f96ed987b89fdb6e0659cc32d2accc50194a6bd2aedcffdce2f3e5",
6
+ "fieldsSig": {
7
+ "names": [
8
+ "symbol",
9
+ "name",
10
+ "decimals",
11
+ "unstakeVaultTemplateId",
12
+ "maxActiveUnstakeRequestsPerUser",
13
+ "unstakeDuration",
14
+ "totalStaked",
15
+ "lastUnstakeVaultIndex",
16
+ "__stdInterfaceId"
17
+ ],
18
+ "types": [
19
+ "ByteVec",
20
+ "ByteVec",
21
+ "U256",
22
+ "ByteVec",
23
+ "U256",
24
+ "U256",
25
+ "U256",
26
+ "U256",
27
+ "ByteVec"
28
+ ],
29
+ "isMutable": [
30
+ false,
31
+ false,
32
+ false,
33
+ false,
34
+ false,
35
+ false,
36
+ true,
37
+ true,
38
+ false
39
+ ]
40
+ },
41
+ "eventsSig": [
42
+ {
43
+ "name": "Staked",
44
+ "fieldNames": [
45
+ "to",
46
+ "amount"
47
+ ],
48
+ "fieldTypes": [
49
+ "Address",
50
+ "U256"
51
+ ]
52
+ },
53
+ {
54
+ "name": "UnstakeScheduled",
55
+ "fieldNames": [
56
+ "to",
57
+ "amount"
58
+ ],
59
+ "fieldTypes": [
60
+ "Address",
61
+ "U256"
62
+ ]
63
+ }
64
+ ],
65
+ "functions": [
66
+ {
67
+ "name": "getSymbol",
68
+ "paramNames": [],
69
+ "paramTypes": [],
70
+ "paramIsMutable": [],
71
+ "returnTypes": [
72
+ "ByteVec"
73
+ ]
74
+ },
75
+ {
76
+ "name": "getName",
77
+ "paramNames": [],
78
+ "paramTypes": [],
79
+ "paramIsMutable": [],
80
+ "returnTypes": [
81
+ "ByteVec"
82
+ ]
83
+ },
84
+ {
85
+ "name": "getDecimals",
86
+ "paramNames": [],
87
+ "paramTypes": [],
88
+ "paramIsMutable": [],
89
+ "returnTypes": [
90
+ "U256"
91
+ ]
92
+ },
93
+ {
94
+ "name": "getTotalSupply",
95
+ "paramNames": [],
96
+ "paramTypes": [],
97
+ "paramIsMutable": [],
98
+ "returnTypes": [
99
+ "U256"
100
+ ]
101
+ },
102
+ {
103
+ "name": "get",
104
+ "paramNames": [
105
+ "array",
106
+ "index"
107
+ ],
108
+ "paramTypes": [
109
+ "ByteVec",
110
+ "U256"
111
+ ],
112
+ "paramIsMutable": [
113
+ false,
114
+ false
115
+ ],
116
+ "returnTypes": [
117
+ "U256"
118
+ ]
119
+ },
120
+ {
121
+ "name": "find",
122
+ "paramNames": [
123
+ "array",
124
+ "value"
125
+ ],
126
+ "paramTypes": [
127
+ "ByteVec",
128
+ "U256"
129
+ ],
130
+ "paramIsMutable": [
131
+ false,
132
+ false
133
+ ],
134
+ "returnTypes": [
135
+ "I256"
136
+ ]
137
+ },
138
+ {
139
+ "name": "remove",
140
+ "paramNames": [
141
+ "array",
142
+ "value"
143
+ ],
144
+ "paramTypes": [
145
+ "ByteVec",
146
+ "U256"
147
+ ],
148
+ "paramIsMutable": [
149
+ false,
150
+ false
151
+ ],
152
+ "returnTypes": [
153
+ "ByteVec"
154
+ ]
155
+ },
156
+ {
157
+ "name": "push",
158
+ "paramNames": [
159
+ "array",
160
+ "value"
161
+ ],
162
+ "paramTypes": [
163
+ "ByteVec",
164
+ "U256"
165
+ ],
166
+ "paramIsMutable": [
167
+ false,
168
+ false
169
+ ],
170
+ "returnTypes": [
171
+ "ByteVec"
172
+ ]
173
+ },
174
+ {
175
+ "name": "binarySearch",
176
+ "paramNames": [
177
+ "array",
178
+ "value",
179
+ "left",
180
+ "right"
181
+ ],
182
+ "paramTypes": [
183
+ "ByteVec",
184
+ "U256",
185
+ "U256",
186
+ "U256"
187
+ ],
188
+ "paramIsMutable": [
189
+ false,
190
+ false,
191
+ false,
192
+ false
193
+ ],
194
+ "returnTypes": [
195
+ "I256"
196
+ ]
197
+ },
198
+ {
199
+ "name": "removeAt",
200
+ "paramNames": [
201
+ "array",
202
+ "index"
203
+ ],
204
+ "paramTypes": [
205
+ "ByteVec",
206
+ "U256"
207
+ ],
208
+ "paramIsMutable": [
209
+ false,
210
+ false
211
+ ],
212
+ "returnTypes": [
213
+ "ByteVec"
214
+ ]
215
+ },
216
+ {
217
+ "name": "size",
218
+ "paramNames": [
219
+ "array"
220
+ ],
221
+ "paramTypes": [
222
+ "ByteVec"
223
+ ],
224
+ "paramIsMutable": [
225
+ false
226
+ ],
227
+ "returnTypes": [
228
+ "U256"
229
+ ]
230
+ },
231
+ {
232
+ "name": "empty",
233
+ "paramNames": [],
234
+ "paramTypes": [],
235
+ "paramIsMutable": [],
236
+ "returnTypes": [
237
+ "ByteVec"
238
+ ]
239
+ },
240
+ {
241
+ "name": "stake",
242
+ "paramNames": [
243
+ "amount"
244
+ ],
245
+ "paramTypes": [
246
+ "U256"
247
+ ],
248
+ "paramIsMutable": [
249
+ false
250
+ ],
251
+ "returnTypes": []
252
+ },
253
+ {
254
+ "name": "startUnstake",
255
+ "paramNames": [
256
+ "amount"
257
+ ],
258
+ "paramTypes": [
259
+ "U256"
260
+ ],
261
+ "paramIsMutable": [
262
+ false
263
+ ],
264
+ "returnTypes": [
265
+ "ByteVec"
266
+ ]
267
+ },
268
+ {
269
+ "name": "getActiveUnstakeVaultIndexes",
270
+ "paramNames": [
271
+ "caller"
272
+ ],
273
+ "paramTypes": [
274
+ "Address"
275
+ ],
276
+ "paramIsMutable": [
277
+ false
278
+ ],
279
+ "returnTypes": [
280
+ "ByteVec"
281
+ ]
282
+ },
283
+ {
284
+ "name": "getClaimableAmount",
285
+ "paramNames": [
286
+ "user",
287
+ "vaultIndex"
288
+ ],
289
+ "paramTypes": [
290
+ "Address",
291
+ "U256"
292
+ ],
293
+ "paramIsMutable": [
294
+ false,
295
+ false
296
+ ],
297
+ "returnTypes": [
298
+ "U256"
299
+ ]
300
+ },
301
+ {
302
+ "name": "claimUnstaked",
303
+ "paramNames": [
304
+ "vaultIndex",
305
+ "amount"
306
+ ],
307
+ "paramTypes": [
308
+ "U256",
309
+ "U256"
310
+ ],
311
+ "paramIsMutable": [
312
+ false,
313
+ false
314
+ ],
315
+ "returnTypes": []
316
+ }
317
+ ],
318
+ "constants": [
319
+ {
320
+ "name": "IntByteLength",
321
+ "value": {
322
+ "type": "U256",
323
+ "value": "32"
324
+ }
325
+ }
326
+ ],
327
+ "enums": [
328
+ {
329
+ "name": "ErrorCode",
330
+ "fields": [
331
+ {
332
+ "name": "InvalidArrayLength",
333
+ "value": {
334
+ "type": "U256",
335
+ "value": "550"
336
+ }
337
+ },
338
+ {
339
+ "name": "IndexOutOfBound",
340
+ "value": {
341
+ "type": "U256",
342
+ "value": "551"
343
+ }
344
+ },
345
+ {
346
+ "name": "InvalidByteVecLength",
347
+ "value": {
348
+ "type": "U256",
349
+ "value": "552"
350
+ }
351
+ }
352
+ ]
353
+ },
354
+ {
355
+ "name": "ErrorCodes",
356
+ "fields": [
357
+ {
358
+ "name": "AssetAddressCallerOnly",
359
+ "value": {
360
+ "type": "U256",
361
+ "value": "10"
362
+ }
363
+ },
364
+ {
365
+ "name": "TooManyActiveUnstakeVaults",
366
+ "value": {
367
+ "type": "U256",
368
+ "value": "11"
369
+ }
370
+ },
371
+ {
372
+ "name": "InvalidUnstakeDuration",
373
+ "value": {
374
+ "type": "U256",
375
+ "value": "12"
376
+ }
377
+ },
378
+ {
379
+ "name": "NonExistantUnstakeVault",
380
+ "value": {
381
+ "type": "U256",
382
+ "value": "13"
383
+ }
384
+ },
385
+ {
386
+ "name": "AmountMustBeGreaterThanZero",
387
+ "value": {
388
+ "type": "U256",
389
+ "value": "14"
390
+ }
391
+ }
392
+ ]
393
+ }
394
+ ],
395
+ "mapsSig": {
396
+ "names": [
397
+ "userActiveUnstakeVaults"
398
+ ],
399
+ "types": [
400
+ "Map[Address,ByteVec]"
401
+ ]
402
+ },
403
+ "stdInterfaceId": "0001"
404
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "version": "v4.2.5",
3
+ "name": "XAlphUnlockAndStartUnstake",
4
+ "bytecodeTemplate": "01010300020016b41700{2}0d0c{1}01100c0d{1}010c170116001601{2}a3{2}0d0d{0}010d18",
5
+ "fieldsSig": {
6
+ "names": [
7
+ "xAlphToken",
8
+ "xAlphStakeVault",
9
+ "amount"
10
+ ],
11
+ "types": [
12
+ "XAlphToken",
13
+ "XAlphStakeVault",
14
+ "U256"
15
+ ],
16
+ "isMutable": [
17
+ false,
18
+ false,
19
+ false
20
+ ]
21
+ },
22
+ "functions": [
23
+ {
24
+ "name": "main",
25
+ "paramNames": [],
26
+ "paramTypes": [],
27
+ "paramIsMutable": [],
28
+ "returnTypes": []
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,282 @@
1
+ {
2
+ "version": "v4.2.5",
3
+ "name": "GovernanceDemo",
4
+ "bytecode": "090c40c9419741f54217422b426c42a642b44382438d439843a801000206004058d3926b380bb417021602ce00774513087b140a5f5f6d61705f5f305f5f16004744cbc54c403f0c0d0d140a5f5f6d61705f5f305f5f16004744cb1705160501010d0d0d1605010117041703000b7a4c041816030c304c180c0d0d140a5f5f6d61705f5f315f5f16034044cb010116012a0c0e0c140a5f5f6d61705f5f315f5f16034044cb0102a00016012aa100160416012a0d0e0c140a5f5f6d61705f5f305f5f16004744cb01024a09ca140a5f5f6d61705f5f305f5f16004744b10c1601d201020100020700405ed365b06caeb417021602ce00774513087b140a5f5f6d61705f5f305f5f16004744cbc50d7b0c0d0d140a5f5f6d61705f5f305f5f16004744cb1706160601010d0d0d1606010117041703160416012b170516050d0e0c140a5f5f6d61705f5f305f5f16004744cb0102000b7a4c041816030c304c180c0d0d140a5f5f6d61705f5f315f5f16034044cb010116012b0c0e0c140a5f5f6d61705f5f315f5f16034044cb0102a00016012ba10016050c2f4c09ca0d0c140a5f5f6d61705f5f305f5f16004744cb010301000002004033d3ecf99ab7b4ce054513077b000919107b000a19117b56a101ce01ce02ce03ce041017000c170116011600314c14ca140a5f5f6d61705f5f315f5f16017a10314d0d2acf4044b10cd2010116010d2a17014a2805a0015e010000000012d33919f580b4ce054513077b00090f7b000a19117b56a10207a0025e010000000406d3068539face01ce02ce03ce040201000102021ad344a25325140a5f5f6d61705f5f305f5f16004744cbc50d7b0c0d0d140a5f5f6d61705f5f305f5f16004744cb1701160101010d0d0d1601010102010001010116d32e30a67700090f7b140a5f5f6d61705f5f315f5f16004044cbc50e7b0c0d0d140a5f5f6d61705f5f315f5f16004044cb010102010000000103d33cfd4f9ea000020100010300405cd376a80ea2b417011601480c7b00090f7b000a19117b140a5f5f6d61705f5f315f5f16004044cbc50e7b140a5f5f6d61705f5f305f5f16014744cbc50d7b0c0d0d140a5f5f6d61705f5f305f5f16014744cb01010c2f13067b0d0d0d140a5f5f6d61705f5f305f5f16014744cb01011702a00016022aa1000c0d0d140a5f5f6d61705f5f315f5f16004044cb010116022a0c0e0c140a5f5f6d61705f5f315f5f16004044cb010216000c0e0c140a5f5f6d61705f5f305f5f16014744cb01020616011600160260000000000104a0010c3002000000000104a0020c300200000000010700097a4c0318000a1902",
5
+ "codeHash": "1d77f89642f8b3bd6364388e7b9b8ad9d58815365d4e7a02a932fe65ab913078",
6
+ "fieldsSig": {
7
+ "names": [
8
+ "xalphStakeVault",
9
+ "proposalOptions",
10
+ "owner",
11
+ "totalVotedAmount",
12
+ "votingStartTime",
13
+ "votingEndTime"
14
+ ],
15
+ "types": [
16
+ "XAlphStakeVault",
17
+ "[U256;4]",
18
+ "Address",
19
+ "U256",
20
+ "U256",
21
+ "U256"
22
+ ],
23
+ "isMutable": [
24
+ false,
25
+ false,
26
+ false,
27
+ true,
28
+ true,
29
+ true
30
+ ]
31
+ },
32
+ "eventsSig": [
33
+ {
34
+ "name": "VotingStarted",
35
+ "fieldNames": [
36
+ "votingStartTime"
37
+ ],
38
+ "fieldTypes": [
39
+ "U256"
40
+ ]
41
+ },
42
+ {
43
+ "name": "VoteCast",
44
+ "fieldNames": [
45
+ "voter",
46
+ "proposalVoted",
47
+ "amount"
48
+ ],
49
+ "fieldTypes": [
50
+ "Address",
51
+ "U256",
52
+ "U256"
53
+ ]
54
+ },
55
+ {
56
+ "name": "VotingEnded",
57
+ "fieldNames": [
58
+ "votingEndTime"
59
+ ],
60
+ "fieldTypes": [
61
+ "U256"
62
+ ]
63
+ }
64
+ ],
65
+ "functions": [
66
+ {
67
+ "name": "onStake",
68
+ "paramNames": [
69
+ "user",
70
+ "addedAmount"
71
+ ],
72
+ "paramTypes": [
73
+ "Address",
74
+ "U256"
75
+ ],
76
+ "paramIsMutable": [
77
+ false,
78
+ false
79
+ ],
80
+ "returnTypes": []
81
+ },
82
+ {
83
+ "name": "onUnstake",
84
+ "paramNames": [
85
+ "user",
86
+ "removedAmount"
87
+ ],
88
+ "paramTypes": [
89
+ "Address",
90
+ "U256"
91
+ ],
92
+ "paramIsMutable": [
93
+ false,
94
+ false
95
+ ],
96
+ "returnTypes": []
97
+ },
98
+ {
99
+ "name": "startVoting",
100
+ "paramNames": [],
101
+ "paramTypes": [],
102
+ "paramIsMutable": [],
103
+ "returnTypes": []
104
+ },
105
+ {
106
+ "name": "endVoting",
107
+ "paramNames": [],
108
+ "paramTypes": [],
109
+ "paramIsMutable": [],
110
+ "returnTypes": []
111
+ },
112
+ {
113
+ "name": "getProposalOptions",
114
+ "paramNames": [],
115
+ "paramTypes": [],
116
+ "paramIsMutable": [],
117
+ "returnTypes": [
118
+ "[U256;4]"
119
+ ]
120
+ },
121
+ {
122
+ "name": "getUserVote",
123
+ "paramNames": [
124
+ "user"
125
+ ],
126
+ "paramTypes": [
127
+ "Address"
128
+ ],
129
+ "paramIsMutable": [
130
+ false
131
+ ],
132
+ "returnTypes": [
133
+ "VoteInfo"
134
+ ]
135
+ },
136
+ {
137
+ "name": "getProposalVotes",
138
+ "paramNames": [
139
+ "proposal"
140
+ ],
141
+ "paramTypes": [
142
+ "U256"
143
+ ],
144
+ "paramIsMutable": [
145
+ false
146
+ ],
147
+ "returnTypes": [
148
+ "U256"
149
+ ]
150
+ },
151
+ {
152
+ "name": "getTotalVotedAmount",
153
+ "paramNames": [],
154
+ "paramTypes": [],
155
+ "paramIsMutable": [],
156
+ "returnTypes": [
157
+ "U256"
158
+ ]
159
+ },
160
+ {
161
+ "name": "vote",
162
+ "paramNames": [
163
+ "proposal"
164
+ ],
165
+ "paramTypes": [
166
+ "U256"
167
+ ],
168
+ "paramIsMutable": [
169
+ false
170
+ ],
171
+ "returnTypes": []
172
+ },
173
+ {
174
+ "name": "isVotingStarted",
175
+ "paramNames": [],
176
+ "paramTypes": [],
177
+ "paramIsMutable": [],
178
+ "returnTypes": [
179
+ "Bool"
180
+ ]
181
+ },
182
+ {
183
+ "name": "isVotingEnded",
184
+ "paramNames": [],
185
+ "paramTypes": [],
186
+ "paramIsMutable": [],
187
+ "returnTypes": [
188
+ "Bool"
189
+ ]
190
+ },
191
+ {
192
+ "name": "isVotingActive",
193
+ "paramNames": [],
194
+ "paramTypes": [],
195
+ "paramIsMutable": [],
196
+ "returnTypes": [
197
+ "Bool"
198
+ ]
199
+ }
200
+ ],
201
+ "constants": [],
202
+ "enums": [
203
+ {
204
+ "name": "ErrorCodes",
205
+ "fields": [
206
+ {
207
+ "name": "AssetAddressCallerOnly",
208
+ "value": {
209
+ "type": "U256",
210
+ "value": "0"
211
+ }
212
+ },
213
+ {
214
+ "name": "UserNotStaked",
215
+ "value": {
216
+ "type": "U256",
217
+ "value": "1"
218
+ }
219
+ },
220
+ {
221
+ "name": "InvalidVoteProposal",
222
+ "value": {
223
+ "type": "U256",
224
+ "value": "2"
225
+ }
226
+ },
227
+ {
228
+ "name": "VotingNotStarted",
229
+ "value": {
230
+ "type": "U256",
231
+ "value": "3"
232
+ }
233
+ },
234
+ {
235
+ "name": "VotingAlreadyStarted",
236
+ "value": {
237
+ "type": "U256",
238
+ "value": "4"
239
+ }
240
+ },
241
+ {
242
+ "name": "VotingAlreadyEnded",
243
+ "value": {
244
+ "type": "U256",
245
+ "value": "5"
246
+ }
247
+ },
248
+ {
249
+ "name": "AlreadyVoted",
250
+ "value": {
251
+ "type": "U256",
252
+ "value": "6"
253
+ }
254
+ },
255
+ {
256
+ "name": "OwnerOnly",
257
+ "value": {
258
+ "type": "U256",
259
+ "value": "7"
260
+ }
261
+ },
262
+ {
263
+ "name": "StakeVaultCallerOnly",
264
+ "value": {
265
+ "type": "U256",
266
+ "value": "8"
267
+ }
268
+ }
269
+ ]
270
+ }
271
+ ],
272
+ "mapsSig": {
273
+ "names": [
274
+ "userVotes",
275
+ "proposalVotes"
276
+ ],
277
+ "types": [
278
+ "Map[Address,VoteInfo]",
279
+ "Map[U256,U256]"
280
+ ]
281
+ }
282
+ }