@zoralabs/limit-orders 0.2.0
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$colon$js.log +85 -0
- package/AUDIT_NOTES.md +33 -0
- package/AUDIT_RFP.md +408 -0
- package/CHANGELOG.md +25 -0
- package/GAS_COMPARISON_RESULTS.md +194 -0
- package/LICENSE +21 -0
- package/README.md +650 -0
- package/SPEC.md +291 -0
- package/abis/BalanceDeltaLibrary.json +15 -0
- package/abis/BeforeSwapDeltaLibrary.json +15 -0
- package/abis/CurrencyLibrary.json +25 -0
- package/abis/CustomRevert.json +28 -0
- package/abis/IAllowanceTransfer.json +486 -0
- package/abis/IAuthority.json +31 -0
- package/abis/ICoin.json +1074 -0
- package/abis/IDeployedCoinVersionLookup.json +21 -0
- package/abis/IDopplerErrors.json +44 -0
- package/abis/IEIP712.json +15 -0
- package/abis/IERC1363.json +373 -0
- package/abis/IERC165.json +21 -0
- package/abis/IERC20.json +185 -0
- package/abis/IERC20Minimal.json +172 -0
- package/abis/IERC6909Claims.json +288 -0
- package/abis/IERC7572.json +21 -0
- package/abis/IExtsload.json +64 -0
- package/abis/IExttload.json +40 -0
- package/abis/IHasCoinType.json +15 -0
- package/abis/IHasPoolKey.json +42 -0
- package/abis/IHasRewardsRecipients.json +54 -0
- package/abis/IHasSwapPath.json +60 -0
- package/abis/IHasTotalSupplyForPositions.json +15 -0
- package/abis/IHooks.json +789 -0
- package/abis/IMsgSender.json +15 -0
- package/abis/IPoolManager.json +1286 -0
- package/abis/IProtocolFees.json +174 -0
- package/abis/ISupportsLimitOrderFill.json +15 -0
- package/abis/ISwapPathRouter.json +92 -0
- package/abis/ISwapRouter.json +219 -0
- package/abis/IUniswapV3SwapCallback.json +25 -0
- package/abis/IUpgradeableDestinationV4Hook.json +84 -0
- package/abis/IUpgradeableDestinationV4HookWithUpdateableFee.json +95 -0
- package/abis/IUpgradeableV4Hook.json +112 -0
- package/abis/IZoraHookRegistry.json +188 -0
- package/abis/IZoraLimitOrderBook.json +623 -0
- package/abis/IZoraLimitOrderBookCoinsInterface.json +67 -0
- package/abis/IZoraV4CoinHook.json +610 -0
- package/abis/Permit2Payments.json +7 -0
- package/abis/Position.json +7 -0
- package/abis/SafeCast.json +7 -0
- package/abis/SafeCast160.json +7 -0
- package/abis/SafeERC20.json +34 -0
- package/abis/SimpleAccessManaged.json +57 -0
- package/abis/SimpleAccessManager.json +351 -0
- package/abis/SqrtPriceMath.json +22 -0
- package/abis/StateLibrary.json +80 -0
- package/abis/SwapLimitOrders.json +22 -0
- package/abis/SwapWithLimitOrders.json +457 -0
- package/abis/TickBitmap.json +18 -0
- package/abis/TickMath.json +24 -0
- package/abis/V3ToV4SwapLib.json +28 -0
- package/abis/ZoraLimitOrderBook.json +771 -0
- package/cache/solidity-files-cache.json +1 -0
- package/dist/index.cjs +760 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +731 -0
- package/dist/index.js.map +1 -0
- package/dist/wagmiGenerated.d.ts +1012 -0
- package/dist/wagmiGenerated.d.ts.map +1 -0
- package/foundry.toml +29 -0
- package/gas_comparison.py +49 -0
- package/out/BalanceDelta.sol/BalanceDeltaLibrary.json +1 -0
- package/out/BeforeSwapDelta.sol/BeforeSwapDeltaLibrary.json +1 -0
- package/out/BitMath.sol/BitMath.json +1 -0
- package/out/BytesLib.sol/BytesLib.json +1 -0
- package/out/CoinCommon.sol/CoinCommon.json +1 -0
- package/out/CoinConfigurationVersions.sol/CoinConfigurationVersions.json +1 -0
- package/out/CoinConstants.sol/CoinConstants.json +1 -0
- package/out/Context.sol/Context.json +1 -0
- package/out/Currency.sol/CurrencyLibrary.json +1 -0
- package/out/CurrencyReserves.sol/CurrencyReserves.json +1 -0
- package/out/CustomRevert.sol/CustomRevert.json +1 -0
- package/out/DopplerMath.sol/DopplerMath.json +1 -0
- package/out/FixedPoint128.sol/FixedPoint128.json +1 -0
- package/out/FixedPoint96.sol/FixedPoint96.json +1 -0
- package/out/FullMath.sol/FullMath.json +1 -0
- package/out/IAllowanceTransfer.sol/IAllowanceTransfer.json +1 -0
- package/out/IAuthority.sol/IAuthority.json +1 -0
- package/out/ICoin.sol/ICoin.json +1 -0
- package/out/ICoin.sol/IHasCoinType.json +1 -0
- package/out/ICoin.sol/IHasPoolKey.json +1 -0
- package/out/ICoin.sol/IHasSwapPath.json +1 -0
- package/out/ICoin.sol/IHasTotalSupplyForPositions.json +1 -0
- package/out/IDeployedCoinVersionLookup.sol/IDeployedCoinVersionLookup.json +1 -0
- package/out/IDopplerErrors.sol/IDopplerErrors.json +1 -0
- package/out/IEIP712.sol/IEIP712.json +1 -0
- package/out/IERC1363.sol/IERC1363.json +1 -0
- package/out/IERC165.sol/IERC165.json +1 -0
- package/out/IERC20.sol/IERC20.json +1 -0
- package/out/IERC20Minimal.sol/IERC20Minimal.json +1 -0
- package/out/IERC6909Claims.sol/IERC6909Claims.json +1 -0
- package/out/IERC7572.sol/IERC7572.json +1 -0
- package/out/IExtsload.sol/IExtsload.json +1 -0
- package/out/IExttload.sol/IExttload.json +1 -0
- package/out/IHasRewardsRecipients.sol/IHasRewardsRecipients.json +1 -0
- package/out/IHooks.sol/IHooks.json +1 -0
- package/out/IMsgSender.sol/IMsgSender.json +1 -0
- package/out/IPoolManager.sol/IPoolManager.json +1 -0
- package/out/IProtocolFees.sol/IProtocolFees.json +1 -0
- package/out/ISupportsLimitOrderFill.sol/ISupportsLimitOrderFill.json +1 -0
- package/out/ISwapPathRouter.sol/ISwapPathRouter.json +1 -0
- package/out/ISwapRouter.sol/ISwapRouter.json +1 -0
- package/out/IUniswapV3SwapCallback.sol/IUniswapV3SwapCallback.json +1 -0
- package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4Hook.json +1 -0
- package/out/IUpgradeableV4Hook.sol/IUpgradeableDestinationV4HookWithUpdateableFee.json +1 -0
- package/out/IUpgradeableV4Hook.sol/IUpgradeableV4Hook.json +1 -0
- package/out/IZoraHookRegistry.sol/IZoraHookRegistry.json +1 -0
- package/out/IZoraLimitOrderBook.sol/IZoraLimitOrderBook.json +1 -0
- package/out/IZoraLimitOrderBookCoinsInterface.sol/IZoraLimitOrderBookCoinsInterface.json +1 -0
- package/out/IZoraV4CoinHook.sol/IZoraV4CoinHook.json +1 -0
- package/out/LimitOrderBitmap.sol/LimitOrderBitmap.json +1 -0
- package/out/LimitOrderCommon.sol/LimitOrderCommon.json +1 -0
- package/out/LimitOrderCreate.sol/LimitOrderCreate.json +1 -0
- package/out/LimitOrderFill.sol/LimitOrderFill.json +1 -0
- package/out/LimitOrderLiquidity.sol/LimitOrderLiquidity.json +1 -0
- package/out/LimitOrderQueues.sol/LimitOrderQueues.json +1 -0
- package/out/LimitOrderStorage.sol/LimitOrderStorage.json +1 -0
- package/out/LimitOrderTypes.sol/LimitOrderTypes.json +1 -0
- package/out/LimitOrderWithdraw.sol/LimitOrderWithdraw.json +1 -0
- package/out/LiquidityAmounts.sol/LiquidityAmounts.json +1 -0
- package/out/LiquidityMath.sol/LiquidityMath.json +1 -0
- package/out/Lock.sol/Lock.json +1 -0
- package/out/NonzeroDeltaCount.sol/NonzeroDeltaCount.json +1 -0
- package/out/Path.sol/Path.json +1 -0
- package/out/PathKey.sol/PathKeyLibrary.json +1 -0
- package/out/Permit2Payments.sol/Permit2Payments.json +1 -0
- package/out/PoolId.sol/PoolIdLibrary.json +1 -0
- package/out/Position.sol/Position.json +1 -0
- package/out/SafeCast.sol/SafeCast.json +1 -0
- package/out/SafeCast160.sol/SafeCast160.json +1 -0
- package/out/SafeERC20.sol/SafeERC20.json +1 -0
- package/out/SimpleAccessManaged.sol/SimpleAccessManaged.json +1 -0
- package/out/SimpleAccessManager.sol/SimpleAccessManager.json +1 -0
- package/out/SqrtPriceMath.sol/SqrtPriceMath.json +1 -0
- package/out/StateLibrary.sol/StateLibrary.json +1 -0
- package/out/SwapLimitOrders.sol/SwapLimitOrders.json +1 -0
- package/out/SwapWithLimitOrders.sol/SwapWithLimitOrders.json +1 -0
- package/out/TickBitmap.sol/TickBitmap.json +1 -0
- package/out/TickMath.sol/TickMath.json +1 -0
- package/out/TransientSlot.sol/TransientSlot.json +1 -0
- package/out/TransientStateLibrary.sol/TransientStateLibrary.json +1 -0
- package/out/UniV4SwapToCurrency.sol/UniV4SwapToCurrency.json +1 -0
- package/out/UnsafeMath.sol/UnsafeMath.json +1 -0
- package/out/V3ToV4SwapLib.sol/V3ToV4SwapLib.json +1 -0
- package/out/ZoraLimitOrderBook.sol/ZoraLimitOrderBook.json +1 -0
- package/out/build-info/69718f10d1dc37f0.json +1 -0
- package/out/uniswap/BitMath.sol/BitMath.json +1 -0
- package/out/uniswap/CustomRevert.sol/CustomRevert.json +1 -0
- package/out/uniswap/FullMath.sol/FullMath.json +1 -0
- package/out/uniswap/SafeCast.sol/SafeCast.json +1 -0
- package/out/uniswap/TickMath.sol/TickMath.json +1 -0
- package/package/index.ts +1 -0
- package/package/wagmiGenerated.ts +738 -0
- package/package.json +57 -0
- package/remappings.txt +11 -0
- package/src/IZoraLimitOrderBook.sol +195 -0
- package/src/ZoraLimitOrderBook.sol +220 -0
- package/src/access/SimpleAccessManaged.sol +76 -0
- package/src/access/SimpleAccessManager.sol +268 -0
- package/src/libs/LimitOrderBitmap.sol +84 -0
- package/src/libs/LimitOrderCommon.sol +91 -0
- package/src/libs/LimitOrderCreate.sol +277 -0
- package/src/libs/LimitOrderFill.sol +362 -0
- package/src/libs/LimitOrderLiquidity.sol +222 -0
- package/src/libs/LimitOrderQueues.sol +101 -0
- package/src/libs/LimitOrderStorage.sol +34 -0
- package/src/libs/LimitOrderTypes.sol +41 -0
- package/src/libs/LimitOrderWithdraw.sol +100 -0
- package/src/libs/Permit2Payments.sol +41 -0
- package/src/libs/SwapLimitOrders.sol +209 -0
- package/src/router/SwapWithLimitOrders.sol +454 -0
- package/test/LimitOrderAccessControl.t.sol +461 -0
- package/test/LimitOrderBitmap.t.sol +194 -0
- package/test/LimitOrderCreate.t.sol +348 -0
- package/test/LimitOrderFill.t.sol +1005 -0
- package/test/LimitOrderLibraries.t.sol +354 -0
- package/test/LimitOrderLiquidityPayouts.t.sol +333 -0
- package/test/LimitOrderV4Pools.t.sol +157 -0
- package/test/LimitOrderWithdraw.t.sol +653 -0
- package/test/SimpleAccessManager.t.sol +420 -0
- package/test/SwapWithLimitOrders.t.sol +107 -0
- package/test/SwapWithLimitOrdersRouter.t.sol +1073 -0
- package/test/gas/LimitOrderFillGas.t.sol +1008 -0
- package/test/gas/LimitOrderSwapGas.t.sol +403 -0
- package/test/gas/logs/gas_benchmarks_fill_20251201.log +30 -0
- package/test/gas/logs/gas_benchmarks_swap_20251201.log +27 -0
- package/test/unit/LimitOrderBitmapUnit.t.sol +276 -0
- package/test/unit/LimitOrderCreateUnit.t.sol +358 -0
- package/test/unit/SwapLimitOrdersUnit.t.sol +672 -0
- package/test/unit/SwapLimitOrdersValidation.t.sol +423 -0
- package/test/unit/SwapWithLimitOrdersUnit.t.sol +321 -0
- package/test/utils/BaseTest.sol +793 -0
- package/test/utils/TestableZoraLimitOrderBook.sol +54 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +11 -0
- package/wagmi.config.ts +18 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "DOMAIN_SEPARATOR",
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"outputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "bytes32",
|
|
10
|
+
"internalType": "bytes32"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"stateMutability": "view"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "function",
|
|
17
|
+
"name": "allowance",
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"name": "user",
|
|
21
|
+
"type": "address",
|
|
22
|
+
"internalType": "address"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "token",
|
|
26
|
+
"type": "address",
|
|
27
|
+
"internalType": "address"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "spender",
|
|
31
|
+
"type": "address",
|
|
32
|
+
"internalType": "address"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"outputs": [
|
|
36
|
+
{
|
|
37
|
+
"name": "amount",
|
|
38
|
+
"type": "uint160",
|
|
39
|
+
"internalType": "uint160"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "expiration",
|
|
43
|
+
"type": "uint48",
|
|
44
|
+
"internalType": "uint48"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "nonce",
|
|
48
|
+
"type": "uint48",
|
|
49
|
+
"internalType": "uint48"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"stateMutability": "view"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "function",
|
|
56
|
+
"name": "approve",
|
|
57
|
+
"inputs": [
|
|
58
|
+
{
|
|
59
|
+
"name": "token",
|
|
60
|
+
"type": "address",
|
|
61
|
+
"internalType": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "spender",
|
|
65
|
+
"type": "address",
|
|
66
|
+
"internalType": "address"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "amount",
|
|
70
|
+
"type": "uint160",
|
|
71
|
+
"internalType": "uint160"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "expiration",
|
|
75
|
+
"type": "uint48",
|
|
76
|
+
"internalType": "uint48"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"outputs": [],
|
|
80
|
+
"stateMutability": "nonpayable"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "function",
|
|
84
|
+
"name": "invalidateNonces",
|
|
85
|
+
"inputs": [
|
|
86
|
+
{
|
|
87
|
+
"name": "token",
|
|
88
|
+
"type": "address",
|
|
89
|
+
"internalType": "address"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "spender",
|
|
93
|
+
"type": "address",
|
|
94
|
+
"internalType": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "newNonce",
|
|
98
|
+
"type": "uint48",
|
|
99
|
+
"internalType": "uint48"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"outputs": [],
|
|
103
|
+
"stateMutability": "nonpayable"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "function",
|
|
107
|
+
"name": "lockdown",
|
|
108
|
+
"inputs": [
|
|
109
|
+
{
|
|
110
|
+
"name": "approvals",
|
|
111
|
+
"type": "tuple[]",
|
|
112
|
+
"internalType": "struct IAllowanceTransfer.TokenSpenderPair[]",
|
|
113
|
+
"components": [
|
|
114
|
+
{
|
|
115
|
+
"name": "token",
|
|
116
|
+
"type": "address",
|
|
117
|
+
"internalType": "address"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "spender",
|
|
121
|
+
"type": "address",
|
|
122
|
+
"internalType": "address"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"outputs": [],
|
|
128
|
+
"stateMutability": "nonpayable"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "function",
|
|
132
|
+
"name": "permit",
|
|
133
|
+
"inputs": [
|
|
134
|
+
{
|
|
135
|
+
"name": "owner",
|
|
136
|
+
"type": "address",
|
|
137
|
+
"internalType": "address"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "permitBatch",
|
|
141
|
+
"type": "tuple",
|
|
142
|
+
"internalType": "struct IAllowanceTransfer.PermitBatch",
|
|
143
|
+
"components": [
|
|
144
|
+
{
|
|
145
|
+
"name": "details",
|
|
146
|
+
"type": "tuple[]",
|
|
147
|
+
"internalType": "struct IAllowanceTransfer.PermitDetails[]",
|
|
148
|
+
"components": [
|
|
149
|
+
{
|
|
150
|
+
"name": "token",
|
|
151
|
+
"type": "address",
|
|
152
|
+
"internalType": "address"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "amount",
|
|
156
|
+
"type": "uint160",
|
|
157
|
+
"internalType": "uint160"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "expiration",
|
|
161
|
+
"type": "uint48",
|
|
162
|
+
"internalType": "uint48"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "nonce",
|
|
166
|
+
"type": "uint48",
|
|
167
|
+
"internalType": "uint48"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "spender",
|
|
173
|
+
"type": "address",
|
|
174
|
+
"internalType": "address"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "sigDeadline",
|
|
178
|
+
"type": "uint256",
|
|
179
|
+
"internalType": "uint256"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "signature",
|
|
185
|
+
"type": "bytes",
|
|
186
|
+
"internalType": "bytes"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"outputs": [],
|
|
190
|
+
"stateMutability": "nonpayable"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "function",
|
|
194
|
+
"name": "permit",
|
|
195
|
+
"inputs": [
|
|
196
|
+
{
|
|
197
|
+
"name": "owner",
|
|
198
|
+
"type": "address",
|
|
199
|
+
"internalType": "address"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "permitSingle",
|
|
203
|
+
"type": "tuple",
|
|
204
|
+
"internalType": "struct IAllowanceTransfer.PermitSingle",
|
|
205
|
+
"components": [
|
|
206
|
+
{
|
|
207
|
+
"name": "details",
|
|
208
|
+
"type": "tuple",
|
|
209
|
+
"internalType": "struct IAllowanceTransfer.PermitDetails",
|
|
210
|
+
"components": [
|
|
211
|
+
{
|
|
212
|
+
"name": "token",
|
|
213
|
+
"type": "address",
|
|
214
|
+
"internalType": "address"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "amount",
|
|
218
|
+
"type": "uint160",
|
|
219
|
+
"internalType": "uint160"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "expiration",
|
|
223
|
+
"type": "uint48",
|
|
224
|
+
"internalType": "uint48"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "nonce",
|
|
228
|
+
"type": "uint48",
|
|
229
|
+
"internalType": "uint48"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "spender",
|
|
235
|
+
"type": "address",
|
|
236
|
+
"internalType": "address"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "sigDeadline",
|
|
240
|
+
"type": "uint256",
|
|
241
|
+
"internalType": "uint256"
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "signature",
|
|
247
|
+
"type": "bytes",
|
|
248
|
+
"internalType": "bytes"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"outputs": [],
|
|
252
|
+
"stateMutability": "nonpayable"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "function",
|
|
256
|
+
"name": "transferFrom",
|
|
257
|
+
"inputs": [
|
|
258
|
+
{
|
|
259
|
+
"name": "transferDetails",
|
|
260
|
+
"type": "tuple[]",
|
|
261
|
+
"internalType": "struct IAllowanceTransfer.AllowanceTransferDetails[]",
|
|
262
|
+
"components": [
|
|
263
|
+
{
|
|
264
|
+
"name": "from",
|
|
265
|
+
"type": "address",
|
|
266
|
+
"internalType": "address"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"name": "to",
|
|
270
|
+
"type": "address",
|
|
271
|
+
"internalType": "address"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "amount",
|
|
275
|
+
"type": "uint160",
|
|
276
|
+
"internalType": "uint160"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "token",
|
|
280
|
+
"type": "address",
|
|
281
|
+
"internalType": "address"
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"outputs": [],
|
|
287
|
+
"stateMutability": "nonpayable"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"type": "function",
|
|
291
|
+
"name": "transferFrom",
|
|
292
|
+
"inputs": [
|
|
293
|
+
{
|
|
294
|
+
"name": "from",
|
|
295
|
+
"type": "address",
|
|
296
|
+
"internalType": "address"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "to",
|
|
300
|
+
"type": "address",
|
|
301
|
+
"internalType": "address"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "amount",
|
|
305
|
+
"type": "uint160",
|
|
306
|
+
"internalType": "uint160"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"name": "token",
|
|
310
|
+
"type": "address",
|
|
311
|
+
"internalType": "address"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"outputs": [],
|
|
315
|
+
"stateMutability": "nonpayable"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"type": "event",
|
|
319
|
+
"name": "Approval",
|
|
320
|
+
"inputs": [
|
|
321
|
+
{
|
|
322
|
+
"name": "owner",
|
|
323
|
+
"type": "address",
|
|
324
|
+
"indexed": true,
|
|
325
|
+
"internalType": "address"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "token",
|
|
329
|
+
"type": "address",
|
|
330
|
+
"indexed": true,
|
|
331
|
+
"internalType": "address"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "spender",
|
|
335
|
+
"type": "address",
|
|
336
|
+
"indexed": true,
|
|
337
|
+
"internalType": "address"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "amount",
|
|
341
|
+
"type": "uint160",
|
|
342
|
+
"indexed": false,
|
|
343
|
+
"internalType": "uint160"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "expiration",
|
|
347
|
+
"type": "uint48",
|
|
348
|
+
"indexed": false,
|
|
349
|
+
"internalType": "uint48"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"anonymous": false
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"type": "event",
|
|
356
|
+
"name": "Lockdown",
|
|
357
|
+
"inputs": [
|
|
358
|
+
{
|
|
359
|
+
"name": "owner",
|
|
360
|
+
"type": "address",
|
|
361
|
+
"indexed": true,
|
|
362
|
+
"internalType": "address"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "token",
|
|
366
|
+
"type": "address",
|
|
367
|
+
"indexed": false,
|
|
368
|
+
"internalType": "address"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "spender",
|
|
372
|
+
"type": "address",
|
|
373
|
+
"indexed": false,
|
|
374
|
+
"internalType": "address"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"anonymous": false
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"type": "event",
|
|
381
|
+
"name": "NonceInvalidation",
|
|
382
|
+
"inputs": [
|
|
383
|
+
{
|
|
384
|
+
"name": "owner",
|
|
385
|
+
"type": "address",
|
|
386
|
+
"indexed": true,
|
|
387
|
+
"internalType": "address"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "token",
|
|
391
|
+
"type": "address",
|
|
392
|
+
"indexed": true,
|
|
393
|
+
"internalType": "address"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "spender",
|
|
397
|
+
"type": "address",
|
|
398
|
+
"indexed": true,
|
|
399
|
+
"internalType": "address"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "newNonce",
|
|
403
|
+
"type": "uint48",
|
|
404
|
+
"indexed": false,
|
|
405
|
+
"internalType": "uint48"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "oldNonce",
|
|
409
|
+
"type": "uint48",
|
|
410
|
+
"indexed": false,
|
|
411
|
+
"internalType": "uint48"
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"anonymous": false
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"type": "event",
|
|
418
|
+
"name": "Permit",
|
|
419
|
+
"inputs": [
|
|
420
|
+
{
|
|
421
|
+
"name": "owner",
|
|
422
|
+
"type": "address",
|
|
423
|
+
"indexed": true,
|
|
424
|
+
"internalType": "address"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "token",
|
|
428
|
+
"type": "address",
|
|
429
|
+
"indexed": true,
|
|
430
|
+
"internalType": "address"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"name": "spender",
|
|
434
|
+
"type": "address",
|
|
435
|
+
"indexed": true,
|
|
436
|
+
"internalType": "address"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "amount",
|
|
440
|
+
"type": "uint160",
|
|
441
|
+
"indexed": false,
|
|
442
|
+
"internalType": "uint160"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"name": "expiration",
|
|
446
|
+
"type": "uint48",
|
|
447
|
+
"indexed": false,
|
|
448
|
+
"internalType": "uint48"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "nonce",
|
|
452
|
+
"type": "uint48",
|
|
453
|
+
"indexed": false,
|
|
454
|
+
"internalType": "uint48"
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"anonymous": false
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"type": "error",
|
|
461
|
+
"name": "AllowanceExpired",
|
|
462
|
+
"inputs": [
|
|
463
|
+
{
|
|
464
|
+
"name": "deadline",
|
|
465
|
+
"type": "uint256",
|
|
466
|
+
"internalType": "uint256"
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"type": "error",
|
|
472
|
+
"name": "ExcessiveInvalidation",
|
|
473
|
+
"inputs": []
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"type": "error",
|
|
477
|
+
"name": "InsufficientAllowance",
|
|
478
|
+
"inputs": [
|
|
479
|
+
{
|
|
480
|
+
"name": "amount",
|
|
481
|
+
"type": "uint256",
|
|
482
|
+
"internalType": "uint256"
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "canCall",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "caller",
|
|
8
|
+
"type": "address",
|
|
9
|
+
"internalType": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "target",
|
|
13
|
+
"type": "address",
|
|
14
|
+
"internalType": "address"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "selector",
|
|
18
|
+
"type": "bytes4",
|
|
19
|
+
"internalType": "bytes4"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"outputs": [
|
|
23
|
+
{
|
|
24
|
+
"name": "allowed",
|
|
25
|
+
"type": "bool",
|
|
26
|
+
"internalType": "bool"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"stateMutability": "view"
|
|
30
|
+
}
|
|
31
|
+
]
|