@chainflip/sdk 1.8.0-assethub.2 → 1.8.0-beta.2
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/dist/chunk-HBQFFIRA.mjs +292 -0
- package/dist/{contracts-BmyTFuGH.d.mts → enums-_AFEOA70.d.mts} +3 -18
- package/dist/{contracts-BmyTFuGH.d.ts → enums-_AFEOA70.d.ts} +3 -18
- package/dist/funding.d.mts +10 -1
- package/dist/funding.d.ts +10 -1
- package/dist/funding.js +94 -374
- package/dist/funding.mjs +832 -43
- package/dist/swap.d.mts +86 -73
- package/dist/swap.d.ts +86 -73
- package/dist/swap.js +914 -14135
- package/dist/swap.mjs +500 -12237
- package/package.json +17 -12
- package/dist/chunk-5BNVUJZY.mjs +0 -2453
package/dist/chunk-5BNVUJZY.mjs
DELETED
|
@@ -1,2453 +0,0 @@
|
|
|
1
|
-
import { constants, HttpClient } from '@chainflip/rpc';
|
|
2
|
-
import { Interface, Contract } from 'ethers';
|
|
3
|
-
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
12
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
13
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
|
-
};
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
|
-
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
|
-
for (let key of __getOwnPropNames(from))
|
|
22
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
23
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
24
|
-
}
|
|
25
|
-
return to;
|
|
26
|
-
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
28
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
32
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
33
|
-
mod
|
|
34
|
-
));
|
|
35
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
36
|
-
|
|
37
|
-
// ../shared/src/enums.ts
|
|
38
|
-
var arrayToMap = /* @__PURE__ */ __name((array) => Object.fromEntries(array.map((key) => [
|
|
39
|
-
key,
|
|
40
|
-
key
|
|
41
|
-
])), "arrayToMap");
|
|
42
|
-
var InternalAssets = arrayToMap([
|
|
43
|
-
"Btc",
|
|
44
|
-
"Dot",
|
|
45
|
-
// ethereum
|
|
46
|
-
"Eth",
|
|
47
|
-
"Usdc",
|
|
48
|
-
"Flip",
|
|
49
|
-
"Usdt",
|
|
50
|
-
// solana
|
|
51
|
-
"Sol",
|
|
52
|
-
"SolUsdc",
|
|
53
|
-
// arbitrum
|
|
54
|
-
"ArbUsdc",
|
|
55
|
-
"ArbEth",
|
|
56
|
-
// asset hub
|
|
57
|
-
"HubDot",
|
|
58
|
-
"HubUsdc",
|
|
59
|
-
"HubUsdt"
|
|
60
|
-
]);
|
|
61
|
-
var Chains = arrayToMap([
|
|
62
|
-
"Bitcoin",
|
|
63
|
-
"Ethereum",
|
|
64
|
-
"Polkadot",
|
|
65
|
-
"Arbitrum",
|
|
66
|
-
"Solana",
|
|
67
|
-
"Assethub"
|
|
68
|
-
]);
|
|
69
|
-
var Assets = arrayToMap([
|
|
70
|
-
"FLIP",
|
|
71
|
-
"USDC",
|
|
72
|
-
"DOT",
|
|
73
|
-
"ETH",
|
|
74
|
-
"BTC",
|
|
75
|
-
"USDT",
|
|
76
|
-
"SOL"
|
|
77
|
-
]);
|
|
78
|
-
var ChainflipNetworks = arrayToMap([
|
|
79
|
-
"backspin",
|
|
80
|
-
"sisyphos",
|
|
81
|
-
"perseverance",
|
|
82
|
-
"mainnet"
|
|
83
|
-
]);
|
|
84
|
-
var isTestnet = /* @__PURE__ */ __name((network) => network !== ChainflipNetworks.mainnet, "isTestnet");
|
|
85
|
-
var assetConstants = {
|
|
86
|
-
[InternalAssets.Eth]: {
|
|
87
|
-
chain: Chains.Ethereum,
|
|
88
|
-
asset: Assets.ETH,
|
|
89
|
-
name: "Ether",
|
|
90
|
-
decimals: 18,
|
|
91
|
-
contractId: 1
|
|
92
|
-
},
|
|
93
|
-
[InternalAssets.Flip]: {
|
|
94
|
-
chain: Chains.Ethereum,
|
|
95
|
-
asset: Assets.FLIP,
|
|
96
|
-
name: "FLIP",
|
|
97
|
-
decimals: 18,
|
|
98
|
-
contractId: 2
|
|
99
|
-
},
|
|
100
|
-
[InternalAssets.Usdc]: {
|
|
101
|
-
chain: Chains.Ethereum,
|
|
102
|
-
asset: Assets.USDC,
|
|
103
|
-
name: "USDC",
|
|
104
|
-
decimals: 6,
|
|
105
|
-
contractId: 3
|
|
106
|
-
},
|
|
107
|
-
[InternalAssets.Usdt]: {
|
|
108
|
-
chain: Chains.Ethereum,
|
|
109
|
-
asset: Assets.USDT,
|
|
110
|
-
name: "USDT",
|
|
111
|
-
decimals: 6,
|
|
112
|
-
contractId: 8
|
|
113
|
-
},
|
|
114
|
-
[InternalAssets.Dot]: {
|
|
115
|
-
chain: Chains.Polkadot,
|
|
116
|
-
asset: Assets.DOT,
|
|
117
|
-
name: "Polkadot",
|
|
118
|
-
decimals: 10,
|
|
119
|
-
contractId: 4
|
|
120
|
-
},
|
|
121
|
-
[InternalAssets.Btc]: {
|
|
122
|
-
chain: Chains.Bitcoin,
|
|
123
|
-
asset: Assets.BTC,
|
|
124
|
-
name: "Bitcoin",
|
|
125
|
-
decimals: 8,
|
|
126
|
-
contractId: 5
|
|
127
|
-
},
|
|
128
|
-
[InternalAssets.ArbEth]: {
|
|
129
|
-
chain: Chains.Arbitrum,
|
|
130
|
-
asset: Assets.ETH,
|
|
131
|
-
name: "Arbitrum Ether",
|
|
132
|
-
decimals: 18,
|
|
133
|
-
contractId: 6
|
|
134
|
-
},
|
|
135
|
-
[InternalAssets.ArbUsdc]: {
|
|
136
|
-
chain: Chains.Arbitrum,
|
|
137
|
-
asset: Assets.USDC,
|
|
138
|
-
name: "Arbitrum USDC",
|
|
139
|
-
decimals: 6,
|
|
140
|
-
contractId: 7
|
|
141
|
-
},
|
|
142
|
-
[InternalAssets.Sol]: {
|
|
143
|
-
chain: Chains.Solana,
|
|
144
|
-
asset: Assets.SOL,
|
|
145
|
-
name: "Solana",
|
|
146
|
-
decimals: 9,
|
|
147
|
-
contractId: 9
|
|
148
|
-
},
|
|
149
|
-
[InternalAssets.SolUsdc]: {
|
|
150
|
-
chain: Chains.Solana,
|
|
151
|
-
asset: Assets.USDC,
|
|
152
|
-
name: "Solana USDC",
|
|
153
|
-
decimals: 6,
|
|
154
|
-
contractId: 10
|
|
155
|
-
},
|
|
156
|
-
[InternalAssets.HubDot]: {
|
|
157
|
-
chain: Chains.Assethub,
|
|
158
|
-
asset: Assets.DOT,
|
|
159
|
-
name: "AssetHub DOT",
|
|
160
|
-
decimals: 10,
|
|
161
|
-
contractId: 11
|
|
162
|
-
},
|
|
163
|
-
[InternalAssets.HubUsdc]: {
|
|
164
|
-
chain: Chains.Assethub,
|
|
165
|
-
asset: Assets.USDC,
|
|
166
|
-
name: "AssetHub USDC",
|
|
167
|
-
decimals: 6,
|
|
168
|
-
contractId: 12
|
|
169
|
-
},
|
|
170
|
-
[InternalAssets.HubUsdt]: {
|
|
171
|
-
chain: Chains.Assethub,
|
|
172
|
-
asset: Assets.USDT,
|
|
173
|
-
name: "AssetHub USDT",
|
|
174
|
-
decimals: 6,
|
|
175
|
-
contractId: 13
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
var chainConstants = {
|
|
179
|
-
[Chains.Ethereum]: {
|
|
180
|
-
assets: [
|
|
181
|
-
Assets.ETH,
|
|
182
|
-
Assets.FLIP,
|
|
183
|
-
Assets.USDC,
|
|
184
|
-
Assets.USDT
|
|
185
|
-
],
|
|
186
|
-
gasAsset: InternalAssets.Eth,
|
|
187
|
-
contractId: 1,
|
|
188
|
-
blockTimeSeconds: 12
|
|
189
|
-
},
|
|
190
|
-
[Chains.Polkadot]: {
|
|
191
|
-
assets: [
|
|
192
|
-
Assets.DOT
|
|
193
|
-
],
|
|
194
|
-
gasAsset: InternalAssets.Dot,
|
|
195
|
-
contractId: 2,
|
|
196
|
-
blockTimeSeconds: 6
|
|
197
|
-
},
|
|
198
|
-
[Chains.Bitcoin]: {
|
|
199
|
-
assets: [
|
|
200
|
-
Assets.BTC
|
|
201
|
-
],
|
|
202
|
-
gasAsset: InternalAssets.Btc,
|
|
203
|
-
contractId: 3,
|
|
204
|
-
blockTimeSeconds: 10 * 60
|
|
205
|
-
},
|
|
206
|
-
[Chains.Arbitrum]: {
|
|
207
|
-
assets: [
|
|
208
|
-
Assets.ETH,
|
|
209
|
-
Assets.USDC
|
|
210
|
-
],
|
|
211
|
-
gasAsset: InternalAssets.ArbEth,
|
|
212
|
-
contractId: 4,
|
|
213
|
-
blockTimeSeconds: 0.26
|
|
214
|
-
},
|
|
215
|
-
[Chains.Solana]: {
|
|
216
|
-
assets: [
|
|
217
|
-
Assets.SOL,
|
|
218
|
-
Assets.USDC
|
|
219
|
-
],
|
|
220
|
-
gasAsset: InternalAssets.Sol,
|
|
221
|
-
contractId: 5,
|
|
222
|
-
blockTimeSeconds: (400 + 800) / 2 / 1e3
|
|
223
|
-
},
|
|
224
|
-
[Chains.Assethub]: {
|
|
225
|
-
assets: [
|
|
226
|
-
Assets.DOT,
|
|
227
|
-
Assets.USDC,
|
|
228
|
-
Assets.USDT
|
|
229
|
-
],
|
|
230
|
-
gasAsset: InternalAssets.HubDot,
|
|
231
|
-
contractId: 6,
|
|
232
|
-
blockTimeSeconds: 12
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
function isValidAssetAndChain(assetAndChain) {
|
|
236
|
-
const { asset, chain } = assetAndChain;
|
|
237
|
-
if (!(chain in Chains)) return false;
|
|
238
|
-
const validAssets = chainConstants[chain].assets;
|
|
239
|
-
return validAssets.includes(asset);
|
|
240
|
-
}
|
|
241
|
-
__name(isValidAssetAndChain, "isValidAssetAndChain");
|
|
242
|
-
var readChainAssetValue = /* @__PURE__ */ __name((map, asset) => {
|
|
243
|
-
const { chain, asset: symbol } = assetConstants[asset];
|
|
244
|
-
const chainValues = map[chain];
|
|
245
|
-
return chainValues[symbol];
|
|
246
|
-
}, "readChainAssetValue");
|
|
247
|
-
function getInternalAsset(asset, assert2 = true) {
|
|
248
|
-
if (!isValidAssetAndChain(asset)) {
|
|
249
|
-
if (assert2) {
|
|
250
|
-
throw new Error(`invalid asset and chain combination: ${JSON.stringify(asset)}`);
|
|
251
|
-
}
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
const map = {
|
|
255
|
-
[Chains.Ethereum]: {
|
|
256
|
-
[Assets.USDC]: InternalAssets.Usdc,
|
|
257
|
-
[Assets.FLIP]: InternalAssets.Flip,
|
|
258
|
-
[Assets.ETH]: InternalAssets.Eth,
|
|
259
|
-
[Assets.USDT]: InternalAssets.Usdt
|
|
260
|
-
},
|
|
261
|
-
[Chains.Bitcoin]: {
|
|
262
|
-
[Assets.BTC]: InternalAssets.Btc
|
|
263
|
-
},
|
|
264
|
-
[Chains.Polkadot]: {
|
|
265
|
-
[Assets.DOT]: InternalAssets.Dot
|
|
266
|
-
},
|
|
267
|
-
[Chains.Arbitrum]: {
|
|
268
|
-
[Assets.USDC]: InternalAssets.ArbUsdc,
|
|
269
|
-
[Assets.ETH]: InternalAssets.ArbEth
|
|
270
|
-
},
|
|
271
|
-
[Chains.Solana]: {
|
|
272
|
-
[Assets.SOL]: InternalAssets.Sol,
|
|
273
|
-
[Assets.USDC]: InternalAssets.SolUsdc
|
|
274
|
-
},
|
|
275
|
-
[Chains.Assethub]: {
|
|
276
|
-
[Assets.DOT]: InternalAssets.HubDot,
|
|
277
|
-
[Assets.USDC]: InternalAssets.HubUsdc,
|
|
278
|
-
[Assets.USDT]: InternalAssets.HubUsdt
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
const chain = map[asset.chain];
|
|
282
|
-
return chain[asset.asset];
|
|
283
|
-
}
|
|
284
|
-
__name(getInternalAsset, "getInternalAsset");
|
|
285
|
-
function getInternalAssets({ srcAsset, srcChain, destAsset, destChain }, assert2 = true) {
|
|
286
|
-
return {
|
|
287
|
-
srcAsset: getInternalAsset({
|
|
288
|
-
asset: srcAsset,
|
|
289
|
-
chain: srcChain
|
|
290
|
-
}, assert2),
|
|
291
|
-
destAsset: getInternalAsset({
|
|
292
|
-
asset: destAsset,
|
|
293
|
-
chain: destChain
|
|
294
|
-
}, assert2)
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
__name(getInternalAssets, "getInternalAssets");
|
|
298
|
-
function getAssetAndChain(internalAsset, prefix) {
|
|
299
|
-
const { chain, asset } = assetConstants[internalAsset];
|
|
300
|
-
if (prefix) {
|
|
301
|
-
return {
|
|
302
|
-
[`${prefix}Asset`]: asset,
|
|
303
|
-
[`${prefix}Chain`]: chain
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
return {
|
|
307
|
-
chain,
|
|
308
|
-
asset
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
__name(getAssetAndChain, "getAssetAndChain");
|
|
312
|
-
|
|
313
|
-
// ../shared/src/guards.ts
|
|
314
|
-
var isString = /* @__PURE__ */ __name((value) => typeof value === "string", "isString");
|
|
315
|
-
var isNotNullish = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isNotNullish");
|
|
316
|
-
function assert(condition, message, Constructor = Error) {
|
|
317
|
-
if (condition) return;
|
|
318
|
-
const error = new Constructor(message);
|
|
319
|
-
if (error.stack) {
|
|
320
|
-
error.stack = error.stack.replace(/\n.+/, "\n");
|
|
321
|
-
}
|
|
322
|
-
throw error;
|
|
323
|
-
}
|
|
324
|
-
__name(assert, "assert");
|
|
325
|
-
var camelCase = /* @__PURE__ */ __name((str) => str.replace(/_([a-z])/g, (_, char) => char.toUpperCase()), "camelCase");
|
|
326
|
-
var camelCaseKeys = /* @__PURE__ */ __name((obj) => {
|
|
327
|
-
if (typeof obj !== "object" || obj === null) return obj;
|
|
328
|
-
if (Array.isArray(obj)) return obj.map((item) => camelCaseKeys(item));
|
|
329
|
-
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [
|
|
330
|
-
camelCase(key),
|
|
331
|
-
camelCaseKeys(value)
|
|
332
|
-
]));
|
|
333
|
-
}, "camelCaseKeys");
|
|
334
|
-
var createRequest = /* @__PURE__ */ __name((method) => async (urlOrNetwork, ...params) => {
|
|
335
|
-
const url = "network" in urlOrNetwork ? constants.PUBLIC_RPC_ENDPOINTS[urlOrNetwork.network] : urlOrNetwork.rpcUrl;
|
|
336
|
-
const result = await new HttpClient(url).sendRequest(method, ...params);
|
|
337
|
-
return camelCaseKeys(result);
|
|
338
|
-
}, "createRequest");
|
|
339
|
-
var transform = /* @__PURE__ */ __name((fn, cb) => (...args) => fn(...args).then(cb), "transform");
|
|
340
|
-
var getFundingEnvironment = createRequest("cf_funding_environment");
|
|
341
|
-
createRequest("cf_swapping_environment");
|
|
342
|
-
createRequest("cf_ingress_egress_environment");
|
|
343
|
-
var getEnvironment = createRequest("cf_environment");
|
|
344
|
-
createRequest("cf_swap_rate");
|
|
345
|
-
createRequest("state_getMetadata");
|
|
346
|
-
var getSupportedAssets = createRequest("cf_supported_assets");
|
|
347
|
-
createRequest("state_getRuntimeVersion");
|
|
348
|
-
createRequest("chain_getBlockHash");
|
|
349
|
-
createRequest("cf_pool_depth");
|
|
350
|
-
createRequest("cf_accounts");
|
|
351
|
-
createRequest("cf_account_info");
|
|
352
|
-
var getAllBoostPoolsDepth = transform(createRequest("cf_boost_pools_depth"), (result) => result.map(({ chain, asset, ...rest }) => ({
|
|
353
|
-
asset: getInternalAsset({
|
|
354
|
-
chain,
|
|
355
|
-
asset
|
|
356
|
-
}),
|
|
357
|
-
...rest
|
|
358
|
-
})));
|
|
359
|
-
createRequest("cf_swap_rate_v2");
|
|
360
|
-
var _abi = [
|
|
361
|
-
{
|
|
362
|
-
inputs: [
|
|
363
|
-
{
|
|
364
|
-
internalType: "address",
|
|
365
|
-
name: "owner",
|
|
366
|
-
type: "address"
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
internalType: "address",
|
|
370
|
-
name: "spender",
|
|
371
|
-
type: "address"
|
|
372
|
-
}
|
|
373
|
-
],
|
|
374
|
-
name: "allowance",
|
|
375
|
-
outputs: [
|
|
376
|
-
{
|
|
377
|
-
internalType: "uint256",
|
|
378
|
-
name: "",
|
|
379
|
-
type: "uint256"
|
|
380
|
-
}
|
|
381
|
-
],
|
|
382
|
-
stateMutability: "view",
|
|
383
|
-
type: "function"
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
inputs: [
|
|
387
|
-
{
|
|
388
|
-
internalType: "address",
|
|
389
|
-
name: "spender",
|
|
390
|
-
type: "address"
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
internalType: "uint256",
|
|
394
|
-
name: "amount",
|
|
395
|
-
type: "uint256"
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
name: "approve",
|
|
399
|
-
outputs: [
|
|
400
|
-
{
|
|
401
|
-
internalType: "bool",
|
|
402
|
-
name: "",
|
|
403
|
-
type: "bool"
|
|
404
|
-
}
|
|
405
|
-
],
|
|
406
|
-
stateMutability: "nonpayable",
|
|
407
|
-
type: "function"
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
inputs: [
|
|
411
|
-
{
|
|
412
|
-
internalType: "address",
|
|
413
|
-
name: "account",
|
|
414
|
-
type: "address"
|
|
415
|
-
}
|
|
416
|
-
],
|
|
417
|
-
name: "balanceOf",
|
|
418
|
-
outputs: [
|
|
419
|
-
{
|
|
420
|
-
internalType: "uint256",
|
|
421
|
-
name: "",
|
|
422
|
-
type: "uint256"
|
|
423
|
-
}
|
|
424
|
-
],
|
|
425
|
-
stateMutability: "view",
|
|
426
|
-
type: "function"
|
|
427
|
-
}
|
|
428
|
-
];
|
|
429
|
-
var _ERC20__factory = class _ERC20__factory {
|
|
430
|
-
static createInterface() {
|
|
431
|
-
return new Interface(_abi);
|
|
432
|
-
}
|
|
433
|
-
static connect(address, runner) {
|
|
434
|
-
return new Contract(address, _abi, runner);
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
__name(_ERC20__factory, "ERC20__factory");
|
|
438
|
-
__publicField(_ERC20__factory, "abi", _abi);
|
|
439
|
-
var ERC20__factory = _ERC20__factory;
|
|
440
|
-
var _abi2 = [
|
|
441
|
-
{
|
|
442
|
-
inputs: [
|
|
443
|
-
{
|
|
444
|
-
internalType: "contract IKeyManager",
|
|
445
|
-
name: "keyManager",
|
|
446
|
-
type: "address"
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
internalType: "uint256",
|
|
450
|
-
name: "minFunding",
|
|
451
|
-
type: "uint256"
|
|
452
|
-
}
|
|
453
|
-
],
|
|
454
|
-
stateMutability: "nonpayable",
|
|
455
|
-
type: "constructor"
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
anonymous: false,
|
|
459
|
-
inputs: [
|
|
460
|
-
{
|
|
461
|
-
indexed: false,
|
|
462
|
-
internalType: "bool",
|
|
463
|
-
name: "communityGuardDisabled",
|
|
464
|
-
type: "bool"
|
|
465
|
-
}
|
|
466
|
-
],
|
|
467
|
-
name: "CommunityGuardDisabled",
|
|
468
|
-
type: "event"
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
anonymous: false,
|
|
472
|
-
inputs: [
|
|
473
|
-
{
|
|
474
|
-
indexed: false,
|
|
475
|
-
internalType: "address",
|
|
476
|
-
name: "flip",
|
|
477
|
-
type: "address"
|
|
478
|
-
}
|
|
479
|
-
],
|
|
480
|
-
name: "FLIPSet",
|
|
481
|
-
type: "event"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
anonymous: false,
|
|
485
|
-
inputs: [
|
|
486
|
-
{
|
|
487
|
-
indexed: false,
|
|
488
|
-
internalType: "uint256",
|
|
489
|
-
name: "oldSupply",
|
|
490
|
-
type: "uint256"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
indexed: false,
|
|
494
|
-
internalType: "uint256",
|
|
495
|
-
name: "newSupply",
|
|
496
|
-
type: "uint256"
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
indexed: false,
|
|
500
|
-
internalType: "uint256",
|
|
501
|
-
name: "stateChainBlockNumber",
|
|
502
|
-
type: "uint256"
|
|
503
|
-
}
|
|
504
|
-
],
|
|
505
|
-
name: "FlipSupplyUpdated",
|
|
506
|
-
type: "event"
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
anonymous: false,
|
|
510
|
-
inputs: [
|
|
511
|
-
{
|
|
512
|
-
indexed: true,
|
|
513
|
-
internalType: "bytes32",
|
|
514
|
-
name: "nodeID",
|
|
515
|
-
type: "bytes32"
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
indexed: false,
|
|
519
|
-
internalType: "uint256",
|
|
520
|
-
name: "amount",
|
|
521
|
-
type: "uint256"
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
indexed: false,
|
|
525
|
-
internalType: "address",
|
|
526
|
-
name: "funder",
|
|
527
|
-
type: "address"
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
|
-
name: "Funded",
|
|
531
|
-
type: "event"
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
anonymous: false,
|
|
535
|
-
inputs: [
|
|
536
|
-
{
|
|
537
|
-
indexed: false,
|
|
538
|
-
internalType: "address",
|
|
539
|
-
name: "to",
|
|
540
|
-
type: "address"
|
|
541
|
-
},
|
|
542
|
-
{
|
|
543
|
-
indexed: false,
|
|
544
|
-
internalType: "uint256",
|
|
545
|
-
name: "amount",
|
|
546
|
-
type: "uint256"
|
|
547
|
-
}
|
|
548
|
-
],
|
|
549
|
-
name: "GovernanceWithdrawal",
|
|
550
|
-
type: "event"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
anonymous: false,
|
|
554
|
-
inputs: [
|
|
555
|
-
{
|
|
556
|
-
indexed: false,
|
|
557
|
-
internalType: "uint256",
|
|
558
|
-
name: "oldMinFunding",
|
|
559
|
-
type: "uint256"
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
indexed: false,
|
|
563
|
-
internalType: "uint256",
|
|
564
|
-
name: "newMinFunding",
|
|
565
|
-
type: "uint256"
|
|
566
|
-
}
|
|
567
|
-
],
|
|
568
|
-
name: "MinFundingChanged",
|
|
569
|
-
type: "event"
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
anonymous: false,
|
|
573
|
-
inputs: [
|
|
574
|
-
{
|
|
575
|
-
indexed: true,
|
|
576
|
-
internalType: "bytes32",
|
|
577
|
-
name: "nodeID",
|
|
578
|
-
type: "bytes32"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
indexed: false,
|
|
582
|
-
internalType: "uint256",
|
|
583
|
-
name: "amount",
|
|
584
|
-
type: "uint256"
|
|
585
|
-
}
|
|
586
|
-
],
|
|
587
|
-
name: "RedemptionExecuted",
|
|
588
|
-
type: "event"
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
anonymous: false,
|
|
592
|
-
inputs: [
|
|
593
|
-
{
|
|
594
|
-
indexed: true,
|
|
595
|
-
internalType: "bytes32",
|
|
596
|
-
name: "nodeID",
|
|
597
|
-
type: "bytes32"
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
indexed: false,
|
|
601
|
-
internalType: "uint256",
|
|
602
|
-
name: "amount",
|
|
603
|
-
type: "uint256"
|
|
604
|
-
}
|
|
605
|
-
],
|
|
606
|
-
name: "RedemptionExpired",
|
|
607
|
-
type: "event"
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
anonymous: false,
|
|
611
|
-
inputs: [
|
|
612
|
-
{
|
|
613
|
-
indexed: true,
|
|
614
|
-
internalType: "bytes32",
|
|
615
|
-
name: "nodeID",
|
|
616
|
-
type: "bytes32"
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
indexed: false,
|
|
620
|
-
internalType: "uint256",
|
|
621
|
-
name: "amount",
|
|
622
|
-
type: "uint256"
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
indexed: true,
|
|
626
|
-
internalType: "address",
|
|
627
|
-
name: "redeemAddress",
|
|
628
|
-
type: "address"
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
indexed: false,
|
|
632
|
-
internalType: "uint48",
|
|
633
|
-
name: "startTime",
|
|
634
|
-
type: "uint48"
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
indexed: false,
|
|
638
|
-
internalType: "uint48",
|
|
639
|
-
name: "expiryTime",
|
|
640
|
-
type: "uint48"
|
|
641
|
-
}
|
|
642
|
-
],
|
|
643
|
-
name: "RedemptionRegistered",
|
|
644
|
-
type: "event"
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
anonymous: false,
|
|
648
|
-
inputs: [
|
|
649
|
-
{
|
|
650
|
-
indexed: false,
|
|
651
|
-
internalType: "bool",
|
|
652
|
-
name: "suspended",
|
|
653
|
-
type: "bool"
|
|
654
|
-
}
|
|
655
|
-
],
|
|
656
|
-
name: "Suspended",
|
|
657
|
-
type: "event"
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
anonymous: false,
|
|
661
|
-
inputs: [
|
|
662
|
-
{
|
|
663
|
-
indexed: false,
|
|
664
|
-
internalType: "address",
|
|
665
|
-
name: "keyManager",
|
|
666
|
-
type: "address"
|
|
667
|
-
}
|
|
668
|
-
],
|
|
669
|
-
name: "UpdatedKeyManager",
|
|
670
|
-
type: "event"
|
|
671
|
-
},
|
|
672
|
-
{
|
|
673
|
-
inputs: [],
|
|
674
|
-
name: "REDEMPTION_DELAY",
|
|
675
|
-
outputs: [
|
|
676
|
-
{
|
|
677
|
-
internalType: "uint48",
|
|
678
|
-
name: "",
|
|
679
|
-
type: "uint48"
|
|
680
|
-
}
|
|
681
|
-
],
|
|
682
|
-
stateMutability: "view",
|
|
683
|
-
type: "function"
|
|
684
|
-
},
|
|
685
|
-
{
|
|
686
|
-
inputs: [],
|
|
687
|
-
name: "disableCommunityGuard",
|
|
688
|
-
outputs: [],
|
|
689
|
-
stateMutability: "nonpayable",
|
|
690
|
-
type: "function"
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
inputs: [],
|
|
694
|
-
name: "enableCommunityGuard",
|
|
695
|
-
outputs: [],
|
|
696
|
-
stateMutability: "nonpayable",
|
|
697
|
-
type: "function"
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
inputs: [
|
|
701
|
-
{
|
|
702
|
-
internalType: "bytes32",
|
|
703
|
-
name: "nodeID",
|
|
704
|
-
type: "bytes32"
|
|
705
|
-
}
|
|
706
|
-
],
|
|
707
|
-
name: "executeRedemption",
|
|
708
|
-
outputs: [],
|
|
709
|
-
stateMutability: "nonpayable",
|
|
710
|
-
type: "function"
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
inputs: [
|
|
714
|
-
{
|
|
715
|
-
internalType: "bytes32",
|
|
716
|
-
name: "nodeID",
|
|
717
|
-
type: "bytes32"
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
internalType: "uint256",
|
|
721
|
-
name: "amount",
|
|
722
|
-
type: "uint256"
|
|
723
|
-
}
|
|
724
|
-
],
|
|
725
|
-
name: "fundStateChainAccount",
|
|
726
|
-
outputs: [],
|
|
727
|
-
stateMutability: "nonpayable",
|
|
728
|
-
type: "function"
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
inputs: [],
|
|
732
|
-
name: "getCommunityGuardDisabled",
|
|
733
|
-
outputs: [
|
|
734
|
-
{
|
|
735
|
-
internalType: "bool",
|
|
736
|
-
name: "",
|
|
737
|
-
type: "bool"
|
|
738
|
-
}
|
|
739
|
-
],
|
|
740
|
-
stateMutability: "view",
|
|
741
|
-
type: "function"
|
|
742
|
-
},
|
|
743
|
-
{
|
|
744
|
-
inputs: [],
|
|
745
|
-
name: "getCommunityKey",
|
|
746
|
-
outputs: [
|
|
747
|
-
{
|
|
748
|
-
internalType: "address",
|
|
749
|
-
name: "",
|
|
750
|
-
type: "address"
|
|
751
|
-
}
|
|
752
|
-
],
|
|
753
|
-
stateMutability: "view",
|
|
754
|
-
type: "function"
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
inputs: [],
|
|
758
|
-
name: "getFLIP",
|
|
759
|
-
outputs: [
|
|
760
|
-
{
|
|
761
|
-
internalType: "contract IFLIP",
|
|
762
|
-
name: "",
|
|
763
|
-
type: "address"
|
|
764
|
-
}
|
|
765
|
-
],
|
|
766
|
-
stateMutability: "view",
|
|
767
|
-
type: "function"
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
inputs: [],
|
|
771
|
-
name: "getGovernor",
|
|
772
|
-
outputs: [
|
|
773
|
-
{
|
|
774
|
-
internalType: "address",
|
|
775
|
-
name: "",
|
|
776
|
-
type: "address"
|
|
777
|
-
}
|
|
778
|
-
],
|
|
779
|
-
stateMutability: "view",
|
|
780
|
-
type: "function"
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
inputs: [],
|
|
784
|
-
name: "getKeyManager",
|
|
785
|
-
outputs: [
|
|
786
|
-
{
|
|
787
|
-
internalType: "contract IKeyManager",
|
|
788
|
-
name: "",
|
|
789
|
-
type: "address"
|
|
790
|
-
}
|
|
791
|
-
],
|
|
792
|
-
stateMutability: "view",
|
|
793
|
-
type: "function"
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
inputs: [],
|
|
797
|
-
name: "getLastSupplyUpdateBlockNumber",
|
|
798
|
-
outputs: [
|
|
799
|
-
{
|
|
800
|
-
internalType: "uint256",
|
|
801
|
-
name: "",
|
|
802
|
-
type: "uint256"
|
|
803
|
-
}
|
|
804
|
-
],
|
|
805
|
-
stateMutability: "view",
|
|
806
|
-
type: "function"
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
inputs: [],
|
|
810
|
-
name: "getMinimumFunding",
|
|
811
|
-
outputs: [
|
|
812
|
-
{
|
|
813
|
-
internalType: "uint256",
|
|
814
|
-
name: "",
|
|
815
|
-
type: "uint256"
|
|
816
|
-
}
|
|
817
|
-
],
|
|
818
|
-
stateMutability: "view",
|
|
819
|
-
type: "function"
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
inputs: [
|
|
823
|
-
{
|
|
824
|
-
internalType: "bytes32",
|
|
825
|
-
name: "nodeID",
|
|
826
|
-
type: "bytes32"
|
|
827
|
-
}
|
|
828
|
-
],
|
|
829
|
-
name: "getPendingRedemption",
|
|
830
|
-
outputs: [
|
|
831
|
-
{
|
|
832
|
-
components: [
|
|
833
|
-
{
|
|
834
|
-
internalType: "uint256",
|
|
835
|
-
name: "amount",
|
|
836
|
-
type: "uint256"
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
internalType: "address",
|
|
840
|
-
name: "redeemAddress",
|
|
841
|
-
type: "address"
|
|
842
|
-
},
|
|
843
|
-
{
|
|
844
|
-
internalType: "uint48",
|
|
845
|
-
name: "startTime",
|
|
846
|
-
type: "uint48"
|
|
847
|
-
},
|
|
848
|
-
{
|
|
849
|
-
internalType: "uint48",
|
|
850
|
-
name: "expiryTime",
|
|
851
|
-
type: "uint48"
|
|
852
|
-
}
|
|
853
|
-
],
|
|
854
|
-
internalType: "struct IStateChainGateway.Redemption",
|
|
855
|
-
name: "",
|
|
856
|
-
type: "tuple"
|
|
857
|
-
}
|
|
858
|
-
],
|
|
859
|
-
stateMutability: "view",
|
|
860
|
-
type: "function"
|
|
861
|
-
},
|
|
862
|
-
{
|
|
863
|
-
inputs: [],
|
|
864
|
-
name: "getSuspendedState",
|
|
865
|
-
outputs: [
|
|
866
|
-
{
|
|
867
|
-
internalType: "bool",
|
|
868
|
-
name: "",
|
|
869
|
-
type: "bool"
|
|
870
|
-
}
|
|
871
|
-
],
|
|
872
|
-
stateMutability: "view",
|
|
873
|
-
type: "function"
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
inputs: [],
|
|
877
|
-
name: "govUpdateFlipIssuer",
|
|
878
|
-
outputs: [],
|
|
879
|
-
stateMutability: "nonpayable",
|
|
880
|
-
type: "function"
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
inputs: [],
|
|
884
|
-
name: "govWithdraw",
|
|
885
|
-
outputs: [],
|
|
886
|
-
stateMutability: "nonpayable",
|
|
887
|
-
type: "function"
|
|
888
|
-
},
|
|
889
|
-
{
|
|
890
|
-
inputs: [
|
|
891
|
-
{
|
|
892
|
-
components: [
|
|
893
|
-
{
|
|
894
|
-
internalType: "uint256",
|
|
895
|
-
name: "sig",
|
|
896
|
-
type: "uint256"
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
internalType: "uint256",
|
|
900
|
-
name: "nonce",
|
|
901
|
-
type: "uint256"
|
|
902
|
-
},
|
|
903
|
-
{
|
|
904
|
-
internalType: "address",
|
|
905
|
-
name: "kTimesGAddress",
|
|
906
|
-
type: "address"
|
|
907
|
-
}
|
|
908
|
-
],
|
|
909
|
-
internalType: "struct IShared.SigData",
|
|
910
|
-
name: "sigData",
|
|
911
|
-
type: "tuple"
|
|
912
|
-
},
|
|
913
|
-
{
|
|
914
|
-
internalType: "bytes32",
|
|
915
|
-
name: "nodeID",
|
|
916
|
-
type: "bytes32"
|
|
917
|
-
},
|
|
918
|
-
{
|
|
919
|
-
internalType: "uint256",
|
|
920
|
-
name: "amount",
|
|
921
|
-
type: "uint256"
|
|
922
|
-
},
|
|
923
|
-
{
|
|
924
|
-
internalType: "address",
|
|
925
|
-
name: "redeemAddress",
|
|
926
|
-
type: "address"
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
internalType: "uint48",
|
|
930
|
-
name: "expiryTime",
|
|
931
|
-
type: "uint48"
|
|
932
|
-
}
|
|
933
|
-
],
|
|
934
|
-
name: "registerRedemption",
|
|
935
|
-
outputs: [],
|
|
936
|
-
stateMutability: "nonpayable",
|
|
937
|
-
type: "function"
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
inputs: [],
|
|
941
|
-
name: "resume",
|
|
942
|
-
outputs: [],
|
|
943
|
-
stateMutability: "nonpayable",
|
|
944
|
-
type: "function"
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
inputs: [
|
|
948
|
-
{
|
|
949
|
-
internalType: "contract IFLIP",
|
|
950
|
-
name: "flip",
|
|
951
|
-
type: "address"
|
|
952
|
-
}
|
|
953
|
-
],
|
|
954
|
-
name: "setFlip",
|
|
955
|
-
outputs: [],
|
|
956
|
-
stateMutability: "nonpayable",
|
|
957
|
-
type: "function"
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
inputs: [
|
|
961
|
-
{
|
|
962
|
-
internalType: "uint256",
|
|
963
|
-
name: "newMinFunding",
|
|
964
|
-
type: "uint256"
|
|
965
|
-
}
|
|
966
|
-
],
|
|
967
|
-
name: "setMinFunding",
|
|
968
|
-
outputs: [],
|
|
969
|
-
stateMutability: "nonpayable",
|
|
970
|
-
type: "function"
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
inputs: [],
|
|
974
|
-
name: "suspend",
|
|
975
|
-
outputs: [],
|
|
976
|
-
stateMutability: "nonpayable",
|
|
977
|
-
type: "function"
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
inputs: [
|
|
981
|
-
{
|
|
982
|
-
components: [
|
|
983
|
-
{
|
|
984
|
-
internalType: "uint256",
|
|
985
|
-
name: "sig",
|
|
986
|
-
type: "uint256"
|
|
987
|
-
},
|
|
988
|
-
{
|
|
989
|
-
internalType: "uint256",
|
|
990
|
-
name: "nonce",
|
|
991
|
-
type: "uint256"
|
|
992
|
-
},
|
|
993
|
-
{
|
|
994
|
-
internalType: "address",
|
|
995
|
-
name: "kTimesGAddress",
|
|
996
|
-
type: "address"
|
|
997
|
-
}
|
|
998
|
-
],
|
|
999
|
-
internalType: "struct IShared.SigData",
|
|
1000
|
-
name: "sigData",
|
|
1001
|
-
type: "tuple"
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
internalType: "address",
|
|
1005
|
-
name: "newIssuer",
|
|
1006
|
-
type: "address"
|
|
1007
|
-
},
|
|
1008
|
-
{
|
|
1009
|
-
internalType: "bool",
|
|
1010
|
-
name: "omitChecks",
|
|
1011
|
-
type: "bool"
|
|
1012
|
-
}
|
|
1013
|
-
],
|
|
1014
|
-
name: "updateFlipIssuer",
|
|
1015
|
-
outputs: [],
|
|
1016
|
-
stateMutability: "nonpayable",
|
|
1017
|
-
type: "function"
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
inputs: [
|
|
1021
|
-
{
|
|
1022
|
-
components: [
|
|
1023
|
-
{
|
|
1024
|
-
internalType: "uint256",
|
|
1025
|
-
name: "sig",
|
|
1026
|
-
type: "uint256"
|
|
1027
|
-
},
|
|
1028
|
-
{
|
|
1029
|
-
internalType: "uint256",
|
|
1030
|
-
name: "nonce",
|
|
1031
|
-
type: "uint256"
|
|
1032
|
-
},
|
|
1033
|
-
{
|
|
1034
|
-
internalType: "address",
|
|
1035
|
-
name: "kTimesGAddress",
|
|
1036
|
-
type: "address"
|
|
1037
|
-
}
|
|
1038
|
-
],
|
|
1039
|
-
internalType: "struct IShared.SigData",
|
|
1040
|
-
name: "sigData",
|
|
1041
|
-
type: "tuple"
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
internalType: "uint256",
|
|
1045
|
-
name: "newTotalSupply",
|
|
1046
|
-
type: "uint256"
|
|
1047
|
-
},
|
|
1048
|
-
{
|
|
1049
|
-
internalType: "uint256",
|
|
1050
|
-
name: "stateChainBlockNumber",
|
|
1051
|
-
type: "uint256"
|
|
1052
|
-
}
|
|
1053
|
-
],
|
|
1054
|
-
name: "updateFlipSupply",
|
|
1055
|
-
outputs: [],
|
|
1056
|
-
stateMutability: "nonpayable",
|
|
1057
|
-
type: "function"
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
inputs: [
|
|
1061
|
-
{
|
|
1062
|
-
components: [
|
|
1063
|
-
{
|
|
1064
|
-
internalType: "uint256",
|
|
1065
|
-
name: "sig",
|
|
1066
|
-
type: "uint256"
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
internalType: "uint256",
|
|
1070
|
-
name: "nonce",
|
|
1071
|
-
type: "uint256"
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
internalType: "address",
|
|
1075
|
-
name: "kTimesGAddress",
|
|
1076
|
-
type: "address"
|
|
1077
|
-
}
|
|
1078
|
-
],
|
|
1079
|
-
internalType: "struct IShared.SigData",
|
|
1080
|
-
name: "sigData",
|
|
1081
|
-
type: "tuple"
|
|
1082
|
-
},
|
|
1083
|
-
{
|
|
1084
|
-
internalType: "contract IKeyManager",
|
|
1085
|
-
name: "keyManager",
|
|
1086
|
-
type: "address"
|
|
1087
|
-
},
|
|
1088
|
-
{
|
|
1089
|
-
internalType: "bool",
|
|
1090
|
-
name: "omitChecks",
|
|
1091
|
-
type: "bool"
|
|
1092
|
-
}
|
|
1093
|
-
],
|
|
1094
|
-
name: "updateKeyManager",
|
|
1095
|
-
outputs: [],
|
|
1096
|
-
stateMutability: "nonpayable",
|
|
1097
|
-
type: "function"
|
|
1098
|
-
}
|
|
1099
|
-
];
|
|
1100
|
-
var _StateChainGateway__factory = class _StateChainGateway__factory {
|
|
1101
|
-
static createInterface() {
|
|
1102
|
-
return new Interface(_abi2);
|
|
1103
|
-
}
|
|
1104
|
-
static connect(address, runner) {
|
|
1105
|
-
return new Contract(address, _abi2, runner);
|
|
1106
|
-
}
|
|
1107
|
-
};
|
|
1108
|
-
__name(_StateChainGateway__factory, "StateChainGateway__factory");
|
|
1109
|
-
__publicField(_StateChainGateway__factory, "abi", _abi2);
|
|
1110
|
-
var StateChainGateway__factory = _StateChainGateway__factory;
|
|
1111
|
-
var _abi3 = [
|
|
1112
|
-
{
|
|
1113
|
-
inputs: [
|
|
1114
|
-
{
|
|
1115
|
-
internalType: "contract IKeyManager",
|
|
1116
|
-
name: "keyManager",
|
|
1117
|
-
type: "address"
|
|
1118
|
-
}
|
|
1119
|
-
],
|
|
1120
|
-
stateMutability: "nonpayable",
|
|
1121
|
-
type: "constructor"
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
anonymous: false,
|
|
1125
|
-
inputs: [
|
|
1126
|
-
{
|
|
1127
|
-
indexed: false,
|
|
1128
|
-
internalType: "bytes32",
|
|
1129
|
-
name: "swapID",
|
|
1130
|
-
type: "bytes32"
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
indexed: false,
|
|
1134
|
-
internalType: "uint256",
|
|
1135
|
-
name: "amount",
|
|
1136
|
-
type: "uint256"
|
|
1137
|
-
}
|
|
1138
|
-
],
|
|
1139
|
-
name: "AddGasNative",
|
|
1140
|
-
type: "event"
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
anonymous: false,
|
|
1144
|
-
inputs: [
|
|
1145
|
-
{
|
|
1146
|
-
indexed: false,
|
|
1147
|
-
internalType: "bytes32",
|
|
1148
|
-
name: "swapID",
|
|
1149
|
-
type: "bytes32"
|
|
1150
|
-
},
|
|
1151
|
-
{
|
|
1152
|
-
indexed: false,
|
|
1153
|
-
internalType: "uint256",
|
|
1154
|
-
name: "amount",
|
|
1155
|
-
type: "uint256"
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
indexed: false,
|
|
1159
|
-
internalType: "address",
|
|
1160
|
-
name: "token",
|
|
1161
|
-
type: "address"
|
|
1162
|
-
}
|
|
1163
|
-
],
|
|
1164
|
-
name: "AddGasToken",
|
|
1165
|
-
type: "event"
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
anonymous: false,
|
|
1169
|
-
inputs: [
|
|
1170
|
-
{
|
|
1171
|
-
indexed: false,
|
|
1172
|
-
internalType: "bool",
|
|
1173
|
-
name: "communityGuardDisabled",
|
|
1174
|
-
type: "bool"
|
|
1175
|
-
}
|
|
1176
|
-
],
|
|
1177
|
-
name: "CommunityGuardDisabled",
|
|
1178
|
-
type: "event"
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
anonymous: false,
|
|
1182
|
-
inputs: [
|
|
1183
|
-
{
|
|
1184
|
-
indexed: true,
|
|
1185
|
-
internalType: "address payable",
|
|
1186
|
-
name: "multicallAddress",
|
|
1187
|
-
type: "address"
|
|
1188
|
-
},
|
|
1189
|
-
{
|
|
1190
|
-
indexed: false,
|
|
1191
|
-
internalType: "uint256",
|
|
1192
|
-
name: "amount",
|
|
1193
|
-
type: "uint256"
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
indexed: true,
|
|
1197
|
-
internalType: "address",
|
|
1198
|
-
name: "token",
|
|
1199
|
-
type: "address"
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
indexed: false,
|
|
1203
|
-
internalType: "bytes",
|
|
1204
|
-
name: "reason",
|
|
1205
|
-
type: "bytes"
|
|
1206
|
-
}
|
|
1207
|
-
],
|
|
1208
|
-
name: "ExecuteActionsFailed",
|
|
1209
|
-
type: "event"
|
|
1210
|
-
},
|
|
1211
|
-
{
|
|
1212
|
-
anonymous: false,
|
|
1213
|
-
inputs: [
|
|
1214
|
-
{
|
|
1215
|
-
indexed: false,
|
|
1216
|
-
internalType: "bool",
|
|
1217
|
-
name: "suspended",
|
|
1218
|
-
type: "bool"
|
|
1219
|
-
}
|
|
1220
|
-
],
|
|
1221
|
-
name: "Suspended",
|
|
1222
|
-
type: "event"
|
|
1223
|
-
},
|
|
1224
|
-
{
|
|
1225
|
-
anonymous: false,
|
|
1226
|
-
inputs: [
|
|
1227
|
-
{
|
|
1228
|
-
indexed: false,
|
|
1229
|
-
internalType: "uint32",
|
|
1230
|
-
name: "dstChain",
|
|
1231
|
-
type: "uint32"
|
|
1232
|
-
},
|
|
1233
|
-
{
|
|
1234
|
-
indexed: false,
|
|
1235
|
-
internalType: "bytes",
|
|
1236
|
-
name: "dstAddress",
|
|
1237
|
-
type: "bytes"
|
|
1238
|
-
},
|
|
1239
|
-
{
|
|
1240
|
-
indexed: false,
|
|
1241
|
-
internalType: "uint32",
|
|
1242
|
-
name: "dstToken",
|
|
1243
|
-
type: "uint32"
|
|
1244
|
-
},
|
|
1245
|
-
{
|
|
1246
|
-
indexed: false,
|
|
1247
|
-
internalType: "uint256",
|
|
1248
|
-
name: "amount",
|
|
1249
|
-
type: "uint256"
|
|
1250
|
-
},
|
|
1251
|
-
{
|
|
1252
|
-
indexed: true,
|
|
1253
|
-
internalType: "address",
|
|
1254
|
-
name: "sender",
|
|
1255
|
-
type: "address"
|
|
1256
|
-
},
|
|
1257
|
-
{
|
|
1258
|
-
indexed: false,
|
|
1259
|
-
internalType: "bytes",
|
|
1260
|
-
name: "cfParameters",
|
|
1261
|
-
type: "bytes"
|
|
1262
|
-
}
|
|
1263
|
-
],
|
|
1264
|
-
name: "SwapNative",
|
|
1265
|
-
type: "event"
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
anonymous: false,
|
|
1269
|
-
inputs: [
|
|
1270
|
-
{
|
|
1271
|
-
indexed: false,
|
|
1272
|
-
internalType: "uint32",
|
|
1273
|
-
name: "dstChain",
|
|
1274
|
-
type: "uint32"
|
|
1275
|
-
},
|
|
1276
|
-
{
|
|
1277
|
-
indexed: false,
|
|
1278
|
-
internalType: "bytes",
|
|
1279
|
-
name: "dstAddress",
|
|
1280
|
-
type: "bytes"
|
|
1281
|
-
},
|
|
1282
|
-
{
|
|
1283
|
-
indexed: false,
|
|
1284
|
-
internalType: "uint32",
|
|
1285
|
-
name: "dstToken",
|
|
1286
|
-
type: "uint32"
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
indexed: false,
|
|
1290
|
-
internalType: "address",
|
|
1291
|
-
name: "srcToken",
|
|
1292
|
-
type: "address"
|
|
1293
|
-
},
|
|
1294
|
-
{
|
|
1295
|
-
indexed: false,
|
|
1296
|
-
internalType: "uint256",
|
|
1297
|
-
name: "amount",
|
|
1298
|
-
type: "uint256"
|
|
1299
|
-
},
|
|
1300
|
-
{
|
|
1301
|
-
indexed: true,
|
|
1302
|
-
internalType: "address",
|
|
1303
|
-
name: "sender",
|
|
1304
|
-
type: "address"
|
|
1305
|
-
},
|
|
1306
|
-
{
|
|
1307
|
-
indexed: false,
|
|
1308
|
-
internalType: "bytes",
|
|
1309
|
-
name: "cfParameters",
|
|
1310
|
-
type: "bytes"
|
|
1311
|
-
}
|
|
1312
|
-
],
|
|
1313
|
-
name: "SwapToken",
|
|
1314
|
-
type: "event"
|
|
1315
|
-
},
|
|
1316
|
-
{
|
|
1317
|
-
anonymous: false,
|
|
1318
|
-
inputs: [
|
|
1319
|
-
{
|
|
1320
|
-
indexed: true,
|
|
1321
|
-
internalType: "address payable",
|
|
1322
|
-
name: "recipient",
|
|
1323
|
-
type: "address"
|
|
1324
|
-
},
|
|
1325
|
-
{
|
|
1326
|
-
indexed: false,
|
|
1327
|
-
internalType: "uint256",
|
|
1328
|
-
name: "amount",
|
|
1329
|
-
type: "uint256"
|
|
1330
|
-
}
|
|
1331
|
-
],
|
|
1332
|
-
name: "TransferNativeFailed",
|
|
1333
|
-
type: "event"
|
|
1334
|
-
},
|
|
1335
|
-
{
|
|
1336
|
-
anonymous: false,
|
|
1337
|
-
inputs: [
|
|
1338
|
-
{
|
|
1339
|
-
indexed: true,
|
|
1340
|
-
internalType: "address payable",
|
|
1341
|
-
name: "recipient",
|
|
1342
|
-
type: "address"
|
|
1343
|
-
},
|
|
1344
|
-
{
|
|
1345
|
-
indexed: false,
|
|
1346
|
-
internalType: "uint256",
|
|
1347
|
-
name: "amount",
|
|
1348
|
-
type: "uint256"
|
|
1349
|
-
},
|
|
1350
|
-
{
|
|
1351
|
-
indexed: true,
|
|
1352
|
-
internalType: "address",
|
|
1353
|
-
name: "token",
|
|
1354
|
-
type: "address"
|
|
1355
|
-
},
|
|
1356
|
-
{
|
|
1357
|
-
indexed: false,
|
|
1358
|
-
internalType: "bytes",
|
|
1359
|
-
name: "reason",
|
|
1360
|
-
type: "bytes"
|
|
1361
|
-
}
|
|
1362
|
-
],
|
|
1363
|
-
name: "TransferTokenFailed",
|
|
1364
|
-
type: "event"
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
anonymous: false,
|
|
1368
|
-
inputs: [
|
|
1369
|
-
{
|
|
1370
|
-
indexed: false,
|
|
1371
|
-
internalType: "address",
|
|
1372
|
-
name: "keyManager",
|
|
1373
|
-
type: "address"
|
|
1374
|
-
}
|
|
1375
|
-
],
|
|
1376
|
-
name: "UpdatedKeyManager",
|
|
1377
|
-
type: "event"
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
anonymous: false,
|
|
1381
|
-
inputs: [
|
|
1382
|
-
{
|
|
1383
|
-
indexed: false,
|
|
1384
|
-
internalType: "uint32",
|
|
1385
|
-
name: "dstChain",
|
|
1386
|
-
type: "uint32"
|
|
1387
|
-
},
|
|
1388
|
-
{
|
|
1389
|
-
indexed: false,
|
|
1390
|
-
internalType: "bytes",
|
|
1391
|
-
name: "dstAddress",
|
|
1392
|
-
type: "bytes"
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
indexed: false,
|
|
1396
|
-
internalType: "uint32",
|
|
1397
|
-
name: "dstToken",
|
|
1398
|
-
type: "uint32"
|
|
1399
|
-
},
|
|
1400
|
-
{
|
|
1401
|
-
indexed: false,
|
|
1402
|
-
internalType: "uint256",
|
|
1403
|
-
name: "amount",
|
|
1404
|
-
type: "uint256"
|
|
1405
|
-
},
|
|
1406
|
-
{
|
|
1407
|
-
indexed: true,
|
|
1408
|
-
internalType: "address",
|
|
1409
|
-
name: "sender",
|
|
1410
|
-
type: "address"
|
|
1411
|
-
},
|
|
1412
|
-
{
|
|
1413
|
-
indexed: false,
|
|
1414
|
-
internalType: "bytes",
|
|
1415
|
-
name: "message",
|
|
1416
|
-
type: "bytes"
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
indexed: false,
|
|
1420
|
-
internalType: "uint256",
|
|
1421
|
-
name: "gasAmount",
|
|
1422
|
-
type: "uint256"
|
|
1423
|
-
},
|
|
1424
|
-
{
|
|
1425
|
-
indexed: false,
|
|
1426
|
-
internalType: "bytes",
|
|
1427
|
-
name: "cfParameters",
|
|
1428
|
-
type: "bytes"
|
|
1429
|
-
}
|
|
1430
|
-
],
|
|
1431
|
-
name: "XCallNative",
|
|
1432
|
-
type: "event"
|
|
1433
|
-
},
|
|
1434
|
-
{
|
|
1435
|
-
anonymous: false,
|
|
1436
|
-
inputs: [
|
|
1437
|
-
{
|
|
1438
|
-
indexed: false,
|
|
1439
|
-
internalType: "uint32",
|
|
1440
|
-
name: "dstChain",
|
|
1441
|
-
type: "uint32"
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
indexed: false,
|
|
1445
|
-
internalType: "bytes",
|
|
1446
|
-
name: "dstAddress",
|
|
1447
|
-
type: "bytes"
|
|
1448
|
-
},
|
|
1449
|
-
{
|
|
1450
|
-
indexed: false,
|
|
1451
|
-
internalType: "uint32",
|
|
1452
|
-
name: "dstToken",
|
|
1453
|
-
type: "uint32"
|
|
1454
|
-
},
|
|
1455
|
-
{
|
|
1456
|
-
indexed: false,
|
|
1457
|
-
internalType: "address",
|
|
1458
|
-
name: "srcToken",
|
|
1459
|
-
type: "address"
|
|
1460
|
-
},
|
|
1461
|
-
{
|
|
1462
|
-
indexed: false,
|
|
1463
|
-
internalType: "uint256",
|
|
1464
|
-
name: "amount",
|
|
1465
|
-
type: "uint256"
|
|
1466
|
-
},
|
|
1467
|
-
{
|
|
1468
|
-
indexed: true,
|
|
1469
|
-
internalType: "address",
|
|
1470
|
-
name: "sender",
|
|
1471
|
-
type: "address"
|
|
1472
|
-
},
|
|
1473
|
-
{
|
|
1474
|
-
indexed: false,
|
|
1475
|
-
internalType: "bytes",
|
|
1476
|
-
name: "message",
|
|
1477
|
-
type: "bytes"
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
indexed: false,
|
|
1481
|
-
internalType: "uint256",
|
|
1482
|
-
name: "gasAmount",
|
|
1483
|
-
type: "uint256"
|
|
1484
|
-
},
|
|
1485
|
-
{
|
|
1486
|
-
indexed: false,
|
|
1487
|
-
internalType: "bytes",
|
|
1488
|
-
name: "cfParameters",
|
|
1489
|
-
type: "bytes"
|
|
1490
|
-
}
|
|
1491
|
-
],
|
|
1492
|
-
name: "XCallToken",
|
|
1493
|
-
type: "event"
|
|
1494
|
-
},
|
|
1495
|
-
{
|
|
1496
|
-
inputs: [
|
|
1497
|
-
{
|
|
1498
|
-
internalType: "bytes32",
|
|
1499
|
-
name: "swapID",
|
|
1500
|
-
type: "bytes32"
|
|
1501
|
-
}
|
|
1502
|
-
],
|
|
1503
|
-
name: "addGasNative",
|
|
1504
|
-
outputs: [],
|
|
1505
|
-
stateMutability: "payable",
|
|
1506
|
-
type: "function"
|
|
1507
|
-
},
|
|
1508
|
-
{
|
|
1509
|
-
inputs: [
|
|
1510
|
-
{
|
|
1511
|
-
internalType: "bytes32",
|
|
1512
|
-
name: "swapID",
|
|
1513
|
-
type: "bytes32"
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
internalType: "uint256",
|
|
1517
|
-
name: "amount",
|
|
1518
|
-
type: "uint256"
|
|
1519
|
-
},
|
|
1520
|
-
{
|
|
1521
|
-
internalType: "contract IERC20",
|
|
1522
|
-
name: "token",
|
|
1523
|
-
type: "address"
|
|
1524
|
-
}
|
|
1525
|
-
],
|
|
1526
|
-
name: "addGasToken",
|
|
1527
|
-
outputs: [],
|
|
1528
|
-
stateMutability: "nonpayable",
|
|
1529
|
-
type: "function"
|
|
1530
|
-
},
|
|
1531
|
-
{
|
|
1532
|
-
inputs: [
|
|
1533
|
-
{
|
|
1534
|
-
components: [
|
|
1535
|
-
{
|
|
1536
|
-
internalType: "uint256",
|
|
1537
|
-
name: "sig",
|
|
1538
|
-
type: "uint256"
|
|
1539
|
-
},
|
|
1540
|
-
{
|
|
1541
|
-
internalType: "uint256",
|
|
1542
|
-
name: "nonce",
|
|
1543
|
-
type: "uint256"
|
|
1544
|
-
},
|
|
1545
|
-
{
|
|
1546
|
-
internalType: "address",
|
|
1547
|
-
name: "kTimesGAddress",
|
|
1548
|
-
type: "address"
|
|
1549
|
-
}
|
|
1550
|
-
],
|
|
1551
|
-
internalType: "struct IShared.SigData",
|
|
1552
|
-
name: "sigData",
|
|
1553
|
-
type: "tuple"
|
|
1554
|
-
},
|
|
1555
|
-
{
|
|
1556
|
-
components: [
|
|
1557
|
-
{
|
|
1558
|
-
internalType: "bytes32",
|
|
1559
|
-
name: "swapID",
|
|
1560
|
-
type: "bytes32"
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
internalType: "address",
|
|
1564
|
-
name: "token",
|
|
1565
|
-
type: "address"
|
|
1566
|
-
}
|
|
1567
|
-
],
|
|
1568
|
-
internalType: "struct IShared.DeployFetchParams[]",
|
|
1569
|
-
name: "deployFetchParamsArray",
|
|
1570
|
-
type: "tuple[]"
|
|
1571
|
-
},
|
|
1572
|
-
{
|
|
1573
|
-
components: [
|
|
1574
|
-
{
|
|
1575
|
-
internalType: "address payable",
|
|
1576
|
-
name: "fetchContract",
|
|
1577
|
-
type: "address"
|
|
1578
|
-
},
|
|
1579
|
-
{
|
|
1580
|
-
internalType: "address",
|
|
1581
|
-
name: "token",
|
|
1582
|
-
type: "address"
|
|
1583
|
-
}
|
|
1584
|
-
],
|
|
1585
|
-
internalType: "struct IShared.FetchParams[]",
|
|
1586
|
-
name: "fetchParamsArray",
|
|
1587
|
-
type: "tuple[]"
|
|
1588
|
-
},
|
|
1589
|
-
{
|
|
1590
|
-
components: [
|
|
1591
|
-
{
|
|
1592
|
-
internalType: "address",
|
|
1593
|
-
name: "token",
|
|
1594
|
-
type: "address"
|
|
1595
|
-
},
|
|
1596
|
-
{
|
|
1597
|
-
internalType: "address payable",
|
|
1598
|
-
name: "recipient",
|
|
1599
|
-
type: "address"
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
internalType: "uint256",
|
|
1603
|
-
name: "amount",
|
|
1604
|
-
type: "uint256"
|
|
1605
|
-
}
|
|
1606
|
-
],
|
|
1607
|
-
internalType: "struct IShared.TransferParams[]",
|
|
1608
|
-
name: "transferParamsArray",
|
|
1609
|
-
type: "tuple[]"
|
|
1610
|
-
}
|
|
1611
|
-
],
|
|
1612
|
-
name: "allBatch",
|
|
1613
|
-
outputs: [],
|
|
1614
|
-
stateMutability: "nonpayable",
|
|
1615
|
-
type: "function"
|
|
1616
|
-
},
|
|
1617
|
-
{
|
|
1618
|
-
inputs: [
|
|
1619
|
-
{
|
|
1620
|
-
components: [
|
|
1621
|
-
{
|
|
1622
|
-
internalType: "uint256",
|
|
1623
|
-
name: "sig",
|
|
1624
|
-
type: "uint256"
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
internalType: "uint256",
|
|
1628
|
-
name: "nonce",
|
|
1629
|
-
type: "uint256"
|
|
1630
|
-
},
|
|
1631
|
-
{
|
|
1632
|
-
internalType: "address",
|
|
1633
|
-
name: "kTimesGAddress",
|
|
1634
|
-
type: "address"
|
|
1635
|
-
}
|
|
1636
|
-
],
|
|
1637
|
-
internalType: "struct IShared.SigData",
|
|
1638
|
-
name: "sigData",
|
|
1639
|
-
type: "tuple"
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
components: [
|
|
1643
|
-
{
|
|
1644
|
-
internalType: "bytes32",
|
|
1645
|
-
name: "swapID",
|
|
1646
|
-
type: "bytes32"
|
|
1647
|
-
},
|
|
1648
|
-
{
|
|
1649
|
-
internalType: "address",
|
|
1650
|
-
name: "token",
|
|
1651
|
-
type: "address"
|
|
1652
|
-
}
|
|
1653
|
-
],
|
|
1654
|
-
internalType: "struct IShared.DeployFetchParams[]",
|
|
1655
|
-
name: "deployFetchParamsArray",
|
|
1656
|
-
type: "tuple[]"
|
|
1657
|
-
}
|
|
1658
|
-
],
|
|
1659
|
-
name: "deployAndFetchBatch",
|
|
1660
|
-
outputs: [],
|
|
1661
|
-
stateMutability: "nonpayable",
|
|
1662
|
-
type: "function"
|
|
1663
|
-
},
|
|
1664
|
-
{
|
|
1665
|
-
inputs: [],
|
|
1666
|
-
name: "disableCommunityGuard",
|
|
1667
|
-
outputs: [],
|
|
1668
|
-
stateMutability: "nonpayable",
|
|
1669
|
-
type: "function"
|
|
1670
|
-
},
|
|
1671
|
-
{
|
|
1672
|
-
inputs: [],
|
|
1673
|
-
name: "enableCommunityGuard",
|
|
1674
|
-
outputs: [],
|
|
1675
|
-
stateMutability: "nonpayable",
|
|
1676
|
-
type: "function"
|
|
1677
|
-
},
|
|
1678
|
-
{
|
|
1679
|
-
inputs: [
|
|
1680
|
-
{
|
|
1681
|
-
components: [
|
|
1682
|
-
{
|
|
1683
|
-
internalType: "uint256",
|
|
1684
|
-
name: "sig",
|
|
1685
|
-
type: "uint256"
|
|
1686
|
-
},
|
|
1687
|
-
{
|
|
1688
|
-
internalType: "uint256",
|
|
1689
|
-
name: "nonce",
|
|
1690
|
-
type: "uint256"
|
|
1691
|
-
},
|
|
1692
|
-
{
|
|
1693
|
-
internalType: "address",
|
|
1694
|
-
name: "kTimesGAddress",
|
|
1695
|
-
type: "address"
|
|
1696
|
-
}
|
|
1697
|
-
],
|
|
1698
|
-
internalType: "struct IShared.SigData",
|
|
1699
|
-
name: "sigData",
|
|
1700
|
-
type: "tuple"
|
|
1701
|
-
},
|
|
1702
|
-
{
|
|
1703
|
-
components: [
|
|
1704
|
-
{
|
|
1705
|
-
internalType: "address",
|
|
1706
|
-
name: "token",
|
|
1707
|
-
type: "address"
|
|
1708
|
-
},
|
|
1709
|
-
{
|
|
1710
|
-
internalType: "address payable",
|
|
1711
|
-
name: "recipient",
|
|
1712
|
-
type: "address"
|
|
1713
|
-
},
|
|
1714
|
-
{
|
|
1715
|
-
internalType: "uint256",
|
|
1716
|
-
name: "amount",
|
|
1717
|
-
type: "uint256"
|
|
1718
|
-
}
|
|
1719
|
-
],
|
|
1720
|
-
internalType: "struct IShared.TransferParams",
|
|
1721
|
-
name: "transferParams",
|
|
1722
|
-
type: "tuple"
|
|
1723
|
-
},
|
|
1724
|
-
{
|
|
1725
|
-
components: [
|
|
1726
|
-
{
|
|
1727
|
-
internalType: "enum IMulticall.CallType",
|
|
1728
|
-
name: "callType",
|
|
1729
|
-
type: "uint8"
|
|
1730
|
-
},
|
|
1731
|
-
{
|
|
1732
|
-
internalType: "address",
|
|
1733
|
-
name: "target",
|
|
1734
|
-
type: "address"
|
|
1735
|
-
},
|
|
1736
|
-
{
|
|
1737
|
-
internalType: "uint256",
|
|
1738
|
-
name: "value",
|
|
1739
|
-
type: "uint256"
|
|
1740
|
-
},
|
|
1741
|
-
{
|
|
1742
|
-
internalType: "bytes",
|
|
1743
|
-
name: "callData",
|
|
1744
|
-
type: "bytes"
|
|
1745
|
-
},
|
|
1746
|
-
{
|
|
1747
|
-
internalType: "bytes",
|
|
1748
|
-
name: "payload",
|
|
1749
|
-
type: "bytes"
|
|
1750
|
-
}
|
|
1751
|
-
],
|
|
1752
|
-
internalType: "struct IMulticall.Call[]",
|
|
1753
|
-
name: "calls",
|
|
1754
|
-
type: "tuple[]"
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
internalType: "uint256",
|
|
1758
|
-
name: "gasMulticall",
|
|
1759
|
-
type: "uint256"
|
|
1760
|
-
}
|
|
1761
|
-
],
|
|
1762
|
-
name: "executeActions",
|
|
1763
|
-
outputs: [],
|
|
1764
|
-
stateMutability: "nonpayable",
|
|
1765
|
-
type: "function"
|
|
1766
|
-
},
|
|
1767
|
-
{
|
|
1768
|
-
inputs: [
|
|
1769
|
-
{
|
|
1770
|
-
components: [
|
|
1771
|
-
{
|
|
1772
|
-
internalType: "uint256",
|
|
1773
|
-
name: "sig",
|
|
1774
|
-
type: "uint256"
|
|
1775
|
-
},
|
|
1776
|
-
{
|
|
1777
|
-
internalType: "uint256",
|
|
1778
|
-
name: "nonce",
|
|
1779
|
-
type: "uint256"
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
internalType: "address",
|
|
1783
|
-
name: "kTimesGAddress",
|
|
1784
|
-
type: "address"
|
|
1785
|
-
}
|
|
1786
|
-
],
|
|
1787
|
-
internalType: "struct IShared.SigData",
|
|
1788
|
-
name: "sigData",
|
|
1789
|
-
type: "tuple"
|
|
1790
|
-
},
|
|
1791
|
-
{
|
|
1792
|
-
internalType: "address",
|
|
1793
|
-
name: "recipient",
|
|
1794
|
-
type: "address"
|
|
1795
|
-
},
|
|
1796
|
-
{
|
|
1797
|
-
internalType: "uint32",
|
|
1798
|
-
name: "srcChain",
|
|
1799
|
-
type: "uint32"
|
|
1800
|
-
},
|
|
1801
|
-
{
|
|
1802
|
-
internalType: "bytes",
|
|
1803
|
-
name: "srcAddress",
|
|
1804
|
-
type: "bytes"
|
|
1805
|
-
},
|
|
1806
|
-
{
|
|
1807
|
-
internalType: "bytes",
|
|
1808
|
-
name: "message",
|
|
1809
|
-
type: "bytes"
|
|
1810
|
-
}
|
|
1811
|
-
],
|
|
1812
|
-
name: "executexCall",
|
|
1813
|
-
outputs: [],
|
|
1814
|
-
stateMutability: "nonpayable",
|
|
1815
|
-
type: "function"
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
inputs: [
|
|
1819
|
-
{
|
|
1820
|
-
components: [
|
|
1821
|
-
{
|
|
1822
|
-
internalType: "uint256",
|
|
1823
|
-
name: "sig",
|
|
1824
|
-
type: "uint256"
|
|
1825
|
-
},
|
|
1826
|
-
{
|
|
1827
|
-
internalType: "uint256",
|
|
1828
|
-
name: "nonce",
|
|
1829
|
-
type: "uint256"
|
|
1830
|
-
},
|
|
1831
|
-
{
|
|
1832
|
-
internalType: "address",
|
|
1833
|
-
name: "kTimesGAddress",
|
|
1834
|
-
type: "address"
|
|
1835
|
-
}
|
|
1836
|
-
],
|
|
1837
|
-
internalType: "struct IShared.SigData",
|
|
1838
|
-
name: "sigData",
|
|
1839
|
-
type: "tuple"
|
|
1840
|
-
},
|
|
1841
|
-
{
|
|
1842
|
-
components: [
|
|
1843
|
-
{
|
|
1844
|
-
internalType: "address",
|
|
1845
|
-
name: "token",
|
|
1846
|
-
type: "address"
|
|
1847
|
-
},
|
|
1848
|
-
{
|
|
1849
|
-
internalType: "address payable",
|
|
1850
|
-
name: "recipient",
|
|
1851
|
-
type: "address"
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
internalType: "uint256",
|
|
1855
|
-
name: "amount",
|
|
1856
|
-
type: "uint256"
|
|
1857
|
-
}
|
|
1858
|
-
],
|
|
1859
|
-
internalType: "struct IShared.TransferParams",
|
|
1860
|
-
name: "transferParams",
|
|
1861
|
-
type: "tuple"
|
|
1862
|
-
},
|
|
1863
|
-
{
|
|
1864
|
-
internalType: "uint32",
|
|
1865
|
-
name: "srcChain",
|
|
1866
|
-
type: "uint32"
|
|
1867
|
-
},
|
|
1868
|
-
{
|
|
1869
|
-
internalType: "bytes",
|
|
1870
|
-
name: "srcAddress",
|
|
1871
|
-
type: "bytes"
|
|
1872
|
-
},
|
|
1873
|
-
{
|
|
1874
|
-
internalType: "bytes",
|
|
1875
|
-
name: "message",
|
|
1876
|
-
type: "bytes"
|
|
1877
|
-
}
|
|
1878
|
-
],
|
|
1879
|
-
name: "executexSwapAndCall",
|
|
1880
|
-
outputs: [],
|
|
1881
|
-
stateMutability: "nonpayable",
|
|
1882
|
-
type: "function"
|
|
1883
|
-
},
|
|
1884
|
-
{
|
|
1885
|
-
inputs: [
|
|
1886
|
-
{
|
|
1887
|
-
components: [
|
|
1888
|
-
{
|
|
1889
|
-
internalType: "uint256",
|
|
1890
|
-
name: "sig",
|
|
1891
|
-
type: "uint256"
|
|
1892
|
-
},
|
|
1893
|
-
{
|
|
1894
|
-
internalType: "uint256",
|
|
1895
|
-
name: "nonce",
|
|
1896
|
-
type: "uint256"
|
|
1897
|
-
},
|
|
1898
|
-
{
|
|
1899
|
-
internalType: "address",
|
|
1900
|
-
name: "kTimesGAddress",
|
|
1901
|
-
type: "address"
|
|
1902
|
-
}
|
|
1903
|
-
],
|
|
1904
|
-
internalType: "struct IShared.SigData",
|
|
1905
|
-
name: "sigData",
|
|
1906
|
-
type: "tuple"
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
components: [
|
|
1910
|
-
{
|
|
1911
|
-
internalType: "address payable",
|
|
1912
|
-
name: "fetchContract",
|
|
1913
|
-
type: "address"
|
|
1914
|
-
},
|
|
1915
|
-
{
|
|
1916
|
-
internalType: "address",
|
|
1917
|
-
name: "token",
|
|
1918
|
-
type: "address"
|
|
1919
|
-
}
|
|
1920
|
-
],
|
|
1921
|
-
internalType: "struct IShared.FetchParams[]",
|
|
1922
|
-
name: "fetchParamsArray",
|
|
1923
|
-
type: "tuple[]"
|
|
1924
|
-
}
|
|
1925
|
-
],
|
|
1926
|
-
name: "fetchBatch",
|
|
1927
|
-
outputs: [],
|
|
1928
|
-
stateMutability: "nonpayable",
|
|
1929
|
-
type: "function"
|
|
1930
|
-
},
|
|
1931
|
-
{
|
|
1932
|
-
inputs: [],
|
|
1933
|
-
name: "getCommunityGuardDisabled",
|
|
1934
|
-
outputs: [
|
|
1935
|
-
{
|
|
1936
|
-
internalType: "bool",
|
|
1937
|
-
name: "",
|
|
1938
|
-
type: "bool"
|
|
1939
|
-
}
|
|
1940
|
-
],
|
|
1941
|
-
stateMutability: "view",
|
|
1942
|
-
type: "function"
|
|
1943
|
-
},
|
|
1944
|
-
{
|
|
1945
|
-
inputs: [],
|
|
1946
|
-
name: "getCommunityKey",
|
|
1947
|
-
outputs: [
|
|
1948
|
-
{
|
|
1949
|
-
internalType: "address",
|
|
1950
|
-
name: "",
|
|
1951
|
-
type: "address"
|
|
1952
|
-
}
|
|
1953
|
-
],
|
|
1954
|
-
stateMutability: "view",
|
|
1955
|
-
type: "function"
|
|
1956
|
-
},
|
|
1957
|
-
{
|
|
1958
|
-
inputs: [],
|
|
1959
|
-
name: "getGovernor",
|
|
1960
|
-
outputs: [
|
|
1961
|
-
{
|
|
1962
|
-
internalType: "address",
|
|
1963
|
-
name: "",
|
|
1964
|
-
type: "address"
|
|
1965
|
-
}
|
|
1966
|
-
],
|
|
1967
|
-
stateMutability: "view",
|
|
1968
|
-
type: "function"
|
|
1969
|
-
},
|
|
1970
|
-
{
|
|
1971
|
-
inputs: [],
|
|
1972
|
-
name: "getKeyManager",
|
|
1973
|
-
outputs: [
|
|
1974
|
-
{
|
|
1975
|
-
internalType: "contract IKeyManager",
|
|
1976
|
-
name: "",
|
|
1977
|
-
type: "address"
|
|
1978
|
-
}
|
|
1979
|
-
],
|
|
1980
|
-
stateMutability: "view",
|
|
1981
|
-
type: "function"
|
|
1982
|
-
},
|
|
1983
|
-
{
|
|
1984
|
-
inputs: [],
|
|
1985
|
-
name: "getSuspendedState",
|
|
1986
|
-
outputs: [
|
|
1987
|
-
{
|
|
1988
|
-
internalType: "bool",
|
|
1989
|
-
name: "",
|
|
1990
|
-
type: "bool"
|
|
1991
|
-
}
|
|
1992
|
-
],
|
|
1993
|
-
stateMutability: "view",
|
|
1994
|
-
type: "function"
|
|
1995
|
-
},
|
|
1996
|
-
{
|
|
1997
|
-
inputs: [
|
|
1998
|
-
{
|
|
1999
|
-
internalType: "address[]",
|
|
2000
|
-
name: "tokens",
|
|
2001
|
-
type: "address[]"
|
|
2002
|
-
}
|
|
2003
|
-
],
|
|
2004
|
-
name: "govWithdraw",
|
|
2005
|
-
outputs: [],
|
|
2006
|
-
stateMutability: "nonpayable",
|
|
2007
|
-
type: "function"
|
|
2008
|
-
},
|
|
2009
|
-
{
|
|
2010
|
-
inputs: [],
|
|
2011
|
-
name: "resume",
|
|
2012
|
-
outputs: [],
|
|
2013
|
-
stateMutability: "nonpayable",
|
|
2014
|
-
type: "function"
|
|
2015
|
-
},
|
|
2016
|
-
{
|
|
2017
|
-
inputs: [],
|
|
2018
|
-
name: "suspend",
|
|
2019
|
-
outputs: [],
|
|
2020
|
-
stateMutability: "nonpayable",
|
|
2021
|
-
type: "function"
|
|
2022
|
-
},
|
|
2023
|
-
{
|
|
2024
|
-
inputs: [
|
|
2025
|
-
{
|
|
2026
|
-
components: [
|
|
2027
|
-
{
|
|
2028
|
-
internalType: "uint256",
|
|
2029
|
-
name: "sig",
|
|
2030
|
-
type: "uint256"
|
|
2031
|
-
},
|
|
2032
|
-
{
|
|
2033
|
-
internalType: "uint256",
|
|
2034
|
-
name: "nonce",
|
|
2035
|
-
type: "uint256"
|
|
2036
|
-
},
|
|
2037
|
-
{
|
|
2038
|
-
internalType: "address",
|
|
2039
|
-
name: "kTimesGAddress",
|
|
2040
|
-
type: "address"
|
|
2041
|
-
}
|
|
2042
|
-
],
|
|
2043
|
-
internalType: "struct IShared.SigData",
|
|
2044
|
-
name: "sigData",
|
|
2045
|
-
type: "tuple"
|
|
2046
|
-
},
|
|
2047
|
-
{
|
|
2048
|
-
components: [
|
|
2049
|
-
{
|
|
2050
|
-
internalType: "address",
|
|
2051
|
-
name: "token",
|
|
2052
|
-
type: "address"
|
|
2053
|
-
},
|
|
2054
|
-
{
|
|
2055
|
-
internalType: "address payable",
|
|
2056
|
-
name: "recipient",
|
|
2057
|
-
type: "address"
|
|
2058
|
-
},
|
|
2059
|
-
{
|
|
2060
|
-
internalType: "uint256",
|
|
2061
|
-
name: "amount",
|
|
2062
|
-
type: "uint256"
|
|
2063
|
-
}
|
|
2064
|
-
],
|
|
2065
|
-
internalType: "struct IShared.TransferParams",
|
|
2066
|
-
name: "transferParams",
|
|
2067
|
-
type: "tuple"
|
|
2068
|
-
}
|
|
2069
|
-
],
|
|
2070
|
-
name: "transfer",
|
|
2071
|
-
outputs: [],
|
|
2072
|
-
stateMutability: "nonpayable",
|
|
2073
|
-
type: "function"
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
inputs: [
|
|
2077
|
-
{
|
|
2078
|
-
components: [
|
|
2079
|
-
{
|
|
2080
|
-
internalType: "uint256",
|
|
2081
|
-
name: "sig",
|
|
2082
|
-
type: "uint256"
|
|
2083
|
-
},
|
|
2084
|
-
{
|
|
2085
|
-
internalType: "uint256",
|
|
2086
|
-
name: "nonce",
|
|
2087
|
-
type: "uint256"
|
|
2088
|
-
},
|
|
2089
|
-
{
|
|
2090
|
-
internalType: "address",
|
|
2091
|
-
name: "kTimesGAddress",
|
|
2092
|
-
type: "address"
|
|
2093
|
-
}
|
|
2094
|
-
],
|
|
2095
|
-
internalType: "struct IShared.SigData",
|
|
2096
|
-
name: "sigData",
|
|
2097
|
-
type: "tuple"
|
|
2098
|
-
},
|
|
2099
|
-
{
|
|
2100
|
-
components: [
|
|
2101
|
-
{
|
|
2102
|
-
internalType: "address",
|
|
2103
|
-
name: "token",
|
|
2104
|
-
type: "address"
|
|
2105
|
-
},
|
|
2106
|
-
{
|
|
2107
|
-
internalType: "address payable",
|
|
2108
|
-
name: "recipient",
|
|
2109
|
-
type: "address"
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
internalType: "uint256",
|
|
2113
|
-
name: "amount",
|
|
2114
|
-
type: "uint256"
|
|
2115
|
-
}
|
|
2116
|
-
],
|
|
2117
|
-
internalType: "struct IShared.TransferParams[]",
|
|
2118
|
-
name: "transferParamsArray",
|
|
2119
|
-
type: "tuple[]"
|
|
2120
|
-
}
|
|
2121
|
-
],
|
|
2122
|
-
name: "transferBatch",
|
|
2123
|
-
outputs: [],
|
|
2124
|
-
stateMutability: "nonpayable",
|
|
2125
|
-
type: "function"
|
|
2126
|
-
},
|
|
2127
|
-
{
|
|
2128
|
-
inputs: [
|
|
2129
|
-
{
|
|
2130
|
-
components: [
|
|
2131
|
-
{
|
|
2132
|
-
internalType: "uint256",
|
|
2133
|
-
name: "sig",
|
|
2134
|
-
type: "uint256"
|
|
2135
|
-
},
|
|
2136
|
-
{
|
|
2137
|
-
internalType: "uint256",
|
|
2138
|
-
name: "nonce",
|
|
2139
|
-
type: "uint256"
|
|
2140
|
-
},
|
|
2141
|
-
{
|
|
2142
|
-
internalType: "address",
|
|
2143
|
-
name: "kTimesGAddress",
|
|
2144
|
-
type: "address"
|
|
2145
|
-
}
|
|
2146
|
-
],
|
|
2147
|
-
internalType: "struct IShared.SigData",
|
|
2148
|
-
name: "sigData",
|
|
2149
|
-
type: "tuple"
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
internalType: "contract IKeyManager",
|
|
2153
|
-
name: "keyManager",
|
|
2154
|
-
type: "address"
|
|
2155
|
-
},
|
|
2156
|
-
{
|
|
2157
|
-
internalType: "bool",
|
|
2158
|
-
name: "omitChecks",
|
|
2159
|
-
type: "bool"
|
|
2160
|
-
}
|
|
2161
|
-
],
|
|
2162
|
-
name: "updateKeyManager",
|
|
2163
|
-
outputs: [],
|
|
2164
|
-
stateMutability: "nonpayable",
|
|
2165
|
-
type: "function"
|
|
2166
|
-
},
|
|
2167
|
-
{
|
|
2168
|
-
inputs: [
|
|
2169
|
-
{
|
|
2170
|
-
internalType: "uint32",
|
|
2171
|
-
name: "dstChain",
|
|
2172
|
-
type: "uint32"
|
|
2173
|
-
},
|
|
2174
|
-
{
|
|
2175
|
-
internalType: "bytes",
|
|
2176
|
-
name: "dstAddress",
|
|
2177
|
-
type: "bytes"
|
|
2178
|
-
},
|
|
2179
|
-
{
|
|
2180
|
-
internalType: "uint32",
|
|
2181
|
-
name: "dstToken",
|
|
2182
|
-
type: "uint32"
|
|
2183
|
-
},
|
|
2184
|
-
{
|
|
2185
|
-
internalType: "bytes",
|
|
2186
|
-
name: "message",
|
|
2187
|
-
type: "bytes"
|
|
2188
|
-
},
|
|
2189
|
-
{
|
|
2190
|
-
internalType: "uint256",
|
|
2191
|
-
name: "gasAmount",
|
|
2192
|
-
type: "uint256"
|
|
2193
|
-
},
|
|
2194
|
-
{
|
|
2195
|
-
internalType: "bytes",
|
|
2196
|
-
name: "cfParameters",
|
|
2197
|
-
type: "bytes"
|
|
2198
|
-
}
|
|
2199
|
-
],
|
|
2200
|
-
name: "xCallNative",
|
|
2201
|
-
outputs: [],
|
|
2202
|
-
stateMutability: "payable",
|
|
2203
|
-
type: "function"
|
|
2204
|
-
},
|
|
2205
|
-
{
|
|
2206
|
-
inputs: [
|
|
2207
|
-
{
|
|
2208
|
-
internalType: "uint32",
|
|
2209
|
-
name: "dstChain",
|
|
2210
|
-
type: "uint32"
|
|
2211
|
-
},
|
|
2212
|
-
{
|
|
2213
|
-
internalType: "bytes",
|
|
2214
|
-
name: "dstAddress",
|
|
2215
|
-
type: "bytes"
|
|
2216
|
-
},
|
|
2217
|
-
{
|
|
2218
|
-
internalType: "uint32",
|
|
2219
|
-
name: "dstToken",
|
|
2220
|
-
type: "uint32"
|
|
2221
|
-
},
|
|
2222
|
-
{
|
|
2223
|
-
internalType: "bytes",
|
|
2224
|
-
name: "message",
|
|
2225
|
-
type: "bytes"
|
|
2226
|
-
},
|
|
2227
|
-
{
|
|
2228
|
-
internalType: "uint256",
|
|
2229
|
-
name: "gasAmount",
|
|
2230
|
-
type: "uint256"
|
|
2231
|
-
},
|
|
2232
|
-
{
|
|
2233
|
-
internalType: "contract IERC20",
|
|
2234
|
-
name: "srcToken",
|
|
2235
|
-
type: "address"
|
|
2236
|
-
},
|
|
2237
|
-
{
|
|
2238
|
-
internalType: "uint256",
|
|
2239
|
-
name: "amount",
|
|
2240
|
-
type: "uint256"
|
|
2241
|
-
},
|
|
2242
|
-
{
|
|
2243
|
-
internalType: "bytes",
|
|
2244
|
-
name: "cfParameters",
|
|
2245
|
-
type: "bytes"
|
|
2246
|
-
}
|
|
2247
|
-
],
|
|
2248
|
-
name: "xCallToken",
|
|
2249
|
-
outputs: [],
|
|
2250
|
-
stateMutability: "nonpayable",
|
|
2251
|
-
type: "function"
|
|
2252
|
-
},
|
|
2253
|
-
{
|
|
2254
|
-
inputs: [
|
|
2255
|
-
{
|
|
2256
|
-
internalType: "uint32",
|
|
2257
|
-
name: "dstChain",
|
|
2258
|
-
type: "uint32"
|
|
2259
|
-
},
|
|
2260
|
-
{
|
|
2261
|
-
internalType: "bytes",
|
|
2262
|
-
name: "dstAddress",
|
|
2263
|
-
type: "bytes"
|
|
2264
|
-
},
|
|
2265
|
-
{
|
|
2266
|
-
internalType: "uint32",
|
|
2267
|
-
name: "dstToken",
|
|
2268
|
-
type: "uint32"
|
|
2269
|
-
},
|
|
2270
|
-
{
|
|
2271
|
-
internalType: "bytes",
|
|
2272
|
-
name: "cfParameters",
|
|
2273
|
-
type: "bytes"
|
|
2274
|
-
}
|
|
2275
|
-
],
|
|
2276
|
-
name: "xSwapNative",
|
|
2277
|
-
outputs: [],
|
|
2278
|
-
stateMutability: "payable",
|
|
2279
|
-
type: "function"
|
|
2280
|
-
},
|
|
2281
|
-
{
|
|
2282
|
-
inputs: [
|
|
2283
|
-
{
|
|
2284
|
-
internalType: "uint32",
|
|
2285
|
-
name: "dstChain",
|
|
2286
|
-
type: "uint32"
|
|
2287
|
-
},
|
|
2288
|
-
{
|
|
2289
|
-
internalType: "bytes",
|
|
2290
|
-
name: "dstAddress",
|
|
2291
|
-
type: "bytes"
|
|
2292
|
-
},
|
|
2293
|
-
{
|
|
2294
|
-
internalType: "uint32",
|
|
2295
|
-
name: "dstToken",
|
|
2296
|
-
type: "uint32"
|
|
2297
|
-
},
|
|
2298
|
-
{
|
|
2299
|
-
internalType: "contract IERC20",
|
|
2300
|
-
name: "srcToken",
|
|
2301
|
-
type: "address"
|
|
2302
|
-
},
|
|
2303
|
-
{
|
|
2304
|
-
internalType: "uint256",
|
|
2305
|
-
name: "amount",
|
|
2306
|
-
type: "uint256"
|
|
2307
|
-
},
|
|
2308
|
-
{
|
|
2309
|
-
internalType: "bytes",
|
|
2310
|
-
name: "cfParameters",
|
|
2311
|
-
type: "bytes"
|
|
2312
|
-
}
|
|
2313
|
-
],
|
|
2314
|
-
name: "xSwapToken",
|
|
2315
|
-
outputs: [],
|
|
2316
|
-
stateMutability: "nonpayable",
|
|
2317
|
-
type: "function"
|
|
2318
|
-
},
|
|
2319
|
-
{
|
|
2320
|
-
stateMutability: "payable",
|
|
2321
|
-
type: "receive"
|
|
2322
|
-
}
|
|
2323
|
-
];
|
|
2324
|
-
var _Vault__factory = class _Vault__factory {
|
|
2325
|
-
static createInterface() {
|
|
2326
|
-
return new Interface(_abi3);
|
|
2327
|
-
}
|
|
2328
|
-
static connect(address, runner) {
|
|
2329
|
-
return new Contract(address, _abi3, runner);
|
|
2330
|
-
}
|
|
2331
|
-
};
|
|
2332
|
-
__name(_Vault__factory, "Vault__factory");
|
|
2333
|
-
__publicField(_Vault__factory, "abi", _abi3);
|
|
2334
|
-
var Vault__factory = _Vault__factory;
|
|
2335
|
-
|
|
2336
|
-
// ../shared/src/consts.ts
|
|
2337
|
-
({
|
|
2338
|
-
[ChainflipNetworks.backspin]: 1e3,
|
|
2339
|
-
[ChainflipNetworks.sisyphos]: 1e3,
|
|
2340
|
-
[ChainflipNetworks.perseverance]: 1e3,
|
|
2341
|
-
[ChainflipNetworks.mainnet]: 1e3
|
|
2342
|
-
});
|
|
2343
|
-
var ETHEREUM_EVM_CHAIN_ID = {
|
|
2344
|
-
[ChainflipNetworks.backspin]: 10997,
|
|
2345
|
-
[ChainflipNetworks.sisyphos]: 11155111,
|
|
2346
|
-
[ChainflipNetworks.perseverance]: 11155111,
|
|
2347
|
-
[ChainflipNetworks.mainnet]: 1
|
|
2348
|
-
};
|
|
2349
|
-
var ARBITRUM_EVM_CHAIN_ID = {
|
|
2350
|
-
[ChainflipNetworks.backspin]: 412346,
|
|
2351
|
-
[ChainflipNetworks.sisyphos]: 421614,
|
|
2352
|
-
[ChainflipNetworks.perseverance]: 421614,
|
|
2353
|
-
[ChainflipNetworks.mainnet]: 42161
|
|
2354
|
-
};
|
|
2355
|
-
var getEvmChainId = /* @__PURE__ */ __name((chain, network) => {
|
|
2356
|
-
switch (chain) {
|
|
2357
|
-
case Chains.Ethereum:
|
|
2358
|
-
return ETHEREUM_EVM_CHAIN_ID[network];
|
|
2359
|
-
case Chains.Arbitrum:
|
|
2360
|
-
return ARBITRUM_EVM_CHAIN_ID[network];
|
|
2361
|
-
default:
|
|
2362
|
-
return void 0;
|
|
2363
|
-
}
|
|
2364
|
-
}, "getEvmChainId");
|
|
2365
|
-
var SEPOLIA_USDC_CONTRACT_ADDRESS = "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238";
|
|
2366
|
-
var SEPOLIA_USDT_CONTRACT_ADDRESS = "0x27CEA6Eb8a21Aae05Eb29C91c5CA10592892F584";
|
|
2367
|
-
var ADDRESSES = {
|
|
2368
|
-
[ChainflipNetworks.backspin]: {
|
|
2369
|
-
FLIP_CONTRACT_ADDRESS: "0x10C6E9530F1C1AF873a391030a1D9E8ed0630D26",
|
|
2370
|
-
USDC_CONTRACT_ADDRESS: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
|
|
2371
|
-
USDT_CONTRACT_ADDRESS: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
|
|
2372
|
-
ARBUSDC_CONTRACT_ADDRESS: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
|
|
2373
|
-
VAULT_CONTRACT_ADDRESS: "0xB7A5bd0345EF1Cc5E66bf61BdeC17D2461fBd968",
|
|
2374
|
-
STATE_CHAIN_GATEWAY_ADDRESS: "0xeEBe00Ac0756308ac4AaBfD76c05c4F3088B8883",
|
|
2375
|
-
ARB_VAULT_CONTRACT_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
|
|
2376
|
-
// TODO(solana)
|
|
2377
|
-
SOLUSDC_CONTRACT_ADDRESS: ""
|
|
2378
|
-
},
|
|
2379
|
-
[ChainflipNetworks.sisyphos]: {
|
|
2380
|
-
FLIP_CONTRACT_ADDRESS: "0xcD079EAB6B5443b545788Fd210C8800FEADd87fa",
|
|
2381
|
-
USDC_CONTRACT_ADDRESS: SEPOLIA_USDC_CONTRACT_ADDRESS,
|
|
2382
|
-
USDT_CONTRACT_ADDRESS: SEPOLIA_USDT_CONTRACT_ADDRESS,
|
|
2383
|
-
ARBUSDC_CONTRACT_ADDRESS: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
|
|
2384
|
-
VAULT_CONTRACT_ADDRESS: "0xa94d6b1853F3cb611Ed3cCb701b4fdA5a9DACe85",
|
|
2385
|
-
STATE_CHAIN_GATEWAY_ADDRESS: "0x1F7fE41C798cc7b1D34BdC8de2dDDA4a4bE744D9",
|
|
2386
|
-
ARB_VAULT_CONTRACT_ADDRESS: "0x8155BdD48CD011e1118b51A1C82be020A3E5c2f2",
|
|
2387
|
-
SOLUSDC_CONTRACT_ADDRESS: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
|
|
2388
|
-
},
|
|
2389
|
-
[ChainflipNetworks.perseverance]: {
|
|
2390
|
-
FLIP_CONTRACT_ADDRESS: "0xdC27c60956cB065D19F08bb69a707E37b36d8086",
|
|
2391
|
-
USDC_CONTRACT_ADDRESS: SEPOLIA_USDC_CONTRACT_ADDRESS,
|
|
2392
|
-
USDT_CONTRACT_ADDRESS: SEPOLIA_USDT_CONTRACT_ADDRESS,
|
|
2393
|
-
ARBUSDC_CONTRACT_ADDRESS: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
|
|
2394
|
-
VAULT_CONTRACT_ADDRESS: "0x36eaD71325604DC15d35FAE584D7b50646D81753",
|
|
2395
|
-
STATE_CHAIN_GATEWAY_ADDRESS: "0xA34a967197Ee90BB7fb28e928388a573c5CFd099",
|
|
2396
|
-
ARB_VAULT_CONTRACT_ADDRESS: "0x2bb150e6d4366A1BDBC4275D1F35892CD63F27e3",
|
|
2397
|
-
SOLUSDC_CONTRACT_ADDRESS: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
|
|
2398
|
-
},
|
|
2399
|
-
[ChainflipNetworks.mainnet]: {
|
|
2400
|
-
FLIP_CONTRACT_ADDRESS: "0x826180541412D574cf1336d22c0C0a287822678A",
|
|
2401
|
-
USDC_CONTRACT_ADDRESS: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
2402
|
-
USDT_CONTRACT_ADDRESS: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
2403
|
-
ARBUSDC_CONTRACT_ADDRESS: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
2404
|
-
VAULT_CONTRACT_ADDRESS: "0xF5e10380213880111522dd0efD3dbb45b9f62Bcc",
|
|
2405
|
-
STATE_CHAIN_GATEWAY_ADDRESS: "0x6995Ab7c4D7F4B03f467Cf4c8E920427d9621DBd",
|
|
2406
|
-
ARB_VAULT_CONTRACT_ADDRESS: "0x79001a5e762f3bEFC8e5871b42F6734e00498920",
|
|
2407
|
-
SOLUSDC_CONTRACT_ADDRESS: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
|
2408
|
-
}
|
|
2409
|
-
};
|
|
2410
|
-
|
|
2411
|
-
// ../shared/src/contracts.ts
|
|
2412
|
-
var extractOverrides = /* @__PURE__ */ __name((transactionOverrides) => {
|
|
2413
|
-
const { wait, ...ethersOverrides } = transactionOverrides;
|
|
2414
|
-
return ethersOverrides;
|
|
2415
|
-
}, "extractOverrides");
|
|
2416
|
-
function getTokenContractAddress(asset, network) {
|
|
2417
|
-
if (asset === InternalAssets.Flip) return ADDRESSES[network].FLIP_CONTRACT_ADDRESS;
|
|
2418
|
-
if (asset === InternalAssets.Usdc) return ADDRESSES[network].USDC_CONTRACT_ADDRESS;
|
|
2419
|
-
if (asset === InternalAssets.Usdt) return ADDRESSES[network].USDT_CONTRACT_ADDRESS;
|
|
2420
|
-
if (asset === InternalAssets.ArbUsdc) return ADDRESSES[network].ARBUSDC_CONTRACT_ADDRESS;
|
|
2421
|
-
if (asset === InternalAssets.SolUsdc) return ADDRESSES[network].SOLUSDC_CONTRACT_ADDRESS;
|
|
2422
|
-
throw new Error(`No contract address for ${asset} on ${network}`);
|
|
2423
|
-
}
|
|
2424
|
-
__name(getTokenContractAddress, "getTokenContractAddress");
|
|
2425
|
-
var getStateChainGatewayContractAddress = /* @__PURE__ */ __name((network) => ADDRESSES[network].STATE_CHAIN_GATEWAY_ADDRESS, "getStateChainGatewayContractAddress");
|
|
2426
|
-
var checkAllowance = /* @__PURE__ */ __name(async (amount, spenderAddress, erc20Address, signer) => {
|
|
2427
|
-
const erc20 = ERC20__factory.connect(erc20Address, signer);
|
|
2428
|
-
const signerAddress = await signer.getAddress();
|
|
2429
|
-
const allowance = await erc20.allowance(signerAddress, spenderAddress);
|
|
2430
|
-
return {
|
|
2431
|
-
allowance,
|
|
2432
|
-
hasSufficientAllowance: allowance >= amount,
|
|
2433
|
-
erc20
|
|
2434
|
-
};
|
|
2435
|
-
}, "checkAllowance");
|
|
2436
|
-
var approve = /* @__PURE__ */ __name(async (amount, spenderAddress, erc20, allowance, txOpts) => {
|
|
2437
|
-
if (allowance >= amount) return null;
|
|
2438
|
-
const transaction = await erc20.approve(spenderAddress, amount - allowance, extractOverrides(txOpts));
|
|
2439
|
-
await transaction.wait(txOpts.wait);
|
|
2440
|
-
return transaction;
|
|
2441
|
-
}, "approve");
|
|
2442
|
-
var getVaultContractAddress = /* @__PURE__ */ __name((chain, network) => {
|
|
2443
|
-
if (chain === Chains.Ethereum) return ADDRESSES[network].VAULT_CONTRACT_ADDRESS;
|
|
2444
|
-
if (chain === Chains.Arbitrum) return ADDRESSES[network].ARB_VAULT_CONTRACT_ADDRESS;
|
|
2445
|
-
throw new Error(`No vault contract address for ${chain} on ${network}`);
|
|
2446
|
-
}, "getVaultContractAddress");
|
|
2447
|
-
var getFlipBalance = /* @__PURE__ */ __name(async (network, signer) => {
|
|
2448
|
-
const flipAddress = getTokenContractAddress(InternalAssets.Flip, network);
|
|
2449
|
-
const flip = ERC20__factory.connect(flipAddress, signer);
|
|
2450
|
-
return flip.balanceOf(await signer.getAddress());
|
|
2451
|
-
}, "getFlipBalance");
|
|
2452
|
-
|
|
2453
|
-
export { Assets, ChainflipNetworks, Chains, InternalAssets, StateChainGateway__factory, Vault__factory, __commonJS, __export, __name, __publicField, __toESM, approve, assert, assetConstants, chainConstants, checkAllowance, extractOverrides, getAllBoostPoolsDepth, getAssetAndChain, getEnvironment, getEvmChainId, getFlipBalance, getFundingEnvironment, getInternalAsset, getInternalAssets, getStateChainGatewayContractAddress, getSupportedAssets, getTokenContractAddress, getVaultContractAddress, isNotNullish, isString, isTestnet, isValidAssetAndChain, readChainAssetValue };
|