@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.
- package/README.md +4 -0
- package/clmm/artifacts/BitmapWord.ral.json +125 -0
- package/clmm/artifacts/BitmapWordDeployer.ral.json +31 -0
- package/clmm/artifacts/CreateConfig.ral.json +37 -0
- package/clmm/artifacts/CreateLiquidPool.ral.json +55 -0
- package/clmm/artifacts/DexAccount.ral.json +110 -0
- package/clmm/artifacts/LiquidityAmountsTest.ral.json +161 -0
- package/clmm/artifacts/LiquidityManagmentTest.ral.json +384 -0
- package/clmm/artifacts/Pool.ral.json +1530 -0
- package/clmm/artifacts/PoolConfig.ral.json +31 -0
- package/clmm/artifacts/PoolFactory.ral.json +300 -0
- package/clmm/artifacts/PoolRouterDemo.ral.json +49 -0
- package/clmm/artifacts/PoolUser.ral.json +89 -0
- package/clmm/artifacts/Position.ral.json +183 -0
- package/clmm/artifacts/PositionManager.ral.json +416 -0
- package/clmm/artifacts/SwapWithoutAccount.ral.json +46 -0
- package/clmm/artifacts/TestToken.ral.json +68 -0
- package/clmm/artifacts/Tick.ral.json +161 -0
- package/clmm/artifacts/TickBitmapTest.ral.json +220 -0
- package/clmm/artifacts/constants.ral.json +81 -0
- package/clmm/artifacts/structs.ral.json +335 -0
- package/clmm/artifacts/ts/BitmapWord.ts +337 -0
- package/clmm/artifacts/ts/BitmapWordDeployer.ts +164 -0
- package/clmm/artifacts/ts/DexAccount.ts +330 -0
- package/clmm/artifacts/ts/LiquidityAmountsTest.ts +464 -0
- package/clmm/artifacts/ts/LiquidityManagmentTest.ts +859 -0
- package/clmm/artifacts/ts/Pool.ts +2535 -0
- package/clmm/artifacts/ts/PoolConfig.ts +179 -0
- package/clmm/artifacts/ts/PoolFactory.ts +640 -0
- package/clmm/artifacts/ts/PoolUser.ts +237 -0
- package/clmm/artifacts/ts/Position.ts +440 -0
- package/clmm/artifacts/ts/PositionManager.ts +929 -0
- package/clmm/artifacts/ts/TestToken.ts +277 -0
- package/clmm/artifacts/ts/Tick.ts +351 -0
- package/clmm/artifacts/ts/TickBitmapTest.ts +512 -0
- package/clmm/artifacts/ts/constants.ts +17 -0
- package/clmm/artifacts/ts/contracts.ts +26 -0
- package/clmm/artifacts/ts/deployments.ts +160 -0
- package/clmm/artifacts/ts/index.ts +20 -0
- package/clmm/artifacts/ts/scripts.ts +76 -0
- package/clmm/artifacts/ts/types.ts +105 -0
- package/clmm/deployments/.deployments.devnet.json +350 -0
- package/clmm/deployments/.deployments.testnet.json +350 -0
- package/cpmm/artifacts/dex/DexAccount.ral.json +110 -0
- package/cpmm/artifacts/dex/Router.ral.json +361 -0
- package/cpmm/artifacts/dex/TokenPair.ral.json +512 -0
- package/cpmm/artifacts/dex/TokenPairFactory.ral.json +297 -0
- package/cpmm/artifacts/examples/ExampleOracleSimple.ral.json +192 -0
- package/cpmm/artifacts/examples/FeeCollectorFactoryImpl.ral.json +185 -0
- package/cpmm/artifacts/examples/FeeCollectorPerTokenPairImpl.ral.json +216 -0
- package/cpmm/artifacts/examples/FullMathTest.ral.json +123 -0
- package/cpmm/artifacts/scripts/AddLiquidity.ral.json +46 -0
- package/cpmm/artifacts/scripts/Burn.ral.json +31 -0
- package/cpmm/artifacts/scripts/CollectFee.ral.json +25 -0
- package/cpmm/artifacts/scripts/CreatePair.ral.json +37 -0
- package/cpmm/artifacts/scripts/CreatePairAndAddLiquidity.ral.json +43 -0
- package/cpmm/artifacts/scripts/EnableFeeCollector.ral.json +28 -0
- package/cpmm/artifacts/scripts/Mint.ral.json +34 -0
- package/cpmm/artifacts/scripts/RemoveLiquidity.ral.json +43 -0
- package/cpmm/artifacts/scripts/SetFeeCollectorFactory.ral.json +28 -0
- package/cpmm/artifacts/scripts/Swap.ral.json +46 -0
- package/cpmm/artifacts/scripts/SwapMaxIn.ral.json +46 -0
- package/cpmm/artifacts/scripts/SwapMinOut.ral.json +46 -0
- package/cpmm/artifacts/test/GetToken.ral.json +31 -0
- package/cpmm/artifacts/test/MathTest.ral.json +49 -0
- package/cpmm/artifacts/test/TestToken.ral.json +87 -0
- package/cpmm/artifacts/ts/DexAccount.ts +329 -0
- package/cpmm/artifacts/ts/ExampleOracleSimple.ts +383 -0
- package/cpmm/artifacts/ts/FeeCollectorFactoryImpl.ts +227 -0
- package/cpmm/artifacts/ts/FeeCollectorPerTokenPairImpl.ts +327 -0
- package/cpmm/artifacts/ts/FullMathTest.ts +251 -0
- package/cpmm/artifacts/ts/MathTest.ts +183 -0
- package/cpmm/artifacts/ts/Router.ts +554 -0
- package/cpmm/artifacts/ts/TestToken.ts +312 -0
- package/cpmm/artifacts/ts/TokenPair.ts +947 -0
- package/cpmm/artifacts/ts/TokenPairFactory.ts +501 -0
- package/cpmm/artifacts/ts/contracts.ts +26 -0
- package/cpmm/artifacts/ts/deployments.ts +109 -0
- package/cpmm/artifacts/ts/index.ts +16 -0
- package/cpmm/artifacts/ts/scripts.ts +142 -0
- package/cpmm/deployments/.deployments.devnet.json +77 -0
- package/cpmm/deployments/.deployments.testnet.json +79 -0
- package/lib/index.d.mts +8800 -0
- package/lib/index.d.ts +8800 -0
- package/lib/index.js +21769 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +22118 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +80 -0
- package/src/clmm/clmm.ts +607 -0
- package/src/clmm/constants.ts +7 -0
- package/src/clmm/index.ts +6 -0
- package/src/clmm/liquidity.ts +163 -0
- package/src/clmm/pool.ts +154 -0
- package/src/clmm/tick.ts +335 -0
- package/src/clmm/types.ts +155 -0
- package/src/common/constants.ts +1 -0
- package/src/common/error.ts +46 -0
- package/src/common/index.ts +7 -0
- package/src/common/logger.ts +82 -0
- package/src/common/math.ts +88 -0
- package/src/common/numeric.ts +64 -0
- package/src/common/types.ts +49 -0
- package/src/common/utils.ts +3 -0
- package/src/cpmm/constants.ts +2 -0
- package/src/cpmm/cpmm.ts +631 -0
- package/src/cpmm/index.ts +3 -0
- package/src/cpmm/types.ts +113 -0
- package/src/index.ts +25 -0
- package/src/moduleBase.ts +64 -0
- package/src/staking/index.ts +4 -0
- package/src/staking/settings.ts +38 -0
- package/src/staking/staking.ts +277 -0
- package/src/staking/types.ts +15 -0
- package/src/staking/utils.ts +25 -0
- package/src/token/index.ts +1 -0
- package/src/token/token.ts +163 -0
- package/src/zeta.ts +105 -0
- package/staking/artifacts/AlphStakeAndLock.ral.json +31 -0
- package/staking/artifacts/AlphUnstakeVault.ral.json +151 -0
- package/staking/artifacts/XAlphStakeVault.ral.json +559 -0
- package/staking/artifacts/XAlphToken.ral.json +404 -0
- package/staking/artifacts/XAlphUnlockAndStartUnstake.ral.json +31 -0
- package/staking/artifacts/examples/GovernanceDemo.ral.json +282 -0
- package/staking/artifacts/examples/RewardSharingVault.ral.json +253 -0
- package/staking/artifacts/structs.ral.json +47 -0
- package/staking/artifacts/ts/AlphUnstakeVault.ts +354 -0
- package/staking/artifacts/ts/FullMathTest.ts +175 -0
- package/staking/artifacts/ts/GovernanceDemo.ts +726 -0
- package/staking/artifacts/ts/RewardSharingVault.ts +559 -0
- package/staking/artifacts/ts/TestDynamicArrayByteVec32.ts +431 -0
- package/staking/artifacts/ts/TestDynamicSortedArrayForU256.ts +516 -0
- package/staking/artifacts/ts/TestMerkleProof.ts +343 -0
- package/staking/artifacts/ts/XAlphStakeVault.ts +1120 -0
- package/staking/artifacts/ts/XAlphToken.ts +835 -0
- package/staking/artifacts/ts/contracts.ts +26 -0
- package/staking/artifacts/ts/deployments.ts +109 -0
- package/staking/artifacts/ts/index.ts +15 -0
- package/staking/artifacts/ts/scripts.ts +35 -0
- package/staking/artifacts/ts/types.ts +19 -0
- package/staking/artifacts/utils/FullMathTest.ral.json +57 -0
- package/staking/artifacts/utils/TestDynamicArrayByteVec32.ral.json +165 -0
- package/staking/artifacts/utils/TestDynamicSortedArrayForU256.ral.json +189 -0
- package/staking/artifacts/utils/TestMerkleProof.ral.json +134 -0
- package/staking/deployments/.deployments.devnet.json +77 -0
- package/staking/deployments/.deployments.testnet.json +78 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.3.0",
|
|
3
|
+
"name": "PoolConfig",
|
|
4
|
+
"bytecode": "030112010000000305d3bda4d814ce00ce01ce0202",
|
|
5
|
+
"codeHash": "aa0838a7a189126cf0627d909b65ba3cfc692813db3d5ccd950763a87d52a0d6",
|
|
6
|
+
"fieldsSig": {
|
|
7
|
+
"names": [
|
|
8
|
+
"config"
|
|
9
|
+
],
|
|
10
|
+
"types": [
|
|
11
|
+
"Config"
|
|
12
|
+
],
|
|
13
|
+
"isMutable": [
|
|
14
|
+
false
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"eventsSig": [],
|
|
18
|
+
"functions": [
|
|
19
|
+
{
|
|
20
|
+
"name": "get",
|
|
21
|
+
"paramNames": [],
|
|
22
|
+
"paramTypes": [],
|
|
23
|
+
"paramIsMutable": [],
|
|
24
|
+
"returnTypes": [
|
|
25
|
+
"Config"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"constants": [],
|
|
30
|
+
"enums": []
|
|
31
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.3.0",
|
|
3
|
+
"name": "PoolFactory",
|
|
4
|
+
"bytecode": "08090a1f403540a040ed41ce41f5422b424500000101010316004002000003040109160016020000cc17031601160344020000030401091600160116020001170316001603cc020000010401403a12bff276187a7a16003a7a05294b033a224a023a90160021170112800d89e87a7a16003a7a05294b033a904a023a22160021170216021601207a7a16003a7a05294b033a904a023a223d0d2a170313ccffffffffffffffffffffffffffffffff16032d0201000307014028d31c03e050b4ce00451341937b16001601160213036413006417041703a0001705a000000017061606ce0516031604c118a0000d2aa1000516055e07160116001605601605020100054020014079d3530365c2160071160171311342bd7b16020000cb17050c0f1605010017081707170616060003170916030d0dce010105170a1603160a0c170d170c170b0c0c0c0c0c0c0c0c0c171a171917181717171617151714171317120c0c0c171d171c171b0c0c171f171eb1ce02ce06ce03ce0416021600160116041607160616091406414c50480002130d640c160b160c160d0c16121613161416151616161716181619161a161b161c161d161e161f131364170f170eb116001601441602000117101610ce01160e160fc1171106161116001601160261161102010004050012d32d2d48cdb4ce00451342bf7bb1160216034416010002170416000d0c160401330103090a001ad3132dd93db4ce00451342be7bb11601160244160000021709160316041608a316031605160616071608110c1609013201000303000ad3333a48b8b4ce00451341937b160016011602bb",
|
|
5
|
+
"codeHash": "4f2990418f84360134e2fe3c2732c0ad191b52d772a8406ae9afe6e87c427bf3",
|
|
6
|
+
"fieldsSig": {
|
|
7
|
+
"names": [
|
|
8
|
+
"owner",
|
|
9
|
+
"poolTemplate",
|
|
10
|
+
"positionTemplate",
|
|
11
|
+
"tickTemplate",
|
|
12
|
+
"wordTemplate",
|
|
13
|
+
"poolConfigTemplate",
|
|
14
|
+
"dexAccountTemplate",
|
|
15
|
+
"nextConfigIndex"
|
|
16
|
+
],
|
|
17
|
+
"types": [
|
|
18
|
+
"Address",
|
|
19
|
+
"ByteVec",
|
|
20
|
+
"ByteVec",
|
|
21
|
+
"ByteVec",
|
|
22
|
+
"ByteVec",
|
|
23
|
+
"ByteVec",
|
|
24
|
+
"ByteVec",
|
|
25
|
+
"U256"
|
|
26
|
+
],
|
|
27
|
+
"isMutable": [
|
|
28
|
+
false,
|
|
29
|
+
false,
|
|
30
|
+
false,
|
|
31
|
+
false,
|
|
32
|
+
false,
|
|
33
|
+
false,
|
|
34
|
+
false,
|
|
35
|
+
true
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"eventsSig": [
|
|
39
|
+
{
|
|
40
|
+
"name": "ConfigCreated",
|
|
41
|
+
"fieldNames": [
|
|
42
|
+
"index"
|
|
43
|
+
],
|
|
44
|
+
"fieldTypes": [
|
|
45
|
+
"U256"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "PoolCreated",
|
|
50
|
+
"fieldNames": [
|
|
51
|
+
"id",
|
|
52
|
+
"token0",
|
|
53
|
+
"token1",
|
|
54
|
+
"configIndex"
|
|
55
|
+
],
|
|
56
|
+
"fieldTypes": [
|
|
57
|
+
"ByteVec",
|
|
58
|
+
"ByteVec",
|
|
59
|
+
"ByteVec",
|
|
60
|
+
"U256"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "FeeTierEnabled",
|
|
65
|
+
"fieldNames": [
|
|
66
|
+
"fee",
|
|
67
|
+
"tickSpacing",
|
|
68
|
+
"index"
|
|
69
|
+
],
|
|
70
|
+
"fieldTypes": [
|
|
71
|
+
"U256",
|
|
72
|
+
"I256",
|
|
73
|
+
"U256"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"functions": [
|
|
78
|
+
{
|
|
79
|
+
"name": "configPath",
|
|
80
|
+
"paramNames": [
|
|
81
|
+
"configIndex_"
|
|
82
|
+
],
|
|
83
|
+
"paramTypes": [
|
|
84
|
+
"U256"
|
|
85
|
+
],
|
|
86
|
+
"paramIsMutable": [
|
|
87
|
+
false
|
|
88
|
+
],
|
|
89
|
+
"returnTypes": [
|
|
90
|
+
"ByteVec"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "poolPath",
|
|
95
|
+
"paramNames": [
|
|
96
|
+
"factory",
|
|
97
|
+
"tokens",
|
|
98
|
+
"configIndex_"
|
|
99
|
+
],
|
|
100
|
+
"paramTypes": [
|
|
101
|
+
"PoolFactory",
|
|
102
|
+
"ByteVec",
|
|
103
|
+
"U256"
|
|
104
|
+
],
|
|
105
|
+
"paramIsMutable": [
|
|
106
|
+
false,
|
|
107
|
+
false,
|
|
108
|
+
false
|
|
109
|
+
],
|
|
110
|
+
"returnTypes": [
|
|
111
|
+
"ByteVec"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "poolContractId",
|
|
116
|
+
"paramNames": [
|
|
117
|
+
"factory",
|
|
118
|
+
"tokens",
|
|
119
|
+
"configIndex_"
|
|
120
|
+
],
|
|
121
|
+
"paramTypes": [
|
|
122
|
+
"PoolFactory",
|
|
123
|
+
"ByteVec",
|
|
124
|
+
"U256"
|
|
125
|
+
],
|
|
126
|
+
"paramIsMutable": [
|
|
127
|
+
false,
|
|
128
|
+
false,
|
|
129
|
+
false
|
|
130
|
+
],
|
|
131
|
+
"returnTypes": [
|
|
132
|
+
"ByteVec"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "tickSpacingToMaxLiquidityPerTick",
|
|
137
|
+
"paramNames": [
|
|
138
|
+
"tickSpacing"
|
|
139
|
+
],
|
|
140
|
+
"paramTypes": [
|
|
141
|
+
"I256"
|
|
142
|
+
],
|
|
143
|
+
"paramIsMutable": [
|
|
144
|
+
false
|
|
145
|
+
],
|
|
146
|
+
"returnTypes": [
|
|
147
|
+
"U256"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "createConfig",
|
|
152
|
+
"paramNames": [
|
|
153
|
+
"config"
|
|
154
|
+
],
|
|
155
|
+
"paramTypes": [
|
|
156
|
+
"Config"
|
|
157
|
+
],
|
|
158
|
+
"paramIsMutable": [
|
|
159
|
+
false
|
|
160
|
+
],
|
|
161
|
+
"returnTypes": [
|
|
162
|
+
"U256"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "create",
|
|
167
|
+
"paramNames": [
|
|
168
|
+
"token0",
|
|
169
|
+
"token1",
|
|
170
|
+
"configIndex",
|
|
171
|
+
"sqrtPriceX96",
|
|
172
|
+
"rewardToken"
|
|
173
|
+
],
|
|
174
|
+
"paramTypes": [
|
|
175
|
+
"ByteVec",
|
|
176
|
+
"ByteVec",
|
|
177
|
+
"U256",
|
|
178
|
+
"U256",
|
|
179
|
+
"ByteVec"
|
|
180
|
+
],
|
|
181
|
+
"paramIsMutable": [
|
|
182
|
+
false,
|
|
183
|
+
false,
|
|
184
|
+
false,
|
|
185
|
+
false,
|
|
186
|
+
false
|
|
187
|
+
],
|
|
188
|
+
"returnTypes": [
|
|
189
|
+
"Pool"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "collectProtocolFees",
|
|
194
|
+
"paramNames": [
|
|
195
|
+
"recipient",
|
|
196
|
+
"configIndex",
|
|
197
|
+
"token0",
|
|
198
|
+
"token1"
|
|
199
|
+
],
|
|
200
|
+
"paramTypes": [
|
|
201
|
+
"Address",
|
|
202
|
+
"U256",
|
|
203
|
+
"ByteVec",
|
|
204
|
+
"ByteVec"
|
|
205
|
+
],
|
|
206
|
+
"paramIsMutable": [
|
|
207
|
+
false,
|
|
208
|
+
false,
|
|
209
|
+
false,
|
|
210
|
+
false
|
|
211
|
+
],
|
|
212
|
+
"returnTypes": []
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "setRewardParams",
|
|
216
|
+
"paramNames": [
|
|
217
|
+
"configIndex",
|
|
218
|
+
"token0",
|
|
219
|
+
"token1",
|
|
220
|
+
"payer",
|
|
221
|
+
"tokenId",
|
|
222
|
+
"index",
|
|
223
|
+
"openTime",
|
|
224
|
+
"endTime",
|
|
225
|
+
"amount"
|
|
226
|
+
],
|
|
227
|
+
"paramTypes": [
|
|
228
|
+
"U256",
|
|
229
|
+
"ByteVec",
|
|
230
|
+
"ByteVec",
|
|
231
|
+
"Address",
|
|
232
|
+
"ByteVec",
|
|
233
|
+
"U256",
|
|
234
|
+
"U256",
|
|
235
|
+
"U256",
|
|
236
|
+
"U256"
|
|
237
|
+
],
|
|
238
|
+
"paramIsMutable": [
|
|
239
|
+
false,
|
|
240
|
+
false,
|
|
241
|
+
false,
|
|
242
|
+
false,
|
|
243
|
+
false,
|
|
244
|
+
false,
|
|
245
|
+
false,
|
|
246
|
+
false,
|
|
247
|
+
false
|
|
248
|
+
],
|
|
249
|
+
"returnTypes": []
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "upgrate",
|
|
253
|
+
"paramNames": [
|
|
254
|
+
"newBytecode",
|
|
255
|
+
"newEncodedImmFields",
|
|
256
|
+
"newEncodedMutFields"
|
|
257
|
+
],
|
|
258
|
+
"paramTypes": [
|
|
259
|
+
"ByteVec",
|
|
260
|
+
"ByteVec",
|
|
261
|
+
"ByteVec"
|
|
262
|
+
],
|
|
263
|
+
"paramIsMutable": [
|
|
264
|
+
false,
|
|
265
|
+
false,
|
|
266
|
+
false
|
|
267
|
+
],
|
|
268
|
+
"returnTypes": []
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"constants": [],
|
|
272
|
+
"enums": [
|
|
273
|
+
{
|
|
274
|
+
"name": "FactoryError",
|
|
275
|
+
"fields": [
|
|
276
|
+
{
|
|
277
|
+
"name": "InvalidTokenOrder",
|
|
278
|
+
"value": {
|
|
279
|
+
"type": "U256",
|
|
280
|
+
"value": "701"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "UnauthorizedRewardSender",
|
|
285
|
+
"value": {
|
|
286
|
+
"type": "U256",
|
|
287
|
+
"value": "702"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "UnauthorizedFeeCollector",
|
|
292
|
+
"value": {
|
|
293
|
+
"type": "U256",
|
|
294
|
+
"value": "703"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.3.0",
|
|
3
|
+
"name": "PoolRouterDemo",
|
|
4
|
+
"bytecodeTemplate": "010103004026004270b41700{8}1600{0}{1}{2}{3}{4}{6}{7}13091308{5}010017081707170617051704170317021701{8}0c2f4c405016000d0c{7}010116007a13c40de0b6b3a7640000a2160113c40de0b6b3a7640000a3160016000b0613800f4240110e16040125181816007a160113c40de0b6b3a7640000a3160213c40de0b6b3a7640000a3160016000b0613800f4240110e16050125181816007a160113c40de0b6b3a7640000a3160313c40de0b6b3a7640000a3160016000b0613800f4240110e16060125181816007a160213c40de0b6b3a7640000a3160313c40de0b6b3a7640000a3160016000b0613800f4240110e1607012518180c6717090d67170a0e67170b0f67170c{8}0d2f4c403ecd16010d13c9010000000000000000000000001400110d16080105170d16007a13c40de0b6b3a7640000a2160113c40de0b6b3a7640000a3160016000b0613800f4240110e160d012518181400170e16001602a5170f1600160113c40de0b6b3a7640000a316001600160203120a13c101000276a30d2a160e13070e1605012a181816001602a5160f2b0c331343e97b{8}0e2f4c40241603160c44171016001603a517111600160113c40de0b6b3a7640000a316001600160303120a13c101000276a30d2a161013070e1605012a181816001603a516112b0c331343ea7b{8}0f2f4c40241601160b44171216001601a517131600160213c40de0b6b3a7640000a316001600160103120a13c101000276a30d2a161213070e1607012a181816001601a516132b0c331343eb7b{8}102f4c40241602160a44171416001602a517151600160313c40de0b6b3a7640000a316001600160204120a13d0fffd8963efd1fc6a506488495d951d5263988d260d2b161413070e1606012a181816001602a516152b0c331343ec7b{8}112f4c40221400171616001601a517171600160213c40de0b6b3a7640000a316001600160104120a13d0fffd8963efd1fc6a506488495d951d5263988d260d2b161613070e1605012a181816001601a516172b0c331343ed7b{8}13062f4c40221400171816001602a517191600160113c40de0b6b3a7640000a316001600160103123613c101000276a30d2a161813070e1605012a181816001602a516192b130a2f1343ee7b{8}13072f4c40241601160a44171a16001603a5171b1600160113c40de0b6b3a7640000a316001600160103123613c101000276a30d2a161a13070e1607012a181816001603a5161b2b130a2f1343f07b{8}13082f4c40241601160b44171c16001602a5171d1600160113c40de0b6b3a7640000a316001600160104123613d0fffd8963efd1fc6a506488495d951d5263988d260d2b161c13070e1607012a181816001602a5161d2b130a2f1343f07b{8}13092f4c40241602160a44171e16001603a5171f1600160213c40de0b6b3a7640000a316001600160203123613c101000276a30d2a161e13070e1606012a181816001603a5161f2b130a2f1343f07b{8}130a2f4c40221400172016001601a517211600160213c40de0b6b3a7640000a316001600160204123613d0fffd8963efd1fc6a506488495d951d5263988d260d2b162013070e1605012a181816001601a516212b130a2f1343ee7b{8}130b2f4c40271601160b44cd44160944172216001602a51723160013c40de0b6b3a7640000a216001600cd04123613d0fffd8963efd1fc6a506488495d951d5263988d260d2b162213070e1607012a181816001602a516232b130a2f1343f07b{8}130c2f4c40261601160b44cd4416094417241600a417251600160213c40de0b6b3a7640000a316001600cd03120a13c101000276a30d2a162413070e1607012a18181600a416252b0c331343eb7b",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"pool_",
|
|
8
|
+
"position_",
|
|
9
|
+
"tick_",
|
|
10
|
+
"word_",
|
|
11
|
+
"factory_",
|
|
12
|
+
"user_",
|
|
13
|
+
"config_",
|
|
14
|
+
"dexAccount_",
|
|
15
|
+
"counter"
|
|
16
|
+
],
|
|
17
|
+
"types": [
|
|
18
|
+
"ByteVec",
|
|
19
|
+
"ByteVec",
|
|
20
|
+
"ByteVec",
|
|
21
|
+
"ByteVec",
|
|
22
|
+
"ByteVec",
|
|
23
|
+
"ByteVec",
|
|
24
|
+
"ByteVec",
|
|
25
|
+
"ByteVec",
|
|
26
|
+
"U256"
|
|
27
|
+
],
|
|
28
|
+
"isMutable": [
|
|
29
|
+
false,
|
|
30
|
+
false,
|
|
31
|
+
false,
|
|
32
|
+
false,
|
|
33
|
+
false,
|
|
34
|
+
false,
|
|
35
|
+
false,
|
|
36
|
+
false,
|
|
37
|
+
false
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"functions": [
|
|
41
|
+
{
|
|
42
|
+
"name": "main",
|
|
43
|
+
"paramNames": [],
|
|
44
|
+
"paramTypes": [],
|
|
45
|
+
"paramIsMutable": [],
|
|
46
|
+
"returnTypes": []
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.3.0",
|
|
3
|
+
"name": "PoolUser",
|
|
4
|
+
"bytecode": "08014198010009140840b7d30719041916000c304c09a000a001a002a003a004a005a006a00702b21301640c130164170a170914010016051609160a13c41bc16d674ec800001601c9a10014010116051609160a13c41bc16d674ec800001601c9a10114010216051609160a13c41bc16d674ec800001601c9a102b21602160316041605160716081307640c130164170c170b1401031606160b160cc1a107060c0c0f0da0070104170d061341f40c0f0da0070104170e06134bb80c0f0da0070104170f061367100c0f0da00701041710a00071a00171334c06a0001711a001a1001611a101a00171a00271334c06a0011712a002a1011612a102a00071a00171334c06a0001713a001a1001613a101cda000160d13c9010000000000000000000000001400110da0070105a103a000a001160e13c9010000000000000000000000001400110da0070105a104a000a002160f13c9010000000000000000000000001400110da0070105a105a001a002161013c9010000000000000000000000001400110da0070105a106a000a001a002a003a004a005a006a00702",
|
|
5
|
+
"codeHash": "9e1114eb366a5aaf1730e3b16068a672c09da46c4e5111267129c5a0bceeaa97",
|
|
6
|
+
"fieldsSig": {
|
|
7
|
+
"names": [
|
|
8
|
+
"token0",
|
|
9
|
+
"token1",
|
|
10
|
+
"token2",
|
|
11
|
+
"pool0",
|
|
12
|
+
"pool1",
|
|
13
|
+
"pool2",
|
|
14
|
+
"pool3",
|
|
15
|
+
"factory"
|
|
16
|
+
],
|
|
17
|
+
"types": [
|
|
18
|
+
"ByteVec",
|
|
19
|
+
"ByteVec",
|
|
20
|
+
"ByteVec",
|
|
21
|
+
"Pool",
|
|
22
|
+
"Pool",
|
|
23
|
+
"Pool",
|
|
24
|
+
"Pool",
|
|
25
|
+
"PoolFactory"
|
|
26
|
+
],
|
|
27
|
+
"isMutable": [
|
|
28
|
+
true,
|
|
29
|
+
true,
|
|
30
|
+
true,
|
|
31
|
+
true,
|
|
32
|
+
true,
|
|
33
|
+
true,
|
|
34
|
+
true,
|
|
35
|
+
true
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"eventsSig": [],
|
|
39
|
+
"functions": [
|
|
40
|
+
{
|
|
41
|
+
"name": "deploy",
|
|
42
|
+
"paramNames": [
|
|
43
|
+
"counter",
|
|
44
|
+
"payer",
|
|
45
|
+
"pool_",
|
|
46
|
+
"position_",
|
|
47
|
+
"tick_",
|
|
48
|
+
"word_",
|
|
49
|
+
"factory_",
|
|
50
|
+
"config_",
|
|
51
|
+
"dexAccount_"
|
|
52
|
+
],
|
|
53
|
+
"paramTypes": [
|
|
54
|
+
"U256",
|
|
55
|
+
"Address",
|
|
56
|
+
"ByteVec",
|
|
57
|
+
"ByteVec",
|
|
58
|
+
"ByteVec",
|
|
59
|
+
"ByteVec",
|
|
60
|
+
"ByteVec",
|
|
61
|
+
"ByteVec",
|
|
62
|
+
"ByteVec"
|
|
63
|
+
],
|
|
64
|
+
"paramIsMutable": [
|
|
65
|
+
false,
|
|
66
|
+
false,
|
|
67
|
+
false,
|
|
68
|
+
false,
|
|
69
|
+
false,
|
|
70
|
+
false,
|
|
71
|
+
false,
|
|
72
|
+
false,
|
|
73
|
+
false
|
|
74
|
+
],
|
|
75
|
+
"returnTypes": [
|
|
76
|
+
"ByteVec",
|
|
77
|
+
"ByteVec",
|
|
78
|
+
"ByteVec",
|
|
79
|
+
"Pool",
|
|
80
|
+
"Pool",
|
|
81
|
+
"Pool",
|
|
82
|
+
"Pool",
|
|
83
|
+
"PoolFactory"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"constants": [],
|
|
88
|
+
"enums": []
|
|
89
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.3.0",
|
|
3
|
+
"name": "Position",
|
|
4
|
+
"bytecode": "0a0819402c410e413141d741f84276428a01000001010ece007a494d470d13216217000c0d160001350201000000020ace007a494d470d132162ce01020000030901408d160016010c0d3687170316001601371704160316043616031604314c020d4a010c36170516050c2f4c04160416022d02160216053313415f7b160016011602871706160516061604334c020d4a010c361705160416063617040c1602361602381707160216072d1702160416072d17040c16073616072d0d351707160416051607373917040f1602370e3a170816080e16021608373637170816080e16021608373637170816080e16021608373637170816080e16021608373637170816080e16021608373637170816080e16021608373637170816041608370200000304011216001601160200021703160016011602870c334c0416030d2a0216030201000409034062d379a1c203b4ce00451343857ba0003f16001f3d17040c0c0c1707170617050c170816080f314c403ea0000c334c403516087a0f314d0d2a7816087a0f314d0d2ac32ba00013cd0100000000000000000000000000000000000216087a0f314d112a7916087a0f314d102ac316087a0f314d112a782a16087a0f314d102ac416080d2a17084a7fbe160116021603a103a102a1011604a1001605160616070201000202000ed3b478489ab4ce00451343857ba00416002aa104a00516012aa10501000308034056d3ad05a194b4ce00451343857b0c0c0c1705170417030c170616060f314c404016067a0f314d7816067a0f314d102ac3334c0916067a0f314d102ac34a0616067a0f314d781707160716067a0f314d0f2a7916067a0f314d102ac316072b16067a0f314d102ac416060d2a17064a7fbc16031604160502010000000406d3f97c255fa000a001a002a00302",
|
|
5
|
+
"codeHash": "893257ca0a6b91cb3976f1cdb74a6b56f8a9f0d54a8034e22e8281dd33c6f313",
|
|
6
|
+
"fieldsSig": {
|
|
7
|
+
"names": [
|
|
8
|
+
"parent",
|
|
9
|
+
"nftIndex",
|
|
10
|
+
"liquidity",
|
|
11
|
+
"growthsInside",
|
|
12
|
+
"tokensOwed",
|
|
13
|
+
"__stdInterfaceId"
|
|
14
|
+
],
|
|
15
|
+
"types": [
|
|
16
|
+
"Address",
|
|
17
|
+
"U256",
|
|
18
|
+
"U256",
|
|
19
|
+
"[U256;3]",
|
|
20
|
+
"[U256;3]",
|
|
21
|
+
"ByteVec"
|
|
22
|
+
],
|
|
23
|
+
"isMutable": [
|
|
24
|
+
false,
|
|
25
|
+
false,
|
|
26
|
+
true,
|
|
27
|
+
true,
|
|
28
|
+
true,
|
|
29
|
+
false
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"eventsSig": [],
|
|
33
|
+
"functions": [
|
|
34
|
+
{
|
|
35
|
+
"name": "getTokenUri",
|
|
36
|
+
"paramNames": [],
|
|
37
|
+
"paramTypes": [],
|
|
38
|
+
"paramIsMutable": [],
|
|
39
|
+
"returnTypes": [
|
|
40
|
+
"ByteVec"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "getCollectionIndex",
|
|
45
|
+
"paramNames": [],
|
|
46
|
+
"paramTypes": [],
|
|
47
|
+
"paramIsMutable": [],
|
|
48
|
+
"returnTypes": [
|
|
49
|
+
"ByteVec",
|
|
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": "mulDivRoundingUp",
|
|
76
|
+
"paramNames": [
|
|
77
|
+
"a",
|
|
78
|
+
"b",
|
|
79
|
+
"denominator"
|
|
80
|
+
],
|
|
81
|
+
"paramTypes": [
|
|
82
|
+
"U256",
|
|
83
|
+
"U256",
|
|
84
|
+
"U256"
|
|
85
|
+
],
|
|
86
|
+
"paramIsMutable": [
|
|
87
|
+
false,
|
|
88
|
+
false,
|
|
89
|
+
false
|
|
90
|
+
],
|
|
91
|
+
"returnTypes": [
|
|
92
|
+
"U256"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "update",
|
|
97
|
+
"paramNames": [
|
|
98
|
+
"liquidityDelta",
|
|
99
|
+
"growths"
|
|
100
|
+
],
|
|
101
|
+
"paramTypes": [
|
|
102
|
+
"I256",
|
|
103
|
+
"[U256;3]"
|
|
104
|
+
],
|
|
105
|
+
"paramIsMutable": [
|
|
106
|
+
false,
|
|
107
|
+
false
|
|
108
|
+
],
|
|
109
|
+
"returnTypes": [
|
|
110
|
+
"[U256;3]"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "deposit",
|
|
115
|
+
"paramNames": [
|
|
116
|
+
"amount0",
|
|
117
|
+
"amount1"
|
|
118
|
+
],
|
|
119
|
+
"paramTypes": [
|
|
120
|
+
"U256",
|
|
121
|
+
"U256"
|
|
122
|
+
],
|
|
123
|
+
"paramIsMutable": [
|
|
124
|
+
false,
|
|
125
|
+
false
|
|
126
|
+
],
|
|
127
|
+
"returnTypes": []
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "collect",
|
|
131
|
+
"paramNames": [
|
|
132
|
+
"maxAmounts"
|
|
133
|
+
],
|
|
134
|
+
"paramTypes": [
|
|
135
|
+
"[U256;3]"
|
|
136
|
+
],
|
|
137
|
+
"paramIsMutable": [
|
|
138
|
+
false
|
|
139
|
+
],
|
|
140
|
+
"returnTypes": [
|
|
141
|
+
"[U256;3]"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "getState",
|
|
146
|
+
"paramNames": [],
|
|
147
|
+
"paramTypes": [],
|
|
148
|
+
"paramIsMutable": [],
|
|
149
|
+
"returnTypes": [
|
|
150
|
+
"U256",
|
|
151
|
+
"[U256;3]"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"constants": [],
|
|
156
|
+
"enums": [
|
|
157
|
+
{
|
|
158
|
+
"name": "FullMathError",
|
|
159
|
+
"fields": [
|
|
160
|
+
{
|
|
161
|
+
"name": "MulDivOverflow",
|
|
162
|
+
"value": {
|
|
163
|
+
"type": "U256",
|
|
164
|
+
"value": "351"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "PositionError",
|
|
171
|
+
"fields": [
|
|
172
|
+
{
|
|
173
|
+
"name": "NotParent",
|
|
174
|
+
"value": {
|
|
175
|
+
"type": "U256",
|
|
176
|
+
"value": "901"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"stdInterfaceId": "0003"
|
|
183
|
+
}
|