@zoralabs/coins 0.9.0 → 1.0.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/.turbo/turbo-build.log +179 -114
- package/CHANGELOG.md +46 -0
- package/abis/BaseCoin.json +26 -118
- package/abis/BaseTest.json +47 -0
- package/abis/BuySupplyWithSwapRouterHook.json +40 -0
- package/abis/Coin.json +171 -63
- package/abis/CoinDopplerMultiCurve.json +38 -0
- package/abis/CoinRewardsV4.json +54 -0
- package/abis/CoinTest.json +53 -20
- package/abis/CoinUniV4Test.json +1091 -0
- package/abis/CoinV4.json +234 -211
- package/abis/DeployScript.json +47 -0
- package/abis/DeployedCoinVersionLookup.json +21 -0
- package/abis/DeployedCoinVersionLookupTest.json +716 -0
- package/abis/DifferentNamespaceVersionLookup.json +39 -0
- package/abis/DopplerUniswapV3Test.json +49 -93
- package/abis/ERC20.json +310 -0
- package/abis/FactoryTest.json +85 -7
- package/abis/FeeEstimatorHook.json +1515 -0
- package/abis/HooksDeployment.json +23 -0
- package/abis/HooksTest.json +60 -0
- package/abis/ICoin.json +40 -71
- package/abis/ICoinV3.json +879 -0
- package/abis/ICoinV4.json +915 -0
- package/abis/IDeployedCoinVersionLookup.json +21 -0
- package/abis/IERC721.json +36 -36
- package/abis/IHasPoolKey.json +42 -0
- package/abis/IHasRewardsRecipients.json +54 -0
- package/abis/IHasSwapPath.json +60 -0
- package/abis/IMsgSender.json +15 -0
- package/abis/IPoolConfigEncoding.json +46 -0
- package/abis/ISwapPathRouter.json +92 -0
- package/abis/IUniversalRouter.json +61 -0
- package/abis/IUnlockCallback.json +21 -0
- package/abis/IV4Quoter.json +310 -0
- package/abis/IZoraFactory.json +210 -11
- package/abis/IZoraV4CoinHook.json +348 -4
- package/abis/MockERC20.json +21 -0
- package/abis/MultiOwnableTest.json +47 -0
- package/abis/{CoinConfigurationVersions.json → Position.json} +1 -1
- package/abis/PrintUpgradeCommand.json +9 -0
- package/abis/ProxyShim.json +24 -0
- package/abis/StateLibrary.json +80 -0
- package/abis/TestDeployedCoinVersionLookupImplementation.json +39 -0
- package/abis/TestV4Swap.json +9 -0
- package/abis/UpgradeCoinImpl.json +47 -0
- package/abis/UpgradesTest.json +81 -0
- package/abis/Vm.json +1482 -111
- package/abis/VmSafe.json +856 -32
- package/abis/ZoraFactoryImpl.json +339 -1
- package/abis/ZoraV4CoinHook.json +442 -5
- package/addresses/8453.json +7 -4
- package/addresses/84532.json +8 -5
- package/addresses/dev/8453.json +10 -0
- package/dist/index.cjs +1932 -167
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1928 -167
- package/dist/index.js.map +1 -1
- package/dist/wagmiGenerated.d.ts +2606 -160
- package/dist/wagmiGenerated.d.ts.map +1 -1
- package/foundry.toml +1 -0
- package/package/wagmiGenerated.ts +1941 -164
- package/package.json +8 -3
- package/remappings.txt +6 -1
- package/script/Deploy.s.sol +1 -1
- package/script/DeployDevFactory.s.sol +21 -0
- package/script/DeployHooks.s.sol +1 -1
- package/script/PrintUpgradeCommand.s.sol +13 -0
- package/script/Simulate.s.sol +1 -10
- package/script/TestBackingCoinSwap.s.sol +147 -0
- package/script/TestV4Swap.s.sol +136 -0
- package/script/UpgradeCoinImpl.sol +2 -2
- package/script/UpgradeFactoryImpl.s.sol +2 -2
- package/src/BaseCoin.sol +190 -0
- package/src/Coin.sol +87 -202
- package/src/CoinV4.sol +121 -0
- package/src/ZoraFactoryImpl.sol +208 -36
- package/{script → src/deployment}/CoinsDeployerBase.sol +111 -17
- package/src/hooks/ZoraV4CoinHook.sol +212 -0
- package/src/hooks/{BaseCoinDeployHook.sol → deployment/BaseCoinDeployHook.sol} +3 -3
- package/src/hooks/deployment/BuySupplyWithSwapRouterHook.sol +140 -0
- package/src/interfaces/ICoin.sol +31 -39
- package/src/interfaces/ICoinV3.sol +71 -0
- package/src/interfaces/ICoinV4.sol +69 -0
- package/src/interfaces/IDeployedCoinVersionLookup.sol +11 -0
- package/src/interfaces/IMsgSender.sol +9 -0
- package/src/interfaces/IPoolConfigEncoding.sol +14 -0
- package/src/interfaces/ISwapPathRouter.sol +14 -0
- package/src/interfaces/IZoraFactory.sol +67 -28
- package/src/interfaces/IZoraV4CoinHook.sol +116 -0
- package/src/libs/CoinCommon.sol +15 -0
- package/src/libs/CoinConfigurationVersions.sol +116 -1
- package/src/libs/CoinConstants.sol +5 -0
- package/src/libs/CoinDopplerMultiCurve.sol +134 -0
- package/src/libs/CoinDopplerUniV3.sol +19 -171
- package/src/libs/CoinRewards.sol +195 -0
- package/src/libs/CoinRewardsV4.sol +179 -0
- package/src/libs/CoinSetup.sol +57 -0
- package/src/libs/CoinSetupV3.sol +6 -67
- package/src/libs/DopplerMath.sol +156 -0
- package/src/libs/HooksDeployment.sol +128 -0
- package/src/libs/MarketConstants.sol +4 -0
- package/src/libs/PoolStateReader.sol +22 -0
- package/src/libs/UniV3BuySell.sol +74 -292
- package/src/libs/UniV4SwapHelper.sol +65 -0
- package/src/libs/UniV4SwapToCurrency.sol +109 -0
- package/src/libs/V4Liquidity.sol +122 -0
- package/src/types/PoolConfiguration.sol +15 -0
- package/src/utils/DeployedCoinVersionLookup.sol +52 -0
- package/src/version/ContractVersionBase.sol +1 -1
- package/test/Coin.t.sol +78 -88
- package/test/CoinDopplerUniV3.t.sol +32 -171
- package/test/CoinUniV4.t.sol +777 -0
- package/test/{Hooks.t.sol → DeploymentHooks.t.sol} +53 -16
- package/test/Factory.t.sol +80 -47
- package/test/MultiOwnable.t.sol +6 -3
- package/test/Upgrades.t.sol +97 -5
- package/test/mocks/MockERC20.sol +12 -0
- package/test/utils/BaseTest.sol +162 -57
- package/test/utils/DeployedCoinVersionLookup.t.sol +127 -0
- package/test/utils/FeeEstimatorHook.sol +84 -0
- package/test/utils/ProxyShim.sol +17 -0
- package/wagmi.config.ts +4 -0
- package/.env +0 -1
- package/.turbo/turbo-update-contract-version.log +0 -22
- package/abis/CoinSetupV3.json +0 -7
- package/abis/HookDeployer.json +0 -68
- package/abis/IHookDeployer.json +0 -42
- package/src/hooks/BuySupplyWithSwapRouterHook.sol +0 -78
- package/src/libs/CoinLegacy.sol +0 -48
- package/src/libs/CoinLegacyMarket.sol +0 -182
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getVersionForDeployedCoin",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "coin",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "uint8",
|
|
16
|
+
"internalType": "uint8"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "view"
|
|
20
|
+
}
|
|
21
|
+
]
|
package/abis/IERC721.json
CHANGED
|
@@ -4,32 +4,32 @@
|
|
|
4
4
|
"name": "approve",
|
|
5
5
|
"inputs": [
|
|
6
6
|
{
|
|
7
|
-
"name": "
|
|
7
|
+
"name": "to",
|
|
8
8
|
"type": "address",
|
|
9
9
|
"internalType": "address"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"name": "
|
|
12
|
+
"name": "tokenId",
|
|
13
13
|
"type": "uint256",
|
|
14
14
|
"internalType": "uint256"
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"outputs": [],
|
|
18
|
-
"stateMutability": "
|
|
18
|
+
"stateMutability": "nonpayable"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"type": "function",
|
|
22
22
|
"name": "balanceOf",
|
|
23
23
|
"inputs": [
|
|
24
24
|
{
|
|
25
|
-
"name": "
|
|
25
|
+
"name": "owner",
|
|
26
26
|
"type": "address",
|
|
27
27
|
"internalType": "address"
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
"outputs": [
|
|
31
31
|
{
|
|
32
|
-
"name": "",
|
|
32
|
+
"name": "balance",
|
|
33
33
|
"type": "uint256",
|
|
34
34
|
"internalType": "uint256"
|
|
35
35
|
}
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"name": "getApproved",
|
|
42
42
|
"inputs": [
|
|
43
43
|
{
|
|
44
|
-
"name": "
|
|
44
|
+
"name": "tokenId",
|
|
45
45
|
"type": "uint256",
|
|
46
46
|
"internalType": "uint256"
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
49
|
"outputs": [
|
|
50
50
|
{
|
|
51
|
-
"name": "",
|
|
51
|
+
"name": "operator",
|
|
52
52
|
"type": "address",
|
|
53
53
|
"internalType": "address"
|
|
54
54
|
}
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"name": "isApprovedForAll",
|
|
61
61
|
"inputs": [
|
|
62
62
|
{
|
|
63
|
-
"name": "
|
|
63
|
+
"name": "owner",
|
|
64
64
|
"type": "address",
|
|
65
65
|
"internalType": "address"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
"name": "
|
|
68
|
+
"name": "operator",
|
|
69
69
|
"type": "address",
|
|
70
70
|
"internalType": "address"
|
|
71
71
|
}
|
|
@@ -84,14 +84,14 @@
|
|
|
84
84
|
"name": "ownerOf",
|
|
85
85
|
"inputs": [
|
|
86
86
|
{
|
|
87
|
-
"name": "
|
|
87
|
+
"name": "tokenId",
|
|
88
88
|
"type": "uint256",
|
|
89
89
|
"internalType": "uint256"
|
|
90
90
|
}
|
|
91
91
|
],
|
|
92
92
|
"outputs": [
|
|
93
93
|
{
|
|
94
|
-
"name": "",
|
|
94
|
+
"name": "owner",
|
|
95
95
|
"type": "address",
|
|
96
96
|
"internalType": "address"
|
|
97
97
|
}
|
|
@@ -103,40 +103,40 @@
|
|
|
103
103
|
"name": "safeTransferFrom",
|
|
104
104
|
"inputs": [
|
|
105
105
|
{
|
|
106
|
-
"name": "
|
|
106
|
+
"name": "from",
|
|
107
107
|
"type": "address",
|
|
108
108
|
"internalType": "address"
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
"name": "
|
|
111
|
+
"name": "to",
|
|
112
112
|
"type": "address",
|
|
113
113
|
"internalType": "address"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
|
-
"name": "
|
|
116
|
+
"name": "tokenId",
|
|
117
117
|
"type": "uint256",
|
|
118
118
|
"internalType": "uint256"
|
|
119
119
|
}
|
|
120
120
|
],
|
|
121
121
|
"outputs": [],
|
|
122
|
-
"stateMutability": "
|
|
122
|
+
"stateMutability": "nonpayable"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"type": "function",
|
|
126
126
|
"name": "safeTransferFrom",
|
|
127
127
|
"inputs": [
|
|
128
128
|
{
|
|
129
|
-
"name": "
|
|
129
|
+
"name": "from",
|
|
130
130
|
"type": "address",
|
|
131
131
|
"internalType": "address"
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
"name": "
|
|
134
|
+
"name": "to",
|
|
135
135
|
"type": "address",
|
|
136
136
|
"internalType": "address"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
"name": "
|
|
139
|
+
"name": "tokenId",
|
|
140
140
|
"type": "uint256",
|
|
141
141
|
"internalType": "uint256"
|
|
142
142
|
},
|
|
@@ -147,19 +147,19 @@
|
|
|
147
147
|
}
|
|
148
148
|
],
|
|
149
149
|
"outputs": [],
|
|
150
|
-
"stateMutability": "
|
|
150
|
+
"stateMutability": "nonpayable"
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"type": "function",
|
|
154
154
|
"name": "setApprovalForAll",
|
|
155
155
|
"inputs": [
|
|
156
156
|
{
|
|
157
|
-
"name": "
|
|
157
|
+
"name": "operator",
|
|
158
158
|
"type": "address",
|
|
159
159
|
"internalType": "address"
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
|
-
"name": "
|
|
162
|
+
"name": "approved",
|
|
163
163
|
"type": "bool",
|
|
164
164
|
"internalType": "bool"
|
|
165
165
|
}
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"name": "supportsInterface",
|
|
173
173
|
"inputs": [
|
|
174
174
|
{
|
|
175
|
-
"name": "
|
|
175
|
+
"name": "interfaceId",
|
|
176
176
|
"type": "bytes4",
|
|
177
177
|
"internalType": "bytes4"
|
|
178
178
|
}
|
|
@@ -191,42 +191,42 @@
|
|
|
191
191
|
"name": "transferFrom",
|
|
192
192
|
"inputs": [
|
|
193
193
|
{
|
|
194
|
-
"name": "
|
|
194
|
+
"name": "from",
|
|
195
195
|
"type": "address",
|
|
196
196
|
"internalType": "address"
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
|
-
"name": "
|
|
199
|
+
"name": "to",
|
|
200
200
|
"type": "address",
|
|
201
201
|
"internalType": "address"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
|
-
"name": "
|
|
204
|
+
"name": "tokenId",
|
|
205
205
|
"type": "uint256",
|
|
206
206
|
"internalType": "uint256"
|
|
207
207
|
}
|
|
208
208
|
],
|
|
209
209
|
"outputs": [],
|
|
210
|
-
"stateMutability": "
|
|
210
|
+
"stateMutability": "nonpayable"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"type": "event",
|
|
214
214
|
"name": "Approval",
|
|
215
215
|
"inputs": [
|
|
216
216
|
{
|
|
217
|
-
"name": "
|
|
217
|
+
"name": "owner",
|
|
218
218
|
"type": "address",
|
|
219
219
|
"indexed": true,
|
|
220
220
|
"internalType": "address"
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
"name": "
|
|
223
|
+
"name": "approved",
|
|
224
224
|
"type": "address",
|
|
225
225
|
"indexed": true,
|
|
226
226
|
"internalType": "address"
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
|
-
"name": "
|
|
229
|
+
"name": "tokenId",
|
|
230
230
|
"type": "uint256",
|
|
231
231
|
"indexed": true,
|
|
232
232
|
"internalType": "uint256"
|
|
@@ -239,19 +239,19 @@
|
|
|
239
239
|
"name": "ApprovalForAll",
|
|
240
240
|
"inputs": [
|
|
241
241
|
{
|
|
242
|
-
"name": "
|
|
242
|
+
"name": "owner",
|
|
243
243
|
"type": "address",
|
|
244
244
|
"indexed": true,
|
|
245
245
|
"internalType": "address"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
|
-
"name": "
|
|
248
|
+
"name": "operator",
|
|
249
249
|
"type": "address",
|
|
250
250
|
"indexed": true,
|
|
251
251
|
"internalType": "address"
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
|
-
"name": "
|
|
254
|
+
"name": "approved",
|
|
255
255
|
"type": "bool",
|
|
256
256
|
"indexed": false,
|
|
257
257
|
"internalType": "bool"
|
|
@@ -264,19 +264,19 @@
|
|
|
264
264
|
"name": "Transfer",
|
|
265
265
|
"inputs": [
|
|
266
266
|
{
|
|
267
|
-
"name": "
|
|
267
|
+
"name": "from",
|
|
268
268
|
"type": "address",
|
|
269
269
|
"indexed": true,
|
|
270
270
|
"internalType": "address"
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
|
-
"name": "
|
|
273
|
+
"name": "to",
|
|
274
274
|
"type": "address",
|
|
275
275
|
"indexed": true,
|
|
276
276
|
"internalType": "address"
|
|
277
277
|
},
|
|
278
278
|
{
|
|
279
|
-
"name": "
|
|
279
|
+
"name": "tokenId",
|
|
280
280
|
"type": "uint256",
|
|
281
281
|
"indexed": true,
|
|
282
282
|
"internalType": "uint256"
|
|
@@ -284,4 +284,4 @@
|
|
|
284
284
|
],
|
|
285
285
|
"anonymous": false
|
|
286
286
|
}
|
|
287
|
-
]
|
|
287
|
+
]]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getPoolKey",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "tuple",
|
|
10
|
+
"internalType": "struct PoolKey",
|
|
11
|
+
"components": [
|
|
12
|
+
{
|
|
13
|
+
"name": "currency0",
|
|
14
|
+
"type": "address",
|
|
15
|
+
"internalType": "Currency"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "currency1",
|
|
19
|
+
"type": "address",
|
|
20
|
+
"internalType": "Currency"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "fee",
|
|
24
|
+
"type": "uint24",
|
|
25
|
+
"internalType": "uint24"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "tickSpacing",
|
|
29
|
+
"type": "int24",
|
|
30
|
+
"internalType": "int24"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "hooks",
|
|
34
|
+
"type": "address",
|
|
35
|
+
"internalType": "contract IHooks"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"stateMutability": "view"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "dopplerFeeRecipient",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "address",
|
|
10
|
+
"internalType": "address"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"stateMutability": "view"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "function",
|
|
17
|
+
"name": "payoutRecipient",
|
|
18
|
+
"inputs": [],
|
|
19
|
+
"outputs": [
|
|
20
|
+
{
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "address",
|
|
23
|
+
"internalType": "address"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"stateMutability": "view"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "function",
|
|
30
|
+
"name": "platformReferrer",
|
|
31
|
+
"inputs": [],
|
|
32
|
+
"outputs": [
|
|
33
|
+
{
|
|
34
|
+
"name": "",
|
|
35
|
+
"type": "address",
|
|
36
|
+
"internalType": "address"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"stateMutability": "view"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "function",
|
|
43
|
+
"name": "protocolRewardRecipient",
|
|
44
|
+
"inputs": [],
|
|
45
|
+
"outputs": [
|
|
46
|
+
{
|
|
47
|
+
"name": "",
|
|
48
|
+
"type": "address",
|
|
49
|
+
"internalType": "address"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"stateMutability": "view"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getPayoutSwapPath",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "coinVersionLookup",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "contract IDeployedCoinVersionLookup"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "tuple",
|
|
16
|
+
"internalType": "struct IHasSwapPath.PayoutSwapPath",
|
|
17
|
+
"components": [
|
|
18
|
+
{
|
|
19
|
+
"name": "path",
|
|
20
|
+
"type": "tuple[]",
|
|
21
|
+
"internalType": "struct PathKey[]",
|
|
22
|
+
"components": [
|
|
23
|
+
{
|
|
24
|
+
"name": "intermediateCurrency",
|
|
25
|
+
"type": "address",
|
|
26
|
+
"internalType": "Currency"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "fee",
|
|
30
|
+
"type": "uint24",
|
|
31
|
+
"internalType": "uint24"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "tickSpacing",
|
|
35
|
+
"type": "int24",
|
|
36
|
+
"internalType": "int24"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "hooks",
|
|
40
|
+
"type": "address",
|
|
41
|
+
"internalType": "contract IHooks"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "hookData",
|
|
45
|
+
"type": "bytes",
|
|
46
|
+
"internalType": "bytes"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "currencyIn",
|
|
52
|
+
"type": "address",
|
|
53
|
+
"internalType": "Currency"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"stateMutability": "view"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "encodeMultiCurvePoolConfig",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "version",
|
|
8
|
+
"type": "uint8",
|
|
9
|
+
"internalType": "uint8"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "currency",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "address"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "tickLower",
|
|
18
|
+
"type": "int24[]",
|
|
19
|
+
"internalType": "int24[]"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "tickUpper",
|
|
23
|
+
"type": "int24[]",
|
|
24
|
+
"internalType": "int24[]"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "numDiscoveryPositions",
|
|
28
|
+
"type": "uint16[]",
|
|
29
|
+
"internalType": "uint16[]"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "maxDiscoverySupplyShare",
|
|
33
|
+
"type": "uint256[]",
|
|
34
|
+
"internalType": "uint256[]"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"outputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "",
|
|
40
|
+
"type": "bytes",
|
|
41
|
+
"internalType": "bytes"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"stateMutability": "pure"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getSwapPath",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "key",
|
|
8
|
+
"type": "tuple",
|
|
9
|
+
"internalType": "struct PoolKey",
|
|
10
|
+
"components": [
|
|
11
|
+
{
|
|
12
|
+
"name": "currency0",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "Currency"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "currency1",
|
|
18
|
+
"type": "address",
|
|
19
|
+
"internalType": "Currency"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "fee",
|
|
23
|
+
"type": "uint24",
|
|
24
|
+
"internalType": "uint24"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "tickSpacing",
|
|
28
|
+
"type": "int24",
|
|
29
|
+
"internalType": "int24"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "hooks",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "contract IHooks"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "toSwapOut",
|
|
40
|
+
"type": "address",
|
|
41
|
+
"internalType": "Currency"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"outputs": [
|
|
45
|
+
{
|
|
46
|
+
"name": "path",
|
|
47
|
+
"type": "tuple[]",
|
|
48
|
+
"internalType": "struct ISwapPathRouter.Path[]",
|
|
49
|
+
"components": [
|
|
50
|
+
{
|
|
51
|
+
"name": "key",
|
|
52
|
+
"type": "tuple",
|
|
53
|
+
"internalType": "struct PoolKey",
|
|
54
|
+
"components": [
|
|
55
|
+
{
|
|
56
|
+
"name": "currency0",
|
|
57
|
+
"type": "address",
|
|
58
|
+
"internalType": "Currency"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "currency1",
|
|
62
|
+
"type": "address",
|
|
63
|
+
"internalType": "Currency"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "fee",
|
|
67
|
+
"type": "uint24",
|
|
68
|
+
"internalType": "uint24"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "tickSpacing",
|
|
72
|
+
"type": "int24",
|
|
73
|
+
"internalType": "int24"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "hooks",
|
|
77
|
+
"type": "address",
|
|
78
|
+
"internalType": "contract IHooks"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "currencyIn",
|
|
84
|
+
"type": "address",
|
|
85
|
+
"internalType": "Currency"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"stateMutability": "view"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "execute",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "commands",
|
|
8
|
+
"type": "bytes",
|
|
9
|
+
"internalType": "bytes"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "inputs",
|
|
13
|
+
"type": "bytes[]",
|
|
14
|
+
"internalType": "bytes[]"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "deadline",
|
|
18
|
+
"type": "uint256",
|
|
19
|
+
"internalType": "uint256"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"outputs": [],
|
|
23
|
+
"stateMutability": "payable"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "error",
|
|
27
|
+
"name": "ETHNotAccepted",
|
|
28
|
+
"inputs": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "error",
|
|
32
|
+
"name": "ExecutionFailed",
|
|
33
|
+
"inputs": [
|
|
34
|
+
{
|
|
35
|
+
"name": "commandIndex",
|
|
36
|
+
"type": "uint256",
|
|
37
|
+
"internalType": "uint256"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "message",
|
|
41
|
+
"type": "bytes",
|
|
42
|
+
"internalType": "bytes"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "error",
|
|
48
|
+
"name": "InvalidEthSender",
|
|
49
|
+
"inputs": []
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "error",
|
|
53
|
+
"name": "LengthMismatch",
|
|
54
|
+
"inputs": []
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "error",
|
|
58
|
+
"name": "TransactionDeadlinePassed",
|
|
59
|
+
"inputs": []
|
|
60
|
+
}
|
|
61
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "unlockCallback",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "data",
|
|
8
|
+
"type": "bytes",
|
|
9
|
+
"internalType": "bytes"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "bytes",
|
|
16
|
+
"internalType": "bytes"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "nonpayable"
|
|
20
|
+
}
|
|
21
|
+
]
|