@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,297 @@
1
+ {
2
+ "version": "v4.2.5",
3
+ "name": "TokenPairFactory",
4
+ "bytecode": "050716402c403a406b408540a64123010001010008d302f1c0ffb4a0014513107b1600a102010001010008d34db5e042b4a0014513107b1600a101010000000103d34086275fa00102010302040018d3a2ac8580b417021602a0014513107b16021601a21602160116000f0da0020100170316030d0c1600010601000202000bd3c9a43b3cb4a0014513107b16010d0c160001060000020402101600711702160171170316021603314c031600160102160116000201030409004045d3fd02709216001602a50c337a4c061816001603a50c33130f7b1602160342130b7b16021603000517051704b116041605ce011406414c504800011305640c0c0c0c0c0c0c14001308641707170616001601a21604160544ce00160616070d1340ff3bc2170805160416051608a00061a0000d2aa100",
5
+ "codeHash": "597644c0643972e3d6e7f5a681e2d9908de74775e9b4e205e15ba39397a9e48c",
6
+ "fieldsSig": {
7
+ "names": [
8
+ "pairTemplateId",
9
+ "dexAccount0",
10
+ "pairSize",
11
+ "feeSetter",
12
+ "feeCollectorFactory"
13
+ ],
14
+ "types": [
15
+ "ByteVec",
16
+ "IDexAccount",
17
+ "U256",
18
+ "Address",
19
+ "FeeCollectorFactory"
20
+ ],
21
+ "isMutable": [
22
+ false,
23
+ false,
24
+ true,
25
+ true,
26
+ true
27
+ ]
28
+ },
29
+ "eventsSig": [
30
+ {
31
+ "name": "PairCreated",
32
+ "fieldNames": [
33
+ "token0",
34
+ "token1",
35
+ "pair",
36
+ "currentPairSize"
37
+ ],
38
+ "fieldTypes": [
39
+ "ByteVec",
40
+ "ByteVec",
41
+ "ByteVec",
42
+ "U256"
43
+ ]
44
+ }
45
+ ],
46
+ "functions": [
47
+ {
48
+ "name": "setFeeCollectorFactory",
49
+ "paramNames": [
50
+ "factory"
51
+ ],
52
+ "paramTypes": [
53
+ "FeeCollectorFactory"
54
+ ],
55
+ "paramIsMutable": [
56
+ false
57
+ ],
58
+ "returnTypes": []
59
+ },
60
+ {
61
+ "name": "updateFeeSetter",
62
+ "paramNames": [
63
+ "newFeeSetter"
64
+ ],
65
+ "paramTypes": [
66
+ "Address"
67
+ ],
68
+ "paramIsMutable": [
69
+ false
70
+ ],
71
+ "returnTypes": []
72
+ },
73
+ {
74
+ "name": "getFeeSetter",
75
+ "paramNames": [],
76
+ "paramTypes": [],
77
+ "paramIsMutable": [],
78
+ "returnTypes": [
79
+ "Address"
80
+ ]
81
+ },
82
+ {
83
+ "name": "enableFeeCollector",
84
+ "paramNames": [
85
+ "tokenPair",
86
+ "alphAmount"
87
+ ],
88
+ "paramTypes": [
89
+ "TokenPair",
90
+ "U256"
91
+ ],
92
+ "paramIsMutable": [
93
+ false,
94
+ false
95
+ ],
96
+ "returnTypes": []
97
+ },
98
+ {
99
+ "name": "updateFeeCollector",
100
+ "paramNames": [
101
+ "tokenPair",
102
+ "newFeeCollectorId"
103
+ ],
104
+ "paramTypes": [
105
+ "TokenPair",
106
+ "ByteVec"
107
+ ],
108
+ "paramIsMutable": [
109
+ false,
110
+ false
111
+ ],
112
+ "returnTypes": []
113
+ },
114
+ {
115
+ "name": "sortTokens",
116
+ "paramNames": [
117
+ "tokenA",
118
+ "tokenB"
119
+ ],
120
+ "paramTypes": [
121
+ "ByteVec",
122
+ "ByteVec"
123
+ ],
124
+ "paramIsMutable": [
125
+ false,
126
+ false
127
+ ],
128
+ "returnTypes": [
129
+ "ByteVec",
130
+ "ByteVec"
131
+ ]
132
+ },
133
+ {
134
+ "name": "createPair",
135
+ "paramNames": [
136
+ "payer",
137
+ "alphAmount",
138
+ "tokenAId",
139
+ "tokenBId"
140
+ ],
141
+ "paramTypes": [
142
+ "Address",
143
+ "U256",
144
+ "ByteVec",
145
+ "ByteVec"
146
+ ],
147
+ "paramIsMutable": [
148
+ false,
149
+ false,
150
+ false,
151
+ false
152
+ ],
153
+ "returnTypes": []
154
+ }
155
+ ],
156
+ "constants": [],
157
+ "enums": [
158
+ {
159
+ "name": "ErrorCodes",
160
+ "fields": [
161
+ {
162
+ "name": "ReserveOverflow",
163
+ "value": {
164
+ "type": "U256",
165
+ "value": "0"
166
+ }
167
+ },
168
+ {
169
+ "name": "InsufficientInitLiquidity",
170
+ "value": {
171
+ "type": "U256",
172
+ "value": "1"
173
+ }
174
+ },
175
+ {
176
+ "name": "InsufficientLiquidityMinted",
177
+ "value": {
178
+ "type": "U256",
179
+ "value": "2"
180
+ }
181
+ },
182
+ {
183
+ "name": "InsufficientLiquidityBurned",
184
+ "value": {
185
+ "type": "U256",
186
+ "value": "3"
187
+ }
188
+ },
189
+ {
190
+ "name": "InvalidToAddress",
191
+ "value": {
192
+ "type": "U256",
193
+ "value": "4"
194
+ }
195
+ },
196
+ {
197
+ "name": "InsufficientLiquidity",
198
+ "value": {
199
+ "type": "U256",
200
+ "value": "5"
201
+ }
202
+ },
203
+ {
204
+ "name": "InvalidTokenInId",
205
+ "value": {
206
+ "type": "U256",
207
+ "value": "6"
208
+ }
209
+ },
210
+ {
211
+ "name": "InvalidCalleeId",
212
+ "value": {
213
+ "type": "U256",
214
+ "value": "7"
215
+ }
216
+ },
217
+ {
218
+ "name": "InvalidK",
219
+ "value": {
220
+ "type": "U256",
221
+ "value": "8"
222
+ }
223
+ },
224
+ {
225
+ "name": "InsufficientOutputAmount",
226
+ "value": {
227
+ "type": "U256",
228
+ "value": "9"
229
+ }
230
+ },
231
+ {
232
+ "name": "InsufficientInputAmount",
233
+ "value": {
234
+ "type": "U256",
235
+ "value": "10"
236
+ }
237
+ },
238
+ {
239
+ "name": "IdenticalTokenIds",
240
+ "value": {
241
+ "type": "U256",
242
+ "value": "11"
243
+ }
244
+ },
245
+ {
246
+ "name": "Expired",
247
+ "value": {
248
+ "type": "U256",
249
+ "value": "12"
250
+ }
251
+ },
252
+ {
253
+ "name": "InsufficientToken0Amount",
254
+ "value": {
255
+ "type": "U256",
256
+ "value": "13"
257
+ }
258
+ },
259
+ {
260
+ "name": "InsufficientToken1Amount",
261
+ "value": {
262
+ "type": "U256",
263
+ "value": "14"
264
+ }
265
+ },
266
+ {
267
+ "name": "TokenNotExist",
268
+ "value": {
269
+ "type": "U256",
270
+ "value": "15"
271
+ }
272
+ },
273
+ {
274
+ "name": "InvalidCaller",
275
+ "value": {
276
+ "type": "U256",
277
+ "value": "16"
278
+ }
279
+ },
280
+ {
281
+ "name": "FeeCollectorNotEnabled",
282
+ "value": {
283
+ "type": "U256",
284
+ "value": "17"
285
+ }
286
+ },
287
+ {
288
+ "name": "InvalidAccount",
289
+ "value": {
290
+ "type": "U256",
291
+ "value": "18"
292
+ }
293
+ }
294
+ ]
295
+ }
296
+ ]
297
+ }
@@ -0,0 +1,192 @@
1
+ {
2
+ "version": "v4.0.0",
3
+ "name": "ExampleOracleSimple",
4
+ "bytecode": "060640354103414c419f41f0422701000205021bd3ebaef653160016010c0d36871702160016013717031602160336170416021603314c0416040d36170416031604020100030801407fd340d735c316020c300d7b1600160100001704170316040c2f4c04160316022d0216021604330c7b16001601160287170516051603334c0416040d361704160316053617030c1602361602381706160216062d1702160316062d17030c16063616062d0d351706160316041606373917030f1602370e3a170716070e16021607373637170716070e16021607373637170716070e16021607373637170716070e16021607373637170716070e16021607373637170716070e16021607373637170716031607370201000203014028d30dcd6a6a16010c300d7b16000c2f4c020c0216000d1340903b314c0616001340703b16012d4a0616000d1340703b16010001170216020d1340e03b310e7b1602020000010602402e0c0dce00010a17010c0dce00010b17020c0ece0001081704170316000c0dce0001092b170516050c304c10160116041603000216052c351701160216031604000216052c351702160116020201000004004028d3948fae95561343e82d0d13203b2e17001600a0022b170116011380015180340f7b16000003170317021602a0003616012da1031603a0013616012da1041602a1001603a1011600a10201000204011cd3a9d209fc0c0ece0001071703170216001602414c06a00316012c1340703c021600160341107ba00416012c1340703c02",
5
+ "codeHash": "c96ea41f2579f435d70c7801c2ec158031575b7571d8e8bbb2e460a8814cfbdf",
6
+ "fieldsSig": {
7
+ "names": [
8
+ "pair",
9
+ "price0CumulativeLast",
10
+ "price1CumulativeLast",
11
+ "blockTimeStampLast",
12
+ "price0Average",
13
+ "price1Average"
14
+ ],
15
+ "types": [
16
+ "TokenPair",
17
+ "U256",
18
+ "U256",
19
+ "U256",
20
+ "U256",
21
+ "U256"
22
+ ],
23
+ "isMutable": [
24
+ false,
25
+ true,
26
+ true,
27
+ true,
28
+ true,
29
+ true
30
+ ]
31
+ },
32
+ "eventsSig": [],
33
+ "functions": [
34
+ {
35
+ "name": "fullMul",
36
+ "paramNames": [
37
+ "x",
38
+ "y"
39
+ ],
40
+ "paramTypes": [
41
+ "U256",
42
+ "U256"
43
+ ],
44
+ "paramIsMutable": [
45
+ false,
46
+ false
47
+ ],
48
+ "returnTypes": [
49
+ "U256",
50
+ "U256"
51
+ ]
52
+ },
53
+ {
54
+ "name": "mulDiv",
55
+ "paramNames": [
56
+ "a",
57
+ "b",
58
+ "denominator"
59
+ ],
60
+ "paramTypes": [
61
+ "U256",
62
+ "U256",
63
+ "U256"
64
+ ],
65
+ "paramIsMutable": [
66
+ false,
67
+ false,
68
+ true
69
+ ],
70
+ "returnTypes": [
71
+ "U256"
72
+ ]
73
+ },
74
+ {
75
+ "name": "fraction",
76
+ "paramNames": [
77
+ "numerator",
78
+ "denominator"
79
+ ],
80
+ "paramTypes": [
81
+ "U256",
82
+ "U256"
83
+ ],
84
+ "paramIsMutable": [
85
+ false,
86
+ false
87
+ ],
88
+ "returnTypes": [
89
+ "U256"
90
+ ]
91
+ },
92
+ {
93
+ "name": "currentCumulativePrices",
94
+ "paramNames": [
95
+ "currentBlockTimeStamp"
96
+ ],
97
+ "paramTypes": [
98
+ "U256"
99
+ ],
100
+ "paramIsMutable": [
101
+ false
102
+ ],
103
+ "returnTypes": [
104
+ "U256",
105
+ "U256"
106
+ ]
107
+ },
108
+ {
109
+ "name": "update",
110
+ "paramNames": [],
111
+ "paramTypes": [],
112
+ "paramIsMutable": [],
113
+ "returnTypes": []
114
+ },
115
+ {
116
+ "name": "consult",
117
+ "paramNames": [
118
+ "tokenId",
119
+ "amountIn"
120
+ ],
121
+ "paramTypes": [
122
+ "ByteVec",
123
+ "U256"
124
+ ],
125
+ "paramIsMutable": [
126
+ false,
127
+ false
128
+ ],
129
+ "returnTypes": [
130
+ "U256"
131
+ ]
132
+ }
133
+ ],
134
+ "constants": [
135
+ {
136
+ "name": "Resolution",
137
+ "value": {
138
+ "type": "U256",
139
+ "value": "112"
140
+ }
141
+ },
142
+ {
143
+ "name": "Period",
144
+ "value": {
145
+ "type": "U256",
146
+ "value": "86400"
147
+ }
148
+ }
149
+ ],
150
+ "enums": [
151
+ {
152
+ "name": "ErrorCodes",
153
+ "fields": [
154
+ {
155
+ "name": "FullDivOverflow",
156
+ "value": {
157
+ "type": "U256",
158
+ "value": "0"
159
+ }
160
+ },
161
+ {
162
+ "name": "DivByZero",
163
+ "value": {
164
+ "type": "U256",
165
+ "value": "1"
166
+ }
167
+ },
168
+ {
169
+ "name": "FractionOverflow",
170
+ "value": {
171
+ "type": "U256",
172
+ "value": "2"
173
+ }
174
+ },
175
+ {
176
+ "name": "PeriodNotElapsed",
177
+ "value": {
178
+ "type": "U256",
179
+ "value": "3"
180
+ }
181
+ },
182
+ {
183
+ "name": "InvalidToken",
184
+ "value": {
185
+ "type": "U256",
186
+ "value": "4"
187
+ }
188
+ }
189
+ ]
190
+ }
191
+ ]
192
+ }
@@ -0,0 +1,185 @@
1
+ {
2
+ "version": "v4.2.5",
3
+ "name": "FeeCollectorFactoryImpl",
4
+ "bytecode": "0201402a010303050116b3ce014113107bce0116021302641300641704170316001601a21602ce0016031604c102",
5
+ "codeHash": "966f75cddefe774a87dbf778012f4f3f494b3a860f4c975d0c5262a1be185d49",
6
+ "fieldsSig": {
7
+ "names": [
8
+ "feeCollectorPerTokenPairTemplateId",
9
+ "tokenPairFactory"
10
+ ],
11
+ "types": [
12
+ "ByteVec",
13
+ "TokenPairFactory"
14
+ ],
15
+ "isMutable": [
16
+ false,
17
+ false
18
+ ]
19
+ },
20
+ "eventsSig": [],
21
+ "functions": [
22
+ {
23
+ "name": "createFeeCollector",
24
+ "paramNames": [
25
+ "caller",
26
+ "alphAmount",
27
+ "tokenPair"
28
+ ],
29
+ "paramTypes": [
30
+ "Address",
31
+ "U256",
32
+ "TokenPair"
33
+ ],
34
+ "paramIsMutable": [
35
+ false,
36
+ false,
37
+ false
38
+ ],
39
+ "returnTypes": [
40
+ "ByteVec"
41
+ ]
42
+ }
43
+ ],
44
+ "constants": [],
45
+ "enums": [
46
+ {
47
+ "name": "ErrorCodes",
48
+ "fields": [
49
+ {
50
+ "name": "ReserveOverflow",
51
+ "value": {
52
+ "type": "U256",
53
+ "value": "0"
54
+ }
55
+ },
56
+ {
57
+ "name": "InsufficientInitLiquidity",
58
+ "value": {
59
+ "type": "U256",
60
+ "value": "1"
61
+ }
62
+ },
63
+ {
64
+ "name": "InsufficientLiquidityMinted",
65
+ "value": {
66
+ "type": "U256",
67
+ "value": "2"
68
+ }
69
+ },
70
+ {
71
+ "name": "InsufficientLiquidityBurned",
72
+ "value": {
73
+ "type": "U256",
74
+ "value": "3"
75
+ }
76
+ },
77
+ {
78
+ "name": "InvalidToAddress",
79
+ "value": {
80
+ "type": "U256",
81
+ "value": "4"
82
+ }
83
+ },
84
+ {
85
+ "name": "InsufficientLiquidity",
86
+ "value": {
87
+ "type": "U256",
88
+ "value": "5"
89
+ }
90
+ },
91
+ {
92
+ "name": "InvalidTokenInId",
93
+ "value": {
94
+ "type": "U256",
95
+ "value": "6"
96
+ }
97
+ },
98
+ {
99
+ "name": "InvalidCalleeId",
100
+ "value": {
101
+ "type": "U256",
102
+ "value": "7"
103
+ }
104
+ },
105
+ {
106
+ "name": "InvalidK",
107
+ "value": {
108
+ "type": "U256",
109
+ "value": "8"
110
+ }
111
+ },
112
+ {
113
+ "name": "InsufficientOutputAmount",
114
+ "value": {
115
+ "type": "U256",
116
+ "value": "9"
117
+ }
118
+ },
119
+ {
120
+ "name": "InsufficientInputAmount",
121
+ "value": {
122
+ "type": "U256",
123
+ "value": "10"
124
+ }
125
+ },
126
+ {
127
+ "name": "IdenticalTokenIds",
128
+ "value": {
129
+ "type": "U256",
130
+ "value": "11"
131
+ }
132
+ },
133
+ {
134
+ "name": "Expired",
135
+ "value": {
136
+ "type": "U256",
137
+ "value": "12"
138
+ }
139
+ },
140
+ {
141
+ "name": "InsufficientToken0Amount",
142
+ "value": {
143
+ "type": "U256",
144
+ "value": "13"
145
+ }
146
+ },
147
+ {
148
+ "name": "InsufficientToken1Amount",
149
+ "value": {
150
+ "type": "U256",
151
+ "value": "14"
152
+ }
153
+ },
154
+ {
155
+ "name": "TokenNotExist",
156
+ "value": {
157
+ "type": "U256",
158
+ "value": "15"
159
+ }
160
+ },
161
+ {
162
+ "name": "InvalidCaller",
163
+ "value": {
164
+ "type": "U256",
165
+ "value": "16"
166
+ }
167
+ },
168
+ {
169
+ "name": "FeeCollectorNotEnabled",
170
+ "value": {
171
+ "type": "U256",
172
+ "value": "17"
173
+ }
174
+ },
175
+ {
176
+ "name": "InvalidAccount",
177
+ "value": {
178
+ "type": "U256",
179
+ "value": "18"
180
+ }
181
+ }
182
+ ]
183
+ }
184
+ ]
185
+ }