@ring-protocol/v2-sdk 0.1.10 → 1.0.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/README.md +4 -4
- package/dist/index.d.mts +358 -0
- package/dist/index.d.ts +358 -4
- package/dist/index.js +3582 -5
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3538 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +20 -26
- package/dist/constants.d.ts +0 -19
- package/dist/entities/index.d.ts +0 -3
- package/dist/entities/pair.d.ts +0 -147
- package/dist/entities/route.d.ts +0 -12
- package/dist/entities/trade.d.ts +0 -103
- package/dist/errors.d.ts +0 -16
- package/dist/router.d.ts +0 -64
- package/dist/v2-sdk.cjs.development.js +0 -959
- package/dist/v2-sdk.cjs.development.js.map +0 -1
- package/dist/v2-sdk.cjs.production.min.js +0 -2
- package/dist/v2-sdk.cjs.production.min.js.map +0 -1
- package/dist/v2-sdk.esm.js +0 -942
- package/dist/v2-sdk.esm.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,3585 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
29
|
|
|
2
|
-
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
FACTORY_ADDRESS_MAP: () => FACTORY_ADDRESS_MAP,
|
|
34
|
+
FEW_WRAPPED_TOKEN_BYTECODE: () => FEW_WRAPPED_TOKEN_BYTECODE,
|
|
35
|
+
FEW_WRAPPED_TOKEN_FACTORY_ADDRESS: () => FEW_WRAPPED_TOKEN_FACTORY_ADDRESS,
|
|
36
|
+
INIT_CODE_HASH: () => INIT_CODE_HASH,
|
|
37
|
+
INIT_CODE_HASH_MAP: () => INIT_CODE_HASH_MAP,
|
|
38
|
+
InsufficientInputAmountError: () => InsufficientInputAmountError,
|
|
39
|
+
InsufficientReservesError: () => InsufficientReservesError,
|
|
40
|
+
MINIMUM_LIQUIDITY: () => MINIMUM_LIQUIDITY,
|
|
41
|
+
Pair: () => Pair,
|
|
42
|
+
Route: () => Route,
|
|
43
|
+
Router: () => Router,
|
|
44
|
+
Trade: () => Trade,
|
|
45
|
+
computePairAddress: () => computePairAddress,
|
|
46
|
+
getFewTokenAddress: () => getFewTokenAddress,
|
|
47
|
+
getFewTokenFromOriginalToken: () => getFewTokenFromOriginalToken,
|
|
48
|
+
inputOutputComparator: () => inputOutputComparator,
|
|
49
|
+
isFewToken: () => isFewToken,
|
|
50
|
+
tradeComparator: () => tradeComparator
|
|
51
|
+
});
|
|
52
|
+
module.exports = __toCommonJS(index_exports);
|
|
3
53
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
54
|
+
// src/constants.ts
|
|
55
|
+
var import_sdk_core = require("@ring-protocol/sdk-core");
|
|
56
|
+
var import_jsbi = __toESM(require("jsbi"));
|
|
57
|
+
var FACTORY_ADDRESS = "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f";
|
|
58
|
+
var V2_FACTORY_ADDRESSES = {
|
|
59
|
+
[import_sdk_core.ChainId.MAINNET]: "0xeb2A625B704d73e82946D8d026E1F588Eed06416",
|
|
60
|
+
[import_sdk_core.ChainId.GOERLI]: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
|
|
61
|
+
// use uniswap v2 factory address
|
|
62
|
+
[import_sdk_core.ChainId.SEPOLIA]: "0x3D7101fDe92D0961cAc4b39Ee5A638d7B6A88090",
|
|
63
|
+
[import_sdk_core.ChainId.OPTIMISM]: "0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf",
|
|
64
|
+
// use uniswap v2 factory address
|
|
65
|
+
[import_sdk_core.ChainId.ARBITRUM_ONE]: "0x1246Fa62467a9AC0892a2d2A9F9aafC2F5609442",
|
|
66
|
+
[import_sdk_core.ChainId.AVALANCHE]: "0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",
|
|
67
|
+
// use uniswap v2 factory address
|
|
68
|
+
[import_sdk_core.ChainId.BASE_SEPOLIA]: "0x7Ae58f10f7849cA6F5fB71b7f45CB416c9204b1e",
|
|
69
|
+
// use uniswap v2 factory address
|
|
70
|
+
[import_sdk_core.ChainId.BASE]: "0x9BfFC3B30D6659e3D84754cc38865B3D60B4980E",
|
|
71
|
+
[import_sdk_core.ChainId.BNB]: "0x4De602A30Ad7fEf8223dcf67A9fB704324C4dd9B",
|
|
72
|
+
[import_sdk_core.ChainId.POLYGON]: "0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C",
|
|
73
|
+
// use uniswap v2 factory address
|
|
74
|
+
[import_sdk_core.ChainId.CELO]: "0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f",
|
|
75
|
+
// use uniswap v2 factory address
|
|
76
|
+
[import_sdk_core.ChainId.BLAST]: "0x24F5Ac9A706De0cF795A8193F6AB3966B14ECfE6",
|
|
77
|
+
[import_sdk_core.ChainId.WORLDCHAIN]: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
|
|
78
|
+
// use uniswap v2 factory address
|
|
79
|
+
[import_sdk_core.ChainId.UNICHAIN_SEPOLIA]: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",
|
|
80
|
+
// use uniswap v2 factory address
|
|
81
|
+
[import_sdk_core.ChainId.UNICHAIN]: "0xEeE400Eabfba8F60f4e6B351D8577394BeB972CD",
|
|
82
|
+
[import_sdk_core.ChainId.MONAD_TESTNET]: "0x733e88f248b742db6c14c0b1713af5ad7fdd59d0",
|
|
83
|
+
// use uniswap v2 factory address
|
|
84
|
+
[import_sdk_core.ChainId.SONEIUM]: "0x97febbc2adbd5644ba22736e962564b23f5828ce",
|
|
85
|
+
// use uniswap v2 factory address
|
|
86
|
+
[import_sdk_core.ChainId.HYPER_MAINNET]: "0x4AfC2e4cA0844ad153B090dc32e207c1DD74a8E4",
|
|
87
|
+
[import_sdk_core.ChainId.STORY_MAINNET]: "0xEeE400Eabfba8F60f4e6B351D8577394BeB972CD",
|
|
88
|
+
[import_sdk_core.ChainId.XLAYER_MAINNET]: "0xdf38f24fe153761634be942f9d859f3dba857e95",
|
|
89
|
+
// use uniswap v2 factory address
|
|
90
|
+
4326: "0xbf56488c857a881ae7e3bed27cf99c10a7ab7e50"
|
|
91
|
+
// use uniswap v2 factory address
|
|
92
|
+
};
|
|
93
|
+
var FACTORY_ADDRESS_MAP = V2_FACTORY_ADDRESSES;
|
|
94
|
+
var INIT_CODE_HASH = "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f";
|
|
95
|
+
var INIT_CODE_HASH_MAP = {
|
|
96
|
+
// Sepolia
|
|
97
|
+
11155111: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
98
|
+
// Blast Sepolia
|
|
99
|
+
168587773: "0x4b1dab7451c20e74482652f09a8ac942d2127aa266ba46f8ec97735f05664521",
|
|
100
|
+
// Blast Mainnet
|
|
101
|
+
81457: "0x501ce753061ab6e75837b15f074633bb775f5972f8dc1112fcc829c2e88dc689",
|
|
102
|
+
// Ethereum Mainnet
|
|
103
|
+
1: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
104
|
+
// unichain sepolia
|
|
105
|
+
1301: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
106
|
+
// unichain
|
|
107
|
+
130: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
108
|
+
// arbitrum sepolia
|
|
109
|
+
421614: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
110
|
+
// base
|
|
111
|
+
8453: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
112
|
+
// arbitrum mainnet
|
|
113
|
+
42161: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
114
|
+
// story odysey
|
|
115
|
+
1516: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
116
|
+
// story mainnet
|
|
117
|
+
1514: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
118
|
+
// bnb chain
|
|
119
|
+
56: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
120
|
+
// hyper mainnet
|
|
121
|
+
999: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
122
|
+
// rootstock
|
|
123
|
+
30: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
124
|
+
// polygon mainnet
|
|
125
|
+
137: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
126
|
+
// optimism
|
|
127
|
+
10: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
128
|
+
// avalanche
|
|
129
|
+
43114: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
130
|
+
// worldchain
|
|
131
|
+
480: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
132
|
+
// zksync
|
|
133
|
+
324: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
134
|
+
// soneium
|
|
135
|
+
1868: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
136
|
+
// zora
|
|
137
|
+
7777777: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
138
|
+
// zora sepolia
|
|
139
|
+
999999999: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
140
|
+
// celo
|
|
141
|
+
42220: "0xa7ae6a5ec37f0c21bbdac560794258c4089b8ae3ffa6e3909b53c6091764a676",
|
|
142
|
+
// megaeth mainnet
|
|
143
|
+
4326: "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f"
|
|
144
|
+
};
|
|
145
|
+
var MINIMUM_LIQUIDITY = import_jsbi.default.BigInt(1e3);
|
|
146
|
+
var ZERO = import_jsbi.default.BigInt(0);
|
|
147
|
+
var ONE = import_jsbi.default.BigInt(1);
|
|
148
|
+
var FIVE = import_jsbi.default.BigInt(5);
|
|
149
|
+
var _997 = import_jsbi.default.BigInt(997);
|
|
150
|
+
var _1000 = import_jsbi.default.BigInt(1e3);
|
|
151
|
+
var BASIS_POINTS = import_jsbi.default.BigInt(1e4);
|
|
152
|
+
var ZERO_PERCENT = new import_sdk_core.Percent(ZERO);
|
|
153
|
+
var ONE_HUNDRED_PERCENT = new import_sdk_core.Percent(ONE);
|
|
154
|
+
|
|
155
|
+
// src/errors.ts
|
|
156
|
+
var CAN_SET_PROTOTYPE = "setPrototypeOf" in Object;
|
|
157
|
+
var InsufficientReservesError = class extends Error {
|
|
158
|
+
constructor() {
|
|
159
|
+
super();
|
|
160
|
+
this.isInsufficientReservesError = true;
|
|
161
|
+
this.name = this.constructor.name;
|
|
162
|
+
if (CAN_SET_PROTOTYPE) Object.setPrototypeOf(this, new.target.prototype);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var InsufficientInputAmountError = class extends Error {
|
|
166
|
+
constructor() {
|
|
167
|
+
super();
|
|
168
|
+
this.isInsufficientInputAmountError = true;
|
|
169
|
+
this.name = this.constructor.name;
|
|
170
|
+
if (CAN_SET_PROTOTYPE) Object.setPrototypeOf(this, new.target.prototype);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// src/entities/pair.ts
|
|
175
|
+
var import_address = require("@ethersproject/address");
|
|
176
|
+
var import_bignumber = require("@ethersproject/bignumber");
|
|
177
|
+
var import_solidity = require("@ethersproject/solidity");
|
|
178
|
+
var import_sdk_core2 = require("@ring-protocol/sdk-core");
|
|
179
|
+
var import_jsbi2 = __toESM(require("jsbi"));
|
|
180
|
+
var import_tiny_invariant = __toESM(require("tiny-invariant"));
|
|
181
|
+
var computePairAddress = ({
|
|
182
|
+
initCodeHash,
|
|
183
|
+
factoryAddress,
|
|
184
|
+
tokenA,
|
|
185
|
+
tokenB
|
|
186
|
+
}) => {
|
|
187
|
+
var _a;
|
|
188
|
+
const [token0, token1] = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA];
|
|
189
|
+
const resolvedInitCodeHash = (_a = initCodeHash != null ? initCodeHash : INIT_CODE_HASH_MAP[token0.chainId]) != null ? _a : INIT_CODE_HASH;
|
|
190
|
+
return (0, import_address.getCreate2Address)(
|
|
191
|
+
factoryAddress,
|
|
192
|
+
(0, import_solidity.keccak256)(["bytes"], [(0, import_solidity.pack)(["address", "address"], [token0.address, token1.address])]),
|
|
193
|
+
resolvedInitCodeHash
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
var Pair = class _Pair {
|
|
197
|
+
static getAddress(tokenA, tokenB) {
|
|
198
|
+
var _a, _b;
|
|
199
|
+
const factoryAddress = (_a = FACTORY_ADDRESS_MAP[tokenA.chainId]) != null ? _a : FACTORY_ADDRESS;
|
|
200
|
+
return computePairAddress({
|
|
201
|
+
initCodeHash: (_b = INIT_CODE_HASH_MAP[tokenA.chainId]) != null ? _b : INIT_CODE_HASH,
|
|
202
|
+
factoryAddress,
|
|
203
|
+
tokenA,
|
|
204
|
+
tokenB
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
constructor(currencyAmountA, tokenAmountB) {
|
|
208
|
+
const tokenAmounts = currencyAmountA.currency.sortsBefore(tokenAmountB.currency) ? [currencyAmountA, tokenAmountB] : [tokenAmountB, currencyAmountA];
|
|
209
|
+
this.liquidityToken = new import_sdk_core2.Token(
|
|
210
|
+
tokenAmounts[0].currency.chainId,
|
|
211
|
+
_Pair.getAddress(tokenAmounts[0].currency, tokenAmounts[1].currency),
|
|
212
|
+
18,
|
|
213
|
+
"RING-V2",
|
|
214
|
+
"Ring V2"
|
|
215
|
+
);
|
|
216
|
+
this.tokenAmounts = tokenAmounts;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Returns true if the token is either token0 or token1
|
|
220
|
+
* @param token to check
|
|
221
|
+
*/
|
|
222
|
+
involvesToken(token) {
|
|
223
|
+
return token.equals(this.token0) || token.equals(this.token1);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Returns the current mid price of the pair in terms of token0, i.e. the ratio of reserve1 to reserve0
|
|
227
|
+
*/
|
|
228
|
+
get token0Price() {
|
|
229
|
+
const result = this.tokenAmounts[1].divide(this.tokenAmounts[0]);
|
|
230
|
+
return new import_sdk_core2.Price(this.token0, this.token1, result.denominator, result.numerator);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Returns the current mid price of the pair in terms of token1, i.e. the ratio of reserve0 to reserve1
|
|
234
|
+
*/
|
|
235
|
+
get token1Price() {
|
|
236
|
+
const result = this.tokenAmounts[0].divide(this.tokenAmounts[1]);
|
|
237
|
+
return new import_sdk_core2.Price(this.token1, this.token0, result.denominator, result.numerator);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Return the price of the given token in terms of the other token in the pair.
|
|
241
|
+
* @param token token to return price of
|
|
242
|
+
*/
|
|
243
|
+
priceOf(token) {
|
|
244
|
+
(0, import_tiny_invariant.default)(this.involvesToken(token), "TOKEN");
|
|
245
|
+
return token.equals(this.token0) ? this.token0Price : this.token1Price;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Returns the chain ID of the tokens in the pair.
|
|
249
|
+
*/
|
|
250
|
+
get chainId() {
|
|
251
|
+
return this.token0.chainId;
|
|
252
|
+
}
|
|
253
|
+
get token0() {
|
|
254
|
+
return this.tokenAmounts[0].currency;
|
|
255
|
+
}
|
|
256
|
+
get token1() {
|
|
257
|
+
return this.tokenAmounts[1].currency;
|
|
258
|
+
}
|
|
259
|
+
get reserve0() {
|
|
260
|
+
return this.tokenAmounts[0];
|
|
261
|
+
}
|
|
262
|
+
get reserve1() {
|
|
263
|
+
return this.tokenAmounts[1];
|
|
264
|
+
}
|
|
265
|
+
reserveOf(token) {
|
|
266
|
+
(0, import_tiny_invariant.default)(this.involvesToken(token), "TOKEN");
|
|
267
|
+
return token.equals(this.token0) ? this.reserve0 : this.reserve1;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* getAmountOut is the linear algebra of reserve ratio against amountIn:amountOut.
|
|
271
|
+
* https://ethereum.stackexchange.com/questions/101629/what-is-math-for-uniswap-calculates-the-amountout-and-amountin-why-997-and-1000
|
|
272
|
+
* has the math deduction for the reserve calculation without fee-on-transfer fees.
|
|
273
|
+
*
|
|
274
|
+
* With fee-on-transfer tax, intuitively it's just:
|
|
275
|
+
* inputAmountWithFeeAndTax = 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn
|
|
276
|
+
* = (1 - amountIn.sellFeesBips / 10000) * amountInWithFee
|
|
277
|
+
* where amountInWithFee is the amountIn after taking out the LP fees
|
|
278
|
+
* outputAmountWithTax = amountOut * (1 - amountOut.buyFeesBips / 10000)
|
|
279
|
+
*
|
|
280
|
+
* But we are illustrating the math deduction below to ensure that's the case.
|
|
281
|
+
*
|
|
282
|
+
* before swap A * B = K where A = reserveIn B = reserveOut
|
|
283
|
+
*
|
|
284
|
+
* after swap A' * B' = K where only k is a constant value
|
|
285
|
+
*
|
|
286
|
+
* getAmountOut
|
|
287
|
+
*
|
|
288
|
+
* A' = A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn # here 0.3% is deducted
|
|
289
|
+
* B' = B - amountOut * (1 - amountOut.buyFeesBips / 10000)
|
|
290
|
+
* amountOut = (B - B') / (1 - amountOut.buyFeesBips / 10000) # where A' * B' still is k
|
|
291
|
+
* = (B - K/(A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn))
|
|
292
|
+
* /
|
|
293
|
+
* (1 - amountOut.buyFeesBips / 10000)
|
|
294
|
+
* = (B - AB/(A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn))
|
|
295
|
+
* /
|
|
296
|
+
* (1 - amountOut.buyFeesBips / 10000)
|
|
297
|
+
* = ((BA + B * 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn - AB)/(A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn))
|
|
298
|
+
* /
|
|
299
|
+
* (1 - amountOut.buyFeesBips / 10000)
|
|
300
|
+
* = (B * 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn / (A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn)
|
|
301
|
+
* /
|
|
302
|
+
* (1 - amountOut.buyFeesBips / 10000)
|
|
303
|
+
* amountOut * (1 - amountOut.buyFeesBips / 10000) = (B * 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn
|
|
304
|
+
* /
|
|
305
|
+
* (A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn)
|
|
306
|
+
*
|
|
307
|
+
* outputAmountWithTax = (B * 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn
|
|
308
|
+
* /
|
|
309
|
+
* (A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn)
|
|
310
|
+
* = (B * 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn * 1000
|
|
311
|
+
* /
|
|
312
|
+
* ((A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn) * 1000)
|
|
313
|
+
* = (B * (1 - amountIn.sellFeesBips / 10000) 997 * * amountIn
|
|
314
|
+
* /
|
|
315
|
+
* (1000 * A + (1 - amountIn.sellFeesBips / 10000) * 997 * amountIn)
|
|
316
|
+
* = (B * (1 - amountIn.sellFeesBips / 10000) * inputAmountWithFee)
|
|
317
|
+
* /
|
|
318
|
+
* (1000 * A + (1 - amountIn.sellFeesBips / 10000) * inputAmountWithFee)
|
|
319
|
+
* = (B * inputAmountWithFeeAndTax)
|
|
320
|
+
* /
|
|
321
|
+
* (1000 * A + inputAmountWithFeeAndTax)
|
|
322
|
+
*
|
|
323
|
+
* inputAmountWithFeeAndTax = (1 - amountIn.sellFeesBips / 10000) * inputAmountWithFee
|
|
324
|
+
* outputAmountWithTax = amountOut * (1 - amountOut.buyFeesBips / 10000)
|
|
325
|
+
*
|
|
326
|
+
* @param inputAmount
|
|
327
|
+
* @param calculateFotFees
|
|
328
|
+
*/
|
|
329
|
+
getOutputAmount(inputAmount, calculateFotFees = true) {
|
|
330
|
+
(0, import_tiny_invariant.default)(this.involvesToken(inputAmount.currency), "TOKEN");
|
|
331
|
+
if (import_jsbi2.default.equal(this.reserve0.quotient, ZERO) || import_jsbi2.default.equal(this.reserve1.quotient, ZERO)) {
|
|
332
|
+
throw new InsufficientReservesError();
|
|
333
|
+
}
|
|
334
|
+
const inputReserve = this.reserveOf(inputAmount.currency);
|
|
335
|
+
const outputReserve = this.reserveOf(inputAmount.currency.equals(this.token0) ? this.token1 : this.token0);
|
|
336
|
+
const percentAfterSellFees = calculateFotFees ? this.derivePercentAfterSellFees(inputAmount) : ZERO_PERCENT;
|
|
337
|
+
const inputAmountAfterTax = percentAfterSellFees.greaterThan(ZERO_PERCENT) ? import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
338
|
+
inputAmount.currency,
|
|
339
|
+
percentAfterSellFees.multiply(inputAmount).quotient
|
|
340
|
+
// fraction.quotient will round down by itself, which is desired
|
|
341
|
+
) : inputAmount;
|
|
342
|
+
const inputAmountWithFeeAndAfterTax = import_jsbi2.default.multiply(inputAmountAfterTax.quotient, _997);
|
|
343
|
+
const numerator = import_jsbi2.default.multiply(inputAmountWithFeeAndAfterTax, outputReserve.quotient);
|
|
344
|
+
const denominator = import_jsbi2.default.add(import_jsbi2.default.multiply(inputReserve.quotient, _1000), inputAmountWithFeeAndAfterTax);
|
|
345
|
+
const outputAmount = import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
346
|
+
inputAmount.currency.equals(this.token0) ? this.token1 : this.token0,
|
|
347
|
+
import_jsbi2.default.divide(numerator, denominator)
|
|
348
|
+
// JSBI.divide will round down by itself, which is desired
|
|
349
|
+
);
|
|
350
|
+
if (import_jsbi2.default.equal(outputAmount.quotient, ZERO)) {
|
|
351
|
+
throw new InsufficientInputAmountError();
|
|
352
|
+
}
|
|
353
|
+
const percentAfterBuyFees = calculateFotFees ? this.derivePercentAfterBuyFees(outputAmount) : ZERO_PERCENT;
|
|
354
|
+
const outputAmountAfterTax = percentAfterBuyFees.greaterThan(ZERO_PERCENT) ? import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
355
|
+
outputAmount.currency,
|
|
356
|
+
outputAmount.multiply(percentAfterBuyFees).quotient
|
|
357
|
+
// fraction.quotient will round down by itself, which is desired
|
|
358
|
+
) : outputAmount;
|
|
359
|
+
if (import_jsbi2.default.equal(outputAmountAfterTax.quotient, ZERO)) {
|
|
360
|
+
throw new InsufficientInputAmountError();
|
|
361
|
+
}
|
|
362
|
+
return [
|
|
363
|
+
outputAmountAfterTax,
|
|
364
|
+
new _Pair(inputReserve.add(inputAmountAfterTax), outputReserve.subtract(outputAmountAfterTax))
|
|
365
|
+
];
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* getAmountIn is the linear algebra of reserve ratio against amountIn:amountOut.
|
|
369
|
+
* https://ethereum.stackexchange.com/questions/101629/what-is-math-for-uniswap-calculates-the-amountout-and-amountin-why-997-and-1000
|
|
370
|
+
* has the math deduction for the reserve calculation without fee-on-transfer fees.
|
|
371
|
+
*
|
|
372
|
+
* With fee-on-transfer fees, intuitively it's just:
|
|
373
|
+
* outputAmountWithTax = amountOut / (1 - amountOut.buyFeesBips / 10000)
|
|
374
|
+
* inputAmountWithTax = amountIn / (1 - amountIn.sellFeesBips / 10000) / 0.997
|
|
375
|
+
*
|
|
376
|
+
* But we are illustrating the math deduction below to ensure that's the case.
|
|
377
|
+
*
|
|
378
|
+
* before swap A * B = K where A = reserveIn B = reserveOut
|
|
379
|
+
*
|
|
380
|
+
* after swap A' * B' = K where only k is a constant value
|
|
381
|
+
*
|
|
382
|
+
* getAmountIn
|
|
383
|
+
*
|
|
384
|
+
* B' = B - amountOut * (1 - amountOut.buyFeesBips / 10000)
|
|
385
|
+
* A' = A + 0.997 * (1 - amountIn.sellFeesBips / 10000) * amountIn # here 0.3% is deducted
|
|
386
|
+
* amountIn = (A' - A) / (0.997 * (1 - amountIn.sellFeesBips / 10000))
|
|
387
|
+
* = (K / (B - amountOut / (1 - amountOut.buyFeesBips / 10000)) - A)
|
|
388
|
+
* /
|
|
389
|
+
* (0.997 * (1 - amountIn.sellFeesBips / 10000))
|
|
390
|
+
* = (AB / (B - amountOut / (1 - amountOut.buyFeesBips / 10000)) - A)
|
|
391
|
+
* /
|
|
392
|
+
* (0.997 * (1 - amountIn.sellFeesBips / 10000))
|
|
393
|
+
* = ((AB - AB + A * amountOut / (1 - amountOut.buyFeesBips / 10000)) / (B - amountOut / (1 - amountOut.buyFeesBips / 10000)))
|
|
394
|
+
* /
|
|
395
|
+
* (0.997 * (1 - amountIn.sellFeesBips / 10000))
|
|
396
|
+
* = ((A * amountOut / (1 - amountOut.buyFeesBips / 10000)) / (B - amountOut / (1 - amountOut.buyFeesBips / 10000)))
|
|
397
|
+
* /
|
|
398
|
+
* (0.997 * (1 - amountIn.sellFeesBips / 10000))
|
|
399
|
+
* = ((A * 1000 * amountOut / (1 - amountOut.buyFeesBips / 10000)) / (B - amountOut / (1 - amountOut.buyFeesBips / 10000)))
|
|
400
|
+
* /
|
|
401
|
+
* (997 * (1 - amountIn.sellFeesBips / 10000))
|
|
402
|
+
*
|
|
403
|
+
* outputAmountWithTax = amountOut / (1 - amountOut.buyFeesBips / 10000)
|
|
404
|
+
* inputAmountWithTax = amountIn / (997 * (1 - amountIn.sellFeesBips / 10000))
|
|
405
|
+
* = (A * outputAmountWithTax * 1000) / ((B - outputAmountWithTax) * 997)
|
|
406
|
+
*
|
|
407
|
+
* @param outputAmount
|
|
408
|
+
*/
|
|
409
|
+
getInputAmount(outputAmount, calculateFotFees = true) {
|
|
410
|
+
(0, import_tiny_invariant.default)(this.involvesToken(outputAmount.currency), "TOKEN");
|
|
411
|
+
const percentAfterBuyFees = calculateFotFees ? this.derivePercentAfterBuyFees(outputAmount) : ZERO_PERCENT;
|
|
412
|
+
const outputAmountBeforeTax = percentAfterBuyFees.greaterThan(ZERO_PERCENT) ? import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
413
|
+
outputAmount.currency,
|
|
414
|
+
import_jsbi2.default.add(outputAmount.divide(percentAfterBuyFees).quotient, ONE)
|
|
415
|
+
// add 1 for rounding up
|
|
416
|
+
) : outputAmount;
|
|
417
|
+
if (import_jsbi2.default.equal(this.reserve0.quotient, ZERO) || import_jsbi2.default.equal(this.reserve1.quotient, ZERO) || import_jsbi2.default.greaterThanOrEqual(outputAmount.quotient, this.reserveOf(outputAmount.currency).quotient) || import_jsbi2.default.greaterThanOrEqual(outputAmountBeforeTax.quotient, this.reserveOf(outputAmount.currency).quotient)) {
|
|
418
|
+
throw new InsufficientReservesError();
|
|
419
|
+
}
|
|
420
|
+
const outputReserve = this.reserveOf(outputAmount.currency);
|
|
421
|
+
const inputReserve = this.reserveOf(outputAmount.currency.equals(this.token0) ? this.token1 : this.token0);
|
|
422
|
+
const numerator = import_jsbi2.default.multiply(import_jsbi2.default.multiply(inputReserve.quotient, outputAmountBeforeTax.quotient), _1000);
|
|
423
|
+
const denominator = import_jsbi2.default.multiply(import_jsbi2.default.subtract(outputReserve.quotient, outputAmountBeforeTax.quotient), _997);
|
|
424
|
+
const inputAmount = import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
425
|
+
outputAmount.currency.equals(this.token0) ? this.token1 : this.token0,
|
|
426
|
+
import_jsbi2.default.add(import_jsbi2.default.divide(numerator, denominator), ONE)
|
|
427
|
+
// add 1 here is part of the formula, no rounding needed here, since there will not be decimal at this point
|
|
428
|
+
);
|
|
429
|
+
const percentAfterSellFees = calculateFotFees ? this.derivePercentAfterSellFees(inputAmount) : ZERO_PERCENT;
|
|
430
|
+
const inputAmountBeforeTax = percentAfterSellFees.greaterThan(ZERO_PERCENT) ? import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
431
|
+
inputAmount.currency,
|
|
432
|
+
import_jsbi2.default.add(inputAmount.divide(percentAfterSellFees).quotient, ONE)
|
|
433
|
+
// add 1 for rounding up
|
|
434
|
+
) : inputAmount;
|
|
435
|
+
return [inputAmountBeforeTax, new _Pair(inputReserve.add(inputAmount), outputReserve.subtract(outputAmount))];
|
|
436
|
+
}
|
|
437
|
+
getLiquidityMinted(totalSupply, tokenAmountA, tokenAmountB) {
|
|
438
|
+
(0, import_tiny_invariant.default)(totalSupply.currency.equals(this.liquidityToken), "LIQUIDITY");
|
|
439
|
+
const tokenAmounts = tokenAmountA.currency.sortsBefore(tokenAmountB.currency) ? [tokenAmountA, tokenAmountB] : [tokenAmountB, tokenAmountA];
|
|
440
|
+
(0, import_tiny_invariant.default)(tokenAmounts[0].currency.equals(this.token0) && tokenAmounts[1].currency.equals(this.token1), "TOKEN");
|
|
441
|
+
let liquidity;
|
|
442
|
+
if (import_jsbi2.default.equal(totalSupply.quotient, ZERO)) {
|
|
443
|
+
liquidity = import_jsbi2.default.subtract(
|
|
444
|
+
(0, import_sdk_core2.sqrt)(import_jsbi2.default.multiply(tokenAmounts[0].quotient, tokenAmounts[1].quotient)),
|
|
445
|
+
MINIMUM_LIQUIDITY
|
|
446
|
+
);
|
|
447
|
+
} else {
|
|
448
|
+
const amount0 = import_jsbi2.default.divide(import_jsbi2.default.multiply(tokenAmounts[0].quotient, totalSupply.quotient), this.reserve0.quotient);
|
|
449
|
+
const amount1 = import_jsbi2.default.divide(import_jsbi2.default.multiply(tokenAmounts[1].quotient, totalSupply.quotient), this.reserve1.quotient);
|
|
450
|
+
liquidity = import_jsbi2.default.lessThanOrEqual(amount0, amount1) ? amount0 : amount1;
|
|
451
|
+
}
|
|
452
|
+
if (!import_jsbi2.default.greaterThan(liquidity, ZERO)) {
|
|
453
|
+
throw new InsufficientInputAmountError();
|
|
454
|
+
}
|
|
455
|
+
return import_sdk_core2.CurrencyAmount.fromRawAmount(this.liquidityToken, liquidity);
|
|
456
|
+
}
|
|
457
|
+
getLiquidityValue(token, totalSupply, liquidity, feeOn = false, kLast) {
|
|
458
|
+
(0, import_tiny_invariant.default)(this.involvesToken(token), "TOKEN");
|
|
459
|
+
(0, import_tiny_invariant.default)(totalSupply.currency.equals(this.liquidityToken), "TOTAL_SUPPLY");
|
|
460
|
+
(0, import_tiny_invariant.default)(liquidity.currency.equals(this.liquidityToken), "LIQUIDITY");
|
|
461
|
+
(0, import_tiny_invariant.default)(import_jsbi2.default.lessThanOrEqual(liquidity.quotient, totalSupply.quotient), "LIQUIDITY");
|
|
462
|
+
let totalSupplyAdjusted;
|
|
463
|
+
if (!feeOn) {
|
|
464
|
+
totalSupplyAdjusted = totalSupply;
|
|
465
|
+
} else {
|
|
466
|
+
(0, import_tiny_invariant.default)(!!kLast, "K_LAST");
|
|
467
|
+
const kLastParsed = import_jsbi2.default.BigInt(kLast);
|
|
468
|
+
if (!import_jsbi2.default.equal(kLastParsed, ZERO)) {
|
|
469
|
+
const rootK = (0, import_sdk_core2.sqrt)(import_jsbi2.default.multiply(this.reserve0.quotient, this.reserve1.quotient));
|
|
470
|
+
const rootKLast = (0, import_sdk_core2.sqrt)(kLastParsed);
|
|
471
|
+
if (import_jsbi2.default.greaterThan(rootK, rootKLast)) {
|
|
472
|
+
const numerator = import_jsbi2.default.multiply(totalSupply.quotient, import_jsbi2.default.subtract(rootK, rootKLast));
|
|
473
|
+
const denominator = import_jsbi2.default.add(import_jsbi2.default.multiply(rootK, FIVE), rootKLast);
|
|
474
|
+
const feeLiquidity = import_jsbi2.default.divide(numerator, denominator);
|
|
475
|
+
totalSupplyAdjusted = totalSupply.add(import_sdk_core2.CurrencyAmount.fromRawAmount(this.liquidityToken, feeLiquidity));
|
|
476
|
+
} else {
|
|
477
|
+
totalSupplyAdjusted = totalSupply;
|
|
478
|
+
}
|
|
479
|
+
} else {
|
|
480
|
+
totalSupplyAdjusted = totalSupply;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return import_sdk_core2.CurrencyAmount.fromRawAmount(
|
|
484
|
+
token,
|
|
485
|
+
import_jsbi2.default.divide(import_jsbi2.default.multiply(liquidity.quotient, this.reserveOf(token).quotient), totalSupplyAdjusted.quotient)
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
derivePercentAfterSellFees(inputAmount) {
|
|
489
|
+
const sellFeeBips = this.token0.wrapped.equals(inputAmount.wrapped.currency) ? this.token0.wrapped.sellFeeBps : this.token1.wrapped.sellFeeBps;
|
|
490
|
+
if (sellFeeBips == null ? void 0 : sellFeeBips.gt(import_bignumber.BigNumber.from(0))) {
|
|
491
|
+
return ONE_HUNDRED_PERCENT.subtract(new import_sdk_core2.Percent(import_jsbi2.default.BigInt(sellFeeBips)).divide(BASIS_POINTS));
|
|
492
|
+
} else {
|
|
493
|
+
return ZERO_PERCENT;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
derivePercentAfterBuyFees(outputAmount) {
|
|
497
|
+
const buyFeeBps = this.token0.wrapped.equals(outputAmount.wrapped.currency) ? this.token0.wrapped.buyFeeBps : this.token1.wrapped.buyFeeBps;
|
|
498
|
+
if (buyFeeBps == null ? void 0 : buyFeeBps.gt(import_bignumber.BigNumber.from(0))) {
|
|
499
|
+
return ONE_HUNDRED_PERCENT.subtract(new import_sdk_core2.Percent(import_jsbi2.default.BigInt(buyFeeBps)).divide(BASIS_POINTS));
|
|
500
|
+
} else {
|
|
501
|
+
return ZERO_PERCENT;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
// src/entities/route.ts
|
|
507
|
+
var import_tiny_invariant2 = __toESM(require("tiny-invariant"));
|
|
508
|
+
var import_sdk_core4 = require("@ring-protocol/sdk-core");
|
|
509
|
+
|
|
510
|
+
// src/fewToken.ts
|
|
511
|
+
var import_sdk_core3 = require("@ring-protocol/sdk-core");
|
|
512
|
+
var import_lib = require("ethers/lib");
|
|
513
|
+
|
|
514
|
+
// src/abis/BlastSepoliaFewWrappedToken.json
|
|
515
|
+
var BlastSepoliaFewWrappedToken_default = {
|
|
516
|
+
_format: "hh-sol-artifact-1",
|
|
517
|
+
contractName: "FewWrappedToken",
|
|
518
|
+
sourceName: "contracts/FewWrappedToken.sol",
|
|
519
|
+
abi: [
|
|
520
|
+
{
|
|
521
|
+
inputs: [],
|
|
522
|
+
stateMutability: "nonpayable",
|
|
523
|
+
type: "constructor"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
anonymous: false,
|
|
527
|
+
inputs: [
|
|
528
|
+
{
|
|
529
|
+
indexed: true,
|
|
530
|
+
internalType: "address",
|
|
531
|
+
name: "owner",
|
|
532
|
+
type: "address"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
indexed: true,
|
|
536
|
+
internalType: "address",
|
|
537
|
+
name: "spender",
|
|
538
|
+
type: "address"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
indexed: false,
|
|
542
|
+
internalType: "uint256",
|
|
543
|
+
name: "value",
|
|
544
|
+
type: "uint256"
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
name: "Approval",
|
|
548
|
+
type: "event"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
anonymous: false,
|
|
552
|
+
inputs: [
|
|
553
|
+
{
|
|
554
|
+
indexed: true,
|
|
555
|
+
internalType: "address",
|
|
556
|
+
name: "burner",
|
|
557
|
+
type: "address"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
indexed: false,
|
|
561
|
+
internalType: "uint256",
|
|
562
|
+
name: "amount",
|
|
563
|
+
type: "uint256"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
indexed: true,
|
|
567
|
+
internalType: "address",
|
|
568
|
+
name: "to",
|
|
569
|
+
type: "address"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
name: "Burn",
|
|
573
|
+
type: "event"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
anonymous: false,
|
|
577
|
+
inputs: [
|
|
578
|
+
{
|
|
579
|
+
indexed: true,
|
|
580
|
+
internalType: "address",
|
|
581
|
+
name: "minter",
|
|
582
|
+
type: "address"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
indexed: false,
|
|
586
|
+
internalType: "uint256",
|
|
587
|
+
name: "amount",
|
|
588
|
+
type: "uint256"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
indexed: true,
|
|
592
|
+
internalType: "address",
|
|
593
|
+
name: "to",
|
|
594
|
+
type: "address"
|
|
595
|
+
}
|
|
596
|
+
],
|
|
597
|
+
name: "Mint",
|
|
598
|
+
type: "event"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
anonymous: false,
|
|
602
|
+
inputs: [
|
|
603
|
+
{
|
|
604
|
+
indexed: true,
|
|
605
|
+
internalType: "address",
|
|
606
|
+
name: "from",
|
|
607
|
+
type: "address"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
indexed: true,
|
|
611
|
+
internalType: "address",
|
|
612
|
+
name: "to",
|
|
613
|
+
type: "address"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
indexed: false,
|
|
617
|
+
internalType: "uint256",
|
|
618
|
+
name: "value",
|
|
619
|
+
type: "uint256"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
name: "Transfer",
|
|
623
|
+
type: "event"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
anonymous: false,
|
|
627
|
+
inputs: [
|
|
628
|
+
{
|
|
629
|
+
indexed: true,
|
|
630
|
+
internalType: "address",
|
|
631
|
+
name: "sender",
|
|
632
|
+
type: "address"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
indexed: false,
|
|
636
|
+
internalType: "uint256",
|
|
637
|
+
name: "amount",
|
|
638
|
+
type: "uint256"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
indexed: true,
|
|
642
|
+
internalType: "address",
|
|
643
|
+
name: "to",
|
|
644
|
+
type: "address"
|
|
645
|
+
}
|
|
646
|
+
],
|
|
647
|
+
name: "Unwrap",
|
|
648
|
+
type: "event"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
anonymous: false,
|
|
652
|
+
inputs: [
|
|
653
|
+
{
|
|
654
|
+
indexed: true,
|
|
655
|
+
internalType: "address",
|
|
656
|
+
name: "sender",
|
|
657
|
+
type: "address"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
indexed: false,
|
|
661
|
+
internalType: "uint256",
|
|
662
|
+
name: "amount",
|
|
663
|
+
type: "uint256"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
indexed: true,
|
|
667
|
+
internalType: "address",
|
|
668
|
+
name: "to",
|
|
669
|
+
type: "address"
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
name: "Wrap",
|
|
673
|
+
type: "event"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
inputs: [],
|
|
677
|
+
name: "DOMAIN_SEPARATOR",
|
|
678
|
+
outputs: [
|
|
679
|
+
{
|
|
680
|
+
internalType: "bytes32",
|
|
681
|
+
name: "",
|
|
682
|
+
type: "bytes32"
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
stateMutability: "view",
|
|
686
|
+
type: "function"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
inputs: [],
|
|
690
|
+
name: "PERMIT_TYPEHASH",
|
|
691
|
+
outputs: [
|
|
692
|
+
{
|
|
693
|
+
internalType: "bytes32",
|
|
694
|
+
name: "",
|
|
695
|
+
type: "bytes32"
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
stateMutability: "view",
|
|
699
|
+
type: "function"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
inputs: [
|
|
703
|
+
{
|
|
704
|
+
internalType: "address",
|
|
705
|
+
name: "",
|
|
706
|
+
type: "address"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
internalType: "address",
|
|
710
|
+
name: "",
|
|
711
|
+
type: "address"
|
|
712
|
+
}
|
|
713
|
+
],
|
|
714
|
+
name: "allowance",
|
|
715
|
+
outputs: [
|
|
716
|
+
{
|
|
717
|
+
internalType: "uint256",
|
|
718
|
+
name: "",
|
|
719
|
+
type: "uint256"
|
|
720
|
+
}
|
|
721
|
+
],
|
|
722
|
+
stateMutability: "view",
|
|
723
|
+
type: "function"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
inputs: [
|
|
727
|
+
{
|
|
728
|
+
internalType: "address",
|
|
729
|
+
name: "spender",
|
|
730
|
+
type: "address"
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
internalType: "uint256",
|
|
734
|
+
name: "value",
|
|
735
|
+
type: "uint256"
|
|
736
|
+
}
|
|
737
|
+
],
|
|
738
|
+
name: "approve",
|
|
739
|
+
outputs: [
|
|
740
|
+
{
|
|
741
|
+
internalType: "bool",
|
|
742
|
+
name: "",
|
|
743
|
+
type: "bool"
|
|
744
|
+
}
|
|
745
|
+
],
|
|
746
|
+
stateMutability: "nonpayable",
|
|
747
|
+
type: "function"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
inputs: [
|
|
751
|
+
{
|
|
752
|
+
internalType: "address",
|
|
753
|
+
name: "",
|
|
754
|
+
type: "address"
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
name: "balanceOf",
|
|
758
|
+
outputs: [
|
|
759
|
+
{
|
|
760
|
+
internalType: "uint256",
|
|
761
|
+
name: "",
|
|
762
|
+
type: "uint256"
|
|
763
|
+
}
|
|
764
|
+
],
|
|
765
|
+
stateMutability: "view",
|
|
766
|
+
type: "function"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
inputs: [
|
|
770
|
+
{
|
|
771
|
+
internalType: "uint256",
|
|
772
|
+
name: "amount",
|
|
773
|
+
type: "uint256"
|
|
774
|
+
}
|
|
775
|
+
],
|
|
776
|
+
name: "burn",
|
|
777
|
+
outputs: [],
|
|
778
|
+
stateMutability: "nonpayable",
|
|
779
|
+
type: "function"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
inputs: [
|
|
783
|
+
{
|
|
784
|
+
internalType: "address",
|
|
785
|
+
name: "account",
|
|
786
|
+
type: "address"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
internalType: "uint256",
|
|
790
|
+
name: "amount",
|
|
791
|
+
type: "uint256"
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
name: "burnFrom",
|
|
795
|
+
outputs: [],
|
|
796
|
+
stateMutability: "nonpayable",
|
|
797
|
+
type: "function"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
inputs: [
|
|
801
|
+
{
|
|
802
|
+
internalType: "address",
|
|
803
|
+
name: "recipient",
|
|
804
|
+
type: "address"
|
|
805
|
+
}
|
|
806
|
+
],
|
|
807
|
+
name: "claimMaxGas",
|
|
808
|
+
outputs: [
|
|
809
|
+
{
|
|
810
|
+
internalType: "uint256",
|
|
811
|
+
name: "",
|
|
812
|
+
type: "uint256"
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
stateMutability: "nonpayable",
|
|
816
|
+
type: "function"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
inputs: [],
|
|
820
|
+
name: "decimals",
|
|
821
|
+
outputs: [
|
|
822
|
+
{
|
|
823
|
+
internalType: "uint8",
|
|
824
|
+
name: "",
|
|
825
|
+
type: "uint8"
|
|
826
|
+
}
|
|
827
|
+
],
|
|
828
|
+
stateMutability: "view",
|
|
829
|
+
type: "function"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
inputs: [],
|
|
833
|
+
name: "factory",
|
|
834
|
+
outputs: [
|
|
835
|
+
{
|
|
836
|
+
internalType: "address",
|
|
837
|
+
name: "",
|
|
838
|
+
type: "address"
|
|
839
|
+
}
|
|
840
|
+
],
|
|
841
|
+
stateMutability: "view",
|
|
842
|
+
type: "function"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
inputs: [
|
|
846
|
+
{
|
|
847
|
+
internalType: "address",
|
|
848
|
+
name: "account",
|
|
849
|
+
type: "address"
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
internalType: "uint256",
|
|
853
|
+
name: "amount",
|
|
854
|
+
type: "uint256"
|
|
855
|
+
}
|
|
856
|
+
],
|
|
857
|
+
name: "mint",
|
|
858
|
+
outputs: [],
|
|
859
|
+
stateMutability: "nonpayable",
|
|
860
|
+
type: "function"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
inputs: [],
|
|
864
|
+
name: "name",
|
|
865
|
+
outputs: [
|
|
866
|
+
{
|
|
867
|
+
internalType: "string",
|
|
868
|
+
name: "",
|
|
869
|
+
type: "string"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
stateMutability: "view",
|
|
873
|
+
type: "function"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
inputs: [
|
|
877
|
+
{
|
|
878
|
+
internalType: "address",
|
|
879
|
+
name: "",
|
|
880
|
+
type: "address"
|
|
881
|
+
}
|
|
882
|
+
],
|
|
883
|
+
name: "nonces",
|
|
884
|
+
outputs: [
|
|
885
|
+
{
|
|
886
|
+
internalType: "uint256",
|
|
887
|
+
name: "",
|
|
888
|
+
type: "uint256"
|
|
889
|
+
}
|
|
890
|
+
],
|
|
891
|
+
stateMutability: "view",
|
|
892
|
+
type: "function"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
inputs: [
|
|
896
|
+
{
|
|
897
|
+
internalType: "address",
|
|
898
|
+
name: "owner",
|
|
899
|
+
type: "address"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
internalType: "address",
|
|
903
|
+
name: "spender",
|
|
904
|
+
type: "address"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
internalType: "uint256",
|
|
908
|
+
name: "value",
|
|
909
|
+
type: "uint256"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
internalType: "uint256",
|
|
913
|
+
name: "deadline",
|
|
914
|
+
type: "uint256"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
internalType: "uint8",
|
|
918
|
+
name: "v",
|
|
919
|
+
type: "uint8"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
internalType: "bytes32",
|
|
923
|
+
name: "r",
|
|
924
|
+
type: "bytes32"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
internalType: "bytes32",
|
|
928
|
+
name: "s",
|
|
929
|
+
type: "bytes32"
|
|
930
|
+
}
|
|
931
|
+
],
|
|
932
|
+
name: "permit",
|
|
933
|
+
outputs: [],
|
|
934
|
+
stateMutability: "nonpayable",
|
|
935
|
+
type: "function"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
inputs: [],
|
|
939
|
+
name: "symbol",
|
|
940
|
+
outputs: [
|
|
941
|
+
{
|
|
942
|
+
internalType: "string",
|
|
943
|
+
name: "",
|
|
944
|
+
type: "string"
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
stateMutability: "view",
|
|
948
|
+
type: "function"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
inputs: [],
|
|
952
|
+
name: "token",
|
|
953
|
+
outputs: [
|
|
954
|
+
{
|
|
955
|
+
internalType: "address",
|
|
956
|
+
name: "",
|
|
957
|
+
type: "address"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
stateMutability: "view",
|
|
961
|
+
type: "function"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
inputs: [],
|
|
965
|
+
name: "totalSupply",
|
|
966
|
+
outputs: [
|
|
967
|
+
{
|
|
968
|
+
internalType: "uint256",
|
|
969
|
+
name: "",
|
|
970
|
+
type: "uint256"
|
|
971
|
+
}
|
|
972
|
+
],
|
|
973
|
+
stateMutability: "view",
|
|
974
|
+
type: "function"
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
inputs: [
|
|
978
|
+
{
|
|
979
|
+
internalType: "address",
|
|
980
|
+
name: "to",
|
|
981
|
+
type: "address"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
internalType: "uint256",
|
|
985
|
+
name: "value",
|
|
986
|
+
type: "uint256"
|
|
987
|
+
}
|
|
988
|
+
],
|
|
989
|
+
name: "transfer",
|
|
990
|
+
outputs: [
|
|
991
|
+
{
|
|
992
|
+
internalType: "bool",
|
|
993
|
+
name: "",
|
|
994
|
+
type: "bool"
|
|
995
|
+
}
|
|
996
|
+
],
|
|
997
|
+
stateMutability: "nonpayable",
|
|
998
|
+
type: "function"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
inputs: [
|
|
1002
|
+
{
|
|
1003
|
+
internalType: "address",
|
|
1004
|
+
name: "from",
|
|
1005
|
+
type: "address"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
internalType: "address",
|
|
1009
|
+
name: "to",
|
|
1010
|
+
type: "address"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
internalType: "uint256",
|
|
1014
|
+
name: "value",
|
|
1015
|
+
type: "uint256"
|
|
1016
|
+
}
|
|
1017
|
+
],
|
|
1018
|
+
name: "transferFrom",
|
|
1019
|
+
outputs: [
|
|
1020
|
+
{
|
|
1021
|
+
internalType: "bool",
|
|
1022
|
+
name: "",
|
|
1023
|
+
type: "bool"
|
|
1024
|
+
}
|
|
1025
|
+
],
|
|
1026
|
+
stateMutability: "nonpayable",
|
|
1027
|
+
type: "function"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
inputs: [
|
|
1031
|
+
{
|
|
1032
|
+
internalType: "uint256",
|
|
1033
|
+
name: "amount",
|
|
1034
|
+
type: "uint256"
|
|
1035
|
+
}
|
|
1036
|
+
],
|
|
1037
|
+
name: "unwrap",
|
|
1038
|
+
outputs: [
|
|
1039
|
+
{
|
|
1040
|
+
internalType: "uint256",
|
|
1041
|
+
name: "",
|
|
1042
|
+
type: "uint256"
|
|
1043
|
+
}
|
|
1044
|
+
],
|
|
1045
|
+
stateMutability: "nonpayable",
|
|
1046
|
+
type: "function"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
inputs: [
|
|
1050
|
+
{
|
|
1051
|
+
internalType: "uint256",
|
|
1052
|
+
name: "amount",
|
|
1053
|
+
type: "uint256"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
internalType: "address",
|
|
1057
|
+
name: "to",
|
|
1058
|
+
type: "address"
|
|
1059
|
+
}
|
|
1060
|
+
],
|
|
1061
|
+
name: "unwrapTo",
|
|
1062
|
+
outputs: [
|
|
1063
|
+
{
|
|
1064
|
+
internalType: "uint256",
|
|
1065
|
+
name: "",
|
|
1066
|
+
type: "uint256"
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
stateMutability: "nonpayable",
|
|
1070
|
+
type: "function"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
inputs: [
|
|
1074
|
+
{
|
|
1075
|
+
internalType: "uint256",
|
|
1076
|
+
name: "amount",
|
|
1077
|
+
type: "uint256"
|
|
1078
|
+
}
|
|
1079
|
+
],
|
|
1080
|
+
name: "wrap",
|
|
1081
|
+
outputs: [
|
|
1082
|
+
{
|
|
1083
|
+
internalType: "uint256",
|
|
1084
|
+
name: "",
|
|
1085
|
+
type: "uint256"
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
stateMutability: "nonpayable",
|
|
1089
|
+
type: "function"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
inputs: [
|
|
1093
|
+
{
|
|
1094
|
+
internalType: "uint256",
|
|
1095
|
+
name: "amount",
|
|
1096
|
+
type: "uint256"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
internalType: "address",
|
|
1100
|
+
name: "to",
|
|
1101
|
+
type: "address"
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
name: "wrapTo",
|
|
1105
|
+
outputs: [
|
|
1106
|
+
{
|
|
1107
|
+
internalType: "uint256",
|
|
1108
|
+
name: "",
|
|
1109
|
+
type: "uint256"
|
|
1110
|
+
}
|
|
1111
|
+
],
|
|
1112
|
+
stateMutability: "nonpayable",
|
|
1113
|
+
type: "function"
|
|
1114
|
+
}
|
|
1115
|
+
],
|
|
1116
|
+
bytecode: "0x60806040523480156200001157600080fd5b50604051469080605262002489823960520190506040518091039020600060405180828054600181600116156101000203166002900480156200008e5780601f106200006b5761010080835404028352918201916200008e565b820191906000526020600020905b81548152906001019060200180831162000079575b505060408051918290038220828201825260018352603160f81b602093840152815180840196909652858201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060860152608085018690523060a0808701919091528151808703909101815260c08601808352815191840191909120600555600780546001600160a01b0319163390811790915563ad4d4e2960e01b9091529051909463ad4d4e29945060c4808201945090829003018186803b1580156200015757600080fd5b505afa1580156200016c573d6000803e3d6000fd5b505050506040513d60208110156200018357600080fd5b5051600880546001600160a01b0319166001600160a01b039283161790819055604080516306fdde0360e01b8152905191909216916306fdde03916004808301926000929190829003018186803b158015620001de57600080fd5b505afa158015620001f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200021d57600080fd5b81019080805160405193929190846401000000008211156200023e57600080fd5b9083019060208201858111156200025457600080fd5b82516401000000008111828201881017156200026f57600080fd5b82525081516020918201929091019080838360005b838110156200029e57818101518382015260200162000284565b50505050905090810190601f168015620002cc5780820380516001836020036101000a031916815260200191505b5060405250508151620002e7926000925060200190620005f3565b50600060405160200180806b02332bb902bb930b83832b2160a51b815250600c0182805460018160011615610100020316600290048015620003635780601f106200034057610100808354040283529182019162000363565b820191906000526020600020905b8154815290600101906020018083116200034e575b505060408051601f1981840301815291905280516200038d935060009250602090910190620005f3565b50600860009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620003dd57600080fd5b505afa158015620003f2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200041c57600080fd5b81019080805160405193929190846401000000008211156200043d57600080fd5b9083019060208201858111156200045357600080fd5b82516401000000008111828201881017156200046e57600080fd5b82525081516020918201929091019080838360005b838110156200049d57818101518382015260200162000483565b50505050905090810190601f168015620004cb5780820380516001836020036101000a031916815260200191505b5060405250508151620004e6926001925060200190620005f3565b506001604051602001808061667760f01b81525060020182805460018160011615610100020316600290048015620005585780601f106200053557610100808354040283529182019162000558565b820191906000526020600020905b81548152906001019060200180831162000543575b505060408051601f19818403018152919052805162000582935060019250602090910190620005f3565b507343000000000000000000000000000000000000026001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620005d357600080fd5b505af1158015620005e8573d6000803e3d6000fd5b505050505062000698565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200063657805160ff191683800117855562000666565b8280016001018555821562000666579182015b828111156200066657825182559160200191906001019062000649565b506200067492915062000678565b5090565b6200069591905b808211156200067457600081556001016200067f565b90565b611de180620006a86000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063cd2002f51161008c578063de0e9a3e11610066578063de0e9a3e1461058e578063ea598cb0146105ab578063fc0c546a146105c85761018d565b8063cd2002f5146104c2578063d505accf146104f5578063dd62ed3e146105535761018d565b806395d89b41116100bd57806395d89b4114610450578063a9059cbb14610458578063c45a0155146104915761018d565b806370a08231146103b157806379cc6790146103e45780637ecebe001461041d5761018d565b806330adf81f1161014557806340c10f191161011f57806340c10f191461032057806342966c681461035b5780635dbd6059146103785761018d565b806330adf81f146102f2578063313ce567146102fa5780633644e515146103185761018d565b806318160ddd1161017657806318160ddd1461025c57806323b872dd1461027657806326599850146102b95761018d565b806306fdde0314610192578063095ea7b31461020f575b600080fd5b61019a6105d0565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d45781810151838201526020016101bc565b50505050905090810190601f1680156102015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102486004803603604081101561022557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561067c565b604080519115158252519081900360200190f35b610264610693565b60408051918252519081900360200190f35b6102486004803603606081101561028c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610699565b610264600480360360408110156102cf57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610778565b61026461086b565b61030261088f565b6040805160ff9092168252519081900360200190f35b610264610894565b6103596004803603604081101561033657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561089a565b005b6103596004803603602081101561037157600080fd5b5035610b8e565b6102646004803603604081101561038e57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610bd2565b610264600480360360208110156103c757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cae565b610359600480360360408110156103fa57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cc0565b6102646004803603602081101561043357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610fb4565b61019a610fc6565b6102486004803603604081101561046e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103e565b61049961104b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610264600480360360208110156104d857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611067565b610359600480360360e081101561050b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356112ac565b6102646004803603604081101561056957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611578565b610264600480360360208110156105a457600080fd5b5035611595565b610264600480360360208110156105c157600080fd5b50356115a1565b6104996115ad565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106745780601f1061064957610100808354040283529160200191610674565b820191906000526020600020905b81548152906001019060200180831161065757829003601f168201915b505050505081565b60006106893384846115c9565b5060015b92915050565b60025481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107635773ffffffffffffffffffffffffffffffffffffffff84166000908152600460209081526040808320338452909152902054610731908363ffffffff61163816565b73ffffffffffffffffffffffffffffffffffffffff851660009081526004602090815260408083203384529091529020555b61076e8484846116aa565b5060019392505050565b60008083116107e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b60085461080d9073ffffffffffffffffffffffffffffffffffffffff1633308661178b565b610817828461195b565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60055481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d602081101561092c57600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b15801561099c57600080fd5b505afa1580156109b0573d6000803e3d6000fd5b505050506040513d60208110156109c657600080fd5b5051610a3357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a9b57600080fd5b505afa158015610aaf573d6000803e3d6000fd5b505050506040513d6020811015610ac557600080fd5b505115610b3357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610b3d828261195b565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610b983382611a0c565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b6000808311610c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611d3b6023913960400191505060405180910390fd5b610c363384611a0c565b600854610c5a9073ffffffffffffffffffffffffffffffffffffffff168385611ad0565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60036020526000908152604090205481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2857600080fd5b505afa158015610d3c573d6000803e3d6000fd5b505050506040513d6020811015610d5257600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b158015610dc257600080fd5b505afa158015610dd6573d6000803e3d6000fd5b505050506040513d6020811015610dec57600080fd5b5051610e5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b505115610f5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610f638282611a0c565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60066020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106745780601f1061064957610100808354040283529160200191610674565b60006106893384846116aa565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b600754604080517ff2f4eb26000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163f2f4eb26916004808301926020929190829003018186803b1580156110d257600080fd5b505afa1580156110e6573d6000803e3d6000fd5b505050506040513d60208110156110fc57600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b15801561116c57600080fd5b505afa158015611180573d6000803e3d6000fd5b505050506040513d602081101561119657600080fd5b50516111ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d5e6021913960400191505060405180910390fd5b604080517f662aa11d00000000000000000000000000000000000000000000000000000000815260006004820181905273ffffffffffffffffffffffffffffffffffffffff8516602483015291517343000000000000000000000000000000000000029263662aa11d92604480820193602093909283900390910190829087803b15801561127a57600080fd5b505af115801561128e573d6000803e3d6000fd5b505050506040513d60208110156112a457600080fd5b505192915050565b4284101561131b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff80891660008181526006602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa15801561147c573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116158015906114f757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61156257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b61156d8989896115c9565b505050505050505050565b600460209081526000928352604080842090915290825290205481565b600061068d8233610bd2565b600061068d8233610778565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561068d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260409020546116e0908263ffffffff61163816565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600360205260408082209390935590841681522054611722908263ffffffff611c9716565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b6020831061186957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161182c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118cb576040519150601f19603f3d011682016040523d82523d6000602084013e6118d0565b606091505b50915091508180156118fe5750805115806118fe57508080602001905160208110156118fb57600080fd5b50515b611953576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611d0a6031913960400191505060405180910390fd5b505050505050565b60025461196e908263ffffffff611c9716565b60025573ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020546119a7908263ffffffff611c9716565b73ffffffffffffffffffffffffffffffffffffffff831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040902054611a42908263ffffffff61163816565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040902055600254611a7b908263ffffffff61163816565b60025560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b60208310611ba657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611b69565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c08576040519150601f19603f3d011682016040523d82523d6000602084013e611c0d565b606091505b5091509150818015611c3b575080511580611c3b5750808060200190516020811015611c3857600080fd5b50515b611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611d7f602d913960400191505060405180910390fd5b5050505050565b8082018281101561068d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f776564436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f725472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a2646970667358221220d7fd196a2dee0bd2daa50f4be8ce4153534129a912325a54effe1fa17da46a6e64736f6c63430006060033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
|
|
1117
|
+
deployedBytecode: "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063cd2002f51161008c578063de0e9a3e11610066578063de0e9a3e1461058e578063ea598cb0146105ab578063fc0c546a146105c85761018d565b8063cd2002f5146104c2578063d505accf146104f5578063dd62ed3e146105535761018d565b806395d89b41116100bd57806395d89b4114610450578063a9059cbb14610458578063c45a0155146104915761018d565b806370a08231146103b157806379cc6790146103e45780637ecebe001461041d5761018d565b806330adf81f1161014557806340c10f191161011f57806340c10f191461032057806342966c681461035b5780635dbd6059146103785761018d565b806330adf81f146102f2578063313ce567146102fa5780633644e515146103185761018d565b806318160ddd1161017657806318160ddd1461025c57806323b872dd1461027657806326599850146102b95761018d565b806306fdde0314610192578063095ea7b31461020f575b600080fd5b61019a6105d0565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d45781810151838201526020016101bc565b50505050905090810190601f1680156102015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102486004803603604081101561022557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561067c565b604080519115158252519081900360200190f35b610264610693565b60408051918252519081900360200190f35b6102486004803603606081101561028c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610699565b610264600480360360408110156102cf57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610778565b61026461086b565b61030261088f565b6040805160ff9092168252519081900360200190f35b610264610894565b6103596004803603604081101561033657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561089a565b005b6103596004803603602081101561037157600080fd5b5035610b8e565b6102646004803603604081101561038e57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610bd2565b610264600480360360208110156103c757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610cae565b610359600480360360408110156103fa57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cc0565b6102646004803603602081101561043357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610fb4565b61019a610fc6565b6102486004803603604081101561046e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561103e565b61049961104b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610264600480360360208110156104d857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611067565b610359600480360360e081101561050b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356112ac565b6102646004803603604081101561056957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611578565b610264600480360360208110156105a457600080fd5b5035611595565b610264600480360360208110156105c157600080fd5b50356115a1565b6104996115ad565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106745780601f1061064957610100808354040283529160200191610674565b820191906000526020600020905b81548152906001019060200180831161065757829003601f168201915b505050505081565b60006106893384846115c9565b5060015b92915050565b60025481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107635773ffffffffffffffffffffffffffffffffffffffff84166000908152600460209081526040808320338452909152902054610731908363ffffffff61163816565b73ffffffffffffffffffffffffffffffffffffffff851660009081526004602090815260408083203384529091529020555b61076e8484846116aa565b5060019392505050565b60008083116107e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b60085461080d9073ffffffffffffffffffffffffffffffffffffffff1633308661178b565b610817828461195b565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60055481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d602081101561092c57600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b15801561099c57600080fd5b505afa1580156109b0573d6000803e3d6000fd5b505050506040513d60208110156109c657600080fd5b5051610a3357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a9b57600080fd5b505afa158015610aaf573d6000803e3d6000fd5b505050506040513d6020811015610ac557600080fd5b505115610b3357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610b3d828261195b565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610b983382611a0c565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b6000808311610c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611d3b6023913960400191505060405180910390fd5b610c363384611a0c565b600854610c5a9073ffffffffffffffffffffffffffffffffffffffff168385611ad0565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60036020526000908152604090205481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2857600080fd5b505afa158015610d3c573d6000803e3d6000fd5b505050506040513d6020811015610d5257600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b158015610dc257600080fd5b505afa158015610dd6573d6000803e3d6000fd5b505050506040513d6020811015610dec57600080fd5b5051610e5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec157600080fd5b505afa158015610ed5573d6000803e3d6000fd5b505050506040513d6020811015610eeb57600080fd5b505115610f5957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610f638282611a0c565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60066020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106745780601f1061064957610100808354040283529160200191610674565b60006106893384846116aa565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b600754604080517ff2f4eb26000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169163f2f4eb26916004808301926020929190829003018186803b1580156110d257600080fd5b505afa1580156110e6573d6000803e3d6000fd5b505050506040513d60208110156110fc57600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b15801561116c57600080fd5b505afa158015611180573d6000803e3d6000fd5b505050506040513d602081101561119657600080fd5b50516111ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d5e6021913960400191505060405180910390fd5b604080517f662aa11d00000000000000000000000000000000000000000000000000000000815260006004820181905273ffffffffffffffffffffffffffffffffffffffff8516602483015291517343000000000000000000000000000000000000029263662aa11d92604480820193602093909283900390910190829087803b15801561127a57600080fd5b505af115801561128e573d6000803e3d6000fd5b505050506040513d60208110156112a457600080fd5b505192915050565b4284101561131b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff80891660008181526006602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa15801561147c573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116158015906114f757508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61156257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b61156d8989896115c9565b505050505050505050565b600460209081526000928352604080842090915290825290205481565b600061068d8233610bd2565b600061068d8233610778565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561068d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260409020546116e0908263ffffffff61163816565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600360205260408082209390935590841681522054611722908263ffffffff611c9716565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b6020831061186957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161182c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146118cb576040519150601f19603f3d011682016040523d82523d6000602084013e6118d0565b606091505b50915091508180156118fe5750805115806118fe57508080602001905160208110156118fb57600080fd5b50515b611953576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611d0a6031913960400191505060405180910390fd5b505050505050565b60025461196e908263ffffffff611c9716565b60025573ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020546119a7908263ffffffff611c9716565b73ffffffffffffffffffffffffffffffffffffffff831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040902054611a42908263ffffffff61163816565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040902055600254611a7b908263ffffffff61163816565b60025560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b60208310611ba657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611b69565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611c08576040519150601f19603f3d011682016040523d82523d6000602084013e611c0d565b606091505b5091509150818015611c3b575080511580611c3b5750808060200190516020811015611c3857600080fd5b50515b611c90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611d7f602d913960400191505060405180910390fd5b5050505050565b8082018281101561068d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f776564436f72655265663a2043616c6c6572206973206e6f74206120676f7665726e6f725472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a2646970667358221220d7fd196a2dee0bd2daa50f4be8ce4153534129a912325a54effe1fa17da46a6e64736f6c63430006060033",
|
|
1118
|
+
linkReferences: {},
|
|
1119
|
+
deployedLinkReferences: {}
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
// src/abis/FewWrappedToken.json
|
|
1123
|
+
var FewWrappedToken_default = {
|
|
1124
|
+
_format: "hh-sol-artifact-1",
|
|
1125
|
+
contractName: "FewWrappedToken",
|
|
1126
|
+
sourceName: "contracts/FewWrappedToken.sol",
|
|
1127
|
+
abi: [
|
|
1128
|
+
{
|
|
1129
|
+
inputs: [],
|
|
1130
|
+
stateMutability: "nonpayable",
|
|
1131
|
+
type: "constructor"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
anonymous: false,
|
|
1135
|
+
inputs: [
|
|
1136
|
+
{
|
|
1137
|
+
indexed: true,
|
|
1138
|
+
internalType: "address",
|
|
1139
|
+
name: "owner",
|
|
1140
|
+
type: "address"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
indexed: true,
|
|
1144
|
+
internalType: "address",
|
|
1145
|
+
name: "spender",
|
|
1146
|
+
type: "address"
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
indexed: false,
|
|
1150
|
+
internalType: "uint256",
|
|
1151
|
+
name: "value",
|
|
1152
|
+
type: "uint256"
|
|
1153
|
+
}
|
|
1154
|
+
],
|
|
1155
|
+
name: "Approval",
|
|
1156
|
+
type: "event"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
anonymous: false,
|
|
1160
|
+
inputs: [
|
|
1161
|
+
{
|
|
1162
|
+
indexed: true,
|
|
1163
|
+
internalType: "address",
|
|
1164
|
+
name: "burner",
|
|
1165
|
+
type: "address"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
indexed: false,
|
|
1169
|
+
internalType: "uint256",
|
|
1170
|
+
name: "amount",
|
|
1171
|
+
type: "uint256"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
indexed: true,
|
|
1175
|
+
internalType: "address",
|
|
1176
|
+
name: "to",
|
|
1177
|
+
type: "address"
|
|
1178
|
+
}
|
|
1179
|
+
],
|
|
1180
|
+
name: "Burn",
|
|
1181
|
+
type: "event"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
anonymous: false,
|
|
1185
|
+
inputs: [
|
|
1186
|
+
{
|
|
1187
|
+
indexed: true,
|
|
1188
|
+
internalType: "address",
|
|
1189
|
+
name: "minter",
|
|
1190
|
+
type: "address"
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
indexed: false,
|
|
1194
|
+
internalType: "uint256",
|
|
1195
|
+
name: "amount",
|
|
1196
|
+
type: "uint256"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
indexed: true,
|
|
1200
|
+
internalType: "address",
|
|
1201
|
+
name: "to",
|
|
1202
|
+
type: "address"
|
|
1203
|
+
}
|
|
1204
|
+
],
|
|
1205
|
+
name: "Mint",
|
|
1206
|
+
type: "event"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
anonymous: false,
|
|
1210
|
+
inputs: [
|
|
1211
|
+
{
|
|
1212
|
+
indexed: true,
|
|
1213
|
+
internalType: "address",
|
|
1214
|
+
name: "from",
|
|
1215
|
+
type: "address"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
indexed: true,
|
|
1219
|
+
internalType: "address",
|
|
1220
|
+
name: "to",
|
|
1221
|
+
type: "address"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
indexed: false,
|
|
1225
|
+
internalType: "uint256",
|
|
1226
|
+
name: "value",
|
|
1227
|
+
type: "uint256"
|
|
1228
|
+
}
|
|
1229
|
+
],
|
|
1230
|
+
name: "Transfer",
|
|
1231
|
+
type: "event"
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
anonymous: false,
|
|
1235
|
+
inputs: [
|
|
1236
|
+
{
|
|
1237
|
+
indexed: true,
|
|
1238
|
+
internalType: "address",
|
|
1239
|
+
name: "sender",
|
|
1240
|
+
type: "address"
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
indexed: false,
|
|
1244
|
+
internalType: "uint256",
|
|
1245
|
+
name: "amount",
|
|
1246
|
+
type: "uint256"
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
indexed: true,
|
|
1250
|
+
internalType: "address",
|
|
1251
|
+
name: "to",
|
|
1252
|
+
type: "address"
|
|
1253
|
+
}
|
|
1254
|
+
],
|
|
1255
|
+
name: "Unwrap",
|
|
1256
|
+
type: "event"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
anonymous: false,
|
|
1260
|
+
inputs: [
|
|
1261
|
+
{
|
|
1262
|
+
indexed: true,
|
|
1263
|
+
internalType: "address",
|
|
1264
|
+
name: "sender",
|
|
1265
|
+
type: "address"
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
indexed: false,
|
|
1269
|
+
internalType: "uint256",
|
|
1270
|
+
name: "amount",
|
|
1271
|
+
type: "uint256"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
indexed: true,
|
|
1275
|
+
internalType: "address",
|
|
1276
|
+
name: "to",
|
|
1277
|
+
type: "address"
|
|
1278
|
+
}
|
|
1279
|
+
],
|
|
1280
|
+
name: "Wrap",
|
|
1281
|
+
type: "event"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
inputs: [],
|
|
1285
|
+
name: "BLAST",
|
|
1286
|
+
outputs: [
|
|
1287
|
+
{
|
|
1288
|
+
internalType: "contract IBlast",
|
|
1289
|
+
name: "",
|
|
1290
|
+
type: "address"
|
|
1291
|
+
}
|
|
1292
|
+
],
|
|
1293
|
+
stateMutability: "view",
|
|
1294
|
+
type: "function"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
inputs: [],
|
|
1298
|
+
name: "DOMAIN_SEPARATOR",
|
|
1299
|
+
outputs: [
|
|
1300
|
+
{
|
|
1301
|
+
internalType: "bytes32",
|
|
1302
|
+
name: "",
|
|
1303
|
+
type: "bytes32"
|
|
1304
|
+
}
|
|
1305
|
+
],
|
|
1306
|
+
stateMutability: "view",
|
|
1307
|
+
type: "function"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
inputs: [],
|
|
1311
|
+
name: "PERMIT_TYPEHASH",
|
|
1312
|
+
outputs: [
|
|
1313
|
+
{
|
|
1314
|
+
internalType: "bytes32",
|
|
1315
|
+
name: "",
|
|
1316
|
+
type: "bytes32"
|
|
1317
|
+
}
|
|
1318
|
+
],
|
|
1319
|
+
stateMutability: "view",
|
|
1320
|
+
type: "function"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
inputs: [
|
|
1324
|
+
{
|
|
1325
|
+
internalType: "address",
|
|
1326
|
+
name: "",
|
|
1327
|
+
type: "address"
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
internalType: "address",
|
|
1331
|
+
name: "",
|
|
1332
|
+
type: "address"
|
|
1333
|
+
}
|
|
1334
|
+
],
|
|
1335
|
+
name: "allowance",
|
|
1336
|
+
outputs: [
|
|
1337
|
+
{
|
|
1338
|
+
internalType: "uint256",
|
|
1339
|
+
name: "",
|
|
1340
|
+
type: "uint256"
|
|
1341
|
+
}
|
|
1342
|
+
],
|
|
1343
|
+
stateMutability: "view",
|
|
1344
|
+
type: "function"
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
inputs: [
|
|
1348
|
+
{
|
|
1349
|
+
internalType: "address",
|
|
1350
|
+
name: "spender",
|
|
1351
|
+
type: "address"
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
internalType: "uint256",
|
|
1355
|
+
name: "value",
|
|
1356
|
+
type: "uint256"
|
|
1357
|
+
}
|
|
1358
|
+
],
|
|
1359
|
+
name: "approve",
|
|
1360
|
+
outputs: [
|
|
1361
|
+
{
|
|
1362
|
+
internalType: "bool",
|
|
1363
|
+
name: "",
|
|
1364
|
+
type: "bool"
|
|
1365
|
+
}
|
|
1366
|
+
],
|
|
1367
|
+
stateMutability: "nonpayable",
|
|
1368
|
+
type: "function"
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
inputs: [
|
|
1372
|
+
{
|
|
1373
|
+
internalType: "address",
|
|
1374
|
+
name: "",
|
|
1375
|
+
type: "address"
|
|
1376
|
+
}
|
|
1377
|
+
],
|
|
1378
|
+
name: "balanceOf",
|
|
1379
|
+
outputs: [
|
|
1380
|
+
{
|
|
1381
|
+
internalType: "uint256",
|
|
1382
|
+
name: "",
|
|
1383
|
+
type: "uint256"
|
|
1384
|
+
}
|
|
1385
|
+
],
|
|
1386
|
+
stateMutability: "view",
|
|
1387
|
+
type: "function"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
inputs: [
|
|
1391
|
+
{
|
|
1392
|
+
internalType: "uint256",
|
|
1393
|
+
name: "amount",
|
|
1394
|
+
type: "uint256"
|
|
1395
|
+
}
|
|
1396
|
+
],
|
|
1397
|
+
name: "burn",
|
|
1398
|
+
outputs: [],
|
|
1399
|
+
stateMutability: "nonpayable",
|
|
1400
|
+
type: "function"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
inputs: [
|
|
1404
|
+
{
|
|
1405
|
+
internalType: "address",
|
|
1406
|
+
name: "account",
|
|
1407
|
+
type: "address"
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
internalType: "uint256",
|
|
1411
|
+
name: "amount",
|
|
1412
|
+
type: "uint256"
|
|
1413
|
+
}
|
|
1414
|
+
],
|
|
1415
|
+
name: "burnFrom",
|
|
1416
|
+
outputs: [],
|
|
1417
|
+
stateMutability: "nonpayable",
|
|
1418
|
+
type: "function"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
inputs: [
|
|
1422
|
+
{
|
|
1423
|
+
internalType: "address",
|
|
1424
|
+
name: "recipient",
|
|
1425
|
+
type: "address"
|
|
1426
|
+
},
|
|
1427
|
+
{
|
|
1428
|
+
internalType: "bool",
|
|
1429
|
+
name: "isMax",
|
|
1430
|
+
type: "bool"
|
|
1431
|
+
}
|
|
1432
|
+
],
|
|
1433
|
+
name: "claimGas",
|
|
1434
|
+
outputs: [
|
|
1435
|
+
{
|
|
1436
|
+
internalType: "uint256",
|
|
1437
|
+
name: "",
|
|
1438
|
+
type: "uint256"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
stateMutability: "nonpayable",
|
|
1442
|
+
type: "function"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
inputs: [],
|
|
1446
|
+
name: "decimals",
|
|
1447
|
+
outputs: [
|
|
1448
|
+
{
|
|
1449
|
+
internalType: "uint8",
|
|
1450
|
+
name: "",
|
|
1451
|
+
type: "uint8"
|
|
1452
|
+
}
|
|
1453
|
+
],
|
|
1454
|
+
stateMutability: "view",
|
|
1455
|
+
type: "function"
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
inputs: [],
|
|
1459
|
+
name: "factory",
|
|
1460
|
+
outputs: [
|
|
1461
|
+
{
|
|
1462
|
+
internalType: "address",
|
|
1463
|
+
name: "",
|
|
1464
|
+
type: "address"
|
|
1465
|
+
}
|
|
1466
|
+
],
|
|
1467
|
+
stateMutability: "view",
|
|
1468
|
+
type: "function"
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
inputs: [],
|
|
1472
|
+
name: "manager",
|
|
1473
|
+
outputs: [
|
|
1474
|
+
{
|
|
1475
|
+
internalType: "address",
|
|
1476
|
+
name: "",
|
|
1477
|
+
type: "address"
|
|
1478
|
+
}
|
|
1479
|
+
],
|
|
1480
|
+
stateMutability: "view",
|
|
1481
|
+
type: "function"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
inputs: [
|
|
1485
|
+
{
|
|
1486
|
+
internalType: "address",
|
|
1487
|
+
name: "account",
|
|
1488
|
+
type: "address"
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
internalType: "uint256",
|
|
1492
|
+
name: "amount",
|
|
1493
|
+
type: "uint256"
|
|
1494
|
+
}
|
|
1495
|
+
],
|
|
1496
|
+
name: "mint",
|
|
1497
|
+
outputs: [],
|
|
1498
|
+
stateMutability: "nonpayable",
|
|
1499
|
+
type: "function"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
inputs: [],
|
|
1503
|
+
name: "name",
|
|
1504
|
+
outputs: [
|
|
1505
|
+
{
|
|
1506
|
+
internalType: "string",
|
|
1507
|
+
name: "",
|
|
1508
|
+
type: "string"
|
|
1509
|
+
}
|
|
1510
|
+
],
|
|
1511
|
+
stateMutability: "view",
|
|
1512
|
+
type: "function"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
inputs: [
|
|
1516
|
+
{
|
|
1517
|
+
internalType: "address",
|
|
1518
|
+
name: "",
|
|
1519
|
+
type: "address"
|
|
1520
|
+
}
|
|
1521
|
+
],
|
|
1522
|
+
name: "nonces",
|
|
1523
|
+
outputs: [
|
|
1524
|
+
{
|
|
1525
|
+
internalType: "uint256",
|
|
1526
|
+
name: "",
|
|
1527
|
+
type: "uint256"
|
|
1528
|
+
}
|
|
1529
|
+
],
|
|
1530
|
+
stateMutability: "view",
|
|
1531
|
+
type: "function"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
inputs: [
|
|
1535
|
+
{
|
|
1536
|
+
internalType: "address",
|
|
1537
|
+
name: "owner",
|
|
1538
|
+
type: "address"
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
internalType: "address",
|
|
1542
|
+
name: "spender",
|
|
1543
|
+
type: "address"
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
internalType: "uint256",
|
|
1547
|
+
name: "value",
|
|
1548
|
+
type: "uint256"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
internalType: "uint256",
|
|
1552
|
+
name: "deadline",
|
|
1553
|
+
type: "uint256"
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
internalType: "uint8",
|
|
1557
|
+
name: "v",
|
|
1558
|
+
type: "uint8"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
internalType: "bytes32",
|
|
1562
|
+
name: "r",
|
|
1563
|
+
type: "bytes32"
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
internalType: "bytes32",
|
|
1567
|
+
name: "s",
|
|
1568
|
+
type: "bytes32"
|
|
1569
|
+
}
|
|
1570
|
+
],
|
|
1571
|
+
name: "permit",
|
|
1572
|
+
outputs: [],
|
|
1573
|
+
stateMutability: "nonpayable",
|
|
1574
|
+
type: "function"
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
inputs: [
|
|
1578
|
+
{
|
|
1579
|
+
internalType: "address",
|
|
1580
|
+
name: "blastGas",
|
|
1581
|
+
type: "address"
|
|
1582
|
+
}
|
|
1583
|
+
],
|
|
1584
|
+
name: "setGasMode",
|
|
1585
|
+
outputs: [],
|
|
1586
|
+
stateMutability: "nonpayable",
|
|
1587
|
+
type: "function"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
inputs: [
|
|
1591
|
+
{
|
|
1592
|
+
internalType: "address",
|
|
1593
|
+
name: "_manager",
|
|
1594
|
+
type: "address"
|
|
1595
|
+
}
|
|
1596
|
+
],
|
|
1597
|
+
name: "setManager",
|
|
1598
|
+
outputs: [],
|
|
1599
|
+
stateMutability: "nonpayable",
|
|
1600
|
+
type: "function"
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
inputs: [
|
|
1604
|
+
{
|
|
1605
|
+
internalType: "address",
|
|
1606
|
+
name: "blastPoints",
|
|
1607
|
+
type: "address"
|
|
1608
|
+
},
|
|
1609
|
+
{
|
|
1610
|
+
internalType: "address",
|
|
1611
|
+
name: "operator",
|
|
1612
|
+
type: "address"
|
|
1613
|
+
}
|
|
1614
|
+
],
|
|
1615
|
+
name: "setPointsOperator",
|
|
1616
|
+
outputs: [],
|
|
1617
|
+
stateMutability: "nonpayable",
|
|
1618
|
+
type: "function"
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
inputs: [],
|
|
1622
|
+
name: "symbol",
|
|
1623
|
+
outputs: [
|
|
1624
|
+
{
|
|
1625
|
+
internalType: "string",
|
|
1626
|
+
name: "",
|
|
1627
|
+
type: "string"
|
|
1628
|
+
}
|
|
1629
|
+
],
|
|
1630
|
+
stateMutability: "view",
|
|
1631
|
+
type: "function"
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
inputs: [],
|
|
1635
|
+
name: "token",
|
|
1636
|
+
outputs: [
|
|
1637
|
+
{
|
|
1638
|
+
internalType: "address",
|
|
1639
|
+
name: "",
|
|
1640
|
+
type: "address"
|
|
1641
|
+
}
|
|
1642
|
+
],
|
|
1643
|
+
stateMutability: "view",
|
|
1644
|
+
type: "function"
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
inputs: [],
|
|
1648
|
+
name: "totalSupply",
|
|
1649
|
+
outputs: [
|
|
1650
|
+
{
|
|
1651
|
+
internalType: "uint256",
|
|
1652
|
+
name: "",
|
|
1653
|
+
type: "uint256"
|
|
1654
|
+
}
|
|
1655
|
+
],
|
|
1656
|
+
stateMutability: "view",
|
|
1657
|
+
type: "function"
|
|
1658
|
+
},
|
|
1659
|
+
{
|
|
1660
|
+
inputs: [
|
|
1661
|
+
{
|
|
1662
|
+
internalType: "address",
|
|
1663
|
+
name: "to",
|
|
1664
|
+
type: "address"
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
internalType: "uint256",
|
|
1668
|
+
name: "value",
|
|
1669
|
+
type: "uint256"
|
|
1670
|
+
}
|
|
1671
|
+
],
|
|
1672
|
+
name: "transfer",
|
|
1673
|
+
outputs: [
|
|
1674
|
+
{
|
|
1675
|
+
internalType: "bool",
|
|
1676
|
+
name: "",
|
|
1677
|
+
type: "bool"
|
|
1678
|
+
}
|
|
1679
|
+
],
|
|
1680
|
+
stateMutability: "nonpayable",
|
|
1681
|
+
type: "function"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
inputs: [
|
|
1685
|
+
{
|
|
1686
|
+
internalType: "address",
|
|
1687
|
+
name: "from",
|
|
1688
|
+
type: "address"
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
internalType: "address",
|
|
1692
|
+
name: "to",
|
|
1693
|
+
type: "address"
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
internalType: "uint256",
|
|
1697
|
+
name: "value",
|
|
1698
|
+
type: "uint256"
|
|
1699
|
+
}
|
|
1700
|
+
],
|
|
1701
|
+
name: "transferFrom",
|
|
1702
|
+
outputs: [
|
|
1703
|
+
{
|
|
1704
|
+
internalType: "bool",
|
|
1705
|
+
name: "",
|
|
1706
|
+
type: "bool"
|
|
1707
|
+
}
|
|
1708
|
+
],
|
|
1709
|
+
stateMutability: "nonpayable",
|
|
1710
|
+
type: "function"
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
inputs: [
|
|
1714
|
+
{
|
|
1715
|
+
internalType: "uint256",
|
|
1716
|
+
name: "amount",
|
|
1717
|
+
type: "uint256"
|
|
1718
|
+
}
|
|
1719
|
+
],
|
|
1720
|
+
name: "unwrap",
|
|
1721
|
+
outputs: [
|
|
1722
|
+
{
|
|
1723
|
+
internalType: "uint256",
|
|
1724
|
+
name: "",
|
|
1725
|
+
type: "uint256"
|
|
1726
|
+
}
|
|
1727
|
+
],
|
|
1728
|
+
stateMutability: "nonpayable",
|
|
1729
|
+
type: "function"
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
inputs: [
|
|
1733
|
+
{
|
|
1734
|
+
internalType: "uint256",
|
|
1735
|
+
name: "amount",
|
|
1736
|
+
type: "uint256"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
internalType: "address",
|
|
1740
|
+
name: "to",
|
|
1741
|
+
type: "address"
|
|
1742
|
+
}
|
|
1743
|
+
],
|
|
1744
|
+
name: "unwrapTo",
|
|
1745
|
+
outputs: [
|
|
1746
|
+
{
|
|
1747
|
+
internalType: "uint256",
|
|
1748
|
+
name: "",
|
|
1749
|
+
type: "uint256"
|
|
1750
|
+
}
|
|
1751
|
+
],
|
|
1752
|
+
stateMutability: "nonpayable",
|
|
1753
|
+
type: "function"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
inputs: [
|
|
1757
|
+
{
|
|
1758
|
+
internalType: "uint256",
|
|
1759
|
+
name: "amount",
|
|
1760
|
+
type: "uint256"
|
|
1761
|
+
}
|
|
1762
|
+
],
|
|
1763
|
+
name: "wrap",
|
|
1764
|
+
outputs: [
|
|
1765
|
+
{
|
|
1766
|
+
internalType: "uint256",
|
|
1767
|
+
name: "",
|
|
1768
|
+
type: "uint256"
|
|
1769
|
+
}
|
|
1770
|
+
],
|
|
1771
|
+
stateMutability: "nonpayable",
|
|
1772
|
+
type: "function"
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
inputs: [
|
|
1776
|
+
{
|
|
1777
|
+
internalType: "uint256",
|
|
1778
|
+
name: "amount",
|
|
1779
|
+
type: "uint256"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
internalType: "address",
|
|
1783
|
+
name: "to",
|
|
1784
|
+
type: "address"
|
|
1785
|
+
}
|
|
1786
|
+
],
|
|
1787
|
+
name: "wrapTo",
|
|
1788
|
+
outputs: [
|
|
1789
|
+
{
|
|
1790
|
+
internalType: "uint256",
|
|
1791
|
+
name: "",
|
|
1792
|
+
type: "uint256"
|
|
1793
|
+
}
|
|
1794
|
+
],
|
|
1795
|
+
stateMutability: "nonpayable",
|
|
1796
|
+
type: "function"
|
|
1797
|
+
}
|
|
1798
|
+
],
|
|
1799
|
+
bytecode: "0x60806040523480156200001157600080fd5b50600080546001600160a01b031916331781556040805163388a0bbd60e11b8152905173430000000000000000000000000000000000000292637114177a926004808201939182900301818387803b1580156200006d57600080fd5b505af115801562000082573d6000803e3d6000fd5b505050507343000000000000000000000000000000000000026001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620000d657600080fd5b505af1158015620000eb573d6000803e3d6000fd5b5050600880546001600160a01b031916339081179091556040805163ad4d4e2960e01b8152905146945091925063ad4d4e29916004808301926020929190829003018186803b1580156200013e57600080fd5b505afa15801562000153573d6000803e3d6000fd5b505050506040513d60208110156200016a57600080fd5b5051600980546001600160a01b0319166001600160a01b039283161790819055604080516306fdde0360e01b8152905191909216916306fdde03916004808301926000929190829003018186803b158015620001c557600080fd5b505afa158015620001da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200020457600080fd5b81019080805160405193929190846401000000008211156200022557600080fd5b9083019060208201858111156200023b57600080fd5b82516401000000008111828201881017156200025657600080fd5b82525081516020918201929091019080838360005b83811015620002855781810151838201526020016200026b565b50505050905090810190601f168015620002b35780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806b02332bb902bb930b83832b2160a51b815250600c0182805190602001908083835b60208310620003055780518252601f199092019160209182019101620002e4565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052600190805190602001906200035092919062000623565b50600960009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620003a057600080fd5b505afa158015620003b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620003df57600080fd5b81019080805160405193929190846401000000008211156200040057600080fd5b9083019060208201858111156200041657600080fd5b82516401000000008111828201881017156200043157600080fd5b82525081516020918201929091019080838360005b838110156200046057818101518382015260200162000446565b50505050905090810190601f1680156200048e5780820380516001836020036101000a031916815260200191505b50604052505050604051602001808061667760f01b81525060020182805190602001908083835b60208310620004d65780518252601f199092019160209182019101620004b5565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052600290805190602001906200052192919062000623565b5060405180605262002c55823960520190506040518091039020600160405180828054600181600116156101000203166002900480156200059c5780601f10620005795761010080835404028352918201916200059c565b820191906000526020600020905b81548152906001019060200180831162000587575b505060408051918290038220828201825260018352603160f81b602093840152815180840196909652858201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606086015260808501959095523060a0808601919091528551808603909101815260c090940190945250508051910120600655620006c8565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200066657805160ff191683800117855562000696565b8280016001018555821562000696579182015b828111156200069657825182559160200191906001019062000679565b50620006a4929150620006a8565b5090565b620006c591905b80821115620006a45760008155600101620006af565b90565b61257d80620006d86000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806379cc6790116100f9578063d0ebdbe711610097578063de0e9a3e11610071578063de0e9a3e14610643578063e220831d14610660578063ea598cb01461069b578063fc0c546a146106b8576101c4565b8063d0ebdbe714610577578063d505accf146105aa578063dd62ed3e14610608576101c4565b806397d75776116100d357806397d75776146104f3578063a9059cbb146104fb578063c45a015514610534578063c8b11dfe1461053c576101c4565b806379cc67901461047f5780637ecebe00146104b857806395d89b41146104eb576101c4565b8063313ce5671161016657806342966c681161014057806342966c68146103c5578063481c6a75146103e25780635dbd60591461041357806370a082311461044c576101c4565b8063313ce567146103665780633644e5151461038457806340c10f191461038c576101c4565b806323b872dd116101a257806323b872dd146102ad57806326599850146102f05780632d195bd21461032957806330adf81f1461035e576101c4565b806306fdde03146101c9578063095ea7b31461024657806318160ddd14610293575b600080fd5b6101d16106c0565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561020b5781810151838201526020016101f3565b50505050905090810190601f1680156102385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027f6004803603604081101561025c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561076b565b604080519115158252519081900360200190f35b61029b610782565b60408051918252519081900360200190f35b61027f600480360360608110156102c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610788565b61029b6004803603604081101561030657600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610867565b61035c6004803603602081101561033f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661095a565b005b61029b610b55565b61036e610b79565b6040805160ff9092168252519081900360200190f35b61029b610b7e565b61035c600480360360408110156103a257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b84565b61035c600480360360208110156103db57600080fd5b5035610e78565b6103ea610ebc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61029b6004803603604081101561042957600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610ed8565b61029b6004803603602081101561046257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610fb4565b61035c6004803603604081101561049557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc6565b61029b600480360360208110156104ce57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112ba565b6101d16112cc565b6103ea611342565b61027f6004803603604081101561051157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561135a565b6103ea611367565b61029b6004803603604081101561055257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515611383565b61035c6004803603602081101561058d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611666565b61035c600480360360e08110156105c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611845565b61029b6004803603604081101561061e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611b11565b61029b6004803603602081101561065957600080fd5b5035611b2e565b61035c6004803603604081101561067657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611b3a565b61029b600480360360208110156106b157600080fd5b5035611d6d565b6103ea611d79565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156107635780601f1061073857610100808354040283529160200191610763565b820191906000526020600020905b81548152906001019060200180831161074657829003601f168201915b505050505081565b6000610778338484611d95565b5060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146108525773ffffffffffffffffffffffffffffffffffffffff84166000908152600560209081526040808320338452909152902054610820908363ffffffff611e0416565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b61085d848484611e76565b5060019392505050565b60008083116108d757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b6009546108fc9073ffffffffffffffffffffffffffffffffffffffff16333086611f57565b610906828461211f565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156109c157600080fd5b505afa1580156109d5573d6000803e3d6000fd5b505050506040513d60208110156109eb57600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b158015610a5b57600080fd5b505afa158015610a6f573d6000803e3d6000fd5b505050506040513d6020811015610a8557600080fd5b5051610af257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b8073ffffffffffffffffffffffffffffffffffffffff16634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b5050505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60065481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610bec57600080fd5b505afa158015610c00573d6000803e3d6000fd5b505050506040513d6020811015610c1657600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b158015610c8657600080fd5b505afa158015610c9a573d6000803e3d6000fd5b505050506040513d6020811015610cb057600080fd5b5051610d1d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8557600080fd5b505afa158015610d99573d6000803e3d6000fd5b505050506040513d6020811015610daf57600080fd5b505115610e1d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610e27828261211f565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610e8233826121d0565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000808311610f32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806124f86023913960400191505060405180910390fd5b610f3c33846121d0565b600954610f609073ffffffffffffffffffffffffffffffffffffffff168385612294565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60046020526000908152604090205481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b15801561102e57600080fd5b505afa158015611042573d6000803e3d6000fd5b505050506040513d602081101561105857600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b1580156110c857600080fd5b505afa1580156110dc573d6000803e3d6000fd5b505050506040513d60208110156110f257600080fd5b505161115f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c757600080fd5b505afa1580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b50511561125f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b61126982826121d0565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60076020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f810184900484028201840190925281815292918301828280156107635780601f1061073857610100808354040283529160200191610763565b73430000000000000000000000000000000000000281565b6000610778338484611e76565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ec57600080fd5b505afa158015611400573d6000803e3d6000fd5b505050506040513d602081101561141657600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b15801561148657600080fd5b505afa15801561149a573d6000803e3d6000fd5b505050506040513d60208110156114b057600080fd5b505161151d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b81156115de57604080517f662aa11d00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516602482015290517343000000000000000000000000000000000000029163662aa11d9160448083019260209291908290030181600087803b1580156115ab57600080fd5b505af11580156115bf573d6000803e3d6000fd5b505050506040513d60208110156115d557600080fd5b5051905061077c565b604080517f954fa5ee00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516602482015290517343000000000000000000000000000000000000029163954fa5ee9160448083019260209291908290030181600087803b1580156115ab57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156116cd57600080fd5b505afa1580156116e1573d6000803e3d6000fd5b505050506040513d60208110156116f757600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b15801561176757600080fd5b505afa15801561177b573d6000803e3d6000fd5b505050506040513d602081101561179157600080fd5b50516117fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b428410156118b457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff80891660008181526007602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611a15573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611a9057508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611afb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b611b06898989611d95565b505050505050505050565b600560209081526000928352604080842090915290825290205481565b600061077c8233610ed8565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba157600080fd5b505afa158015611bb5573d6000803e3d6000fd5b505050506040513d6020811015611bcb57600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b158015611c3b57600080fd5b505afa158015611c4f573d6000803e3d6000fd5b505050506040513d6020811015611c6557600080fd5b5051611cd257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff166336b91f2b826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015611d5157600080fd5b505af1158015611d65573d6000803e3d6000fd5b505050505050565b600061077c8233610867565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561077c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902054611eac908263ffffffff611e0416565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054611eee908263ffffffff61245416565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b6020831061203557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611ff8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612097576040519150601f19603f3d011682016040523d82523d6000602084013e61209c565b606091505b50915091508180156120ca5750805115806120ca57508080602001905160208110156120c757600080fd5b50515b611d65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806124c76031913960400191505060405180910390fd5b600354612132908263ffffffff61245416565b60035573ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604090205461216b908263ffffffff61245416565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054612206908263ffffffff611e0416565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205560035461223f908263ffffffff611e0416565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061236a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161232d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146123cc576040519150601f19603f3d011682016040523d82523d6000602084013e6123d1565b606091505b50915091508180156123ff5750805115806123ff57508080602001905160208110156123fc57600080fd5b50515b610b4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061251b602d913960400191505060405180910390fd5b8082018281101561077c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f7765645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a26469706673582212203fc33f19631f6982b9939229a37c5e4a768f74907515d9ac5ebe0d64086ae03d64736f6c63430006060033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
|
|
1800
|
+
deployedBytecode: "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806379cc6790116100f9578063d0ebdbe711610097578063de0e9a3e11610071578063de0e9a3e14610643578063e220831d14610660578063ea598cb01461069b578063fc0c546a146106b8576101c4565b8063d0ebdbe714610577578063d505accf146105aa578063dd62ed3e14610608576101c4565b806397d75776116100d357806397d75776146104f3578063a9059cbb146104fb578063c45a015514610534578063c8b11dfe1461053c576101c4565b806379cc67901461047f5780637ecebe00146104b857806395d89b41146104eb576101c4565b8063313ce5671161016657806342966c681161014057806342966c68146103c5578063481c6a75146103e25780635dbd60591461041357806370a082311461044c576101c4565b8063313ce567146103665780633644e5151461038457806340c10f191461038c576101c4565b806323b872dd116101a257806323b872dd146102ad57806326599850146102f05780632d195bd21461032957806330adf81f1461035e576101c4565b806306fdde03146101c9578063095ea7b31461024657806318160ddd14610293575b600080fd5b6101d16106c0565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561020b5781810151838201526020016101f3565b50505050905090810190601f1680156102385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027f6004803603604081101561025c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561076b565b604080519115158252519081900360200190f35b61029b610782565b60408051918252519081900360200190f35b61027f600480360360608110156102c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610788565b61029b6004803603604081101561030657600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610867565b61035c6004803603602081101561033f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661095a565b005b61029b610b55565b61036e610b79565b6040805160ff9092168252519081900360200190f35b61029b610b7e565b61035c600480360360408110156103a257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610b84565b61035c600480360360208110156103db57600080fd5b5035610e78565b6103ea610ebc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61029b6004803603604081101561042957600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610ed8565b61029b6004803603602081101561046257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610fb4565b61035c6004803603604081101561049557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610fc6565b61029b600480360360208110156104ce57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166112ba565b6101d16112cc565b6103ea611342565b61027f6004803603604081101561051157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561135a565b6103ea611367565b61029b6004803603604081101561055257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001351515611383565b61035c6004803603602081101561058d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611666565b61035c600480360360e08110156105c057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611845565b61029b6004803603604081101561061e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611b11565b61029b6004803603602081101561065957600080fd5b5035611b2e565b61035c6004803603604081101561067657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611b3a565b61029b600480360360208110156106b157600080fd5b5035611d6d565b6103ea611d79565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156107635780601f1061073857610100808354040283529160200191610763565b820191906000526020600020905b81548152906001019060200180831161074657829003601f168201915b505050505081565b6000610778338484611d95565b5060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146108525773ffffffffffffffffffffffffffffffffffffffff84166000908152600560209081526040808320338452909152902054610820908363ffffffff611e0416565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b61085d848484611e76565b5060019392505050565b60008083116108d757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b6009546108fc9073ffffffffffffffffffffffffffffffffffffffff16333086611f57565b610906828461211f565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156109c157600080fd5b505afa1580156109d5573d6000803e3d6000fd5b505050506040513d60208110156109eb57600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b158015610a5b57600080fd5b505afa158015610a6f573d6000803e3d6000fd5b505050506040513d6020811015610a8557600080fd5b5051610af257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b8073ffffffffffffffffffffffffffffffffffffffff16634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b5050505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60065481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610bec57600080fd5b505afa158015610c00573d6000803e3d6000fd5b505050506040513d6020811015610c1657600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b158015610c8657600080fd5b505afa158015610c9a573d6000803e3d6000fd5b505050506040513d6020811015610cb057600080fd5b5051610d1d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8557600080fd5b505afa158015610d99573d6000803e3d6000fd5b505050506040513d6020811015610daf57600080fd5b505115610e1d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610e27828261211f565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610e8233826121d0565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000808311610f32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806124f86023913960400191505060405180910390fd5b610f3c33846121d0565b600954610f609073ffffffffffffffffffffffffffffffffffffffff168385612294565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60046020526000908152604090205481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b15801561102e57600080fd5b505afa158015611042573d6000803e3d6000fd5b505050506040513d602081101561105857600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b1580156110c857600080fd5b505afa1580156110dc573d6000803e3d6000fd5b505050506040513d60208110156110f257600080fd5b505161115f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c757600080fd5b505afa1580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b50511561125f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b61126982826121d0565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60076020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f810184900484028201840190925281815292918301828280156107635780601f1061073857610100808354040283529160200191610763565b73430000000000000000000000000000000000000281565b6000610778338484611e76565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ec57600080fd5b505afa158015611400573d6000803e3d6000fd5b505050506040513d602081101561141657600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b15801561148657600080fd5b505afa15801561149a573d6000803e3d6000fd5b505050506040513d60208110156114b057600080fd5b505161151d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b81156115de57604080517f662aa11d00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516602482015290517343000000000000000000000000000000000000029163662aa11d9160448083019260209291908290030181600087803b1580156115ab57600080fd5b505af11580156115bf573d6000803e3d6000fd5b505050506040513d60208110156115d557600080fd5b5051905061077c565b604080517f954fa5ee00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516602482015290517343000000000000000000000000000000000000029163954fa5ee9160448083019260209291908290030181600087803b1580156115ab57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156116cd57600080fd5b505afa1580156116e1573d6000803e3d6000fd5b505050506040513d60208110156116f757600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b15801561176757600080fd5b505afa15801561177b573d6000803e3d6000fd5b505050506040513d602081101561179157600080fd5b50516117fe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b428410156118b457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff80891660008181526007602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015611a15573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590611a9057508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611afb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b611b06898989611d95565b505050505050505050565b600560209081526000928352604080842090915290825290205481565b600061077c8233610ed8565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba157600080fd5b505afa158015611bb5573d6000803e3d6000fd5b505050506040513d6020811015611bcb57600080fd5b5051604080517fe43581b8000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163e43581b891602480820192602092909190829003018186803b158015611c3b57600080fd5b505afa158015611c4f573d6000803e3d6000fd5b505050506040513d6020811015611c6557600080fd5b5051611cd257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f464f5242494444454e0000000000000000000000000000000000000000000000604482015290519081900360640190fd5b8173ffffffffffffffffffffffffffffffffffffffff166336b91f2b826040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015611d5157600080fd5b505af1158015611d65573d6000803e3d6000fd5b505050505050565b600061077c8233610867565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561077c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902054611eac908263ffffffff611e0416565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054611eee908263ffffffff61245416565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b6020831061203557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611ff8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612097576040519150601f19603f3d011682016040523d82523d6000602084013e61209c565b606091505b50915091508180156120ca5750805115806120ca57508080602001905160208110156120c757600080fd5b50515b611d65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001806124c76031913960400191505060405180910390fd5b600354612132908263ffffffff61245416565b60035573ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604090205461216b908263ffffffff61245416565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054612206908263ffffffff611e0416565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602052604090205560035461223f908263ffffffff611e0416565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061236a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161232d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146123cc576040519150601f19603f3d011682016040523d82523d6000602084013e6123d1565b606091505b50915091508180156123ff5750805115806123ff57508080602001905160208110156123fc57600080fd5b50515b610b4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061251b602d913960400191505060405180910390fd5b8082018281101561077c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f7765645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a26469706673582212203fc33f19631f6982b9939229a37c5e4a768f74907515d9ac5ebe0d64086ae03d64736f6c63430006060033",
|
|
1801
|
+
linkReferences: {},
|
|
1802
|
+
deployedLinkReferences: {}
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
// src/abis/EVMFewWrappedToken.json
|
|
1806
|
+
var EVMFewWrappedToken_default = {
|
|
1807
|
+
_format: "hh-sol-artifact-1",
|
|
1808
|
+
contractName: "FewWrappedToken",
|
|
1809
|
+
sourceName: "contracts/FewWrappedToken.sol",
|
|
1810
|
+
abi: [
|
|
1811
|
+
{
|
|
1812
|
+
inputs: [],
|
|
1813
|
+
stateMutability: "nonpayable",
|
|
1814
|
+
type: "constructor"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
anonymous: false,
|
|
1818
|
+
inputs: [
|
|
1819
|
+
{
|
|
1820
|
+
indexed: true,
|
|
1821
|
+
internalType: "address",
|
|
1822
|
+
name: "owner",
|
|
1823
|
+
type: "address"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
indexed: true,
|
|
1827
|
+
internalType: "address",
|
|
1828
|
+
name: "spender",
|
|
1829
|
+
type: "address"
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
indexed: false,
|
|
1833
|
+
internalType: "uint256",
|
|
1834
|
+
name: "value",
|
|
1835
|
+
type: "uint256"
|
|
1836
|
+
}
|
|
1837
|
+
],
|
|
1838
|
+
name: "Approval",
|
|
1839
|
+
type: "event"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
anonymous: false,
|
|
1843
|
+
inputs: [
|
|
1844
|
+
{
|
|
1845
|
+
indexed: true,
|
|
1846
|
+
internalType: "address",
|
|
1847
|
+
name: "burner",
|
|
1848
|
+
type: "address"
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
indexed: false,
|
|
1852
|
+
internalType: "uint256",
|
|
1853
|
+
name: "amount",
|
|
1854
|
+
type: "uint256"
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
indexed: true,
|
|
1858
|
+
internalType: "address",
|
|
1859
|
+
name: "to",
|
|
1860
|
+
type: "address"
|
|
1861
|
+
}
|
|
1862
|
+
],
|
|
1863
|
+
name: "Burn",
|
|
1864
|
+
type: "event"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
anonymous: false,
|
|
1868
|
+
inputs: [
|
|
1869
|
+
{
|
|
1870
|
+
indexed: true,
|
|
1871
|
+
internalType: "address",
|
|
1872
|
+
name: "minter",
|
|
1873
|
+
type: "address"
|
|
1874
|
+
},
|
|
1875
|
+
{
|
|
1876
|
+
indexed: false,
|
|
1877
|
+
internalType: "uint256",
|
|
1878
|
+
name: "amount",
|
|
1879
|
+
type: "uint256"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
indexed: true,
|
|
1883
|
+
internalType: "address",
|
|
1884
|
+
name: "to",
|
|
1885
|
+
type: "address"
|
|
1886
|
+
}
|
|
1887
|
+
],
|
|
1888
|
+
name: "Mint",
|
|
1889
|
+
type: "event"
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
anonymous: false,
|
|
1893
|
+
inputs: [
|
|
1894
|
+
{
|
|
1895
|
+
indexed: true,
|
|
1896
|
+
internalType: "address",
|
|
1897
|
+
name: "from",
|
|
1898
|
+
type: "address"
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
indexed: true,
|
|
1902
|
+
internalType: "address",
|
|
1903
|
+
name: "to",
|
|
1904
|
+
type: "address"
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
indexed: false,
|
|
1908
|
+
internalType: "uint256",
|
|
1909
|
+
name: "value",
|
|
1910
|
+
type: "uint256"
|
|
1911
|
+
}
|
|
1912
|
+
],
|
|
1913
|
+
name: "Transfer",
|
|
1914
|
+
type: "event"
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
anonymous: false,
|
|
1918
|
+
inputs: [
|
|
1919
|
+
{
|
|
1920
|
+
indexed: true,
|
|
1921
|
+
internalType: "address",
|
|
1922
|
+
name: "sender",
|
|
1923
|
+
type: "address"
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
indexed: false,
|
|
1927
|
+
internalType: "uint256",
|
|
1928
|
+
name: "amount",
|
|
1929
|
+
type: "uint256"
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
indexed: true,
|
|
1933
|
+
internalType: "address",
|
|
1934
|
+
name: "to",
|
|
1935
|
+
type: "address"
|
|
1936
|
+
}
|
|
1937
|
+
],
|
|
1938
|
+
name: "Unwrap",
|
|
1939
|
+
type: "event"
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
anonymous: false,
|
|
1943
|
+
inputs: [
|
|
1944
|
+
{
|
|
1945
|
+
indexed: true,
|
|
1946
|
+
internalType: "address",
|
|
1947
|
+
name: "sender",
|
|
1948
|
+
type: "address"
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
indexed: false,
|
|
1952
|
+
internalType: "uint256",
|
|
1953
|
+
name: "amount",
|
|
1954
|
+
type: "uint256"
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
indexed: true,
|
|
1958
|
+
internalType: "address",
|
|
1959
|
+
name: "to",
|
|
1960
|
+
type: "address"
|
|
1961
|
+
}
|
|
1962
|
+
],
|
|
1963
|
+
name: "Wrap",
|
|
1964
|
+
type: "event"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
inputs: [],
|
|
1968
|
+
name: "DOMAIN_SEPARATOR",
|
|
1969
|
+
outputs: [
|
|
1970
|
+
{
|
|
1971
|
+
internalType: "bytes32",
|
|
1972
|
+
name: "",
|
|
1973
|
+
type: "bytes32"
|
|
1974
|
+
}
|
|
1975
|
+
],
|
|
1976
|
+
stateMutability: "view",
|
|
1977
|
+
type: "function"
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
inputs: [],
|
|
1981
|
+
name: "PERMIT_TYPEHASH",
|
|
1982
|
+
outputs: [
|
|
1983
|
+
{
|
|
1984
|
+
internalType: "bytes32",
|
|
1985
|
+
name: "",
|
|
1986
|
+
type: "bytes32"
|
|
1987
|
+
}
|
|
1988
|
+
],
|
|
1989
|
+
stateMutability: "view",
|
|
1990
|
+
type: "function"
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
inputs: [
|
|
1994
|
+
{
|
|
1995
|
+
internalType: "address",
|
|
1996
|
+
name: "",
|
|
1997
|
+
type: "address"
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
internalType: "address",
|
|
2001
|
+
name: "",
|
|
2002
|
+
type: "address"
|
|
2003
|
+
}
|
|
2004
|
+
],
|
|
2005
|
+
name: "allowance",
|
|
2006
|
+
outputs: [
|
|
2007
|
+
{
|
|
2008
|
+
internalType: "uint256",
|
|
2009
|
+
name: "",
|
|
2010
|
+
type: "uint256"
|
|
2011
|
+
}
|
|
2012
|
+
],
|
|
2013
|
+
stateMutability: "view",
|
|
2014
|
+
type: "function"
|
|
2015
|
+
},
|
|
2016
|
+
{
|
|
2017
|
+
inputs: [
|
|
2018
|
+
{
|
|
2019
|
+
internalType: "address",
|
|
2020
|
+
name: "spender",
|
|
2021
|
+
type: "address"
|
|
2022
|
+
},
|
|
2023
|
+
{
|
|
2024
|
+
internalType: "uint256",
|
|
2025
|
+
name: "value",
|
|
2026
|
+
type: "uint256"
|
|
2027
|
+
}
|
|
2028
|
+
],
|
|
2029
|
+
name: "approve",
|
|
2030
|
+
outputs: [
|
|
2031
|
+
{
|
|
2032
|
+
internalType: "bool",
|
|
2033
|
+
name: "",
|
|
2034
|
+
type: "bool"
|
|
2035
|
+
}
|
|
2036
|
+
],
|
|
2037
|
+
stateMutability: "nonpayable",
|
|
2038
|
+
type: "function"
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
inputs: [
|
|
2042
|
+
{
|
|
2043
|
+
internalType: "address",
|
|
2044
|
+
name: "",
|
|
2045
|
+
type: "address"
|
|
2046
|
+
}
|
|
2047
|
+
],
|
|
2048
|
+
name: "balanceOf",
|
|
2049
|
+
outputs: [
|
|
2050
|
+
{
|
|
2051
|
+
internalType: "uint256",
|
|
2052
|
+
name: "",
|
|
2053
|
+
type: "uint256"
|
|
2054
|
+
}
|
|
2055
|
+
],
|
|
2056
|
+
stateMutability: "view",
|
|
2057
|
+
type: "function"
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
inputs: [
|
|
2061
|
+
{
|
|
2062
|
+
internalType: "uint256",
|
|
2063
|
+
name: "amount",
|
|
2064
|
+
type: "uint256"
|
|
2065
|
+
}
|
|
2066
|
+
],
|
|
2067
|
+
name: "burn",
|
|
2068
|
+
outputs: [],
|
|
2069
|
+
stateMutability: "nonpayable",
|
|
2070
|
+
type: "function"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
inputs: [
|
|
2074
|
+
{
|
|
2075
|
+
internalType: "address",
|
|
2076
|
+
name: "account",
|
|
2077
|
+
type: "address"
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
internalType: "uint256",
|
|
2081
|
+
name: "amount",
|
|
2082
|
+
type: "uint256"
|
|
2083
|
+
}
|
|
2084
|
+
],
|
|
2085
|
+
name: "burnFrom",
|
|
2086
|
+
outputs: [],
|
|
2087
|
+
stateMutability: "nonpayable",
|
|
2088
|
+
type: "function"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
inputs: [],
|
|
2092
|
+
name: "decimals",
|
|
2093
|
+
outputs: [
|
|
2094
|
+
{
|
|
2095
|
+
internalType: "uint8",
|
|
2096
|
+
name: "",
|
|
2097
|
+
type: "uint8"
|
|
2098
|
+
}
|
|
2099
|
+
],
|
|
2100
|
+
stateMutability: "view",
|
|
2101
|
+
type: "function"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
inputs: [],
|
|
2105
|
+
name: "factory",
|
|
2106
|
+
outputs: [
|
|
2107
|
+
{
|
|
2108
|
+
internalType: "address",
|
|
2109
|
+
name: "",
|
|
2110
|
+
type: "address"
|
|
2111
|
+
}
|
|
2112
|
+
],
|
|
2113
|
+
stateMutability: "view",
|
|
2114
|
+
type: "function"
|
|
2115
|
+
},
|
|
2116
|
+
{
|
|
2117
|
+
inputs: [
|
|
2118
|
+
{
|
|
2119
|
+
internalType: "address",
|
|
2120
|
+
name: "account",
|
|
2121
|
+
type: "address"
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
internalType: "uint256",
|
|
2125
|
+
name: "amount",
|
|
2126
|
+
type: "uint256"
|
|
2127
|
+
}
|
|
2128
|
+
],
|
|
2129
|
+
name: "mint",
|
|
2130
|
+
outputs: [],
|
|
2131
|
+
stateMutability: "nonpayable",
|
|
2132
|
+
type: "function"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
inputs: [],
|
|
2136
|
+
name: "name",
|
|
2137
|
+
outputs: [
|
|
2138
|
+
{
|
|
2139
|
+
internalType: "string",
|
|
2140
|
+
name: "",
|
|
2141
|
+
type: "string"
|
|
2142
|
+
}
|
|
2143
|
+
],
|
|
2144
|
+
stateMutability: "view",
|
|
2145
|
+
type: "function"
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
inputs: [
|
|
2149
|
+
{
|
|
2150
|
+
internalType: "address",
|
|
2151
|
+
name: "",
|
|
2152
|
+
type: "address"
|
|
2153
|
+
}
|
|
2154
|
+
],
|
|
2155
|
+
name: "nonces",
|
|
2156
|
+
outputs: [
|
|
2157
|
+
{
|
|
2158
|
+
internalType: "uint256",
|
|
2159
|
+
name: "",
|
|
2160
|
+
type: "uint256"
|
|
2161
|
+
}
|
|
2162
|
+
],
|
|
2163
|
+
stateMutability: "view",
|
|
2164
|
+
type: "function"
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
inputs: [
|
|
2168
|
+
{
|
|
2169
|
+
internalType: "address",
|
|
2170
|
+
name: "owner",
|
|
2171
|
+
type: "address"
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
internalType: "address",
|
|
2175
|
+
name: "spender",
|
|
2176
|
+
type: "address"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
internalType: "uint256",
|
|
2180
|
+
name: "value",
|
|
2181
|
+
type: "uint256"
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
internalType: "uint256",
|
|
2185
|
+
name: "deadline",
|
|
2186
|
+
type: "uint256"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
internalType: "uint8",
|
|
2190
|
+
name: "v",
|
|
2191
|
+
type: "uint8"
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
internalType: "bytes32",
|
|
2195
|
+
name: "r",
|
|
2196
|
+
type: "bytes32"
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
internalType: "bytes32",
|
|
2200
|
+
name: "s",
|
|
2201
|
+
type: "bytes32"
|
|
2202
|
+
}
|
|
2203
|
+
],
|
|
2204
|
+
name: "permit",
|
|
2205
|
+
outputs: [],
|
|
2206
|
+
stateMutability: "nonpayable",
|
|
2207
|
+
type: "function"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
inputs: [],
|
|
2211
|
+
name: "symbol",
|
|
2212
|
+
outputs: [
|
|
2213
|
+
{
|
|
2214
|
+
internalType: "string",
|
|
2215
|
+
name: "",
|
|
2216
|
+
type: "string"
|
|
2217
|
+
}
|
|
2218
|
+
],
|
|
2219
|
+
stateMutability: "view",
|
|
2220
|
+
type: "function"
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
inputs: [],
|
|
2224
|
+
name: "token",
|
|
2225
|
+
outputs: [
|
|
2226
|
+
{
|
|
2227
|
+
internalType: "address",
|
|
2228
|
+
name: "",
|
|
2229
|
+
type: "address"
|
|
2230
|
+
}
|
|
2231
|
+
],
|
|
2232
|
+
stateMutability: "view",
|
|
2233
|
+
type: "function"
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
inputs: [],
|
|
2237
|
+
name: "totalSupply",
|
|
2238
|
+
outputs: [
|
|
2239
|
+
{
|
|
2240
|
+
internalType: "uint256",
|
|
2241
|
+
name: "",
|
|
2242
|
+
type: "uint256"
|
|
2243
|
+
}
|
|
2244
|
+
],
|
|
2245
|
+
stateMutability: "view",
|
|
2246
|
+
type: "function"
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
inputs: [
|
|
2250
|
+
{
|
|
2251
|
+
internalType: "address",
|
|
2252
|
+
name: "to",
|
|
2253
|
+
type: "address"
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
internalType: "uint256",
|
|
2257
|
+
name: "value",
|
|
2258
|
+
type: "uint256"
|
|
2259
|
+
}
|
|
2260
|
+
],
|
|
2261
|
+
name: "transfer",
|
|
2262
|
+
outputs: [
|
|
2263
|
+
{
|
|
2264
|
+
internalType: "bool",
|
|
2265
|
+
name: "",
|
|
2266
|
+
type: "bool"
|
|
2267
|
+
}
|
|
2268
|
+
],
|
|
2269
|
+
stateMutability: "nonpayable",
|
|
2270
|
+
type: "function"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
inputs: [
|
|
2274
|
+
{
|
|
2275
|
+
internalType: "address",
|
|
2276
|
+
name: "from",
|
|
2277
|
+
type: "address"
|
|
2278
|
+
},
|
|
2279
|
+
{
|
|
2280
|
+
internalType: "address",
|
|
2281
|
+
name: "to",
|
|
2282
|
+
type: "address"
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
internalType: "uint256",
|
|
2286
|
+
name: "value",
|
|
2287
|
+
type: "uint256"
|
|
2288
|
+
}
|
|
2289
|
+
],
|
|
2290
|
+
name: "transferFrom",
|
|
2291
|
+
outputs: [
|
|
2292
|
+
{
|
|
2293
|
+
internalType: "bool",
|
|
2294
|
+
name: "",
|
|
2295
|
+
type: "bool"
|
|
2296
|
+
}
|
|
2297
|
+
],
|
|
2298
|
+
stateMutability: "nonpayable",
|
|
2299
|
+
type: "function"
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
inputs: [
|
|
2303
|
+
{
|
|
2304
|
+
internalType: "uint256",
|
|
2305
|
+
name: "amount",
|
|
2306
|
+
type: "uint256"
|
|
2307
|
+
}
|
|
2308
|
+
],
|
|
2309
|
+
name: "unwrap",
|
|
2310
|
+
outputs: [
|
|
2311
|
+
{
|
|
2312
|
+
internalType: "uint256",
|
|
2313
|
+
name: "",
|
|
2314
|
+
type: "uint256"
|
|
2315
|
+
}
|
|
2316
|
+
],
|
|
2317
|
+
stateMutability: "nonpayable",
|
|
2318
|
+
type: "function"
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
inputs: [
|
|
2322
|
+
{
|
|
2323
|
+
internalType: "uint256",
|
|
2324
|
+
name: "amount",
|
|
2325
|
+
type: "uint256"
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
internalType: "address",
|
|
2329
|
+
name: "to",
|
|
2330
|
+
type: "address"
|
|
2331
|
+
}
|
|
2332
|
+
],
|
|
2333
|
+
name: "unwrapTo",
|
|
2334
|
+
outputs: [
|
|
2335
|
+
{
|
|
2336
|
+
internalType: "uint256",
|
|
2337
|
+
name: "",
|
|
2338
|
+
type: "uint256"
|
|
2339
|
+
}
|
|
2340
|
+
],
|
|
2341
|
+
stateMutability: "nonpayable",
|
|
2342
|
+
type: "function"
|
|
2343
|
+
},
|
|
2344
|
+
{
|
|
2345
|
+
inputs: [
|
|
2346
|
+
{
|
|
2347
|
+
internalType: "uint256",
|
|
2348
|
+
name: "amount",
|
|
2349
|
+
type: "uint256"
|
|
2350
|
+
}
|
|
2351
|
+
],
|
|
2352
|
+
name: "wrap",
|
|
2353
|
+
outputs: [
|
|
2354
|
+
{
|
|
2355
|
+
internalType: "uint256",
|
|
2356
|
+
name: "",
|
|
2357
|
+
type: "uint256"
|
|
2358
|
+
}
|
|
2359
|
+
],
|
|
2360
|
+
stateMutability: "nonpayable",
|
|
2361
|
+
type: "function"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
inputs: [
|
|
2365
|
+
{
|
|
2366
|
+
internalType: "uint256",
|
|
2367
|
+
name: "amount",
|
|
2368
|
+
type: "uint256"
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
internalType: "address",
|
|
2372
|
+
name: "to",
|
|
2373
|
+
type: "address"
|
|
2374
|
+
}
|
|
2375
|
+
],
|
|
2376
|
+
name: "wrapTo",
|
|
2377
|
+
outputs: [
|
|
2378
|
+
{
|
|
2379
|
+
internalType: "uint256",
|
|
2380
|
+
name: "",
|
|
2381
|
+
type: "uint256"
|
|
2382
|
+
}
|
|
2383
|
+
],
|
|
2384
|
+
stateMutability: "nonpayable",
|
|
2385
|
+
type: "function"
|
|
2386
|
+
}
|
|
2387
|
+
],
|
|
2388
|
+
bytecode: "0x60806040523480156200001157600080fd5b5060405146908060526200217c823960520190506040518091039020600060405180828054600181600116156101000203166002900480156200008e5780601f106200006b5761010080835404028352918201916200008e565b820191906000526020600020905b81548152906001019060200180831162000079575b505060408051918290038220828201825260018352603160f81b602093840152815180840196909652858201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060860152608085018690523060a0808701919091528151808703909101815260c08601808352815191840191909120600555600780546001600160a01b0319163390811790915563ad4d4e2960e01b9091529051909463ad4d4e29945060c4808201945090829003018186803b1580156200015757600080fd5b505afa1580156200016c573d6000803e3d6000fd5b505050506040513d60208110156200018357600080fd5b5051600880546001600160a01b0319166001600160a01b039283161790819055604080516306fdde0360e01b8152905191909216916306fdde03916004808301926000929190829003018186803b158015620001de57600080fd5b505afa158015620001f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200021d57600080fd5b81019080805160405193929190846401000000008211156200023e57600080fd5b9083019060208201858111156200025457600080fd5b82516401000000008111828201881017156200026f57600080fd5b82525081516020918201929091019080838360005b838110156200029e57818101518382015260200162000284565b50505050905090810190601f168015620002cc5780820380516001836020036101000a031916815260200191505b5060405250508151620002e79260009250602001906200058a565b50600060405160200180806b02332bb902bb930b83832b2160a51b815250600c0182805460018160011615610100020316600290048015620003635780601f106200034057610100808354040283529182019162000363565b820191906000526020600020905b8154815290600101906020018083116200034e575b505060408051601f1981840301815291905280516200038d9350600092506020909101906200058a565b50600860009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620003dd57600080fd5b505afa158015620003f2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200041c57600080fd5b81019080805160405193929190846401000000008211156200043d57600080fd5b9083019060208201858111156200045357600080fd5b82516401000000008111828201881017156200046e57600080fd5b82525081516020918201929091019080838360005b838110156200049d57818101518382015260200162000483565b50505050905090810190601f168015620004cb5780820380516001836020036101000a031916815260200191505b5060405250508151620004e69260019250602001906200058a565b506001604051602001808061667760f01b81525060020182805460018160011615610100020316600290048015620005585780601f106200053557610100808354040283529182019162000558565b820191906000526020600020905b81548152906001019060200180831162000543575b505060408051601f198184030181529190528051620005829350600192506020909101906200058a565b50506200062f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620005cd57805160ff1916838001178555620005fd565b82800160010185558215620005fd579182015b82811115620005fd578251825591602001919060010190620005e0565b506200060b9291506200060f565b5090565b6200062c91905b808211156200060b576000815560010162000616565b90565b611b3d806200063f6000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806370a08231116100d8578063c45a01551161008c578063de0e9a3e11610066578063de0e9a3e14610550578063ea598cb01461056d578063fc0c546a1461058a57610182565b8063c45a015514610486578063d505accf146104b7578063dd62ed3e1461051557610182565b80637ecebe00116100bd5780637ecebe001461041257806395d89b4114610445578063a9059cbb1461044d57610182565b806370a08231146103a657806379cc6790146103d957610182565b806330adf81f1161013a57806340c10f191161011457806340c10f191461031557806342966c68146103505780635dbd60591461036d57610182565b806330adf81f146102e7578063313ce567146102ef5780633644e5151461030d57610182565b806318160ddd1161016b57806318160ddd1461025157806323b872dd1461026b57806326599850146102ae57610182565b806306fdde0314610187578063095ea7b314610204575b600080fd5b61018f610592565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101c95781810151838201526020016101b1565b50505050905090810190601f1680156101f65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023d6004803603604081101561021a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561063e565b604080519115158252519081900360200190f35b610259610655565b60408051918252519081900360200190f35b61023d6004803603606081101561028157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561065b565b610259600480360360408110156102c457600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661073a565b61025961082d565b6102f7610851565b6040805160ff9092168252519081900360200190f35b610259610856565b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561085c565b005b61034e6004803603602081101561036657600080fd5b5035610b50565b6102596004803603604081101561038357600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610b94565b610259600480360360208110156103bc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c70565b61034e600480360360408110156103ef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c82565b6102596004803603602081101561042857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f76565b61018f610f88565b61023d6004803603604081101561046357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611000565b61048e61100d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61034e600480360360e08110156104cd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611029565b6102596004803603604081101561052b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166112f5565b6102596004803603602081101561056657600080fd5b5035611312565b6102596004803603602081101561058357600080fd5b503561131e565b61048e61132a565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b820191906000526020600020905b81548152906001019060200180831161061957829003601f168201915b505050505081565b600061064b338484611346565b5060015b92915050565b60025481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107255773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020546106f3908363ffffffff6113b516565b73ffffffffffffffffffffffffffffffffffffffff851660009081526004602090815260408083203384529091529020555b610730848484611427565b5060019392505050565b60008083116107aa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b6008546107cf9073ffffffffffffffffffffffffffffffffffffffff16333086611508565b6107d982846116d8565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60055481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156108c457600080fd5b505afa1580156108d8573d6000803e3d6000fd5b505050506040513d60208110156108ee57600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b15801561095e57600080fd5b505afa158015610972573d6000803e3d6000fd5b505050506040513d602081101561098857600080fd5b50516109f557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5d57600080fd5b505afa158015610a71573d6000803e3d6000fd5b505050506040513d6020811015610a8757600080fd5b505115610af557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610aff82826116d8565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610b5a3382611789565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b6000808311610bee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611ab86023913960400191505060405180910390fd5b610bf83384611789565b600854610c1c9073ffffffffffffffffffffffffffffffffffffffff16838561184d565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60036020526000908152604090205481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610cea57600080fd5b505afa158015610cfe573d6000803e3d6000fd5b505050506040513d6020811015610d1457600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b158015610d8457600080fd5b505afa158015610d98573d6000803e3d6000fd5b505050506040513d6020811015610dae57600080fd5b5051610e1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8357600080fd5b505afa158015610e97573d6000803e3d6000fd5b505050506040513d6020811015610ead57600080fd5b505115610f1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610f258282611789565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60066020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b600061064b338484611427565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b4284101561109857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff80891660008181526006602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156111f9573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061127457508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6112df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b6112ea898989611346565b505050505050505050565b600460209081526000928352604080842090915290825290205481565b600061064f8233610b94565b600061064f823361073a565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604090205461145d908263ffffffff6113b516565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260036020526040808220939093559084168152205461149f908263ffffffff611a1416565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b602083106115e657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115a9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611648576040519150601f19603f3d011682016040523d82523d6000602084013e61164d565b606091505b509150915081801561167b57508051158061167b575080806020019051602081101561167857600080fd5b50515b6116d0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611a876031913960400191505060405180910390fd5b505050505050565b6002546116eb908263ffffffff611a1416565b60025573ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040902054611724908263ffffffff611a1416565b73ffffffffffffffffffffffffffffffffffffffff831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020546117bf908263ffffffff6113b516565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260409020556002546117f8908263ffffffff6113b516565b60025560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061192357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016118e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611985576040519150601f19603f3d011682016040523d82523d6000602084013e61198a565b606091505b50915091508180156119b85750805115806119b857508080602001905160208110156119b557600080fd5b50515b611a0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611adb602d913960400191505060405180910390fd5b5050505050565b8082018281101561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f7765645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a2646970667358221220fb4d68ddfdf6276ca4a2c32195454555ebea54885be43587198200c3a63be11964736f6c63430006060033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
|
|
2389
|
+
deployedBytecode: "0x608060405234801561001057600080fd5b50600436106101825760003560e01c806370a08231116100d8578063c45a01551161008c578063de0e9a3e11610066578063de0e9a3e14610550578063ea598cb01461056d578063fc0c546a1461058a57610182565b8063c45a015514610486578063d505accf146104b7578063dd62ed3e1461051557610182565b80637ecebe00116100bd5780637ecebe001461041257806395d89b4114610445578063a9059cbb1461044d57610182565b806370a08231146103a657806379cc6790146103d957610182565b806330adf81f1161013a57806340c10f191161011457806340c10f191461031557806342966c68146103505780635dbd60591461036d57610182565b806330adf81f146102e7578063313ce567146102ef5780633644e5151461030d57610182565b806318160ddd1161016b57806318160ddd1461025157806323b872dd1461026b57806326599850146102ae57610182565b806306fdde0314610187578063095ea7b314610204575b600080fd5b61018f610592565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101c95781810151838201526020016101b1565b50505050905090810190601f1680156101f65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023d6004803603604081101561021a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561063e565b604080519115158252519081900360200190f35b610259610655565b60408051918252519081900360200190f35b61023d6004803603606081101561028157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561065b565b610259600480360360408110156102c457600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661073a565b61025961082d565b6102f7610851565b6040805160ff9092168252519081900360200190f35b610259610856565b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561085c565b005b61034e6004803603602081101561036657600080fd5b5035610b50565b6102596004803603604081101561038357600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610b94565b610259600480360360208110156103bc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c70565b61034e600480360360408110156103ef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c82565b6102596004803603602081101561042857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f76565b61018f610f88565b61023d6004803603604081101561046357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611000565b61048e61100d565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61034e600480360360e08110156104cd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611029565b6102596004803603604081101561052b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166112f5565b6102596004803603602081101561056657600080fd5b5035611312565b6102596004803603602081101561058357600080fd5b503561131e565b61048e61132a565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b820191906000526020600020905b81548152906001019060200180831161061957829003601f168201915b505050505081565b600061064b338484611346565b5060015b92915050565b60025481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526004602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107255773ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020546106f3908363ffffffff6113b516565b73ffffffffffffffffffffffffffffffffffffffff851660009081526004602090815260408083203384529091529020555b610730848484611427565b5060019392505050565b60008083116107aa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b6008546107cf9073ffffffffffffffffffffffffffffffffffffffff16333086611508565b6107d982846116d8565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60055481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156108c457600080fd5b505afa1580156108d8573d6000803e3d6000fd5b505050506040513d60208110156108ee57600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b15801561095e57600080fd5b505afa158015610972573d6000803e3d6000fd5b505050506040513d602081101561098857600080fd5b50516109f557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5d57600080fd5b505afa158015610a71573d6000803e3d6000fd5b505050506040513d6020811015610a8757600080fd5b505115610af557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610aff82826116d8565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610b5a3382611789565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b6000808311610bee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611ab86023913960400191505060405180910390fd5b610bf83384611789565b600854610c1c9073ffffffffffffffffffffffffffffffffffffffff16838561184d565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60036020526000908152604090205481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610cea57600080fd5b505afa158015610cfe573d6000803e3d6000fd5b505050506040513d6020811015610d1457600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b158015610d8457600080fd5b505afa158015610d98573d6000803e3d6000fd5b505050506040513d6020811015610dae57600080fd5b5051610e1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8357600080fd5b505afa158015610e97573d6000803e3d6000fd5b505050506040513d6020811015610ead57600080fd5b505115610f1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610f258282611789565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60066020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b600061064b338484611427565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b4284101561109857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff80891660008181526006602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156111f9573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061127457508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6112df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b6112ea898989611346565b505050505050505050565b600460209081526000928352604080842090915290825290205481565b600061064f8233610b94565b600061064f823361073a565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604090205461145d908263ffffffff6113b516565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260036020526040808220939093559084168152205461149f908263ffffffff611a1416565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526003602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b602083106115e657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115a9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611648576040519150601f19603f3d011682016040523d82523d6000602084013e61164d565b606091505b509150915081801561167b57508051158061167b575080806020019051602081101561167857600080fd5b50515b6116d0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611a876031913960400191505060405180910390fd5b505050505050565b6002546116eb908263ffffffff611a1416565b60025573ffffffffffffffffffffffffffffffffffffffff8216600090815260036020526040902054611724908263ffffffff611a1416565b73ffffffffffffffffffffffffffffffffffffffff831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260409020546117bf908263ffffffff6113b516565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260409020556002546117f8908263ffffffff6113b516565b60025560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061192357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016118e6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611985576040519150601f19603f3d011682016040523d82523d6000602084013e61198a565b606091505b50915091508180156119b85750805115806119b857508080602001905160208110156119b557600080fd5b50515b611a0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611adb602d913960400191505060405180910390fd5b5050505050565b8082018281101561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f7765645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a2646970667358221220fb4d68ddfdf6276ca4a2c32195454555ebea54885be43587198200c3a63be11964736f6c63430006060033",
|
|
2390
|
+
linkReferences: {},
|
|
2391
|
+
deployedLinkReferences: {}
|
|
2392
|
+
};
|
|
2393
|
+
|
|
2394
|
+
// src/abis/ETHFewWrappedToken.json
|
|
2395
|
+
var ETHFewWrappedToken_default = {
|
|
2396
|
+
_format: "hh-sol-artifact-1",
|
|
2397
|
+
contractName: "FewWrappedToken",
|
|
2398
|
+
sourceName: "contracts/FewWrappedToken.sol",
|
|
2399
|
+
abi: [
|
|
2400
|
+
{
|
|
2401
|
+
inputs: [],
|
|
2402
|
+
stateMutability: "nonpayable",
|
|
2403
|
+
type: "constructor"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
anonymous: false,
|
|
2407
|
+
inputs: [
|
|
2408
|
+
{
|
|
2409
|
+
indexed: true,
|
|
2410
|
+
internalType: "address",
|
|
2411
|
+
name: "owner",
|
|
2412
|
+
type: "address"
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
indexed: true,
|
|
2416
|
+
internalType: "address",
|
|
2417
|
+
name: "spender",
|
|
2418
|
+
type: "address"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
indexed: false,
|
|
2422
|
+
internalType: "uint256",
|
|
2423
|
+
name: "value",
|
|
2424
|
+
type: "uint256"
|
|
2425
|
+
}
|
|
2426
|
+
],
|
|
2427
|
+
name: "Approval",
|
|
2428
|
+
type: "event"
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
anonymous: false,
|
|
2432
|
+
inputs: [
|
|
2433
|
+
{
|
|
2434
|
+
indexed: true,
|
|
2435
|
+
internalType: "address",
|
|
2436
|
+
name: "burner",
|
|
2437
|
+
type: "address"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
indexed: false,
|
|
2441
|
+
internalType: "uint256",
|
|
2442
|
+
name: "amount",
|
|
2443
|
+
type: "uint256"
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
indexed: true,
|
|
2447
|
+
internalType: "address",
|
|
2448
|
+
name: "to",
|
|
2449
|
+
type: "address"
|
|
2450
|
+
}
|
|
2451
|
+
],
|
|
2452
|
+
name: "Burn",
|
|
2453
|
+
type: "event"
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
anonymous: false,
|
|
2457
|
+
inputs: [
|
|
2458
|
+
{
|
|
2459
|
+
indexed: true,
|
|
2460
|
+
internalType: "address",
|
|
2461
|
+
name: "minter",
|
|
2462
|
+
type: "address"
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
indexed: false,
|
|
2466
|
+
internalType: "uint256",
|
|
2467
|
+
name: "amount",
|
|
2468
|
+
type: "uint256"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
indexed: true,
|
|
2472
|
+
internalType: "address",
|
|
2473
|
+
name: "to",
|
|
2474
|
+
type: "address"
|
|
2475
|
+
}
|
|
2476
|
+
],
|
|
2477
|
+
name: "Mint",
|
|
2478
|
+
type: "event"
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
anonymous: false,
|
|
2482
|
+
inputs: [
|
|
2483
|
+
{
|
|
2484
|
+
indexed: true,
|
|
2485
|
+
internalType: "address",
|
|
2486
|
+
name: "from",
|
|
2487
|
+
type: "address"
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
indexed: true,
|
|
2491
|
+
internalType: "address",
|
|
2492
|
+
name: "to",
|
|
2493
|
+
type: "address"
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
indexed: false,
|
|
2497
|
+
internalType: "uint256",
|
|
2498
|
+
name: "value",
|
|
2499
|
+
type: "uint256"
|
|
2500
|
+
}
|
|
2501
|
+
],
|
|
2502
|
+
name: "Transfer",
|
|
2503
|
+
type: "event"
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
anonymous: false,
|
|
2507
|
+
inputs: [
|
|
2508
|
+
{
|
|
2509
|
+
indexed: true,
|
|
2510
|
+
internalType: "address",
|
|
2511
|
+
name: "sender",
|
|
2512
|
+
type: "address"
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
indexed: false,
|
|
2516
|
+
internalType: "uint256",
|
|
2517
|
+
name: "amount",
|
|
2518
|
+
type: "uint256"
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
indexed: true,
|
|
2522
|
+
internalType: "address",
|
|
2523
|
+
name: "to",
|
|
2524
|
+
type: "address"
|
|
2525
|
+
}
|
|
2526
|
+
],
|
|
2527
|
+
name: "Unwrap",
|
|
2528
|
+
type: "event"
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
anonymous: false,
|
|
2532
|
+
inputs: [
|
|
2533
|
+
{
|
|
2534
|
+
indexed: true,
|
|
2535
|
+
internalType: "address",
|
|
2536
|
+
name: "sender",
|
|
2537
|
+
type: "address"
|
|
2538
|
+
},
|
|
2539
|
+
{
|
|
2540
|
+
indexed: false,
|
|
2541
|
+
internalType: "uint256",
|
|
2542
|
+
name: "amount",
|
|
2543
|
+
type: "uint256"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
indexed: true,
|
|
2547
|
+
internalType: "address",
|
|
2548
|
+
name: "to",
|
|
2549
|
+
type: "address"
|
|
2550
|
+
}
|
|
2551
|
+
],
|
|
2552
|
+
name: "Wrap",
|
|
2553
|
+
type: "event"
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
inputs: [],
|
|
2557
|
+
name: "DOMAIN_SEPARATOR",
|
|
2558
|
+
outputs: [
|
|
2559
|
+
{
|
|
2560
|
+
internalType: "bytes32",
|
|
2561
|
+
name: "",
|
|
2562
|
+
type: "bytes32"
|
|
2563
|
+
}
|
|
2564
|
+
],
|
|
2565
|
+
stateMutability: "view",
|
|
2566
|
+
type: "function"
|
|
2567
|
+
},
|
|
2568
|
+
{
|
|
2569
|
+
inputs: [],
|
|
2570
|
+
name: "PERMIT_TYPEHASH",
|
|
2571
|
+
outputs: [
|
|
2572
|
+
{
|
|
2573
|
+
internalType: "bytes32",
|
|
2574
|
+
name: "",
|
|
2575
|
+
type: "bytes32"
|
|
2576
|
+
}
|
|
2577
|
+
],
|
|
2578
|
+
stateMutability: "view",
|
|
2579
|
+
type: "function"
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
inputs: [
|
|
2583
|
+
{
|
|
2584
|
+
internalType: "address",
|
|
2585
|
+
name: "",
|
|
2586
|
+
type: "address"
|
|
2587
|
+
},
|
|
2588
|
+
{
|
|
2589
|
+
internalType: "address",
|
|
2590
|
+
name: "",
|
|
2591
|
+
type: "address"
|
|
2592
|
+
}
|
|
2593
|
+
],
|
|
2594
|
+
name: "allowance",
|
|
2595
|
+
outputs: [
|
|
2596
|
+
{
|
|
2597
|
+
internalType: "uint256",
|
|
2598
|
+
name: "",
|
|
2599
|
+
type: "uint256"
|
|
2600
|
+
}
|
|
2601
|
+
],
|
|
2602
|
+
stateMutability: "view",
|
|
2603
|
+
type: "function"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
inputs: [
|
|
2607
|
+
{
|
|
2608
|
+
internalType: "address",
|
|
2609
|
+
name: "spender",
|
|
2610
|
+
type: "address"
|
|
2611
|
+
},
|
|
2612
|
+
{
|
|
2613
|
+
internalType: "uint256",
|
|
2614
|
+
name: "value",
|
|
2615
|
+
type: "uint256"
|
|
2616
|
+
}
|
|
2617
|
+
],
|
|
2618
|
+
name: "approve",
|
|
2619
|
+
outputs: [
|
|
2620
|
+
{
|
|
2621
|
+
internalType: "bool",
|
|
2622
|
+
name: "",
|
|
2623
|
+
type: "bool"
|
|
2624
|
+
}
|
|
2625
|
+
],
|
|
2626
|
+
stateMutability: "nonpayable",
|
|
2627
|
+
type: "function"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
inputs: [
|
|
2631
|
+
{
|
|
2632
|
+
internalType: "address",
|
|
2633
|
+
name: "",
|
|
2634
|
+
type: "address"
|
|
2635
|
+
}
|
|
2636
|
+
],
|
|
2637
|
+
name: "balanceOf",
|
|
2638
|
+
outputs: [
|
|
2639
|
+
{
|
|
2640
|
+
internalType: "uint256",
|
|
2641
|
+
name: "",
|
|
2642
|
+
type: "uint256"
|
|
2643
|
+
}
|
|
2644
|
+
],
|
|
2645
|
+
stateMutability: "view",
|
|
2646
|
+
type: "function"
|
|
2647
|
+
},
|
|
2648
|
+
{
|
|
2649
|
+
inputs: [
|
|
2650
|
+
{
|
|
2651
|
+
internalType: "uint256",
|
|
2652
|
+
name: "amount",
|
|
2653
|
+
type: "uint256"
|
|
2654
|
+
}
|
|
2655
|
+
],
|
|
2656
|
+
name: "burn",
|
|
2657
|
+
outputs: [],
|
|
2658
|
+
stateMutability: "nonpayable",
|
|
2659
|
+
type: "function"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
inputs: [
|
|
2663
|
+
{
|
|
2664
|
+
internalType: "address",
|
|
2665
|
+
name: "account",
|
|
2666
|
+
type: "address"
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
internalType: "uint256",
|
|
2670
|
+
name: "amount",
|
|
2671
|
+
type: "uint256"
|
|
2672
|
+
}
|
|
2673
|
+
],
|
|
2674
|
+
name: "burnFrom",
|
|
2675
|
+
outputs: [],
|
|
2676
|
+
stateMutability: "nonpayable",
|
|
2677
|
+
type: "function"
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
inputs: [],
|
|
2681
|
+
name: "decimals",
|
|
2682
|
+
outputs: [
|
|
2683
|
+
{
|
|
2684
|
+
internalType: "uint8",
|
|
2685
|
+
name: "",
|
|
2686
|
+
type: "uint8"
|
|
2687
|
+
}
|
|
2688
|
+
],
|
|
2689
|
+
stateMutability: "view",
|
|
2690
|
+
type: "function"
|
|
2691
|
+
},
|
|
2692
|
+
{
|
|
2693
|
+
inputs: [],
|
|
2694
|
+
name: "factory",
|
|
2695
|
+
outputs: [
|
|
2696
|
+
{
|
|
2697
|
+
internalType: "address",
|
|
2698
|
+
name: "",
|
|
2699
|
+
type: "address"
|
|
2700
|
+
}
|
|
2701
|
+
],
|
|
2702
|
+
stateMutability: "view",
|
|
2703
|
+
type: "function"
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
inputs: [
|
|
2707
|
+
{
|
|
2708
|
+
internalType: "address",
|
|
2709
|
+
name: "account",
|
|
2710
|
+
type: "address"
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
internalType: "uint256",
|
|
2714
|
+
name: "amount",
|
|
2715
|
+
type: "uint256"
|
|
2716
|
+
}
|
|
2717
|
+
],
|
|
2718
|
+
name: "mint",
|
|
2719
|
+
outputs: [],
|
|
2720
|
+
stateMutability: "nonpayable",
|
|
2721
|
+
type: "function"
|
|
2722
|
+
},
|
|
2723
|
+
{
|
|
2724
|
+
inputs: [],
|
|
2725
|
+
name: "name",
|
|
2726
|
+
outputs: [
|
|
2727
|
+
{
|
|
2728
|
+
internalType: "string",
|
|
2729
|
+
name: "",
|
|
2730
|
+
type: "string"
|
|
2731
|
+
}
|
|
2732
|
+
],
|
|
2733
|
+
stateMutability: "view",
|
|
2734
|
+
type: "function"
|
|
2735
|
+
},
|
|
2736
|
+
{
|
|
2737
|
+
inputs: [
|
|
2738
|
+
{
|
|
2739
|
+
internalType: "address",
|
|
2740
|
+
name: "",
|
|
2741
|
+
type: "address"
|
|
2742
|
+
}
|
|
2743
|
+
],
|
|
2744
|
+
name: "nonces",
|
|
2745
|
+
outputs: [
|
|
2746
|
+
{
|
|
2747
|
+
internalType: "uint256",
|
|
2748
|
+
name: "",
|
|
2749
|
+
type: "uint256"
|
|
2750
|
+
}
|
|
2751
|
+
],
|
|
2752
|
+
stateMutability: "view",
|
|
2753
|
+
type: "function"
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
inputs: [
|
|
2757
|
+
{
|
|
2758
|
+
internalType: "address",
|
|
2759
|
+
name: "owner",
|
|
2760
|
+
type: "address"
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
internalType: "address",
|
|
2764
|
+
name: "spender",
|
|
2765
|
+
type: "address"
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
internalType: "uint256",
|
|
2769
|
+
name: "value",
|
|
2770
|
+
type: "uint256"
|
|
2771
|
+
},
|
|
2772
|
+
{
|
|
2773
|
+
internalType: "uint256",
|
|
2774
|
+
name: "deadline",
|
|
2775
|
+
type: "uint256"
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
internalType: "uint8",
|
|
2779
|
+
name: "v",
|
|
2780
|
+
type: "uint8"
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
internalType: "bytes32",
|
|
2784
|
+
name: "r",
|
|
2785
|
+
type: "bytes32"
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
internalType: "bytes32",
|
|
2789
|
+
name: "s",
|
|
2790
|
+
type: "bytes32"
|
|
2791
|
+
}
|
|
2792
|
+
],
|
|
2793
|
+
name: "permit",
|
|
2794
|
+
outputs: [],
|
|
2795
|
+
stateMutability: "nonpayable",
|
|
2796
|
+
type: "function"
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
inputs: [],
|
|
2800
|
+
name: "symbol",
|
|
2801
|
+
outputs: [
|
|
2802
|
+
{
|
|
2803
|
+
internalType: "string",
|
|
2804
|
+
name: "",
|
|
2805
|
+
type: "string"
|
|
2806
|
+
}
|
|
2807
|
+
],
|
|
2808
|
+
stateMutability: "view",
|
|
2809
|
+
type: "function"
|
|
2810
|
+
},
|
|
2811
|
+
{
|
|
2812
|
+
inputs: [],
|
|
2813
|
+
name: "token",
|
|
2814
|
+
outputs: [
|
|
2815
|
+
{
|
|
2816
|
+
internalType: "address",
|
|
2817
|
+
name: "",
|
|
2818
|
+
type: "address"
|
|
2819
|
+
}
|
|
2820
|
+
],
|
|
2821
|
+
stateMutability: "view",
|
|
2822
|
+
type: "function"
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
inputs: [],
|
|
2826
|
+
name: "totalSupply",
|
|
2827
|
+
outputs: [
|
|
2828
|
+
{
|
|
2829
|
+
internalType: "uint256",
|
|
2830
|
+
name: "",
|
|
2831
|
+
type: "uint256"
|
|
2832
|
+
}
|
|
2833
|
+
],
|
|
2834
|
+
stateMutability: "view",
|
|
2835
|
+
type: "function"
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
inputs: [
|
|
2839
|
+
{
|
|
2840
|
+
internalType: "address",
|
|
2841
|
+
name: "to",
|
|
2842
|
+
type: "address"
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
internalType: "uint256",
|
|
2846
|
+
name: "value",
|
|
2847
|
+
type: "uint256"
|
|
2848
|
+
}
|
|
2849
|
+
],
|
|
2850
|
+
name: "transfer",
|
|
2851
|
+
outputs: [
|
|
2852
|
+
{
|
|
2853
|
+
internalType: "bool",
|
|
2854
|
+
name: "",
|
|
2855
|
+
type: "bool"
|
|
2856
|
+
}
|
|
2857
|
+
],
|
|
2858
|
+
stateMutability: "nonpayable",
|
|
2859
|
+
type: "function"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
inputs: [
|
|
2863
|
+
{
|
|
2864
|
+
internalType: "address",
|
|
2865
|
+
name: "from",
|
|
2866
|
+
type: "address"
|
|
2867
|
+
},
|
|
2868
|
+
{
|
|
2869
|
+
internalType: "address",
|
|
2870
|
+
name: "to",
|
|
2871
|
+
type: "address"
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
internalType: "uint256",
|
|
2875
|
+
name: "value",
|
|
2876
|
+
type: "uint256"
|
|
2877
|
+
}
|
|
2878
|
+
],
|
|
2879
|
+
name: "transferFrom",
|
|
2880
|
+
outputs: [
|
|
2881
|
+
{
|
|
2882
|
+
internalType: "bool",
|
|
2883
|
+
name: "",
|
|
2884
|
+
type: "bool"
|
|
2885
|
+
}
|
|
2886
|
+
],
|
|
2887
|
+
stateMutability: "nonpayable",
|
|
2888
|
+
type: "function"
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
inputs: [
|
|
2892
|
+
{
|
|
2893
|
+
internalType: "uint256",
|
|
2894
|
+
name: "amount",
|
|
2895
|
+
type: "uint256"
|
|
2896
|
+
}
|
|
2897
|
+
],
|
|
2898
|
+
name: "unwrap",
|
|
2899
|
+
outputs: [
|
|
2900
|
+
{
|
|
2901
|
+
internalType: "uint256",
|
|
2902
|
+
name: "",
|
|
2903
|
+
type: "uint256"
|
|
2904
|
+
}
|
|
2905
|
+
],
|
|
2906
|
+
stateMutability: "nonpayable",
|
|
2907
|
+
type: "function"
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
inputs: [
|
|
2911
|
+
{
|
|
2912
|
+
internalType: "uint256",
|
|
2913
|
+
name: "amount",
|
|
2914
|
+
type: "uint256"
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
internalType: "address",
|
|
2918
|
+
name: "to",
|
|
2919
|
+
type: "address"
|
|
2920
|
+
}
|
|
2921
|
+
],
|
|
2922
|
+
name: "unwrapTo",
|
|
2923
|
+
outputs: [
|
|
2924
|
+
{
|
|
2925
|
+
internalType: "uint256",
|
|
2926
|
+
name: "",
|
|
2927
|
+
type: "uint256"
|
|
2928
|
+
}
|
|
2929
|
+
],
|
|
2930
|
+
stateMutability: "nonpayable",
|
|
2931
|
+
type: "function"
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
inputs: [
|
|
2935
|
+
{
|
|
2936
|
+
internalType: "uint256",
|
|
2937
|
+
name: "amount",
|
|
2938
|
+
type: "uint256"
|
|
2939
|
+
}
|
|
2940
|
+
],
|
|
2941
|
+
name: "wrap",
|
|
2942
|
+
outputs: [
|
|
2943
|
+
{
|
|
2944
|
+
internalType: "uint256",
|
|
2945
|
+
name: "",
|
|
2946
|
+
type: "uint256"
|
|
2947
|
+
}
|
|
2948
|
+
],
|
|
2949
|
+
stateMutability: "nonpayable",
|
|
2950
|
+
type: "function"
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
inputs: [
|
|
2954
|
+
{
|
|
2955
|
+
internalType: "uint256",
|
|
2956
|
+
name: "amount",
|
|
2957
|
+
type: "uint256"
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
internalType: "address",
|
|
2961
|
+
name: "to",
|
|
2962
|
+
type: "address"
|
|
2963
|
+
}
|
|
2964
|
+
],
|
|
2965
|
+
name: "wrapTo",
|
|
2966
|
+
outputs: [
|
|
2967
|
+
{
|
|
2968
|
+
internalType: "uint256",
|
|
2969
|
+
name: "",
|
|
2970
|
+
type: "uint256"
|
|
2971
|
+
}
|
|
2972
|
+
],
|
|
2973
|
+
stateMutability: "nonpayable",
|
|
2974
|
+
type: "function"
|
|
2975
|
+
}
|
|
2976
|
+
],
|
|
2977
|
+
bytecode: "0x60806040523480156200001157600080fd5b50600880546001600160a01b031916339081179091556040805163ad4d4e2960e01b8152905146929163ad4d4e29916004808301926020929190829003018186803b1580156200006057600080fd5b505afa15801562000075573d6000803e3d6000fd5b505050506040513d60208110156200008c57600080fd5b5051600980546001600160a01b0319166001600160a01b039283161790819055604080516306fdde0360e01b8152905191909216916306fdde03916004808301926000929190829003018186803b158015620000e757600080fd5b505afa158015620000fc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200012657600080fd5b81019080805160405193929190846401000000008211156200014757600080fd5b9083019060208201858111156200015d57600080fd5b82516401000000008111828201881017156200017857600080fd5b82525081516020918201929091019080838360005b83811015620001a75781810151838201526020016200018d565b50505050905090810190601f168015620001d55780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806b02332bb902bb930b83832b2160a51b815250600c0182805190602001908083835b60208310620002275780518252601f19909201916020918201910162000206565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526000908051906020019062000272929190620005d5565b50600960009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620002c257600080fd5b505afa158015620002d7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200030157600080fd5b81019080805160405193929190846401000000008211156200032257600080fd5b9083019060208201858111156200033857600080fd5b82516401000000008111828201881017156200035357600080fd5b82525081516020918201929091019080838360005b838110156200038257818101518382015260200162000368565b50505050905090810190601f168015620003b05780820380516001836020036101000a031916815260200191505b50604052505050604051602001808061667760f01b81525060020182805190602001908083835b60208310620003f85780518252601f199092019160209182019101620003d7565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526001908051906020019062000443929190620005d5565b50600960009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200049357600080fd5b505afa158015620004a8573d6000803e3d6000fd5b505050506040513d6020811015620004bf57600080fd5b50516002805460ff191660ff909216919091179055604051806052620021cb823960520190506040518091039020600060405180828054600181600116156101000203166002900480156200054e5780601f106200052b5761010080835404028352918201916200054e565b820191906000526020600020905b81548152906001019060200180831162000539575b505060408051918290038220828201825260018352603160f81b602093840152815180840196909652858201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606086015260808501959095523060a0808601919091528551808603909101815260c0909401909452505080519101206006556200067a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200061857805160ff191683800117855562000648565b8280016001018555821562000648579182015b82811115620006485782518255916020019190600101906200062b565b50620006569291506200065a565b5090565b6200067791905b8082111562000656576000815560010162000661565b90565b611b41806200068a6000396000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806370a08231116100d8578063c45a01551161008c578063de0e9a3e11610066578063de0e9a3e14610550578063ea598cb01461056d578063fc0c546a1461058a57610182565b8063c45a015514610486578063d505accf146104b7578063dd62ed3e1461051557610182565b80637ecebe00116100bd5780637ecebe001461041257806395d89b4114610445578063a9059cbb1461044d57610182565b806370a08231146103a657806379cc6790146103d957610182565b806330adf81f1161013a57806340c10f191161011457806340c10f191461031557806342966c68146103505780635dbd60591461036d57610182565b806330adf81f146102e7578063313ce567146102ef5780633644e5151461030d57610182565b806318160ddd1161016b57806318160ddd1461025157806323b872dd1461026b57806326599850146102ae57610182565b806306fdde0314610187578063095ea7b314610204575b600080fd5b61018f610592565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101c95781810151838201526020016101b1565b50505050905090810190601f1680156101f65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023d6004803603604081101561021a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561063e565b604080519115158252519081900360200190f35b610259610655565b60408051918252519081900360200190f35b61023d6004803603606081101561028157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561065b565b610259600480360360408110156102c457600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661073a565b61025961082d565b6102f7610851565b6040805160ff9092168252519081900360200190f35b61025961085a565b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610860565b005b61034e6004803603602081101561036657600080fd5b5035610b54565b6102596004803603604081101561038357600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610b98565b610259600480360360208110156103bc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c74565b61034e600480360360408110156103ef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c86565b6102596004803603602081101561042857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f7a565b61018f610f8c565b61023d6004803603604081101561046357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611004565b61048e611011565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61034e600480360360e08110156104cd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561102d565b6102596004803603604081101561052b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166112f9565b6102596004803603602081101561056657600080fd5b5035611316565b6102596004803603602081101561058357600080fd5b5035611322565b61048e61132e565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b820191906000526020600020905b81548152906001019060200180831161061957829003601f168201915b505050505081565b600061064b33848461134a565b5060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107255773ffffffffffffffffffffffffffffffffffffffff841660009081526005602090815260408083203384529091529020546106f3908363ffffffff6113b916565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b61073084848461142b565b5060019392505050565b60008083116107aa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b6009546107cf9073ffffffffffffffffffffffffffffffffffffffff1633308661150c565b6107d982846116dc565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156108c857600080fd5b505afa1580156108dc573d6000803e3d6000fd5b505050506040513d60208110156108f257600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b15801561096257600080fd5b505afa158015610976573d6000803e3d6000fd5b505050506040513d602081101561098c57600080fd5b50516109f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6157600080fd5b505afa158015610a75573d6000803e3d6000fd5b505050506040513d6020811015610a8b57600080fd5b505115610af957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610b0382826116dc565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610b5e338261178d565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b6000808311610bf2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611abc6023913960400191505060405180910390fd5b610bfc338461178d565b600954610c209073ffffffffffffffffffffffffffffffffffffffff168385611851565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60046020526000908152604090205481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610cee57600080fd5b505afa158015610d02573d6000803e3d6000fd5b505050506040513d6020811015610d1857600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b158015610d8857600080fd5b505afa158015610d9c573d6000803e3d6000fd5b505050506040513d6020811015610db257600080fd5b5051610e1f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8757600080fd5b505afa158015610e9b573d6000803e3d6000fd5b505050506040513d6020811015610eb157600080fd5b505115610f1f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610f29828261178d565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60076020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b600061064b33848461142b565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b4284101561109c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff80891660008181526007602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156111fd573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061127857508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6112e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b6112ee89898961134a565b505050505050505050565b600560209081526000928352604080842090915290825290205481565b600061064f8233610b98565b600061064f823361073a565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902054611461908263ffffffff6113b916565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526004602052604080822093909355908416815220546114a3908263ffffffff611a1816565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b602083106115ea57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115ad565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461164c576040519150601f19603f3d011682016040523d82523d6000602084013e611651565b606091505b509150915081801561167f57508051158061167f575080806020019051602081101561167c57600080fd5b50515b6116d4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611a8b6031913960400191505060405180910390fd5b505050505050565b6003546116ef908263ffffffff611a1816565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054611728908263ffffffff611a1816565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260409020546117c3908263ffffffff6113b916565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600460205260409020556003546117fc908263ffffffff6113b916565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061192757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016118ea565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611989576040519150601f19603f3d011682016040523d82523d6000602084013e61198e565b606091505b50915091508180156119bc5750805115806119bc57508080602001905160208110156119b957600080fd5b50515b611a11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611adf602d913960400191505060405180910390fd5b5050505050565b8082018281101561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f7765645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a2646970667358221220a6e8991d1c9bb458886caf6747ba791abf4d04a0ed92291519c07b76fb5e6db664736f6c63430006060033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",
|
|
2978
|
+
deployedBytecode: "0x608060405234801561001057600080fd5b50600436106101825760003560e01c806370a08231116100d8578063c45a01551161008c578063de0e9a3e11610066578063de0e9a3e14610550578063ea598cb01461056d578063fc0c546a1461058a57610182565b8063c45a015514610486578063d505accf146104b7578063dd62ed3e1461051557610182565b80637ecebe00116100bd5780637ecebe001461041257806395d89b4114610445578063a9059cbb1461044d57610182565b806370a08231146103a657806379cc6790146103d957610182565b806330adf81f1161013a57806340c10f191161011457806340c10f191461031557806342966c68146103505780635dbd60591461036d57610182565b806330adf81f146102e7578063313ce567146102ef5780633644e5151461030d57610182565b806318160ddd1161016b57806318160ddd1461025157806323b872dd1461026b57806326599850146102ae57610182565b806306fdde0314610187578063095ea7b314610204575b600080fd5b61018f610592565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101c95781810151838201526020016101b1565b50505050905090810190601f1680156101f65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023d6004803603604081101561021a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561063e565b604080519115158252519081900360200190f35b610259610655565b60408051918252519081900360200190f35b61023d6004803603606081101561028157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561065b565b610259600480360360408110156102c457600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff1661073a565b61025961082d565b6102f7610851565b6040805160ff9092168252519081900360200190f35b61025961085a565b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610860565b005b61034e6004803603602081101561036657600080fd5b5035610b54565b6102596004803603604081101561038357600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610b98565b610259600480360360208110156103bc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610c74565b61034e600480360360408110156103ef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c86565b6102596004803603602081101561042857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f7a565b61018f610f8c565b61023d6004803603604081101561046357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611004565b61048e611011565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61034e600480360360e08110156104cd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561102d565b6102596004803603604081101561052b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166112f9565b6102596004803603602081101561056657600080fd5b5035611316565b6102596004803603602081101561058357600080fd5b5035611322565b61048e61132e565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b820191906000526020600020905b81548152906001019060200180831161061957829003601f168201915b505050505081565b600061064b33848461134a565b5060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146107255773ffffffffffffffffffffffffffffffffffffffff841660009081526005602090815260408083203384529091529020546106f3908363ffffffff6113b916565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b61073084848461142b565b5060019392505050565b60008083116107aa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665773a2063616e27742077726170207a65726f20746f6b656e000000000000604482015290519081900360640190fd5b6009546107cf9073ffffffffffffffffffffffffffffffffffffffff1633308661150c565b6107d982846116dc565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917feb5580a0908e96b78bdcb1a3c5638793b491a6073c3ff56061a069cb205817739181900360200190a35090919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b1580156108c857600080fd5b505afa1580156108dc573d6000803e3d6000fd5b505050506040513d60208110156108f257600080fd5b5051604080517faa271e1a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff9092169163aa271e1a91602480820192602092909190829003018186803b15801561096257600080fd5b505afa158015610976573d6000803e3d6000fd5b505050506040513d602081101561098c57600080fd5b50516109f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206d696e74657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6157600080fd5b505afa158015610a75573d6000803e3d6000fd5b505050506040513d6020811015610a8b57600080fd5b505115610af957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610b0382826116dc565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fbcad3d7d3dfccb90d49c6063bf70f828901fefc88937d90af74e58e6e55bc39d9181900360200190a35050565b610b5e338261178d565b604080518281529051339182917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a350565b6000808311610bf2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611abc6023913960400191505060405180910390fd5b610bfc338461178d565b600954610c209073ffffffffffffffffffffffffffffffffffffffff168385611851565b60408051848152905173ffffffffffffffffffffffffffffffffffffffff84169133917f12d6424519838e57637c6db9df31af32d7926ff0a53dd37007c191d0fe3028189181900360200190a35090919050565b60046020526000908152604090205481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2f4eb266040518163ffffffff1660e01b815260040160206040518083038186803b158015610cee57600080fd5b505afa158015610d02573d6000803e3d6000fd5b505050506040513d6020811015610d1857600080fd5b5051604080517f4334614a000000000000000000000000000000000000000000000000000000008152336004820152905173ffffffffffffffffffffffffffffffffffffffff90921691634334614a91602480820192602092909190829003018186803b158015610d8857600080fd5b505afa158015610d9c573d6000803e3d6000fd5b505050506040513d6020811015610db257600080fd5b5051610e1f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f436f72655265663a2043616c6c6572206973206e6f742061206275726e657200604482015290519081900360640190fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8757600080fd5b505afa158015610e9b573d6000803e3d6000fd5b505050506040513d6020811015610eb157600080fd5b505115610f1f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f436f72655265663a2043616c6c65722069732070617573656400000000000000604482015290519081900360640190fd5b610f29828261178d565b60408051828152905173ffffffffffffffffffffffffffffffffffffffff84169133917fdbdf9b8e4b75e75b162d151ec8fc7f0561cabab5fcccfa2600be62223e4300c49181900360200190a35050565b60076020526000908152604090205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156106365780601f1061060b57610100808354040283529160200191610636565b600061064b33848461142b565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b4284101561109c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4665773a20455850495245440000000000000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff80891660008181526007602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156111fd573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061127857508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6112e357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665773a20494e56414c49445f5349474e415455524500000000000000000000604482015290519081900360640190fd5b6112ee89898961134a565b505050505050505050565b600560209081526000928352604080842090915290825290205481565b600061064f8233610b98565b600061064f823361073a565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b8082038281111561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902054611461908263ffffffff6113b916565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526004602052604080822093909355908416815220546114a3908263ffffffff611a1816565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b602083106115ea57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016115ad565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461164c576040519150601f19603f3d011682016040523d82523d6000602084013e611651565b606091505b509150915081801561167f57508051158061167f575080806020019051602081101561167c57600080fd5b50515b6116d4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611a8b6031913960400191505060405180910390fd5b505050505050565b6003546116ef908263ffffffff611a1816565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054611728908263ffffffff611a1816565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260409020546117c3908263ffffffff6113b916565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600460205260409020556003546117fc908263ffffffff6113b916565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061192757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016118ea565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611989576040519150601f19603f3d011682016040523d82523d6000602084013e61198e565b606091505b50915091508180156119bc5750805115806119bc57508080602001905160208110156119b957600080fd5b50515b611a11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611adf602d913960400191505060405180910390fd5b5050505050565b8082018281101561064f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fdfe5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c65644665773a207a65726f20616d6f756e7420756e77726170206e6f7420616c6c6f7765645472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564a2646970667358221220a6e8991d1c9bb458886caf6747ba791abf4d04a0ed92291519c07b76fb5e6db664736f6c63430006060033",
|
|
2979
|
+
linkReferences: {},
|
|
2980
|
+
deployedLinkReferences: {}
|
|
2981
|
+
};
|
|
2982
|
+
|
|
2983
|
+
// src/fewToken.ts
|
|
2984
|
+
var FEW_WRAPPED_FACTORY_CONFIGS = {
|
|
2985
|
+
[168587773]: {
|
|
2986
|
+
fewWrapFactory: "0xf11788d14EbE6abF4EA02e162C75AD938F1730C1",
|
|
2987
|
+
bytecode: BlastSepoliaFewWrappedToken_default.bytecode
|
|
2988
|
+
},
|
|
2989
|
+
[11155111]: {
|
|
2990
|
+
fewWrapFactory: "0x226e65279E177A779522864Ce1dE40c85E2C08A5",
|
|
2991
|
+
bytecode: EVMFewWrappedToken_default.bytecode
|
|
2992
|
+
},
|
|
2993
|
+
[81457]: {
|
|
2994
|
+
fewWrapFactory: "0x455b20131D59f01d082df1225154fDA813E8CeE9",
|
|
2995
|
+
bytecode: FewWrappedToken_default.bytecode
|
|
2996
|
+
},
|
|
2997
|
+
[1]: {
|
|
2998
|
+
fewWrapFactory: "0x7D86394139bf1122E82FDF45Bb4e3b038A4464DD",
|
|
2999
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3000
|
+
},
|
|
3001
|
+
// unichain sepolia
|
|
3002
|
+
[1301]: {
|
|
3003
|
+
fewWrapFactory: "0x7D86394139bf1122E82FDF45Bb4e3b038A4464DD",
|
|
3004
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3005
|
+
},
|
|
3006
|
+
// unichain
|
|
3007
|
+
[130]: {
|
|
3008
|
+
fewWrapFactory: "0x974Cc3F3468cd9C12731108148C4DABFB5eE556F",
|
|
3009
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3010
|
+
},
|
|
3011
|
+
// arbitrum sepolia
|
|
3012
|
+
[421614]: {
|
|
3013
|
+
fewWrapFactory: "0xCc7eb1f253c0A988a4754445CA8c9Ab82C704E53",
|
|
3014
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3015
|
+
},
|
|
3016
|
+
// arbitrum mainnet
|
|
3017
|
+
[42161]: {
|
|
3018
|
+
fewWrapFactory: "0x974Cc3F3468cd9C12731108148C4DABFB5eE556F",
|
|
3019
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3020
|
+
},
|
|
3021
|
+
// base
|
|
3022
|
+
[8453]: {
|
|
3023
|
+
fewWrapFactory: "0xb3Ad7754f363af676dC1C5be40423FE538a47920",
|
|
3024
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3025
|
+
},
|
|
3026
|
+
// story odysey
|
|
3027
|
+
[1516]: {
|
|
3028
|
+
fewWrapFactory: "0xCc7eb1f253c0A988a4754445CA8c9Ab82C704E53",
|
|
3029
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3030
|
+
},
|
|
3031
|
+
// story mainnet
|
|
3032
|
+
[1514]: {
|
|
3033
|
+
fewWrapFactory: "0x974Cc3F3468cd9C12731108148C4DABFB5eE556F",
|
|
3034
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3035
|
+
},
|
|
3036
|
+
// hyper mainnet
|
|
3037
|
+
[999]: {
|
|
3038
|
+
fewWrapFactory: "0x6B65ed7315274eB9EF06A48132EB04D808700b86",
|
|
3039
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3040
|
+
},
|
|
3041
|
+
// bnb chain
|
|
3042
|
+
[56]: {
|
|
3043
|
+
fewWrapFactory: "0xEeE400Eabfba8F60f4e6B351D8577394BeB972CD",
|
|
3044
|
+
bytecode: ETHFewWrappedToken_default.bytecode
|
|
3045
|
+
}
|
|
3046
|
+
};
|
|
3047
|
+
var isFewWrappedTokenSupported = (chainId) => {
|
|
3048
|
+
return chainId in FEW_WRAPPED_FACTORY_CONFIGS;
|
|
3049
|
+
};
|
|
3050
|
+
var FEW_WRAPPED_TOKEN_FACTORY_ADDRESS = (chainId) => {
|
|
3051
|
+
if (!(chainId in FEW_WRAPPED_FACTORY_CONFIGS))
|
|
3052
|
+
throw new Error(`Few wrapped token address not deployed on chain ${chainId}`);
|
|
3053
|
+
return FEW_WRAPPED_FACTORY_CONFIGS[chainId].fewWrapFactory;
|
|
3054
|
+
};
|
|
3055
|
+
var FEW_WRAPPED_TOKEN_BYTECODE = (chainId) => {
|
|
3056
|
+
if (!(chainId in FEW_WRAPPED_FACTORY_CONFIGS))
|
|
3057
|
+
throw new Error(`Few wrapped token bytecode not deployed on chain ${chainId}`);
|
|
3058
|
+
return FEW_WRAPPED_FACTORY_CONFIGS[chainId].bytecode;
|
|
3059
|
+
};
|
|
3060
|
+
var FewTokenCreator = class {
|
|
3061
|
+
constructor(token, chainId) {
|
|
3062
|
+
this.token = token;
|
|
3063
|
+
this.chainId = chainId;
|
|
3064
|
+
}
|
|
3065
|
+
hasFewPrefix() {
|
|
3066
|
+
var _a, _b, _c, _d;
|
|
3067
|
+
const isFewWrappedName = (_b = (_a = this.token.name) == null ? void 0 : _a.startsWith("Few Wrapped ")) != null ? _b : false;
|
|
3068
|
+
const isFwSymbol = (_d = (_c = this.token.symbol) == null ? void 0 : _c.startsWith("fw")) != null ? _d : false;
|
|
3069
|
+
return isFewWrappedName || isFwSymbol;
|
|
3070
|
+
}
|
|
3071
|
+
getFewTokenAddress() {
|
|
3072
|
+
if (this.hasFewPrefix()) {
|
|
3073
|
+
return this.token.address;
|
|
3074
|
+
} else {
|
|
3075
|
+
return getFewTokenAddress(this.token.address, this.chainId);
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
getFewSymbol() {
|
|
3079
|
+
if (this.hasFewPrefix()) {
|
|
3080
|
+
return this.token.symbol;
|
|
3081
|
+
} else {
|
|
3082
|
+
return `fw${this.token.symbol}`;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
getFewTokenName() {
|
|
3086
|
+
if (this.hasFewPrefix()) {
|
|
3087
|
+
return this.token.name;
|
|
3088
|
+
} else {
|
|
3089
|
+
return `Few Wrapped ${this.token.name}`;
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
getFewToken() {
|
|
3093
|
+
const fewTokenAddress = this.getFewTokenAddress();
|
|
3094
|
+
return new import_sdk_core3.Token(
|
|
3095
|
+
this.token.chainId,
|
|
3096
|
+
fewTokenAddress,
|
|
3097
|
+
this.token.decimals,
|
|
3098
|
+
this.getFewSymbol(),
|
|
3099
|
+
this.getFewTokenName()
|
|
3100
|
+
);
|
|
3101
|
+
}
|
|
3102
|
+
};
|
|
3103
|
+
function getFewTokenAddress(token, chainId) {
|
|
3104
|
+
if (!isFewWrappedTokenSupported(chainId)) {
|
|
3105
|
+
return import_lib.utils.getAddress(token);
|
|
3106
|
+
}
|
|
3107
|
+
const constructorArgumentsEncoded = import_lib.utils.defaultAbiCoder.encode(["address"], [token]);
|
|
3108
|
+
const create2Inputs = [
|
|
3109
|
+
"0xff",
|
|
3110
|
+
FEW_WRAPPED_TOKEN_FACTORY_ADDRESS(chainId),
|
|
3111
|
+
// salt
|
|
3112
|
+
import_lib.utils.keccak256(constructorArgumentsEncoded),
|
|
3113
|
+
// init code. bytecode + constructor arguments
|
|
3114
|
+
import_lib.utils.keccak256(FEW_WRAPPED_TOKEN_BYTECODE(chainId))
|
|
3115
|
+
];
|
|
3116
|
+
const sanitizedInputs = `0x${create2Inputs.map((i) => i.slice(2)).join("")}`;
|
|
3117
|
+
return import_lib.utils.getAddress(`0x${import_lib.utils.keccak256(sanitizedInputs).slice(-40)}`);
|
|
3118
|
+
}
|
|
3119
|
+
function getFewTokenFromOriginalToken(token, chainId) {
|
|
3120
|
+
if (!isFewWrappedTokenSupported(chainId)) {
|
|
3121
|
+
return token;
|
|
3122
|
+
}
|
|
3123
|
+
const fewTokenCreator = new FewTokenCreator(token, chainId);
|
|
3124
|
+
return fewTokenCreator.getFewToken();
|
|
3125
|
+
}
|
|
3126
|
+
function isFewToken(token) {
|
|
3127
|
+
var _a, _b, _c, _d;
|
|
3128
|
+
const isFewWrappedName = (_b = (_a = token.name) == null ? void 0 : _a.startsWith("Few Wrapped ")) != null ? _b : false;
|
|
3129
|
+
const isFwSymbol = (_d = (_c = token.symbol) == null ? void 0 : _c.startsWith("fw")) != null ? _d : false;
|
|
3130
|
+
return isFewWrappedName || isFwSymbol;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
// src/entities/route.ts
|
|
3134
|
+
var Route = class {
|
|
3135
|
+
constructor(pairs, input, output) {
|
|
3136
|
+
this._midPrice = null;
|
|
3137
|
+
(0, import_tiny_invariant2.default)(pairs.length > 0, "PAIRS");
|
|
3138
|
+
const chainId = pairs[0].chainId;
|
|
3139
|
+
(0, import_tiny_invariant2.default)(
|
|
3140
|
+
pairs.every((pair) => pair.chainId === chainId),
|
|
3141
|
+
"CHAIN_IDS"
|
|
3142
|
+
);
|
|
3143
|
+
const wrappedInput = input.wrapped;
|
|
3144
|
+
const wrappedOutput = output.wrapped;
|
|
3145
|
+
if (isFewToken(wrappedInput) || isFewToken(wrappedOutput) || isFewToken(pairs[0].token0) || isFewToken(pairs[0].token1)) {
|
|
3146
|
+
const fewWrappedInput = getFewTokenFromOriginalToken(wrappedInput.wrapped, chainId);
|
|
3147
|
+
const fewWrappedOutput = getFewTokenFromOriginalToken(wrappedOutput.wrapped, chainId);
|
|
3148
|
+
(0, import_tiny_invariant2.default)(pairs[0].involvesToken(fewWrappedInput), "INPUT");
|
|
3149
|
+
(0, import_tiny_invariant2.default)(typeof output === "undefined" || pairs[pairs.length - 1].involvesToken(fewWrappedOutput), "OUTPUT");
|
|
3150
|
+
const path = [fewWrappedInput];
|
|
3151
|
+
for (const [i, pair] of pairs.entries()) {
|
|
3152
|
+
const currentInput = path[i];
|
|
3153
|
+
(0, import_tiny_invariant2.default)(currentInput.equals(pair.token0) || currentInput.equals(pair.token1), "PATH");
|
|
3154
|
+
const output2 = currentInput.equals(pair.token0) ? pair.token1 : pair.token0;
|
|
3155
|
+
path.push(output2);
|
|
3156
|
+
}
|
|
3157
|
+
this.pairs = pairs;
|
|
3158
|
+
this.path = path;
|
|
3159
|
+
this.input = input;
|
|
3160
|
+
this.output = output;
|
|
3161
|
+
} else {
|
|
3162
|
+
(0, import_tiny_invariant2.default)(pairs[0].involvesToken(wrappedInput), "INPUT");
|
|
3163
|
+
(0, import_tiny_invariant2.default)(typeof output === "undefined" || pairs[pairs.length - 1].involvesToken(output.wrapped), "OUTPUT");
|
|
3164
|
+
const path = [wrappedInput];
|
|
3165
|
+
for (const [i, pair] of pairs.entries()) {
|
|
3166
|
+
const currentInput = path[i];
|
|
3167
|
+
(0, import_tiny_invariant2.default)(currentInput.equals(pair.token0) || currentInput.equals(pair.token1), "PATH");
|
|
3168
|
+
const output2 = currentInput.equals(pair.token0) ? pair.token1 : pair.token0;
|
|
3169
|
+
path.push(output2);
|
|
3170
|
+
}
|
|
3171
|
+
this.pairs = pairs;
|
|
3172
|
+
this.path = path;
|
|
3173
|
+
this.input = input;
|
|
3174
|
+
this.output = output;
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
get midPrice() {
|
|
3178
|
+
if (this._midPrice !== null) return this._midPrice;
|
|
3179
|
+
const prices = [];
|
|
3180
|
+
for (const [i, pair] of this.pairs.entries()) {
|
|
3181
|
+
prices.push(
|
|
3182
|
+
this.path[i].equals(pair.token0) ? new import_sdk_core4.Price(pair.reserve0.currency, pair.reserve1.currency, pair.reserve0.quotient, pair.reserve1.quotient) : new import_sdk_core4.Price(pair.reserve1.currency, pair.reserve0.currency, pair.reserve1.quotient, pair.reserve0.quotient)
|
|
3183
|
+
);
|
|
3184
|
+
}
|
|
3185
|
+
const reduced = prices.slice(1).reduce((accumulator, currentValue) => accumulator.multiply(currentValue), prices[0]);
|
|
3186
|
+
return this._midPrice = new import_sdk_core4.Price(this.input, this.output, reduced.denominator, reduced.numerator);
|
|
3187
|
+
}
|
|
3188
|
+
get chainId() {
|
|
3189
|
+
return this.pairs[0].chainId;
|
|
3190
|
+
}
|
|
3191
|
+
};
|
|
3192
|
+
|
|
3193
|
+
// src/entities/trade.ts
|
|
3194
|
+
var import_sdk_core5 = require("@ring-protocol/sdk-core");
|
|
3195
|
+
var import_tiny_invariant3 = __toESM(require("tiny-invariant"));
|
|
3196
|
+
function inputOutputComparator(a, b) {
|
|
3197
|
+
(0, import_tiny_invariant3.default)(a.inputAmount.currency.equals(b.inputAmount.currency), "INPUT_CURRENCY");
|
|
3198
|
+
(0, import_tiny_invariant3.default)(a.outputAmount.currency.equals(b.outputAmount.currency), "OUTPUT_CURRENCY");
|
|
3199
|
+
if (a.outputAmount.equalTo(b.outputAmount)) {
|
|
3200
|
+
if (a.inputAmount.equalTo(b.inputAmount)) {
|
|
3201
|
+
return 0;
|
|
3202
|
+
}
|
|
3203
|
+
if (a.inputAmount.lessThan(b.inputAmount)) {
|
|
3204
|
+
return -1;
|
|
3205
|
+
} else {
|
|
3206
|
+
return 1;
|
|
3207
|
+
}
|
|
3208
|
+
} else {
|
|
3209
|
+
if (a.outputAmount.lessThan(b.outputAmount)) {
|
|
3210
|
+
return 1;
|
|
3211
|
+
} else {
|
|
3212
|
+
return -1;
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
function tradeComparator(a, b) {
|
|
3217
|
+
const ioComp = inputOutputComparator(a, b);
|
|
3218
|
+
if (ioComp !== 0) {
|
|
3219
|
+
return ioComp;
|
|
3220
|
+
}
|
|
3221
|
+
if (a.priceImpact.lessThan(b.priceImpact)) {
|
|
3222
|
+
return -1;
|
|
3223
|
+
} else if (a.priceImpact.greaterThan(b.priceImpact)) {
|
|
3224
|
+
return 1;
|
|
3225
|
+
}
|
|
3226
|
+
return a.route.path.length - b.route.path.length;
|
|
3227
|
+
}
|
|
3228
|
+
var Trade = class _Trade {
|
|
3229
|
+
/**
|
|
3230
|
+
* Constructs an exact in trade with the given amount in and route
|
|
3231
|
+
* @param route route of the exact in trade
|
|
3232
|
+
* @param amountIn the amount being passed in
|
|
3233
|
+
*/
|
|
3234
|
+
static exactIn(route, amountIn) {
|
|
3235
|
+
return new _Trade(route, amountIn, import_sdk_core5.TradeType.EXACT_INPUT);
|
|
3236
|
+
}
|
|
3237
|
+
/**
|
|
3238
|
+
* Constructs an exact out trade with the given amount out and route
|
|
3239
|
+
* @param route route of the exact out trade
|
|
3240
|
+
* @param amountOut the amount returned by the trade
|
|
3241
|
+
*/
|
|
3242
|
+
static exactOut(route, amountOut) {
|
|
3243
|
+
return new _Trade(route, amountOut, import_sdk_core5.TradeType.EXACT_OUTPUT);
|
|
3244
|
+
}
|
|
3245
|
+
constructor(route, amount, tradeType) {
|
|
3246
|
+
this.route = route;
|
|
3247
|
+
this.tradeType = tradeType;
|
|
3248
|
+
const tokenAmounts = new Array(route.path.length);
|
|
3249
|
+
const chainId = route.pairs[0].chainId;
|
|
3250
|
+
if (tradeType === import_sdk_core5.TradeType.EXACT_INPUT) {
|
|
3251
|
+
if (isFewToken(route.pairs[0].token0) || isFewToken(route.pairs[0].token1) || isFewToken(route.input.wrapped) || isFewToken(route.output.wrapped)) {
|
|
3252
|
+
(0, import_tiny_invariant3.default)(amount.currency.equals(route.input), "INPUT");
|
|
3253
|
+
const fewAmountToken = getFewTokenFromOriginalToken(amount.currency.wrapped, chainId);
|
|
3254
|
+
tokenAmounts[0] = import_sdk_core5.CurrencyAmount.fromFractionalAmount(fewAmountToken, amount.numerator, amount.denominator);
|
|
3255
|
+
for (let i = 0; i < route.path.length - 1; i++) {
|
|
3256
|
+
const pair = route.pairs[i];
|
|
3257
|
+
const [outputAmount] = pair.getOutputAmount(tokenAmounts[i]);
|
|
3258
|
+
tokenAmounts[i + 1] = outputAmount;
|
|
3259
|
+
}
|
|
3260
|
+
this.inputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(route.input, amount.numerator, amount.denominator);
|
|
3261
|
+
this.outputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(
|
|
3262
|
+
route.output,
|
|
3263
|
+
tokenAmounts[tokenAmounts.length - 1].numerator,
|
|
3264
|
+
tokenAmounts[tokenAmounts.length - 1].denominator
|
|
3265
|
+
);
|
|
3266
|
+
} else {
|
|
3267
|
+
(0, import_tiny_invariant3.default)(amount.currency.equals(route.input), "INPUT");
|
|
3268
|
+
tokenAmounts[0] = amount.wrapped;
|
|
3269
|
+
for (let i = 0; i < route.path.length - 1; i++) {
|
|
3270
|
+
const pair = route.pairs[i];
|
|
3271
|
+
const [outputAmount] = pair.getOutputAmount(tokenAmounts[i]);
|
|
3272
|
+
tokenAmounts[i + 1] = outputAmount;
|
|
3273
|
+
}
|
|
3274
|
+
this.inputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(route.input, amount.numerator, amount.denominator);
|
|
3275
|
+
this.outputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(
|
|
3276
|
+
route.output,
|
|
3277
|
+
tokenAmounts[tokenAmounts.length - 1].numerator,
|
|
3278
|
+
tokenAmounts[tokenAmounts.length - 1].denominator
|
|
3279
|
+
);
|
|
3280
|
+
}
|
|
3281
|
+
} else {
|
|
3282
|
+
if (isFewToken(route.pairs[0].token0) || isFewToken(route.pairs[0].token1) || isFewToken(route.input.wrapped) || isFewToken(route.output.wrapped)) {
|
|
3283
|
+
(0, import_tiny_invariant3.default)(amount.currency.equals(route.output), "OUTPUT");
|
|
3284
|
+
const fewAmountToken = getFewTokenFromOriginalToken(amount.currency.wrapped, chainId);
|
|
3285
|
+
tokenAmounts[tokenAmounts.length - 1] = import_sdk_core5.CurrencyAmount.fromFractionalAmount(
|
|
3286
|
+
fewAmountToken,
|
|
3287
|
+
amount.numerator,
|
|
3288
|
+
amount.denominator
|
|
3289
|
+
);
|
|
3290
|
+
for (let i = route.path.length - 1; i > 0; i--) {
|
|
3291
|
+
const pair = route.pairs[i - 1];
|
|
3292
|
+
const [inputAmount] = pair.getInputAmount(tokenAmounts[i]);
|
|
3293
|
+
tokenAmounts[i - 1] = inputAmount;
|
|
3294
|
+
}
|
|
3295
|
+
this.inputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(
|
|
3296
|
+
route.input,
|
|
3297
|
+
tokenAmounts[0].numerator,
|
|
3298
|
+
tokenAmounts[0].denominator
|
|
3299
|
+
);
|
|
3300
|
+
this.outputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(route.output, amount.numerator, amount.denominator);
|
|
3301
|
+
} else {
|
|
3302
|
+
(0, import_tiny_invariant3.default)(amount.currency.equals(route.output), "OUTPUT");
|
|
3303
|
+
tokenAmounts[tokenAmounts.length - 1] = amount.wrapped;
|
|
3304
|
+
for (let i = route.path.length - 1; i > 0; i--) {
|
|
3305
|
+
const pair = route.pairs[i - 1];
|
|
3306
|
+
const [inputAmount] = pair.getInputAmount(tokenAmounts[i]);
|
|
3307
|
+
tokenAmounts[i - 1] = inputAmount;
|
|
3308
|
+
}
|
|
3309
|
+
this.inputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(
|
|
3310
|
+
route.input,
|
|
3311
|
+
tokenAmounts[0].numerator,
|
|
3312
|
+
tokenAmounts[0].denominator
|
|
3313
|
+
);
|
|
3314
|
+
this.outputAmount = import_sdk_core5.CurrencyAmount.fromFractionalAmount(route.output, amount.numerator, amount.denominator);
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3317
|
+
this.executionPrice = new import_sdk_core5.Price(
|
|
3318
|
+
this.inputAmount.currency,
|
|
3319
|
+
this.outputAmount.currency,
|
|
3320
|
+
this.inputAmount.quotient,
|
|
3321
|
+
this.outputAmount.quotient
|
|
3322
|
+
);
|
|
3323
|
+
this.priceImpact = (0, import_sdk_core5.computePriceImpact)(route.midPrice, this.inputAmount, this.outputAmount);
|
|
3324
|
+
}
|
|
3325
|
+
/**
|
|
3326
|
+
* Get the minimum amount that must be received from this trade for the given slippage tolerance
|
|
3327
|
+
* @param slippageTolerance tolerance of unfavorable slippage from the execution price of this trade
|
|
3328
|
+
*/
|
|
3329
|
+
minimumAmountOut(slippageTolerance) {
|
|
3330
|
+
(0, import_tiny_invariant3.default)(!slippageTolerance.lessThan(ZERO), "SLIPPAGE_TOLERANCE");
|
|
3331
|
+
if (this.tradeType === import_sdk_core5.TradeType.EXACT_OUTPUT) {
|
|
3332
|
+
return this.outputAmount;
|
|
3333
|
+
} else {
|
|
3334
|
+
const slippageAdjustedAmountOut = new import_sdk_core5.Fraction(ONE).add(slippageTolerance).invert().multiply(this.outputAmount.quotient).quotient;
|
|
3335
|
+
return import_sdk_core5.CurrencyAmount.fromRawAmount(this.outputAmount.currency, slippageAdjustedAmountOut);
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
/**
|
|
3339
|
+
* Get the maximum amount in that can be spent via this trade for the given slippage tolerance
|
|
3340
|
+
* @param slippageTolerance tolerance of unfavorable slippage from the execution price of this trade
|
|
3341
|
+
*/
|
|
3342
|
+
maximumAmountIn(slippageTolerance) {
|
|
3343
|
+
(0, import_tiny_invariant3.default)(!slippageTolerance.lessThan(ZERO), "SLIPPAGE_TOLERANCE");
|
|
3344
|
+
if (this.tradeType === import_sdk_core5.TradeType.EXACT_INPUT) {
|
|
3345
|
+
return this.inputAmount;
|
|
3346
|
+
} else {
|
|
3347
|
+
const slippageAdjustedAmountIn = new import_sdk_core5.Fraction(ONE).add(slippageTolerance).multiply(this.inputAmount.quotient).quotient;
|
|
3348
|
+
return import_sdk_core5.CurrencyAmount.fromRawAmount(this.inputAmount.currency, slippageAdjustedAmountIn);
|
|
3349
|
+
}
|
|
3350
|
+
}
|
|
3351
|
+
/**
|
|
3352
|
+
* Given a list of pairs, and a fixed amount in, returns the top `maxNumResults` trades that go from an input token
|
|
3353
|
+
* amount to an output token, making at most `maxHops` hops.
|
|
3354
|
+
* Note this does not consider aggregation, as routes are linear. It's possible a better route exists by splitting
|
|
3355
|
+
* the amount in among multiple routes.
|
|
3356
|
+
* @param pairs the pairs to consider in finding the best trade
|
|
3357
|
+
* @param nextAmountIn exact amount of input currency to spend
|
|
3358
|
+
* @param currencyOut the desired currency out
|
|
3359
|
+
* @param maxNumResults maximum number of results to return
|
|
3360
|
+
* @param maxHops maximum number of hops a returned trade can make, e.g. 1 hop goes through a single pair
|
|
3361
|
+
* @param currentPairs used in recursion; the current list of pairs
|
|
3362
|
+
* @param currencyAmountIn used in recursion; the original value of the currencyAmountIn parameter
|
|
3363
|
+
* @param bestTrades used in recursion; the current list of best trades
|
|
3364
|
+
*/
|
|
3365
|
+
static bestTradeExactIn(pairs, currencyAmountIn, currencyOut, { maxNumResults = 3, maxHops = 3 } = {}, currentPairs = [], nextAmountIn = currencyAmountIn, bestTrades = []) {
|
|
3366
|
+
(0, import_tiny_invariant3.default)(pairs.length > 0, "PAIRS");
|
|
3367
|
+
(0, import_tiny_invariant3.default)(maxHops > 0, "MAX_HOPS");
|
|
3368
|
+
(0, import_tiny_invariant3.default)(currencyAmountIn === nextAmountIn || currentPairs.length > 0, "INVALID_RECURSION");
|
|
3369
|
+
const amountIn = nextAmountIn.wrapped;
|
|
3370
|
+
const tokenOut = currencyOut.wrapped;
|
|
3371
|
+
for (let i = 0; i < pairs.length; i++) {
|
|
3372
|
+
const pair = pairs[i];
|
|
3373
|
+
if (!pair.token0.equals(amountIn.currency) && !pair.token1.equals(amountIn.currency)) continue;
|
|
3374
|
+
if (pair.reserve0.equalTo(ZERO) || pair.reserve1.equalTo(ZERO)) continue;
|
|
3375
|
+
let amountOut;
|
|
3376
|
+
try {
|
|
3377
|
+
;
|
|
3378
|
+
[amountOut] = pair.getOutputAmount(amountIn);
|
|
3379
|
+
} catch (error) {
|
|
3380
|
+
if (error.isInsufficientInputAmountError) {
|
|
3381
|
+
continue;
|
|
3382
|
+
}
|
|
3383
|
+
throw error;
|
|
3384
|
+
}
|
|
3385
|
+
if (amountOut.currency.equals(tokenOut)) {
|
|
3386
|
+
(0, import_sdk_core5.sortedInsert)(
|
|
3387
|
+
bestTrades,
|
|
3388
|
+
new _Trade(
|
|
3389
|
+
new Route([...currentPairs, pair], currencyAmountIn.currency, currencyOut),
|
|
3390
|
+
currencyAmountIn,
|
|
3391
|
+
import_sdk_core5.TradeType.EXACT_INPUT
|
|
3392
|
+
),
|
|
3393
|
+
maxNumResults,
|
|
3394
|
+
tradeComparator
|
|
3395
|
+
);
|
|
3396
|
+
} else if (maxHops > 1 && pairs.length > 1) {
|
|
3397
|
+
const pairsExcludingThisPair = pairs.slice(0, i).concat(pairs.slice(i + 1, pairs.length));
|
|
3398
|
+
_Trade.bestTradeExactIn(
|
|
3399
|
+
pairsExcludingThisPair,
|
|
3400
|
+
currencyAmountIn,
|
|
3401
|
+
currencyOut,
|
|
3402
|
+
{
|
|
3403
|
+
maxNumResults,
|
|
3404
|
+
maxHops: maxHops - 1
|
|
3405
|
+
},
|
|
3406
|
+
[...currentPairs, pair],
|
|
3407
|
+
amountOut,
|
|
3408
|
+
bestTrades
|
|
3409
|
+
);
|
|
3410
|
+
}
|
|
3411
|
+
}
|
|
3412
|
+
return bestTrades;
|
|
3413
|
+
}
|
|
3414
|
+
/**
|
|
3415
|
+
* Return the execution price after accounting for slippage tolerance
|
|
3416
|
+
* @param slippageTolerance the allowed tolerated slippage
|
|
3417
|
+
*/
|
|
3418
|
+
worstExecutionPrice(slippageTolerance) {
|
|
3419
|
+
return new import_sdk_core5.Price(
|
|
3420
|
+
this.inputAmount.currency,
|
|
3421
|
+
this.outputAmount.currency,
|
|
3422
|
+
this.maximumAmountIn(slippageTolerance).quotient,
|
|
3423
|
+
this.minimumAmountOut(slippageTolerance).quotient
|
|
3424
|
+
);
|
|
3425
|
+
}
|
|
3426
|
+
/**
|
|
3427
|
+
* similar to the above method but instead targets a fixed output amount
|
|
3428
|
+
* given a list of pairs, and a fixed amount out, returns the top `maxNumResults` trades that go from an input token
|
|
3429
|
+
* to an output token amount, making at most `maxHops` hops
|
|
3430
|
+
* note this does not consider aggregation, as routes are linear. it's possible a better route exists by splitting
|
|
3431
|
+
* the amount in among multiple routes.
|
|
3432
|
+
* @param pairs the pairs to consider in finding the best trade
|
|
3433
|
+
* @param currencyIn the currency to spend
|
|
3434
|
+
* @param nextAmountOut the exact amount of currency out
|
|
3435
|
+
* @param maxNumResults maximum number of results to return
|
|
3436
|
+
* @param maxHops maximum number of hops a returned trade can make, e.g. 1 hop goes through a single pair
|
|
3437
|
+
* @param currentPairs used in recursion; the current list of pairs
|
|
3438
|
+
* @param currencyAmountOut used in recursion; the original value of the currencyAmountOut parameter
|
|
3439
|
+
* @param bestTrades used in recursion; the current list of best trades
|
|
3440
|
+
*/
|
|
3441
|
+
static bestTradeExactOut(pairs, currencyIn, currencyAmountOut, { maxNumResults = 3, maxHops = 3 } = {}, currentPairs = [], nextAmountOut = currencyAmountOut, bestTrades = []) {
|
|
3442
|
+
(0, import_tiny_invariant3.default)(pairs.length > 0, "PAIRS");
|
|
3443
|
+
(0, import_tiny_invariant3.default)(maxHops > 0, "MAX_HOPS");
|
|
3444
|
+
(0, import_tiny_invariant3.default)(currencyAmountOut === nextAmountOut || currentPairs.length > 0, "INVALID_RECURSION");
|
|
3445
|
+
const amountOut = nextAmountOut.wrapped;
|
|
3446
|
+
const tokenIn = currencyIn.wrapped;
|
|
3447
|
+
for (let i = 0; i < pairs.length; i++) {
|
|
3448
|
+
const pair = pairs[i];
|
|
3449
|
+
if (!pair.token0.equals(amountOut.currency) && !pair.token1.equals(amountOut.currency)) continue;
|
|
3450
|
+
if (pair.reserve0.equalTo(ZERO) || pair.reserve1.equalTo(ZERO)) continue;
|
|
3451
|
+
let amountIn;
|
|
3452
|
+
try {
|
|
3453
|
+
;
|
|
3454
|
+
[amountIn] = pair.getInputAmount(amountOut);
|
|
3455
|
+
} catch (error) {
|
|
3456
|
+
if (error.isInsufficientReservesError) {
|
|
3457
|
+
continue;
|
|
3458
|
+
}
|
|
3459
|
+
throw error;
|
|
3460
|
+
}
|
|
3461
|
+
if (amountIn.currency.equals(tokenIn)) {
|
|
3462
|
+
(0, import_sdk_core5.sortedInsert)(
|
|
3463
|
+
bestTrades,
|
|
3464
|
+
new _Trade(
|
|
3465
|
+
new Route([pair, ...currentPairs], currencyIn, currencyAmountOut.currency),
|
|
3466
|
+
currencyAmountOut,
|
|
3467
|
+
import_sdk_core5.TradeType.EXACT_OUTPUT
|
|
3468
|
+
),
|
|
3469
|
+
maxNumResults,
|
|
3470
|
+
tradeComparator
|
|
3471
|
+
);
|
|
3472
|
+
} else if (maxHops > 1 && pairs.length > 1) {
|
|
3473
|
+
const pairsExcludingThisPair = pairs.slice(0, i).concat(pairs.slice(i + 1, pairs.length));
|
|
3474
|
+
_Trade.bestTradeExactOut(
|
|
3475
|
+
pairsExcludingThisPair,
|
|
3476
|
+
currencyIn,
|
|
3477
|
+
currencyAmountOut,
|
|
3478
|
+
{
|
|
3479
|
+
maxNumResults,
|
|
3480
|
+
maxHops: maxHops - 1
|
|
3481
|
+
},
|
|
3482
|
+
[pair, ...currentPairs],
|
|
3483
|
+
amountIn,
|
|
3484
|
+
bestTrades
|
|
3485
|
+
);
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
return bestTrades;
|
|
3489
|
+
}
|
|
3490
|
+
};
|
|
3491
|
+
|
|
3492
|
+
// src/router.ts
|
|
3493
|
+
var import_sdk_core6 = require("@ring-protocol/sdk-core");
|
|
3494
|
+
var import_tiny_invariant4 = __toESM(require("tiny-invariant"));
|
|
3495
|
+
function toHex(currencyAmount) {
|
|
3496
|
+
return `0x${currencyAmount.quotient.toString(16)}`;
|
|
8
3497
|
}
|
|
3498
|
+
var ZERO_HEX = "0x0";
|
|
3499
|
+
var Router = class {
|
|
3500
|
+
/**
|
|
3501
|
+
* Cannot be constructed.
|
|
3502
|
+
*/
|
|
3503
|
+
constructor() {
|
|
3504
|
+
}
|
|
3505
|
+
/**
|
|
3506
|
+
* Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade.
|
|
3507
|
+
* @param trade to produce call parameters for
|
|
3508
|
+
* @param options options for the call parameters
|
|
3509
|
+
*/
|
|
3510
|
+
static swapCallParameters(trade, options) {
|
|
3511
|
+
const etherIn = trade.inputAmount.currency.isNative;
|
|
3512
|
+
const etherOut = trade.outputAmount.currency.isNative;
|
|
3513
|
+
(0, import_tiny_invariant4.default)(!(etherIn && etherOut), "ETHER_IN_OUT");
|
|
3514
|
+
(0, import_tiny_invariant4.default)(!("ttl" in options) || options.ttl > 0, "TTL");
|
|
3515
|
+
const to = (0, import_sdk_core6.validateAndParseAddress)(options.recipient);
|
|
3516
|
+
const amountIn = toHex(trade.maximumAmountIn(options.allowedSlippage));
|
|
3517
|
+
const amountOut = toHex(trade.minimumAmountOut(options.allowedSlippage));
|
|
3518
|
+
const path = trade.route.path.map((token) => token.address);
|
|
3519
|
+
const deadline = "ttl" in options ? `0x${(Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3) + options.ttl).toString(16)}` : `0x${options.deadline.toString(16)}`;
|
|
3520
|
+
const useFeeOnTransfer = Boolean(options.feeOnTransfer);
|
|
3521
|
+
let methodName;
|
|
3522
|
+
let args;
|
|
3523
|
+
let value;
|
|
3524
|
+
switch (trade.tradeType) {
|
|
3525
|
+
case import_sdk_core6.TradeType.EXACT_INPUT:
|
|
3526
|
+
if (etherIn) {
|
|
3527
|
+
methodName = useFeeOnTransfer ? "swapExactETHForTokensSupportingFeeOnTransferTokens" : "swapExactETHForTokens";
|
|
3528
|
+
args = [amountOut, path, to, deadline];
|
|
3529
|
+
value = amountIn;
|
|
3530
|
+
} else if (etherOut) {
|
|
3531
|
+
methodName = useFeeOnTransfer ? "swapExactTokensForETHSupportingFeeOnTransferTokens" : "swapExactTokensForETH";
|
|
3532
|
+
args = [amountIn, amountOut, path, to, deadline];
|
|
3533
|
+
value = ZERO_HEX;
|
|
3534
|
+
} else {
|
|
3535
|
+
methodName = useFeeOnTransfer ? "swapExactTokensForTokensSupportingFeeOnTransferTokens" : "swapExactTokensForTokens";
|
|
3536
|
+
args = [amountIn, amountOut, path, to, deadline];
|
|
3537
|
+
value = ZERO_HEX;
|
|
3538
|
+
}
|
|
3539
|
+
break;
|
|
3540
|
+
case import_sdk_core6.TradeType.EXACT_OUTPUT:
|
|
3541
|
+
(0, import_tiny_invariant4.default)(!useFeeOnTransfer, "EXACT_OUT_FOT");
|
|
3542
|
+
if (etherIn) {
|
|
3543
|
+
methodName = "swapETHForExactTokens";
|
|
3544
|
+
args = [amountOut, path, to, deadline];
|
|
3545
|
+
value = amountIn;
|
|
3546
|
+
} else if (etherOut) {
|
|
3547
|
+
methodName = "swapTokensForExactETH";
|
|
3548
|
+
args = [amountOut, amountIn, path, to, deadline];
|
|
3549
|
+
value = ZERO_HEX;
|
|
3550
|
+
} else {
|
|
3551
|
+
methodName = "swapTokensForExactTokens";
|
|
3552
|
+
args = [amountOut, amountIn, path, to, deadline];
|
|
3553
|
+
value = ZERO_HEX;
|
|
3554
|
+
}
|
|
3555
|
+
break;
|
|
3556
|
+
}
|
|
3557
|
+
return {
|
|
3558
|
+
methodName,
|
|
3559
|
+
args,
|
|
3560
|
+
value
|
|
3561
|
+
};
|
|
3562
|
+
}
|
|
3563
|
+
};
|
|
3564
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3565
|
+
0 && (module.exports = {
|
|
3566
|
+
FACTORY_ADDRESS_MAP,
|
|
3567
|
+
FEW_WRAPPED_TOKEN_BYTECODE,
|
|
3568
|
+
FEW_WRAPPED_TOKEN_FACTORY_ADDRESS,
|
|
3569
|
+
INIT_CODE_HASH,
|
|
3570
|
+
INIT_CODE_HASH_MAP,
|
|
3571
|
+
InsufficientInputAmountError,
|
|
3572
|
+
InsufficientReservesError,
|
|
3573
|
+
MINIMUM_LIQUIDITY,
|
|
3574
|
+
Pair,
|
|
3575
|
+
Route,
|
|
3576
|
+
Router,
|
|
3577
|
+
Trade,
|
|
3578
|
+
computePairAddress,
|
|
3579
|
+
getFewTokenAddress,
|
|
3580
|
+
getFewTokenFromOriginalToken,
|
|
3581
|
+
inputOutputComparator,
|
|
3582
|
+
isFewToken,
|
|
3583
|
+
tradeComparator
|
|
3584
|
+
});
|
|
3585
|
+
//# sourceMappingURL=index.js.map
|