@gmx-io/sdk 1.2.1 → 1.3.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/build/cjs/src/abis/ClaimHandler.json +1 -16
- package/build/cjs/src/abis/CustomErrors.json +642 -61
- package/build/cjs/src/abis/DataStore.json +25 -6
- package/build/cjs/src/abis/EventEmitter.json +1 -6
- package/build/cjs/src/abis/ExchangeRouter.json +195 -290
- package/build/cjs/src/abis/GelatoRelayRouter.json +251 -98
- package/build/cjs/src/abis/GlvReader.json +60 -3
- package/build/cjs/src/abis/GlvRouter.json +144 -86
- package/build/cjs/src/abis/GovToken.json +1 -354
- package/build/cjs/src/abis/LayerZeroProvider.json +372 -0
- package/build/cjs/src/abis/Multicall.json +134 -38
- package/build/cjs/src/abis/MultichainClaimsRouter.json +1266 -0
- package/build/cjs/src/abis/MultichainGlvRouter.json +1150 -0
- package/build/cjs/src/abis/MultichainGmRouter.json +1449 -0
- package/build/cjs/src/abis/MultichainOrderRouter.json +1820 -0
- package/build/cjs/src/abis/MultichainSubaccountRouter.json +2069 -0
- package/build/cjs/src/abis/MultichainTransferRouter.json +915 -0
- package/build/cjs/src/abis/MultichainUtils.json +133 -0
- package/build/cjs/src/abis/MultichainVault.json +275 -0
- package/build/cjs/src/abis/ReferralStorage.json +69 -19
- package/build/cjs/src/abis/RelayParams.json +85 -48
- package/build/cjs/src/abis/SmartAccount.json +28 -0
- package/build/cjs/src/abis/SubaccountGelatoRelayRouter.json +282 -148
- package/build/cjs/src/abis/SubaccountRouter.json +62 -118
- package/build/cjs/src/abis/SyntheticsReader.json +342 -474
- package/build/cjs/src/abis/SyntheticsRouter.json +1 -6
- package/build/cjs/src/abis/index.js +51 -7
- package/build/cjs/src/configs/__tests__/markets.spec.js +1 -1
- package/build/cjs/src/configs/__tests__/permits.spec.js +1 -1
- package/build/cjs/src/configs/__tests__/tokens.spec.js +1 -1
- package/build/cjs/src/configs/batch.js +48 -0
- package/build/cjs/src/configs/chains.js +41 -8
- package/build/cjs/src/configs/contracts.js +151 -41
- package/build/cjs/src/configs/dataStore.js +39 -5
- package/build/cjs/src/configs/express.js +4 -0
- package/build/cjs/src/configs/factors.js +1 -1
- package/build/cjs/src/configs/markets.js +128 -0
- package/build/cjs/src/configs/oracleKeeper.js +2 -0
- package/build/cjs/src/configs/tokens.js +217 -2
- package/build/cjs/src/modules/markets/index.js +9 -4
- package/build/cjs/src/modules/markets/query-builders.js +28 -8
- package/build/cjs/src/modules/orders/helpers.js +2 -2
- package/build/cjs/src/modules/orders/helpers.spec.js +1 -1
- package/build/cjs/src/modules/orders/utils.js +4 -5
- package/build/cjs/src/modules/positions/positions.js +38 -5
- package/build/cjs/src/modules/utils/utils.js +1 -0
- package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +146 -0
- package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +2207 -532
- package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +272 -0
- package/build/cjs/src/test/mock.js +9 -4
- package/build/cjs/src/types/subsquid.js +507 -1
- package/build/cjs/src/utils/LruCache.js +4 -0
- package/build/cjs/src/utils/__tests__/LruCache.spec.js +18 -0
- package/build/cjs/src/utils/__tests__/numbers.spec.js +18 -16
- package/build/cjs/src/utils/__tests__/orderTransactions/batchUtils.spec.js +0 -1
- package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +8 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +38 -30
- package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +10 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +6 -0
- package/build/cjs/src/utils/__tests__/positions.spec.js +23 -6
- package/build/cjs/src/utils/bigmath.js +9 -2
- package/build/cjs/src/utils/errors/parseError.js +35 -1
- package/build/cjs/src/utils/fees/executionFee.js +5 -3
- package/build/cjs/src/utils/fees/index.js +8 -6
- package/build/cjs/src/utils/fees/priceImpact.js +94 -32
- package/build/cjs/src/utils/gelatoRelay.js +5 -0
- package/build/cjs/src/utils/marketKeysAndConfigs.js +24 -4
- package/build/cjs/src/utils/markets.js +10 -3
- package/build/cjs/src/utils/numbers.js +18 -17
- package/build/cjs/src/utils/orderTransactions.js +5 -1
- package/build/cjs/src/utils/positions.js +77 -9
- package/build/cjs/src/utils/prices.js +19 -13
- package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +1 -0
- package/build/cjs/src/utils/swap/swapStats.js +6 -3
- package/build/cjs/src/utils/trade/decrease.js +470 -0
- package/build/cjs/src/utils/trade/{amounts.js → increase.js} +86 -31
- package/build/cjs/src/utils/tradeHistory.js +3 -0
- package/build/esm/src/abis/ClaimHandler.json +1 -16
- package/build/esm/src/abis/CustomErrors.json +642 -61
- package/build/esm/src/abis/DataStore.json +25 -6
- package/build/esm/src/abis/EventEmitter.json +1 -6
- package/build/esm/src/abis/ExchangeRouter.json +195 -290
- package/build/esm/src/abis/GelatoRelayRouter.json +251 -98
- package/build/esm/src/abis/GlvReader.json +60 -3
- package/build/esm/src/abis/GlvRouter.json +144 -86
- package/build/esm/src/abis/GovToken.json +1 -354
- package/build/esm/src/abis/LayerZeroProvider.json +372 -0
- package/build/esm/src/abis/Multicall.json +134 -38
- package/build/esm/src/abis/MultichainClaimsRouter.json +1266 -0
- package/build/esm/src/abis/MultichainGlvRouter.json +1150 -0
- package/build/esm/src/abis/MultichainGmRouter.json +1449 -0
- package/build/esm/src/abis/MultichainOrderRouter.json +1820 -0
- package/build/esm/src/abis/MultichainSubaccountRouter.json +2069 -0
- package/build/esm/src/abis/MultichainTransferRouter.json +915 -0
- package/build/esm/src/abis/MultichainUtils.json +133 -0
- package/build/esm/src/abis/MultichainVault.json +275 -0
- package/build/esm/src/abis/ReferralStorage.json +69 -19
- package/build/esm/src/abis/RelayParams.json +85 -48
- package/build/esm/src/abis/SmartAccount.json +28 -0
- package/build/esm/src/abis/SubaccountGelatoRelayRouter.json +282 -148
- package/build/esm/src/abis/SubaccountRouter.json +62 -118
- package/build/esm/src/abis/SyntheticsReader.json +342 -474
- package/build/esm/src/abis/SyntheticsRouter.json +1 -6
- package/build/esm/src/abis/index.js +51 -7
- package/build/esm/src/configs/__tests__/markets.spec.js +3 -3
- package/build/esm/src/configs/__tests__/permits.spec.js +2 -2
- package/build/esm/src/configs/__tests__/tokens.spec.js +2 -2
- package/build/esm/src/configs/batch.js +49 -1
- package/build/esm/src/configs/chains.js +40 -7
- package/build/esm/src/configs/contracts.js +152 -42
- package/build/esm/src/configs/dataStore.js +29 -1
- package/build/esm/src/configs/express.js +5 -1
- package/build/esm/src/configs/factors.js +1 -1
- package/build/esm/src/configs/markets.js +129 -1
- package/build/esm/src/configs/oracleKeeper.js +3 -1
- package/build/esm/src/configs/tokens.js +216 -2
- package/build/esm/src/modules/markets/index.js +9 -4
- package/build/esm/src/modules/markets/query-builders.js +28 -8
- package/build/esm/src/modules/orders/helpers.js +1 -1
- package/build/esm/src/modules/orders/helpers.spec.js +1 -1
- package/build/esm/src/modules/orders/utils.js +4 -5
- package/build/esm/src/modules/positions/positions.js +40 -7
- package/build/esm/src/modules/utils/utils.js +1 -0
- package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +146 -0
- package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +2207 -532
- package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +272 -0
- package/build/esm/src/test/mock.js +9 -4
- package/build/esm/src/types/subsquid.js +506 -0
- package/build/esm/src/utils/LruCache.js +4 -0
- package/build/esm/src/utils/__tests__/LruCache.spec.js +18 -0
- package/build/esm/src/utils/__tests__/numbers.spec.js +18 -16
- package/build/esm/src/utils/__tests__/orderTransactions/batchUtils.spec.js +0 -1
- package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +8 -0
- package/build/esm/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +38 -30
- package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +10 -0
- package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +7 -1
- package/build/esm/src/utils/__tests__/positions.spec.js +23 -6
- package/build/esm/src/utils/bigmath.js +9 -2
- package/build/esm/src/utils/errors/parseError.js +31 -0
- package/build/esm/src/utils/fees/executionFee.js +5 -3
- package/build/esm/src/utils/fees/index.js +8 -6
- package/build/esm/src/utils/fees/priceImpact.js +88 -30
- package/build/esm/src/utils/gelatoRelay.js +2 -0
- package/build/esm/src/utils/marketKeysAndConfigs.js +25 -5
- package/build/esm/src/utils/markets.js +7 -1
- package/build/esm/src/utils/numbers.js +18 -17
- package/build/esm/src/utils/orderTransactions.js +5 -1
- package/build/esm/src/utils/positions.js +75 -11
- package/build/esm/src/utils/prices.js +20 -14
- package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +1 -0
- package/build/esm/src/utils/swap/swapStats.js +6 -3
- package/build/esm/src/utils/trade/decrease.js +460 -0
- package/build/esm/src/utils/trade/{amounts.js → increase.js} +87 -33
- package/build/esm/src/utils/tradeHistory.js +3 -0
- package/build/types/src/abis/index.d.ts +1 -1
- package/build/types/src/configs/batch.d.ts +2 -2
- package/build/types/src/configs/chains.d.ts +25 -20
- package/build/types/src/configs/contracts.d.ts +118 -10
- package/build/types/src/configs/dataStore.d.ts +16 -0
- package/build/types/src/configs/factors.d.ts +1 -1
- package/build/types/src/configs/markets.d.ts +2 -2
- package/build/types/src/configs/tokens.d.ts +1 -0
- package/build/types/src/index.d.ts +1 -1
- package/build/types/src/modules/base.d.ts +1 -1
- package/build/types/src/modules/markets/query-builders.d.ts +3 -2
- package/build/types/src/modules/markets/types.d.ts +2 -2
- package/build/types/src/modules/orders/utils.d.ts +6 -5
- package/build/types/src/types/fees.d.ts +1 -0
- package/build/types/src/types/markets.d.ts +10 -5
- package/build/types/src/types/orders.d.ts +1 -1
- package/build/types/src/types/positions.d.ts +26 -2
- package/build/types/src/types/sdk.d.ts +2 -2
- package/build/types/src/types/subsquid.d.ts +1259 -9
- package/build/types/src/types/tokens.d.ts +7 -0
- package/build/types/src/types/trade.d.ts +14 -3
- package/build/types/src/types/tradeHistory.d.ts +3 -0
- package/build/types/src/utils/LruCache.d.ts +1 -0
- package/build/types/src/utils/bigmath.d.ts +2 -1
- package/build/types/src/utils/errors/parseError.d.ts +11 -0
- package/build/types/src/utils/fees/executionFee.d.ts +6 -3
- package/build/types/src/utils/fees/index.d.ts +2 -2
- package/build/types/src/utils/fees/priceImpact.d.ts +33 -5
- package/build/types/src/utils/marketKeysAndConfigs.d.ts +9 -4
- package/build/types/src/utils/markets.d.ts +7 -0
- package/build/types/src/utils/multicall.d.ts +1 -1
- package/build/types/src/utils/numbers.d.ts +6 -3
- package/build/types/src/utils/orderTransactions.d.ts +6 -4
- package/build/types/src/utils/positions.d.ts +30 -0
- package/build/types/src/utils/prices.d.ts +4 -0
- package/build/types/src/utils/swap/swapValues.d.ts +1 -1
- package/build/types/src/utils/trade/decrease.d.ts +77 -0
- package/build/types/src/utils/trade/{amounts.d.ts → increase.d.ts} +16 -1
- package/package.json +2 -2
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
{
|
|
2
|
+
"abi": [
|
|
3
|
+
{
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"internalType": "contract DataStore",
|
|
7
|
+
"name": "_dataStore",
|
|
8
|
+
"type": "address"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"internalType": "contract RoleStore",
|
|
12
|
+
"name": "_roleStore",
|
|
13
|
+
"type": "address"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"internalType": "contract EventEmitter",
|
|
17
|
+
"name": "_eventEmitter",
|
|
18
|
+
"type": "address"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"internalType": "contract MultichainVault",
|
|
22
|
+
"name": "_multichainVault",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"internalType": "contract IMultichainGmRouter",
|
|
27
|
+
"name": "_multichainGmRouter",
|
|
28
|
+
"type": "address"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"internalType": "contract IMultichainGlvRouter",
|
|
32
|
+
"name": "_multichainGlvRouter",
|
|
33
|
+
"type": "address"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"internalType": "contract IMultichainOrderRouter",
|
|
37
|
+
"name": "_multichainOrderRouter",
|
|
38
|
+
"type": "address"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"stateMutability": "nonpayable",
|
|
42
|
+
"type": "constructor"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"inputs": [],
|
|
46
|
+
"name": "EmptyHoldingAddress",
|
|
47
|
+
"type": "error"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"inputs": [],
|
|
51
|
+
"name": "EmptyReceiver",
|
|
52
|
+
"type": "error"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"inputs": [
|
|
56
|
+
{
|
|
57
|
+
"internalType": "address",
|
|
58
|
+
"name": "token",
|
|
59
|
+
"type": "address"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"name": "EmptyTokenTranferGasLimit",
|
|
63
|
+
"type": "error"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"inputs": [],
|
|
67
|
+
"name": "EmptyWithdrawalAmount",
|
|
68
|
+
"type": "error"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"inputs": [
|
|
72
|
+
{
|
|
73
|
+
"internalType": "uint256",
|
|
74
|
+
"name": "gas",
|
|
75
|
+
"type": "uint256"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"internalType": "uint256",
|
|
79
|
+
"name": "estimatedGasLimit",
|
|
80
|
+
"type": "uint256"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"name": "InsufficientGasLeft",
|
|
84
|
+
"type": "error"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"inputs": [
|
|
88
|
+
{
|
|
89
|
+
"internalType": "address",
|
|
90
|
+
"name": "token",
|
|
91
|
+
"type": "address"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"name": "InvalidBridgeOutToken",
|
|
95
|
+
"type": "error"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"inputs": [
|
|
99
|
+
{
|
|
100
|
+
"internalType": "uint256",
|
|
101
|
+
"name": "eid",
|
|
102
|
+
"type": "uint256"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"name": "InvalidEid",
|
|
106
|
+
"type": "error"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"inputs": [
|
|
110
|
+
{
|
|
111
|
+
"internalType": "address",
|
|
112
|
+
"name": "token",
|
|
113
|
+
"type": "address"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"internalType": "address",
|
|
117
|
+
"name": "receiver",
|
|
118
|
+
"type": "address"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"internalType": "uint256",
|
|
122
|
+
"name": "amount",
|
|
123
|
+
"type": "uint256"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"name": "TokenTransferError",
|
|
127
|
+
"type": "error"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"inputs": [
|
|
131
|
+
{
|
|
132
|
+
"internalType": "address",
|
|
133
|
+
"name": "msgSender",
|
|
134
|
+
"type": "address"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"internalType": "string",
|
|
138
|
+
"name": "role",
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"name": "Unauthorized",
|
|
143
|
+
"type": "error"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"anonymous": false,
|
|
147
|
+
"inputs": [
|
|
148
|
+
{
|
|
149
|
+
"indexed": false,
|
|
150
|
+
"internalType": "string",
|
|
151
|
+
"name": "reason",
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"indexed": false,
|
|
156
|
+
"internalType": "bytes",
|
|
157
|
+
"name": "returndata",
|
|
158
|
+
"type": "bytes"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"name": "TokenTransferReverted",
|
|
162
|
+
"type": "event"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"inputs": [
|
|
166
|
+
{
|
|
167
|
+
"internalType": "address",
|
|
168
|
+
"name": "account",
|
|
169
|
+
"type": "address"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"internalType": "uint256",
|
|
173
|
+
"name": "srcChainId",
|
|
174
|
+
"type": "uint256"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"components": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "address",
|
|
180
|
+
"name": "token",
|
|
181
|
+
"type": "address"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"internalType": "uint256",
|
|
185
|
+
"name": "amount",
|
|
186
|
+
"type": "uint256"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"internalType": "uint256",
|
|
190
|
+
"name": "minAmountOut",
|
|
191
|
+
"type": "uint256"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"internalType": "address",
|
|
195
|
+
"name": "provider",
|
|
196
|
+
"type": "address"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"internalType": "bytes",
|
|
200
|
+
"name": "data",
|
|
201
|
+
"type": "bytes"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"internalType": "struct IRelayUtils.BridgeOutParams",
|
|
205
|
+
"name": "params",
|
|
206
|
+
"type": "tuple"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"name": "bridgeOut",
|
|
210
|
+
"outputs": [
|
|
211
|
+
{
|
|
212
|
+
"internalType": "uint256",
|
|
213
|
+
"name": "",
|
|
214
|
+
"type": "uint256"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"stateMutability": "nonpayable",
|
|
218
|
+
"type": "function"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"inputs": [],
|
|
222
|
+
"name": "dataStore",
|
|
223
|
+
"outputs": [
|
|
224
|
+
{
|
|
225
|
+
"internalType": "contract DataStore",
|
|
226
|
+
"name": "",
|
|
227
|
+
"type": "address"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"stateMutability": "view",
|
|
231
|
+
"type": "function"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"inputs": [],
|
|
235
|
+
"name": "eventEmitter",
|
|
236
|
+
"outputs": [
|
|
237
|
+
{
|
|
238
|
+
"internalType": "contract EventEmitter",
|
|
239
|
+
"name": "",
|
|
240
|
+
"type": "address"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"stateMutability": "view",
|
|
244
|
+
"type": "function"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"inputs": [
|
|
248
|
+
{
|
|
249
|
+
"internalType": "address",
|
|
250
|
+
"name": "from",
|
|
251
|
+
"type": "address"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"internalType": "bytes32",
|
|
255
|
+
"name": "",
|
|
256
|
+
"type": "bytes32"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"internalType": "bytes",
|
|
260
|
+
"name": "message",
|
|
261
|
+
"type": "bytes"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"internalType": "address",
|
|
265
|
+
"name": "",
|
|
266
|
+
"type": "address"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"internalType": "bytes",
|
|
270
|
+
"name": "",
|
|
271
|
+
"type": "bytes"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"name": "lzCompose",
|
|
275
|
+
"outputs": [],
|
|
276
|
+
"stateMutability": "payable",
|
|
277
|
+
"type": "function"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [],
|
|
281
|
+
"name": "multichainGlvRouter",
|
|
282
|
+
"outputs": [
|
|
283
|
+
{
|
|
284
|
+
"internalType": "contract IMultichainGlvRouter",
|
|
285
|
+
"name": "",
|
|
286
|
+
"type": "address"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"stateMutability": "view",
|
|
290
|
+
"type": "function"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [],
|
|
294
|
+
"name": "multichainGmRouter",
|
|
295
|
+
"outputs": [
|
|
296
|
+
{
|
|
297
|
+
"internalType": "contract IMultichainGmRouter",
|
|
298
|
+
"name": "",
|
|
299
|
+
"type": "address"
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
"stateMutability": "view",
|
|
303
|
+
"type": "function"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"inputs": [],
|
|
307
|
+
"name": "multichainOrderRouter",
|
|
308
|
+
"outputs": [
|
|
309
|
+
{
|
|
310
|
+
"internalType": "contract IMultichainOrderRouter",
|
|
311
|
+
"name": "",
|
|
312
|
+
"type": "address"
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"stateMutability": "view",
|
|
316
|
+
"type": "function"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"inputs": [],
|
|
320
|
+
"name": "multichainVault",
|
|
321
|
+
"outputs": [
|
|
322
|
+
{
|
|
323
|
+
"internalType": "contract MultichainVault",
|
|
324
|
+
"name": "",
|
|
325
|
+
"type": "address"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"stateMutability": "view",
|
|
329
|
+
"type": "function"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"inputs": [],
|
|
333
|
+
"name": "roleStore",
|
|
334
|
+
"outputs": [
|
|
335
|
+
{
|
|
336
|
+
"internalType": "contract RoleStore",
|
|
337
|
+
"name": "",
|
|
338
|
+
"type": "address"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"stateMutability": "view",
|
|
342
|
+
"type": "function"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"inputs": [
|
|
346
|
+
{
|
|
347
|
+
"internalType": "address",
|
|
348
|
+
"name": "token",
|
|
349
|
+
"type": "address"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"internalType": "address",
|
|
353
|
+
"name": "receiver",
|
|
354
|
+
"type": "address"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"internalType": "uint256",
|
|
358
|
+
"name": "amount",
|
|
359
|
+
"type": "uint256"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"name": "withdrawTokens",
|
|
363
|
+
"outputs": [],
|
|
364
|
+
"stateMutability": "nonpayable",
|
|
365
|
+
"type": "function"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"stateMutability": "payable",
|
|
369
|
+
"type": "receive"
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "Multicall2",
|
|
4
|
-
"sourceName": "contracts/mock/Multicall2.sol",
|
|
5
2
|
"abi": [
|
|
6
3
|
{
|
|
7
4
|
"inputs": [
|
|
@@ -18,7 +15,7 @@
|
|
|
18
15
|
"type": "bytes"
|
|
19
16
|
}
|
|
20
17
|
],
|
|
21
|
-
"internalType": "struct
|
|
18
|
+
"internalType": "struct Multicall3.Call[]",
|
|
22
19
|
"name": "calls",
|
|
23
20
|
"type": "tuple[]"
|
|
24
21
|
}
|
|
@@ -36,7 +33,108 @@
|
|
|
36
33
|
"type": "bytes[]"
|
|
37
34
|
}
|
|
38
35
|
],
|
|
39
|
-
"stateMutability": "
|
|
36
|
+
"stateMutability": "payable",
|
|
37
|
+
"type": "function"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"inputs": [
|
|
41
|
+
{
|
|
42
|
+
"components": [
|
|
43
|
+
{
|
|
44
|
+
"internalType": "address",
|
|
45
|
+
"name": "target",
|
|
46
|
+
"type": "address"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"internalType": "bool",
|
|
50
|
+
"name": "allowFailure",
|
|
51
|
+
"type": "bool"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"internalType": "bytes",
|
|
55
|
+
"name": "callData",
|
|
56
|
+
"type": "bytes"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"internalType": "struct Multicall3.Call3[]",
|
|
60
|
+
"name": "calls",
|
|
61
|
+
"type": "tuple[]"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"name": "aggregate3",
|
|
65
|
+
"outputs": [
|
|
66
|
+
{
|
|
67
|
+
"components": [
|
|
68
|
+
{
|
|
69
|
+
"internalType": "bool",
|
|
70
|
+
"name": "success",
|
|
71
|
+
"type": "bool"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"internalType": "bytes",
|
|
75
|
+
"name": "returnData",
|
|
76
|
+
"type": "bytes"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"internalType": "struct Multicall3.Result[]",
|
|
80
|
+
"name": "returnData",
|
|
81
|
+
"type": "tuple[]"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"stateMutability": "payable",
|
|
85
|
+
"type": "function"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"inputs": [
|
|
89
|
+
{
|
|
90
|
+
"components": [
|
|
91
|
+
{
|
|
92
|
+
"internalType": "address",
|
|
93
|
+
"name": "target",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"internalType": "bool",
|
|
98
|
+
"name": "allowFailure",
|
|
99
|
+
"type": "bool"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"internalType": "uint256",
|
|
103
|
+
"name": "value",
|
|
104
|
+
"type": "uint256"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"internalType": "bytes",
|
|
108
|
+
"name": "callData",
|
|
109
|
+
"type": "bytes"
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"internalType": "struct Multicall3.Call3Value[]",
|
|
113
|
+
"name": "calls",
|
|
114
|
+
"type": "tuple[]"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"name": "aggregate3Value",
|
|
118
|
+
"outputs": [
|
|
119
|
+
{
|
|
120
|
+
"components": [
|
|
121
|
+
{
|
|
122
|
+
"internalType": "bool",
|
|
123
|
+
"name": "success",
|
|
124
|
+
"type": "bool"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"internalType": "bytes",
|
|
128
|
+
"name": "returnData",
|
|
129
|
+
"type": "bytes"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"internalType": "struct Multicall3.Result[]",
|
|
133
|
+
"name": "returnData",
|
|
134
|
+
"type": "tuple[]"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"stateMutability": "payable",
|
|
40
138
|
"type": "function"
|
|
41
139
|
},
|
|
42
140
|
{
|
|
@@ -54,7 +152,7 @@
|
|
|
54
152
|
"type": "bytes"
|
|
55
153
|
}
|
|
56
154
|
],
|
|
57
|
-
"internalType": "struct
|
|
155
|
+
"internalType": "struct Multicall3.Call[]",
|
|
58
156
|
"name": "calls",
|
|
59
157
|
"type": "tuple[]"
|
|
60
158
|
}
|
|
@@ -84,12 +182,25 @@
|
|
|
84
182
|
"type": "bytes"
|
|
85
183
|
}
|
|
86
184
|
],
|
|
87
|
-
"internalType": "struct
|
|
185
|
+
"internalType": "struct Multicall3.Result[]",
|
|
88
186
|
"name": "returnData",
|
|
89
187
|
"type": "tuple[]"
|
|
90
188
|
}
|
|
91
189
|
],
|
|
92
|
-
"stateMutability": "
|
|
190
|
+
"stateMutability": "payable",
|
|
191
|
+
"type": "function"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"inputs": [],
|
|
195
|
+
"name": "getBasefee",
|
|
196
|
+
"outputs": [
|
|
197
|
+
{
|
|
198
|
+
"internalType": "uint256",
|
|
199
|
+
"name": "basefee",
|
|
200
|
+
"type": "uint256"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"stateMutability": "view",
|
|
93
204
|
"type": "function"
|
|
94
205
|
},
|
|
95
206
|
{
|
|
@@ -126,12 +237,12 @@
|
|
|
126
237
|
},
|
|
127
238
|
{
|
|
128
239
|
"inputs": [],
|
|
129
|
-
"name": "
|
|
240
|
+
"name": "getChainId",
|
|
130
241
|
"outputs": [
|
|
131
242
|
{
|
|
132
|
-
"internalType": "
|
|
133
|
-
"name": "
|
|
134
|
-
"type": "
|
|
243
|
+
"internalType": "uint256",
|
|
244
|
+
"name": "chainid",
|
|
245
|
+
"type": "uint256"
|
|
135
246
|
}
|
|
136
247
|
],
|
|
137
248
|
"stateMutability": "view",
|
|
@@ -139,12 +250,12 @@
|
|
|
139
250
|
},
|
|
140
251
|
{
|
|
141
252
|
"inputs": [],
|
|
142
|
-
"name": "
|
|
253
|
+
"name": "getCurrentBlockCoinbase",
|
|
143
254
|
"outputs": [
|
|
144
255
|
{
|
|
145
|
-
"internalType": "
|
|
146
|
-
"name": "
|
|
147
|
-
"type": "
|
|
256
|
+
"internalType": "address",
|
|
257
|
+
"name": "coinbase",
|
|
258
|
+
"type": "address"
|
|
148
259
|
}
|
|
149
260
|
],
|
|
150
261
|
"stateMutability": "view",
|
|
@@ -195,19 +306,6 @@
|
|
|
195
306
|
"stateMutability": "view",
|
|
196
307
|
"type": "function"
|
|
197
308
|
},
|
|
198
|
-
{
|
|
199
|
-
"inputs": [],
|
|
200
|
-
"name": "getL1BlockNumber",
|
|
201
|
-
"outputs": [
|
|
202
|
-
{
|
|
203
|
-
"internalType": "uint256",
|
|
204
|
-
"name": "l1BlockNumber",
|
|
205
|
-
"type": "uint256"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
"stateMutability": "view",
|
|
209
|
-
"type": "function"
|
|
210
|
-
},
|
|
211
309
|
{
|
|
212
310
|
"inputs": [],
|
|
213
311
|
"name": "getLastBlockHash",
|
|
@@ -241,7 +339,7 @@
|
|
|
241
339
|
"type": "bytes"
|
|
242
340
|
}
|
|
243
341
|
],
|
|
244
|
-
"internalType": "struct
|
|
342
|
+
"internalType": "struct Multicall3.Call[]",
|
|
245
343
|
"name": "calls",
|
|
246
344
|
"type": "tuple[]"
|
|
247
345
|
}
|
|
@@ -261,12 +359,12 @@
|
|
|
261
359
|
"type": "bytes"
|
|
262
360
|
}
|
|
263
361
|
],
|
|
264
|
-
"internalType": "struct
|
|
362
|
+
"internalType": "struct Multicall3.Result[]",
|
|
265
363
|
"name": "returnData",
|
|
266
364
|
"type": "tuple[]"
|
|
267
365
|
}
|
|
268
366
|
],
|
|
269
|
-
"stateMutability": "
|
|
367
|
+
"stateMutability": "payable",
|
|
270
368
|
"type": "function"
|
|
271
369
|
},
|
|
272
370
|
{
|
|
@@ -289,7 +387,7 @@
|
|
|
289
387
|
"type": "bytes"
|
|
290
388
|
}
|
|
291
389
|
],
|
|
292
|
-
"internalType": "struct
|
|
390
|
+
"internalType": "struct Multicall3.Call[]",
|
|
293
391
|
"name": "calls",
|
|
294
392
|
"type": "tuple[]"
|
|
295
393
|
}
|
|
@@ -319,15 +417,13 @@
|
|
|
319
417
|
"type": "bytes"
|
|
320
418
|
}
|
|
321
419
|
],
|
|
322
|
-
"internalType": "struct
|
|
420
|
+
"internalType": "struct Multicall3.Result[]",
|
|
323
421
|
"name": "returnData",
|
|
324
422
|
"type": "tuple[]"
|
|
325
423
|
}
|
|
326
424
|
],
|
|
327
|
-
"stateMutability": "
|
|
425
|
+
"stateMutability": "payable",
|
|
328
426
|
"type": "function"
|
|
329
427
|
}
|
|
330
|
-
]
|
|
331
|
-
"linkReferences": {},
|
|
332
|
-
"deployedLinkReferences": {}
|
|
428
|
+
]
|
|
333
429
|
}
|