@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,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.2.5",
|
|
3
|
+
"name": "FeeCollectorPerTokenPairImpl",
|
|
4
|
+
"bytecode": "0204154032404b406701010202000ab3ce014113107b1600b2ce011601aa01020202000dd3f1ab4760b40c0dce0001024513107b1600ce011601ab01020101000bd320f98f62b40c0dce0001024513107b1600b001000000000dd3f2c71c4bb40c0dce0001024513107b0c0cce010111",
|
|
5
|
+
"codeHash": "a2326c414551281d90194411b00b614c3fc07cb568020e1ed2e1852099e6996e",
|
|
6
|
+
"fieldsSig": {
|
|
7
|
+
"names": [
|
|
8
|
+
"tokenPairFactory",
|
|
9
|
+
"tokenPair"
|
|
10
|
+
],
|
|
11
|
+
"types": [
|
|
12
|
+
"TokenPairFactory",
|
|
13
|
+
"TokenPair"
|
|
14
|
+
],
|
|
15
|
+
"isMutable": [
|
|
16
|
+
false,
|
|
17
|
+
false
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"eventsSig": [],
|
|
21
|
+
"functions": [
|
|
22
|
+
{
|
|
23
|
+
"name": "collectFee",
|
|
24
|
+
"paramNames": [
|
|
25
|
+
"from",
|
|
26
|
+
"amount"
|
|
27
|
+
],
|
|
28
|
+
"paramTypes": [
|
|
29
|
+
"Address",
|
|
30
|
+
"U256"
|
|
31
|
+
],
|
|
32
|
+
"paramIsMutable": [
|
|
33
|
+
false,
|
|
34
|
+
false
|
|
35
|
+
],
|
|
36
|
+
"returnTypes": []
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "withdraw",
|
|
40
|
+
"paramNames": [
|
|
41
|
+
"to",
|
|
42
|
+
"amount"
|
|
43
|
+
],
|
|
44
|
+
"paramTypes": [
|
|
45
|
+
"Address",
|
|
46
|
+
"U256"
|
|
47
|
+
],
|
|
48
|
+
"paramIsMutable": [
|
|
49
|
+
false,
|
|
50
|
+
false
|
|
51
|
+
],
|
|
52
|
+
"returnTypes": []
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "destroy",
|
|
56
|
+
"paramNames": [
|
|
57
|
+
"to"
|
|
58
|
+
],
|
|
59
|
+
"paramTypes": [
|
|
60
|
+
"Address"
|
|
61
|
+
],
|
|
62
|
+
"paramIsMutable": [
|
|
63
|
+
false
|
|
64
|
+
],
|
|
65
|
+
"returnTypes": []
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "collectFeeManually",
|
|
69
|
+
"paramNames": [],
|
|
70
|
+
"paramTypes": [],
|
|
71
|
+
"paramIsMutable": [],
|
|
72
|
+
"returnTypes": []
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"constants": [],
|
|
76
|
+
"enums": [
|
|
77
|
+
{
|
|
78
|
+
"name": "ErrorCodes",
|
|
79
|
+
"fields": [
|
|
80
|
+
{
|
|
81
|
+
"name": "ReserveOverflow",
|
|
82
|
+
"value": {
|
|
83
|
+
"type": "U256",
|
|
84
|
+
"value": "0"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "InsufficientInitLiquidity",
|
|
89
|
+
"value": {
|
|
90
|
+
"type": "U256",
|
|
91
|
+
"value": "1"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "InsufficientLiquidityMinted",
|
|
96
|
+
"value": {
|
|
97
|
+
"type": "U256",
|
|
98
|
+
"value": "2"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "InsufficientLiquidityBurned",
|
|
103
|
+
"value": {
|
|
104
|
+
"type": "U256",
|
|
105
|
+
"value": "3"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "InvalidToAddress",
|
|
110
|
+
"value": {
|
|
111
|
+
"type": "U256",
|
|
112
|
+
"value": "4"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "InsufficientLiquidity",
|
|
117
|
+
"value": {
|
|
118
|
+
"type": "U256",
|
|
119
|
+
"value": "5"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "InvalidTokenInId",
|
|
124
|
+
"value": {
|
|
125
|
+
"type": "U256",
|
|
126
|
+
"value": "6"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "InvalidCalleeId",
|
|
131
|
+
"value": {
|
|
132
|
+
"type": "U256",
|
|
133
|
+
"value": "7"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "InvalidK",
|
|
138
|
+
"value": {
|
|
139
|
+
"type": "U256",
|
|
140
|
+
"value": "8"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "InsufficientOutputAmount",
|
|
145
|
+
"value": {
|
|
146
|
+
"type": "U256",
|
|
147
|
+
"value": "9"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "InsufficientInputAmount",
|
|
152
|
+
"value": {
|
|
153
|
+
"type": "U256",
|
|
154
|
+
"value": "10"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "IdenticalTokenIds",
|
|
159
|
+
"value": {
|
|
160
|
+
"type": "U256",
|
|
161
|
+
"value": "11"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "Expired",
|
|
166
|
+
"value": {
|
|
167
|
+
"type": "U256",
|
|
168
|
+
"value": "12"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "InsufficientToken0Amount",
|
|
173
|
+
"value": {
|
|
174
|
+
"type": "U256",
|
|
175
|
+
"value": "13"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "InsufficientToken1Amount",
|
|
180
|
+
"value": {
|
|
181
|
+
"type": "U256",
|
|
182
|
+
"value": "14"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "TokenNotExist",
|
|
187
|
+
"value": {
|
|
188
|
+
"type": "U256",
|
|
189
|
+
"value": "15"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "InvalidCaller",
|
|
194
|
+
"value": {
|
|
195
|
+
"type": "U256",
|
|
196
|
+
"value": "16"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "FeeCollectorNotEnabled",
|
|
201
|
+
"value": {
|
|
202
|
+
"type": "U256",
|
|
203
|
+
"value": "17"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "InvalidAccount",
|
|
208
|
+
"value": {
|
|
209
|
+
"type": "U256",
|
|
210
|
+
"value": "18"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "FullMathTest",
|
|
4
|
+
"bytecode": "000340354103414c01000205021bd3ebaef653160016010c0d36871702160016013717031602160336170416021603314c0416040d36170416031604020100030801407fd340d735c316020c300d7b1600160100001704170316040c2f4c04160316022d0216021604330c7b16001601160287170516051603334c0416040d361704160316053617030c1602361602381706160216062d1702160316062d17030c16063616062d0d351706160316041606373917030f1602370e3a170716070e16021607373637170716070e16021607373637170716070e16021607373637170716070e16021607373637170716070e16021607373637170716070e16021607373637170716031607370201000203014028d30dcd6a6a16010c300d7b16000c2f4c020c0216000d1340903b314c0616001340703b16012d4a0616000d1340703b16010001170216020d1340e03b310e7b160202",
|
|
5
|
+
"codeHash": "4e6bd23542804a31c9fdc85b4a0065857c11fcd0b7a40a7ce2c66558001e2040",
|
|
6
|
+
"fieldsSig": {
|
|
7
|
+
"names": [],
|
|
8
|
+
"types": [],
|
|
9
|
+
"isMutable": []
|
|
10
|
+
},
|
|
11
|
+
"eventsSig": [],
|
|
12
|
+
"functions": [
|
|
13
|
+
{
|
|
14
|
+
"name": "fullMul",
|
|
15
|
+
"paramNames": [
|
|
16
|
+
"x",
|
|
17
|
+
"y"
|
|
18
|
+
],
|
|
19
|
+
"paramTypes": [
|
|
20
|
+
"U256",
|
|
21
|
+
"U256"
|
|
22
|
+
],
|
|
23
|
+
"paramIsMutable": [
|
|
24
|
+
false,
|
|
25
|
+
false
|
|
26
|
+
],
|
|
27
|
+
"returnTypes": [
|
|
28
|
+
"U256",
|
|
29
|
+
"U256"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "mulDiv",
|
|
34
|
+
"paramNames": [
|
|
35
|
+
"a",
|
|
36
|
+
"b",
|
|
37
|
+
"denominator"
|
|
38
|
+
],
|
|
39
|
+
"paramTypes": [
|
|
40
|
+
"U256",
|
|
41
|
+
"U256",
|
|
42
|
+
"U256"
|
|
43
|
+
],
|
|
44
|
+
"paramIsMutable": [
|
|
45
|
+
false,
|
|
46
|
+
false,
|
|
47
|
+
true
|
|
48
|
+
],
|
|
49
|
+
"returnTypes": [
|
|
50
|
+
"U256"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "fraction",
|
|
55
|
+
"paramNames": [
|
|
56
|
+
"numerator",
|
|
57
|
+
"denominator"
|
|
58
|
+
],
|
|
59
|
+
"paramTypes": [
|
|
60
|
+
"U256",
|
|
61
|
+
"U256"
|
|
62
|
+
],
|
|
63
|
+
"paramIsMutable": [
|
|
64
|
+
false,
|
|
65
|
+
false
|
|
66
|
+
],
|
|
67
|
+
"returnTypes": [
|
|
68
|
+
"U256"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"constants": [
|
|
73
|
+
{
|
|
74
|
+
"name": "Resolution",
|
|
75
|
+
"value": {
|
|
76
|
+
"type": "U256",
|
|
77
|
+
"value": "112"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"enums": [
|
|
82
|
+
{
|
|
83
|
+
"name": "ErrorCodes",
|
|
84
|
+
"fields": [
|
|
85
|
+
{
|
|
86
|
+
"name": "FullDivOverflow",
|
|
87
|
+
"value": {
|
|
88
|
+
"type": "U256",
|
|
89
|
+
"value": "0"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "DivByZero",
|
|
94
|
+
"value": {
|
|
95
|
+
"type": "U256",
|
|
96
|
+
"value": "1"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "FractionOverflow",
|
|
101
|
+
"value": {
|
|
102
|
+
"type": "U256",
|
|
103
|
+
"value": "2"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "PeriodNotElapsed",
|
|
108
|
+
"value": {
|
|
109
|
+
"type": "U256",
|
|
110
|
+
"value": "3"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "InvalidToken",
|
|
115
|
+
"value": {
|
|
116
|
+
"type": "U256",
|
|
117
|
+
"value": "4"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "AddLiquidity",
|
|
4
|
+
"bytecodeTemplate": "0101030002001c0c0e{2}010717011700{0}7a1600{3}a31601{4}a3{2}{0}{3}{4}{5}{6}{7}13070f{1}0101181818",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"sender",
|
|
8
|
+
"router",
|
|
9
|
+
"pair",
|
|
10
|
+
"amount0Desired",
|
|
11
|
+
"amount1Desired",
|
|
12
|
+
"amount0Min",
|
|
13
|
+
"amount1Min",
|
|
14
|
+
"deadline"
|
|
15
|
+
],
|
|
16
|
+
"types": [
|
|
17
|
+
"Address",
|
|
18
|
+
"Router",
|
|
19
|
+
"TokenPair",
|
|
20
|
+
"U256",
|
|
21
|
+
"U256",
|
|
22
|
+
"U256",
|
|
23
|
+
"U256",
|
|
24
|
+
"U256"
|
|
25
|
+
],
|
|
26
|
+
"isMutable": [
|
|
27
|
+
false,
|
|
28
|
+
false,
|
|
29
|
+
false,
|
|
30
|
+
false,
|
|
31
|
+
false,
|
|
32
|
+
false,
|
|
33
|
+
false,
|
|
34
|
+
false
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"functions": [
|
|
38
|
+
{
|
|
39
|
+
"name": "main",
|
|
40
|
+
"paramNames": [],
|
|
41
|
+
"paramTypes": [],
|
|
42
|
+
"paramIsMutable": [],
|
|
43
|
+
"returnTypes": []
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "Burn",
|
|
4
|
+
"bytecodeTemplate": "0101030000000c{1}{0}{2}a3{1}{2}0e0e{0}010f1818",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"tokenPair",
|
|
8
|
+
"sender",
|
|
9
|
+
"liquidity"
|
|
10
|
+
],
|
|
11
|
+
"types": [
|
|
12
|
+
"TokenPair",
|
|
13
|
+
"Address",
|
|
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,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "CollectFee",
|
|
4
|
+
"bytecodeTemplate": "010100000000040c0c{0}0103",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"feeCollector"
|
|
8
|
+
],
|
|
9
|
+
"types": [
|
|
10
|
+
"FeeCollectorPerTokenPairImpl"
|
|
11
|
+
],
|
|
12
|
+
"isMutable": [
|
|
13
|
+
false
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"functions": [
|
|
17
|
+
{
|
|
18
|
+
"name": "main",
|
|
19
|
+
"paramNames": [],
|
|
20
|
+
"paramTypes": [],
|
|
21
|
+
"paramIsMutable": [],
|
|
22
|
+
"returnTypes": []
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "CreatePair",
|
|
4
|
+
"bytecodeTemplate": "01010300000013{0}7a7a{2}a2{3}0da3{4}0da3{0}{2}{3}{4}100c{1}0106",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"payer",
|
|
8
|
+
"factory",
|
|
9
|
+
"alphAmount",
|
|
10
|
+
"tokenAId",
|
|
11
|
+
"tokenBId"
|
|
12
|
+
],
|
|
13
|
+
"types": [
|
|
14
|
+
"Address",
|
|
15
|
+
"TokenPairFactory",
|
|
16
|
+
"U256",
|
|
17
|
+
"ByteVec",
|
|
18
|
+
"ByteVec"
|
|
19
|
+
],
|
|
20
|
+
"isMutable": [
|
|
21
|
+
false,
|
|
22
|
+
false,
|
|
23
|
+
false,
|
|
24
|
+
false,
|
|
25
|
+
false
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"functions": [
|
|
29
|
+
{
|
|
30
|
+
"name": "main",
|
|
31
|
+
"paramNames": [],
|
|
32
|
+
"paramTypes": [],
|
|
33
|
+
"paramIsMutable": [],
|
|
34
|
+
"returnTypes": []
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.2.5",
|
|
3
|
+
"name": "CreatePairAndAddLiquidity",
|
|
4
|
+
"bytecodeTemplate": "0101030001004029{0}7a7a{2}a2{3}0da3{4}0da3{0}{2}{3}{4}100c{1}0106{1}{3}{4}44cc1700{0}7a{3}{5}a3{4}{6}a3{0}{5}{6}0f0d1600010e18",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"payer",
|
|
8
|
+
"factory",
|
|
9
|
+
"alphAmount",
|
|
10
|
+
"token0Id",
|
|
11
|
+
"token1Id",
|
|
12
|
+
"amount0",
|
|
13
|
+
"amount1"
|
|
14
|
+
],
|
|
15
|
+
"types": [
|
|
16
|
+
"Address",
|
|
17
|
+
"TokenPairFactory",
|
|
18
|
+
"U256",
|
|
19
|
+
"ByteVec",
|
|
20
|
+
"ByteVec",
|
|
21
|
+
"U256",
|
|
22
|
+
"U256"
|
|
23
|
+
],
|
|
24
|
+
"isMutable": [
|
|
25
|
+
false,
|
|
26
|
+
false,
|
|
27
|
+
false,
|
|
28
|
+
false,
|
|
29
|
+
false,
|
|
30
|
+
false,
|
|
31
|
+
false
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"functions": [
|
|
35
|
+
{
|
|
36
|
+
"name": "main",
|
|
37
|
+
"paramNames": [],
|
|
38
|
+
"paramTypes": [],
|
|
39
|
+
"paramIsMutable": [],
|
|
40
|
+
"returnTypes": []
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "EnableFeeCollector",
|
|
4
|
+
"bytecodeTemplate": "01010300000009b413c40de0b6b3a7640000a2{1}13c40de0b6b3a76400000e0c{0}0103",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"tokenPairFactory",
|
|
8
|
+
"tokenPair"
|
|
9
|
+
],
|
|
10
|
+
"types": [
|
|
11
|
+
"TokenPairFactory",
|
|
12
|
+
"TokenPair"
|
|
13
|
+
],
|
|
14
|
+
"isMutable": [
|
|
15
|
+
false,
|
|
16
|
+
false
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"functions": [
|
|
20
|
+
{
|
|
21
|
+
"name": "main",
|
|
22
|
+
"paramNames": [],
|
|
23
|
+
"paramTypes": [],
|
|
24
|
+
"paramIsMutable": [],
|
|
25
|
+
"returnTypes": []
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "Mint",
|
|
4
|
+
"bytecodeTemplate": "010103000200160c0e{0}010717011700{1}7a1600{2}a31601{3}a3{1}{2}{3}0f0d{0}010e18",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"tokenPair",
|
|
8
|
+
"sender",
|
|
9
|
+
"amount0",
|
|
10
|
+
"amount1"
|
|
11
|
+
],
|
|
12
|
+
"types": [
|
|
13
|
+
"TokenPair",
|
|
14
|
+
"Address",
|
|
15
|
+
"U256",
|
|
16
|
+
"U256"
|
|
17
|
+
],
|
|
18
|
+
"isMutable": [
|
|
19
|
+
false,
|
|
20
|
+
false,
|
|
21
|
+
false,
|
|
22
|
+
false
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"functions": [
|
|
26
|
+
{
|
|
27
|
+
"name": "main",
|
|
28
|
+
"paramNames": [],
|
|
29
|
+
"paramTypes": [],
|
|
30
|
+
"paramIsMutable": [],
|
|
31
|
+
"returnTypes": []
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "RemoveLiquidity",
|
|
4
|
+
"bytecodeTemplate": "01010300000010{0}{2}{3}a3{2}{0}{3}{4}{5}{6}13060e{1}01021818",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"sender",
|
|
8
|
+
"router",
|
|
9
|
+
"pairId",
|
|
10
|
+
"liquidity",
|
|
11
|
+
"amount0Min",
|
|
12
|
+
"amount1Min",
|
|
13
|
+
"deadline"
|
|
14
|
+
],
|
|
15
|
+
"types": [
|
|
16
|
+
"Address",
|
|
17
|
+
"Router",
|
|
18
|
+
"ByteVec",
|
|
19
|
+
"U256",
|
|
20
|
+
"U256",
|
|
21
|
+
"U256",
|
|
22
|
+
"U256"
|
|
23
|
+
],
|
|
24
|
+
"isMutable": [
|
|
25
|
+
false,
|
|
26
|
+
false,
|
|
27
|
+
false,
|
|
28
|
+
false,
|
|
29
|
+
false,
|
|
30
|
+
false,
|
|
31
|
+
false
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"functions": [
|
|
35
|
+
{
|
|
36
|
+
"name": "main",
|
|
37
|
+
"paramNames": [],
|
|
38
|
+
"paramTypes": [],
|
|
39
|
+
"paramIsMutable": [],
|
|
40
|
+
"returnTypes": []
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.0.0",
|
|
3
|
+
"name": "SetFeeCollectorFactory",
|
|
4
|
+
"bytecodeTemplate": "01010300000005{1}0d0c{0}0100",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"tokenPairFactory",
|
|
8
|
+
"feeCollectorFactory"
|
|
9
|
+
],
|
|
10
|
+
"types": [
|
|
11
|
+
"TokenPairFactory",
|
|
12
|
+
"FeeCollectorFactory"
|
|
13
|
+
],
|
|
14
|
+
"isMutable": [
|
|
15
|
+
false,
|
|
16
|
+
false
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"functions": [
|
|
20
|
+
{
|
|
21
|
+
"name": "main",
|
|
22
|
+
"paramNames": [],
|
|
23
|
+
"paramTypes": [],
|
|
24
|
+
"paramIsMutable": [],
|
|
25
|
+
"returnTypes": []
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "v4.2.5",
|
|
3
|
+
"name": "Swap",
|
|
4
|
+
"bytecodeTemplate": "0101030004004056b41700{0}160047cc17011601c5194c0516000d0c{0}d465b302f90c0e{1}010717031702{2}{3}464c04{2}{3}13c3038d7ea4c68000a7{4}0c2f4c0f{2}1603{5}a3{2}{3}{4}{5}{6}{7}13060c{1}01104a4025{5}0c2f4c0f{2}1602{4}a3{2}{3}{4}{5}{6}{7}13060c{1}01104a12{2}7a1602{4}a31603{5}a3{2}{3}{4}{5}{6}{7}13060c{1}0110",
|
|
5
|
+
"fieldsSig": {
|
|
6
|
+
"names": [
|
|
7
|
+
"dexAccount",
|
|
8
|
+
"tokenPair",
|
|
9
|
+
"sender",
|
|
10
|
+
"to",
|
|
11
|
+
"amount0In",
|
|
12
|
+
"amount1In",
|
|
13
|
+
"amount0Out",
|
|
14
|
+
"amount1Out"
|
|
15
|
+
],
|
|
16
|
+
"types": [
|
|
17
|
+
"IDexAccount",
|
|
18
|
+
"TokenPair",
|
|
19
|
+
"Address",
|
|
20
|
+
"Address",
|
|
21
|
+
"U256",
|
|
22
|
+
"U256",
|
|
23
|
+
"U256",
|
|
24
|
+
"U256"
|
|
25
|
+
],
|
|
26
|
+
"isMutable": [
|
|
27
|
+
false,
|
|
28
|
+
false,
|
|
29
|
+
false,
|
|
30
|
+
false,
|
|
31
|
+
false,
|
|
32
|
+
false,
|
|
33
|
+
false,
|
|
34
|
+
false
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"functions": [
|
|
38
|
+
{
|
|
39
|
+
"name": "main",
|
|
40
|
+
"paramNames": [],
|
|
41
|
+
"paramTypes": [],
|
|
42
|
+
"paramIsMutable": [],
|
|
43
|
+
"returnTypes": []
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|