@mint.club/v2-cli 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -24725,13 +24725,13 @@ var require_interface = __commonJS((exports) => {
24725
24725
  function Interface2(fragments) {
24726
24726
  var _newTarget = this.constructor;
24727
24727
  var _this = this;
24728
- var abi2 = [];
24728
+ var abi3 = [];
24729
24729
  if (typeof fragments === "string") {
24730
- abi2 = JSON.parse(fragments);
24730
+ abi3 = JSON.parse(fragments);
24731
24731
  } else {
24732
- abi2 = fragments;
24732
+ abi3 = fragments;
24733
24733
  }
24734
- (0, properties_1.defineReadOnly)(this, "fragments", abi2.map(function(fragment) {
24734
+ (0, properties_1.defineReadOnly)(this, "fragments", abi3.map(function(fragment) {
24735
24735
  return fragments_1.Fragment.from(fragment);
24736
24736
  }).filter(function(fragment) {
24737
24737
  return fragment != null;
@@ -24785,15 +24785,15 @@ var require_interface = __commonJS((exports) => {
24785
24785
  if (format === fragments_1.FormatTypes.sighash) {
24786
24786
  logger.throwArgumentError("interface does not support formatting sighash", "format", format);
24787
24787
  }
24788
- var abi2 = this.fragments.map(function(fragment) {
24788
+ var abi3 = this.fragments.map(function(fragment) {
24789
24789
  return fragment.format(format);
24790
24790
  });
24791
24791
  if (format === fragments_1.FormatTypes.json) {
24792
- return JSON.stringify(abi2.map(function(j) {
24792
+ return JSON.stringify(abi3.map(function(j) {
24793
24793
  return JSON.parse(j);
24794
24794
  }));
24795
24795
  }
24796
- return abi2;
24796
+ return abi3;
24797
24797
  };
24798
24798
  Interface2.getAbiCoder = function() {
24799
24799
  return abi_coder_1.defaultAbiCoder;
@@ -35589,14 +35589,14 @@ var require_lib24 = __commonJS((exports) => {
35589
35589
  if (typeof compilerOutput === "string") {
35590
35590
  compilerOutput = JSON.parse(compilerOutput);
35591
35591
  }
35592
- var abi2 = compilerOutput.abi;
35592
+ var abi3 = compilerOutput.abi;
35593
35593
  var bytecode = null;
35594
35594
  if (compilerOutput.bytecode) {
35595
35595
  bytecode = compilerOutput.bytecode;
35596
35596
  } else if (compilerOutput.evm && compilerOutput.evm.bytecode) {
35597
35597
  bytecode = compilerOutput.evm.bytecode;
35598
35598
  }
35599
- return new this(abi2, bytecode, signer);
35599
+ return new this(abi3, bytecode, signer);
35600
35600
  };
35601
35601
  ContractFactory2.getInterface = function(contractInterface) {
35602
35602
  return Contract.getInterface(contractInterface);
@@ -46487,7 +46487,7 @@ var require_json_rpc_provider = __commonJS((exports) => {
46487
46487
  exports.JsonRpcProvider = JsonRpcProvider;
46488
46488
  });
46489
46489
 
46490
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/constants.js
46490
+ // ../node_modules/ws/lib/constants.js
46491
46491
  var require_constants = __commonJS((exports, module) => {
46492
46492
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
46493
46493
  var hasBlob = typeof Blob !== "undefined";
@@ -46507,7 +46507,7 @@ var require_constants = __commonJS((exports, module) => {
46507
46507
  };
46508
46508
  });
46509
46509
 
46510
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/buffer-util.js
46510
+ // ../node_modules/ws/lib/buffer-util.js
46511
46511
  var require_buffer_util = __commonJS((exports, module) => {
46512
46512
  var { EMPTY_BUFFER } = require_constants();
46513
46513
  var FastBuffer = Buffer[Symbol.species];
@@ -46585,7 +46585,7 @@ var require_buffer_util = __commonJS((exports, module) => {
46585
46585
  }
46586
46586
  });
46587
46587
 
46588
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/limiter.js
46588
+ // ../node_modules/ws/lib/limiter.js
46589
46589
  var require_limiter = __commonJS((exports, module) => {
46590
46590
  var kDone = Symbol("kDone");
46591
46591
  var kRun = Symbol("kRun");
@@ -46617,7 +46617,7 @@ var require_limiter = __commonJS((exports, module) => {
46617
46617
  module.exports = Limiter;
46618
46618
  });
46619
46619
 
46620
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/permessage-deflate.js
46620
+ // ../node_modules/ws/lib/permessage-deflate.js
46621
46621
  var require_permessage_deflate = __commonJS((exports, module) => {
46622
46622
  var zlib = __require("zlib");
46623
46623
  var bufferUtil = require_buffer_util();
@@ -46881,7 +46881,7 @@ var require_permessage_deflate = __commonJS((exports, module) => {
46881
46881
  }
46882
46882
  });
46883
46883
 
46884
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/validation.js
46884
+ // ../node_modules/ws/lib/validation.js
46885
46885
  var require_validation = __commonJS((exports, module) => {
46886
46886
  var { isUtf8 } = __require("buffer");
46887
46887
  var { hasBlob } = require_constants();
@@ -47068,7 +47068,7 @@ var require_validation = __commonJS((exports, module) => {
47068
47068
  }
47069
47069
  });
47070
47070
 
47071
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/receiver.js
47071
+ // ../node_modules/ws/lib/receiver.js
47072
47072
  var require_receiver = __commonJS((exports, module) => {
47073
47073
  var { Writable } = __require("stream");
47074
47074
  var PerMessageDeflate = require_permessage_deflate();
@@ -47465,7 +47465,7 @@ var require_receiver = __commonJS((exports, module) => {
47465
47465
  module.exports = Receiver;
47466
47466
  });
47467
47467
 
47468
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/sender.js
47468
+ // ../node_modules/ws/lib/sender.js
47469
47469
  var require_sender = __commonJS((exports, module) => {
47470
47470
  var { Duplex } = __require("stream");
47471
47471
  var { randomFillSync } = __require("crypto");
@@ -47824,7 +47824,7 @@ var require_sender = __commonJS((exports, module) => {
47824
47824
  }
47825
47825
  });
47826
47826
 
47827
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/event-target.js
47827
+ // ../node_modules/ws/lib/event-target.js
47828
47828
  var require_event_target = __commonJS((exports, module) => {
47829
47829
  var { kForOnEventAttribute, kListener } = require_constants();
47830
47830
  var kCode = Symbol("kCode");
@@ -47975,7 +47975,7 @@ var require_event_target = __commonJS((exports, module) => {
47975
47975
  }
47976
47976
  });
47977
47977
 
47978
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/extension.js
47978
+ // ../node_modules/ws/lib/extension.js
47979
47979
  var require_extension = __commonJS((exports, module) => {
47980
47980
  var { tokenChars } = require_validation();
47981
47981
  function push(dest, name, elem) {
@@ -48140,7 +48140,7 @@ var require_extension = __commonJS((exports, module) => {
48140
48140
  module.exports = { format, parse: parse2 };
48141
48141
  });
48142
48142
 
48143
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/websocket.js
48143
+ // ../node_modules/ws/lib/websocket.js
48144
48144
  var require_websocket = __commonJS((exports, module) => {
48145
48145
  var EventEmitter = __require("events");
48146
48146
  var https = __require("https");
@@ -48912,7 +48912,7 @@ var require_websocket = __commonJS((exports, module) => {
48912
48912
  }
48913
48913
  });
48914
48914
 
48915
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/stream.js
48915
+ // ../node_modules/ws/lib/stream.js
48916
48916
  var require_stream = __commonJS((exports, module) => {
48917
48917
  var WebSocket = require_websocket();
48918
48918
  var { Duplex } = __require("stream");
@@ -49015,7 +49015,7 @@ var require_stream = __commonJS((exports, module) => {
49015
49015
  module.exports = createWebSocketStream;
49016
49016
  });
49017
49017
 
49018
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/subprotocol.js
49018
+ // ../node_modules/ws/lib/subprotocol.js
49019
49019
  var require_subprotocol = __commonJS((exports, module) => {
49020
49020
  var { tokenChars } = require_validation();
49021
49021
  function parse2(header) {
@@ -49060,7 +49060,7 @@ var require_subprotocol = __commonJS((exports, module) => {
49060
49060
  module.exports = { parse: parse2 };
49061
49061
  });
49062
49062
 
49063
- // ../node_modules/@ethersproject/providers/node_modules/ws/lib/websocket-server.js
49063
+ // ../node_modules/ws/lib/websocket-server.js
49064
49064
  var require_websocket_server = __commonJS((exports, module) => {
49065
49065
  var EventEmitter = __require("events");
49066
49066
  var http2 = __require("http");
@@ -49370,7 +49370,7 @@ var require_websocket_server = __commonJS((exports, module) => {
49370
49370
  }
49371
49371
  });
49372
49372
 
49373
- // ../node_modules/@ethersproject/providers/node_modules/ws/index.js
49373
+ // ../node_modules/ws/index.js
49374
49374
  var require_ws = __commonJS((exports, module) => {
49375
49375
  var createWebSocketStream = require_stream();
49376
49376
  var extension = require_extension();
@@ -65599,6 +65599,7 @@ function http(url, config = {}) {
65599
65599
  init_number();
65600
65600
  init_decodeAbiParameters();
65601
65601
  init_encodeAbiParameters();
65602
+ init_encodeFunctionData();
65602
65603
 
65603
65604
  // ../node_modules/viem/_esm/utils/abi/encodePacked.js
65604
65605
  init_abi();
@@ -67737,9 +67738,26 @@ var ERC20_ABI = [
67737
67738
  { type: "function", name: "decimals", stateMutability: "view", inputs: [], outputs: [{ type: "uint8" }] },
67738
67739
  { type: "function", name: "totalSupply", stateMutability: "view", inputs: [], outputs: [{ type: "uint256" }] },
67739
67740
  { type: "function", name: "balanceOf", stateMutability: "view", inputs: [{ name: "account", type: "address" }], outputs: [{ type: "uint256" }] },
67741
+ { type: "function", name: "transfer", stateMutability: "nonpayable", inputs: [{ name: "to", type: "address" }, { name: "amount", type: "uint256" }], outputs: [{ type: "bool" }] },
67740
67742
  { type: "function", name: "approve", stateMutability: "nonpayable", inputs: [{ name: "spender", type: "address" }, { name: "amount", type: "uint256" }], outputs: [{ type: "bool" }] }
67741
67743
  ];
67742
67744
 
67745
+ // src/utils/erc20-return.ts
67746
+ async function assertErc20CallSucceeds(client, account, token, data, operation) {
67747
+ const response = await client.call({ account, to: token, data });
67748
+ if (!response.data || response.data === "0x")
67749
+ return;
67750
+ let succeeded;
67751
+ try {
67752
+ [succeeded] = decodeAbiParameters([{ type: "bool" }], response.data);
67753
+ } catch {
67754
+ throw new Error(`ERC-20 ${operation} returned invalid data`);
67755
+ }
67756
+ if (!succeeded) {
67757
+ throw new Error(`ERC-20 ${operation} returned false`);
67758
+ }
67759
+ }
67760
+
67743
67761
  // src/utils/approve.ts
67744
67762
  var APPROVE_ABI = [
67745
67763
  ...ERC20_ABI,
@@ -67783,12 +67801,14 @@ async function waitForApproval(pub, hash3) {
67783
67801
  }
67784
67802
  }
67785
67803
  async function writeApproval(pub, wallet, token, spender, amount) {
67786
- const hash3 = await wallet.writeContract({
67804
+ const approval = {
67787
67805
  address: token,
67788
67806
  abi: APPROVE_ABI,
67789
67807
  functionName: "approve",
67790
67808
  args: [spender, amount]
67791
- });
67809
+ };
67810
+ await assertErc20CallSucceeds(pub, wallet.account.address, token, encodeFunctionData(approval), "approval");
67811
+ const hash3 = await wallet.writeContract(approval);
67792
67812
  await waitForApproval(pub, hash3);
67793
67813
  }
67794
67814
  async function ensureApproval(pub, wallet, token, spender, amount) {
@@ -68536,11 +68556,14 @@ var ERC1155_ABI = [
68536
68556
  }
68537
68557
  ];
68538
68558
  async function send(to, amount, privateKey, opts, chain = "base") {
68559
+ if (opts.tokenId !== undefined && (!opts.token || opts.token.toLowerCase() === ZERO_ADDRESS.toLowerCase())) {
68560
+ throw new Error("tokenId requires an ERC-1155 contract address");
68561
+ }
68539
68562
  const publicClient = getPublicClient(chain);
68540
68563
  const walletClient = getWalletClient(privateKey, chain);
68541
68564
  const account = walletClient.account;
68542
68565
  const chainName = CHAIN_CONFIGS[chain].chain.name;
68543
- if (opts.token && opts.tokenId) {
68566
+ if (opts.token && opts.tokenId !== undefined) {
68544
68567
  const tokenId = BigInt(opts.tokenId);
68545
68568
  const quantity = BigInt(amount);
68546
68569
  console.log(`\uD83D\uDCE6 Sending ${quantity} of ERC-1155 #${tokenId} (${shortAddr(opts.token)}) to ${shortAddr(to)} on ${chainName}...`);
@@ -68573,23 +68596,14 @@ async function send(to, amount, privateKey, opts, chain = "base") {
68573
68596
  ]);
68574
68597
  const value2 = parse(amount, decimals);
68575
68598
  console.log(`\uD83D\uDCB8 Sending ${amount} ${symbol} (${shortAddr(opts.token)}) to ${shortAddr(to)} on ${chainName}...`);
68576
- const hash4 = await walletClient.writeContract({
68599
+ const transfer2 = {
68577
68600
  address: opts.token,
68578
- abi: [
68579
- {
68580
- type: "function",
68581
- name: "transfer",
68582
- stateMutability: "nonpayable",
68583
- inputs: [
68584
- { name: "to", type: "address" },
68585
- { name: "amount", type: "uint256" }
68586
- ],
68587
- outputs: [{ type: "bool" }]
68588
- }
68589
- ],
68601
+ abi: ERC20_ABI,
68590
68602
  functionName: "transfer",
68591
68603
  args: [to, value2]
68592
- });
68604
+ };
68605
+ await assertErc20CallSucceeds(publicClient, account.address, opts.token, encodeFunctionData(transfer2), "transfer");
68606
+ const hash4 = await walletClient.writeContract(transfer2);
68593
68607
  console.log(` TX: ${shortHash(hash4)}`);
68594
68608
  console.log(` ${txUrl(hash4, chain)}`);
68595
68609
  const receipt2 = await publicClient.waitForTransactionReceipt({ hash: hash4 });
@@ -68819,18 +68833,6 @@ function savePrivateKey(key, envDir = ENV_DIR) {
68819
68833
  chmodSync(envPath, 384);
68820
68834
  }
68821
68835
  async function wallet(opts, chain = "base") {
68822
- if (opts.setPrivateKey) {
68823
- const key2 = opts.setPrivateKey.startsWith("0x") ? opts.setPrivateKey : `0x${opts.setPrivateKey}`;
68824
- const account2 = privateKeyToAccount(key2);
68825
- savePrivateKey(key2);
68826
- console.log(`✅ Private key saved!
68827
-
68828
- Address: ${account2.address}
68829
- Saved to: ~/.mintclub/.env
68830
- `);
68831
- printKeyWarning();
68832
- return;
68833
- }
68834
68836
  if (opts.generate) {
68835
68837
  if (existsSync2(ENV_PATH) && /^PRIVATE_KEY=.*$/m.test(readFileSync2(ENV_PATH, "utf-8"))) {
68836
68838
  throw new Error("PRIVATE_KEY already exists in ~/.mintclub/.env. Delete it manually if you want to generate a new one.");
@@ -70030,881 +70032,136 @@ function sqrt(value) {
70030
70032
  return z;
70031
70033
  }
70032
70034
  // ../node_modules/@uniswap/universal-router/artifacts/contracts/UniversalRouter.sol/UniversalRouter.json
70033
- var UniversalRouter_default = {
70034
- _format: "hh-sol-artifact-1",
70035
- contractName: "UniversalRouter",
70036
- sourceName: "contracts/UniversalRouter.sol",
70037
- abi: [
70038
- {
70039
- inputs: [
70040
- {
70041
- components: [
70042
- {
70043
- internalType: "address",
70044
- name: "permit2",
70045
- type: "address"
70046
- },
70047
- {
70048
- internalType: "address",
70049
- name: "weth9",
70050
- type: "address"
70051
- },
70052
- {
70053
- internalType: "address",
70054
- name: "v2Factory",
70055
- type: "address"
70056
- },
70057
- {
70058
- internalType: "address",
70059
- name: "v3Factory",
70060
- type: "address"
70061
- },
70062
- {
70063
- internalType: "bytes32",
70064
- name: "pairInitCodeHash",
70065
- type: "bytes32"
70066
- },
70067
- {
70068
- internalType: "bytes32",
70069
- name: "poolInitCodeHash",
70070
- type: "bytes32"
70071
- },
70072
- {
70073
- internalType: "address",
70074
- name: "v4PoolManager",
70075
- type: "address"
70076
- },
70077
- {
70078
- internalType: "address",
70079
- name: "v3NFTPositionManager",
70080
- type: "address"
70081
- },
70082
- {
70083
- internalType: "address",
70084
- name: "v4PositionManager",
70085
- type: "address"
70086
- },
70087
- {
70088
- internalType: "address",
70089
- name: "spokePool",
70090
- type: "address"
70091
- }
70092
- ],
70093
- internalType: "struct RouterParameters",
70094
- name: "params",
70095
- type: "tuple"
70096
- }
70097
- ],
70098
- stateMutability: "nonpayable",
70099
- type: "constructor"
70100
- },
70101
- {
70102
- inputs: [
70103
- {
70104
- internalType: "address",
70105
- name: "target",
70106
- type: "address"
70107
- }
70108
- ],
70109
- name: "AddressEmptyCode",
70110
- type: "error"
70111
- },
70112
- {
70113
- inputs: [
70114
- {
70115
- internalType: "address",
70116
- name: "account",
70117
- type: "address"
70118
- }
70119
- ],
70120
- name: "AddressInsufficientBalance",
70121
- type: "error"
70122
- },
70123
- {
70124
- inputs: [],
70125
- name: "BalanceTooLow",
70126
- type: "error"
70127
- },
70128
- {
70129
- inputs: [],
70130
- name: "ContractLocked",
70131
- type: "error"
70132
- },
70133
- {
70134
- inputs: [
70135
- {
70136
- internalType: "Currency",
70137
- name: "currency",
70138
- type: "address"
70139
- }
70140
- ],
70141
- name: "DeltaNotNegative",
70142
- type: "error"
70143
- },
70144
- {
70145
- inputs: [
70146
- {
70147
- internalType: "Currency",
70148
- name: "currency",
70149
- type: "address"
70150
- }
70151
- ],
70152
- name: "DeltaNotPositive",
70153
- type: "error"
70154
- },
70155
- {
70156
- inputs: [],
70157
- name: "ECDSAInvalidSignature",
70158
- type: "error"
70159
- },
70160
- {
70161
- inputs: [
70162
- {
70163
- internalType: "uint256",
70164
- name: "length",
70165
- type: "uint256"
70166
- }
70167
- ],
70168
- name: "ECDSAInvalidSignatureLength",
70169
- type: "error"
70170
- },
70171
- {
70172
- inputs: [
70173
- {
70174
- internalType: "bytes32",
70175
- name: "s",
70176
- type: "bytes32"
70177
- }
70178
- ],
70179
- name: "ECDSAInvalidSignatureS",
70180
- type: "error"
70181
- },
70182
- {
70183
- inputs: [],
70184
- name: "ETHNotAccepted",
70185
- type: "error"
70186
- },
70187
- {
70188
- inputs: [
70189
- {
70190
- internalType: "uint256",
70191
- name: "commandIndex",
70192
- type: "uint256"
70193
- },
70194
- {
70195
- internalType: "bytes",
70196
- name: "message",
70197
- type: "bytes"
70198
- }
70199
- ],
70200
- name: "ExecutionFailed",
70201
- type: "error"
70202
- },
70203
- {
70204
- inputs: [],
70205
- name: "FailedInnerCall",
70206
- type: "error"
70207
- },
70208
- {
70209
- inputs: [],
70210
- name: "FromAddressIsNotOwner",
70211
- type: "error"
70212
- },
70213
- {
70214
- inputs: [],
70215
- name: "InputLengthMismatch",
70216
- type: "error"
70217
- },
70218
- {
70219
- inputs: [],
70220
- name: "InsufficientBalance",
70221
- type: "error"
70222
- },
70223
- {
70224
- inputs: [],
70225
- name: "InsufficientETH",
70226
- type: "error"
70227
- },
70228
- {
70229
- inputs: [],
70230
- name: "InsufficientToken",
70231
- type: "error"
70232
- },
70233
- {
70234
- inputs: [
70235
- {
70236
- internalType: "bytes4",
70237
- name: "action",
70238
- type: "bytes4"
70239
- }
70240
- ],
70241
- name: "InvalidAction",
70242
- type: "error"
70243
- },
70244
- {
70245
- inputs: [],
70246
- name: "InvalidBips",
70247
- type: "error"
70248
- },
70249
- {
70250
- inputs: [
70251
- {
70252
- internalType: "uint256",
70253
- name: "commandType",
70254
- type: "uint256"
70255
- }
70256
- ],
70257
- name: "InvalidCommandType",
70258
- type: "error"
70259
- },
70260
- {
70261
- inputs: [],
70262
- name: "InvalidEthSender",
70263
- type: "error"
70264
- },
70265
- {
70266
- inputs: [],
70267
- name: "InvalidHopSlippageLength",
70268
- type: "error"
70269
- },
70270
- {
70271
- inputs: [],
70272
- name: "InvalidPath",
70273
- type: "error"
70274
- },
70275
- {
70276
- inputs: [],
70277
- name: "InvalidReserves",
70278
- type: "error"
70279
- },
70280
- {
70281
- inputs: [],
70282
- name: "InvalidShortString",
70283
- type: "error"
70284
- },
70285
- {
70286
- inputs: [],
70287
- name: "LengthMismatch",
70288
- type: "error"
70289
- },
70290
- {
70291
- inputs: [],
70292
- name: "NonceAlreadyUsed",
70293
- type: "error"
70294
- },
70295
- {
70296
- inputs: [
70297
- {
70298
- internalType: "uint256",
70299
- name: "tokenId",
70300
- type: "uint256"
70301
- }
70302
- ],
70303
- name: "NotAuthorizedForToken",
70304
- type: "error"
70305
- },
70306
- {
70307
- inputs: [],
70308
- name: "NotPoolManager",
70309
- type: "error"
70310
- },
70311
- {
70312
- inputs: [],
70313
- name: "OnlyMintAllowed",
70314
- type: "error"
70315
- },
70316
- {
70317
- inputs: [
70318
- {
70319
- internalType: "address",
70320
- name: "token",
70321
- type: "address"
70322
- }
70323
- ],
70324
- name: "SafeERC20FailedOperation",
70325
- type: "error"
70326
- },
70327
- {
70328
- inputs: [],
70329
- name: "SliceOutOfBounds",
70330
- type: "error"
70331
- },
70332
- {
70333
- inputs: [
70334
- {
70335
- internalType: "string",
70336
- name: "str",
70337
- type: "string"
70338
- }
70339
- ],
70340
- name: "StringTooLong",
70341
- type: "error"
70342
- },
70343
- {
70344
- inputs: [],
70345
- name: "TransactionDeadlinePassed",
70346
- type: "error"
70347
- },
70348
- {
70349
- inputs: [],
70350
- name: "UnsafeCast",
70351
- type: "error"
70352
- },
70353
- {
70354
- inputs: [
70355
- {
70356
- internalType: "uint256",
70357
- name: "action",
70358
- type: "uint256"
70359
- }
70360
- ],
70361
- name: "UnsupportedAction",
70362
- type: "error"
70363
- },
70364
- {
70365
- inputs: [],
70366
- name: "V2InvalidPath",
70367
- type: "error"
70368
- },
70369
- {
70370
- inputs: [],
70371
- name: "V2TooLittleReceived",
70372
- type: "error"
70373
- },
70374
- {
70375
- inputs: [],
70376
- name: "V2TooMuchRequested",
70377
- type: "error"
70378
- },
70379
- {
70380
- inputs: [],
70381
- name: "V3InvalidAmountOut",
70382
- type: "error"
70383
- },
70384
- {
70385
- inputs: [],
70386
- name: "V3InvalidCaller",
70387
- type: "error"
70388
- },
70389
- {
70390
- inputs: [],
70391
- name: "V3InvalidSwap",
70392
- type: "error"
70393
- },
70394
- {
70395
- inputs: [],
70396
- name: "V3TooLittleReceived",
70397
- type: "error"
70398
- },
70399
- {
70400
- inputs: [],
70401
- name: "V3TooMuchRequested",
70402
- type: "error"
70403
- },
70404
- {
70405
- inputs: [
70406
- {
70407
- internalType: "uint256",
70408
- name: "minAmountOutReceived",
70409
- type: "uint256"
70410
- },
70411
- {
70412
- internalType: "uint256",
70413
- name: "amountReceived",
70414
- type: "uint256"
70415
- }
70416
- ],
70417
- name: "V4TooLittleReceived",
70418
- type: "error"
70419
- },
70420
- {
70421
- inputs: [
70422
- {
70423
- internalType: "uint256",
70424
- name: "hopIndex",
70425
- type: "uint256"
70426
- },
70427
- {
70428
- internalType: "uint256",
70429
- name: "maxPrice",
70430
- type: "uint256"
70431
- },
70432
- {
70433
- internalType: "uint256",
70434
- name: "price",
70435
- type: "uint256"
70436
- }
70437
- ],
70438
- name: "V4TooLittleReceivedPerHop",
70439
- type: "error"
70440
- },
70441
- {
70442
- inputs: [
70443
- {
70444
- internalType: "uint256",
70445
- name: "maxAmountInRequested",
70446
- type: "uint256"
70447
- },
70448
- {
70449
- internalType: "uint256",
70450
- name: "amountRequested",
70451
- type: "uint256"
70452
- }
70453
- ],
70454
- name: "V4TooMuchRequested",
70455
- type: "error"
70456
- },
70457
- {
70458
- inputs: [
70459
- {
70460
- internalType: "uint256",
70461
- name: "hopIndex",
70462
- type: "uint256"
70463
- },
70464
- {
70465
- internalType: "uint256",
70466
- name: "maxPrice",
70467
- type: "uint256"
70468
- },
70469
- {
70470
- internalType: "uint256",
70471
- name: "price",
70472
- type: "uint256"
70473
- }
70474
- ],
70475
- name: "V4TooMuchRequestedPerHop",
70476
- type: "error"
70477
- },
70478
- {
70479
- anonymous: false,
70480
- inputs: [],
70481
- name: "EIP712DomainChanged",
70482
- type: "event"
70483
- },
70484
- {
70485
- inputs: [],
70486
- name: "SPOKE_POOL",
70487
- outputs: [
70488
- {
70489
- internalType: "contract IV3SpokePool",
70490
- name: "",
70491
- type: "address"
70492
- }
70493
- ],
70494
- stateMutability: "view",
70495
- type: "function"
70496
- },
70497
- {
70498
- inputs: [],
70499
- name: "V3_POSITION_MANAGER",
70500
- outputs: [
70501
- {
70502
- internalType: "contract INonfungiblePositionManager",
70503
- name: "",
70504
- type: "address"
70505
- }
70506
- ],
70507
- stateMutability: "view",
70508
- type: "function"
70509
- },
70510
- {
70511
- inputs: [],
70512
- name: "V4_POSITION_MANAGER",
70513
- outputs: [
70514
- {
70515
- internalType: "contract IPositionManager",
70516
- name: "",
70517
- type: "address"
70518
- }
70519
- ],
70520
- stateMutability: "view",
70521
- type: "function"
70522
- },
70523
- {
70524
- inputs: [],
70525
- name: "eip712Domain",
70526
- outputs: [
70527
- {
70528
- internalType: "bytes1",
70529
- name: "fields",
70530
- type: "bytes1"
70531
- },
70532
- {
70533
- internalType: "string",
70534
- name: "name",
70535
- type: "string"
70536
- },
70537
- {
70538
- internalType: "string",
70539
- name: "version",
70540
- type: "string"
70541
- },
70542
- {
70543
- internalType: "uint256",
70544
- name: "chainId",
70545
- type: "uint256"
70546
- },
70547
- {
70548
- internalType: "address",
70549
- name: "verifyingContract",
70550
- type: "address"
70551
- },
70552
- {
70553
- internalType: "bytes32",
70554
- name: "salt",
70555
- type: "bytes32"
70556
- },
70557
- {
70558
- internalType: "uint256[]",
70559
- name: "extensions",
70560
- type: "uint256[]"
70561
- }
70562
- ],
70563
- stateMutability: "view",
70564
- type: "function"
70565
- },
70566
- {
70567
- inputs: [
70568
- {
70569
- internalType: "bytes",
70570
- name: "commands",
70571
- type: "bytes"
70572
- },
70573
- {
70574
- internalType: "bytes[]",
70575
- name: "inputs",
70576
- type: "bytes[]"
70577
- }
70578
- ],
70579
- name: "execute",
70580
- outputs: [],
70581
- stateMutability: "payable",
70582
- type: "function"
70583
- },
70584
- {
70585
- inputs: [
70586
- {
70587
- internalType: "bytes",
70588
- name: "commands",
70589
- type: "bytes"
70590
- },
70591
- {
70592
- internalType: "bytes[]",
70593
- name: "inputs",
70594
- type: "bytes[]"
70595
- },
70596
- {
70597
- internalType: "uint256",
70598
- name: "deadline",
70599
- type: "uint256"
70600
- }
70601
- ],
70602
- name: "execute",
70603
- outputs: [],
70604
- stateMutability: "payable",
70605
- type: "function"
70606
- },
70607
- {
70608
- inputs: [
70609
- {
70610
- internalType: "bytes",
70611
- name: "commands",
70612
- type: "bytes"
70613
- },
70614
- {
70615
- internalType: "bytes[]",
70616
- name: "inputs",
70617
- type: "bytes[]"
70618
- },
70619
- {
70620
- internalType: "bytes32",
70621
- name: "intent",
70622
- type: "bytes32"
70623
- },
70624
- {
70625
- internalType: "bytes32",
70626
- name: "data",
70627
- type: "bytes32"
70628
- },
70629
- {
70630
- internalType: "bool",
70631
- name: "verifySender",
70632
- type: "bool"
70633
- },
70634
- {
70635
- internalType: "bytes32",
70636
- name: "nonce",
70637
- type: "bytes32"
70638
- },
70639
- {
70640
- internalType: "bytes",
70641
- name: "signature",
70642
- type: "bytes"
70643
- },
70644
- {
70645
- internalType: "uint256",
70646
- name: "deadline",
70647
- type: "uint256"
70648
- }
70649
- ],
70650
- name: "executeSigned",
70651
- outputs: [],
70652
- stateMutability: "payable",
70653
- type: "function"
70654
- },
70655
- {
70656
- inputs: [],
70657
- name: "msgSender",
70658
- outputs: [
70659
- {
70660
- internalType: "address",
70661
- name: "",
70662
- type: "address"
70663
- }
70664
- ],
70665
- stateMutability: "view",
70666
- type: "function"
70667
- },
70668
- {
70669
- inputs: [
70670
- {
70671
- internalType: "address",
70672
- name: "user",
70673
- type: "address"
70674
- },
70675
- {
70676
- internalType: "bytes32",
70677
- name: "nonce",
70678
- type: "bytes32"
70679
- }
70680
- ],
70681
- name: "noncesUsed",
70682
- outputs: [
70683
- {
70684
- internalType: "bool",
70685
- name: "used",
70686
- type: "bool"
70687
- }
70688
- ],
70689
- stateMutability: "view",
70690
- type: "function"
70691
- },
70692
- {
70693
- inputs: [],
70694
- name: "poolManager",
70695
- outputs: [
70696
- {
70697
- internalType: "contract IPoolManager",
70698
- name: "",
70699
- type: "address"
70700
- }
70701
- ],
70702
- stateMutability: "view",
70703
- type: "function"
70704
- },
70705
- {
70706
- inputs: [],
70707
- name: "signedRouteContext",
70708
- outputs: [
70709
- {
70710
- internalType: "address",
70711
- name: "signer",
70712
- type: "address"
70713
- },
70714
- {
70715
- internalType: "bytes32",
70716
- name: "intent",
70717
- type: "bytes32"
70718
- },
70719
- {
70720
- internalType: "bytes32",
70721
- name: "data",
70722
- type: "bytes32"
70723
- }
70724
- ],
70725
- stateMutability: "view",
70726
- type: "function"
70727
- },
70728
- {
70729
- inputs: [
70730
- {
70731
- internalType: "int256",
70732
- name: "amount0Delta",
70733
- type: "int256"
70734
- },
70735
- {
70736
- internalType: "int256",
70737
- name: "amount1Delta",
70738
- type: "int256"
70739
- },
70740
- {
70741
- internalType: "bytes",
70742
- name: "data",
70743
- type: "bytes"
70744
- }
70745
- ],
70746
- name: "uniswapV3SwapCallback",
70747
- outputs: [],
70748
- stateMutability: "nonpayable",
70749
- type: "function"
70750
- },
70751
- {
70752
- inputs: [
70753
- {
70754
- internalType: "bytes",
70755
- name: "data",
70756
- type: "bytes"
70757
- }
70758
- ],
70759
- name: "unlockCallback",
70760
- outputs: [
70761
- {
70762
- internalType: "bytes",
70763
- name: "",
70764
- type: "bytes"
70765
- }
70766
- ],
70767
- stateMutability: "nonpayable",
70768
- type: "function"
70769
- },
70770
- {
70771
- stateMutability: "payable",
70772
- type: "receive"
70773
- }
70774
- ],
70775
- bytecode: "0x6102a080604052346104145761014081614f5e80380380916100218285610433565b833981010312610414576040519061014082016001600160401b038111838210176104005760405261005281610456565b825261006060208201610456565b6020830190815261007360408301610456565b906040840191825261008760608401610456565b91606085019283526080840151946080810195865260a08501519360a082019485526100b560c08701610456565b9660c083019788526100c960e08801610456565b958660e08501526100f16101206100e36101008b01610456565b998a61010088015201610456565b98896101208601526040519761010689610418565b6001600160a01b03908116895298891660208901908152905194519651604051919991979082169695821695911661013d88610418565b8752602087019586525192519151905160405190936001600160a01b039384169316608082016001600160401b0381118382101761040057604052815260208101928352604081019182526060810193845260405161019d604082610433565b600f815260208101906e2ab734bb32b939b0b62937baba32b960891b8252604051916101ca604084610433565b600183526020830191601960f91b83526101e38161046a565b610120526101f084610600565b61014052519020918260e05251902080610100524660a0526040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815261025960c082610433565b5190206080523060c052516001600160a01b0390811661016052905161018052905181166101a05290516101c0526101e09190915290518116610200529051811661022052905181166102405290518116610260521661028052604051614825908161073982396080518161367a015260a05181613737015260c05181613644015260e051816136c9015261010051816136ef015261012051816105130152610140518161053c0152610160518181816114f4015281816116ac01526134400152610180518181816114d3015281816116ce015261341f01526101a05181612b7601526101c05181612b5401526101e0518181816066015281816103090152818161043d01528181611e71015281816122670152818161404b015281816140a4015281816141630152818161429601526145a1015261020051818181601d015281816119b90152611adb01526102205181818161120501528181611c790152612ec601526102405181818161060801528181611f66015261200901526102605181818161037f015261230401526102805181818161064c0152818161262901526127120152f35b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b604081019081106001600160401b0382111761040057604052565b601f909101601f19168101906001600160401b0382119082101761040057604052565b51906001600160a01b038216820361041457565b908151602081105f146104e4575090601f8151116104a4576020815191015160208210610495571790565b5f198260200360031b1b161790565b604460209160405192839163305a27a960e01b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fd5b6001600160401b038111610400575f54600181811c911680156105f6575b60208210146105e257601f81116105b0575b50602092601f821160011461055157928192935f92610546575b50508160011b915f199060031b1c1916175f5560ff90565b015190505f8061052e565b601f198216935f8052805f20915f5b8681106105985750836001959610610580575b505050811b015f5560ff90565b01515f1960f88460031b161c191690555f8080610573565b91926020600181928685015181550194019201610560565b5f8052601f60205f20910160051c810190601f830160051c015b8181106105d75750610514565b5f81556001016105ca565b634e487b7160e01b5f52602260045260245ffd5b90607f1690610502565b908151602081105f1461062b575090601f8151116104a4576020815191015160208210610495571790565b6001600160401b03811161040057600154600181811c9116801561072e575b60208210146105e257601f81116106fb575b50602092601f821160011461069a57928192935f9261068f575b50508160011b915f199060031b1c19161760015560ff90565b015190505f80610676565b601f1982169360015f52805f20915f5b8681106106e357508360019596106106cb575b505050811b0160015560ff90565b01515f1960f88460031b161c191690555f80806106bd565b919260206001819286850151815501940192016106aa565b60015f52601f60205f20910160051c810190601f830160051c015b818110610723575061065c565b5f8155600101610716565b90607f169061064a56fe60c0806040526004361015610095575b50361561001a575f80fd5b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141580610062575b61005357005b631c5deabb60e11b5f5260045ffd5b50337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141561004d565b5f3560e01c9081631a27b20114610b345750806324856bc314610aad5780633593564c14610a0257806344684dc31461067b5780638021fef714610637578063817122dc146105f357806384b0196e146104fb57806391dd73461461040b578063d04d79a2146103ae578063d0c9f6cb1461036a578063d737d0c714610338578063dc4c90d3146102f45763fa461e3314610130575f61000f565b34610265576060366003190112610265576024356004356044356001600160401b03811161026557610166903690600401610b91565b5f8313918215806102ea575b6102db57818101604082820312610265578135906001600160401b0382116102655761019f91830161294d565b5060208101356001600160a01b0381169290839003610265576101c191612a68565b90601790602b83106102cc578035968760601c956101ef62ffffff8585013560601c9a60481c168a89612af1565b336001600160a01b03909116036102bd57156102b357508685105b156102205750505061021e93503391612bce565b005b91935091939482602b0180602b1161029f578410610269575082821161026557918190039101600160ff1b8410156102655761021e93610260339161296b565b612c20565b5f80fd5b925050505f805160206147998339815191529291925c82116102905761021e923391612bce565b6339cedf2960e11b5f5260045ffd5b634e487b7160e01b5f52601160045260245ffd5b955084871061020a565b6332b13d9160e01b5f5260045ffd5b633b99b53d60e01b5f5260045ffd5b63316cf0eb60e01b5f5260045ffd5b505f851315610172565b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610265575f366003190112610265576040516001600160a01b035f805160206147798339815191525c168152602090f35b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610265575f36600319011261026557604080516001600160a01b035f805160206147f98339815191525c1681525f805160206147b98339815191525c60208201525f805160206147d98339815191525c91810191909152606090f35b34610265576020366003190112610265576004356001600160401b0381116102655761043b903690600401610b91565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036104ec5761047491613143565b908183036104dd575f5b8381106104b1576104ad6040516104966020826128c2565b5f8152604051918291602083526020830190610bee565b0390f35b806104d76104c26001938789610c12565b3560f81c6104d1838787610c50565b9161380b565b0161047e565b63aaad13f760e01b5f5260045ffd5b63570c108560e11b5f5260045ffd5b34610265575f366003190112610265576105976105377f0000000000000000000000000000000000000000000000000000000000000000612f50565b6105607f0000000000000000000000000000000000000000000000000000000000000000613073565b60206105a56040519261057383856128c2565b5f84525f368137604051958695600f60f81b875260e08588015260e0870190610bee565b908582036040870152610bee565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b8281106105dc57505050500390f35b8351855286955093810193928101926001016105cd565b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b610100366003190112610265576004356001600160401b038111610265576106a7903690600401610b91565b6024356001600160401b038111610265576106c6903690600401610bbe565b9160443560843580151581036102655760c4356001600160401b038111610265576106f5903690600401610b91565b9160e4358042116109f35790889161070c896128e5565b61071960405191826128c2565b8981526107258a6128e5565b6020820190601f19013682375f5b8b811061099a5750604051915160208301929183915f5b81811061098157505050936108399693604293836107796108429b99956108339903601f1981018352826128c2565b51902091156109775761079033935b8c3691612917565b60208151910120926040519260208401947f4b503a2e339bf072a489301f3eec7abaefc520266c462796ed9267bbcc6e407c8652604085015260608401528a608084015260643560a084015260018060a01b031660c083015260a43560e08301526101008201526101008152610808610120826128c2565b519020610813613641565b906040519161190160f01b83526002830152602282015220923691612917565b9061375d565b90929192613797565b600160a43501610919575b5f805160206147f98339815191525d5f805160206147b98339815191525d6064355f805160206147d98339815191525d33301461090b575f805160206147798339815191525c6001600160a01b03166108fc576108b993335f805160206147798339815191525d610c6b565b5f5f805160206147798339815191525d5b5f5f805160206147f98339815191525d5f5f805160206147b98339815191525d5f5f805160206147d98339815191525d005b6337affdbf60e11b5f5260045ffd5b61091493610c6b565b6108ca565b60018060a01b038116805f52600260205260405f2060a4355f5260205260ff60405f205416610969575f52600260205260405f2060a4355f5260205260405f20600160ff1982541617905561084d565b623f613760e71b5f5260045ffd5b6107905f93610788565b825184528f98506020938401939092019160010161074a565b9091929394506109b56109ae828d8d610c50565b3691612917565b602081519101209083518110156109df5760019160208260051b8601015201908b94939291610733565b634e487b7160e01b5f52603260045260245ffd5b632dfb7c8b60e11b5f5260045ffd5b6060366003190112610265576004356001600160401b03811161026557610a2d903690600401610b91565b6024356001600160401b03811161026557610a4c903690600401610bbe565b9160443542116109f357333014610aa4575f805160206147798339815191525c6001600160a01b03166108fc57610a9293335f805160206147798339815191525d610c6b565b5f5f805160206147798339815191525d005b61021e93610c6b565b6040366003190112610265576004356001600160401b03811161026557610ad8903690600401610b91565b6024356001600160401b03811161026557610af7903690600401610bbe565b91333014610aa4575f805160206147798339815191525c6001600160a01b03166108fc57610a9293335f805160206147798339815191525d610c6b565b34610265576040366003190112610265576004356001600160a01b0381169190829003610265576020915f526002825260405f206024355f52825260ff60405f20541615158152f35b35906001600160a01b038216820361026557565b9181601f84011215610265578235916001600160401b038311610265576020838186019501011161026557565b9181601f84011215610265578235916001600160401b038311610265576020808501948460051b01011161026557565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b908210156109df570190565b903590601e198136030182121561026557018035906001600160401b0382116102655760200191813603831361026557565b908210156109df57610c679160051b810190610c1e565b9091565b90939284810361289857919293905f925b828410610c8a575050505050565b610c9a8484849596979894610c12565b3593610ca7868389610c50565b919093606098607f8860f81c1696600197602181105f14612389576010811015611e2b5760088110156114525780610fe05750610ce960208801359588612a90565b909690608089013515610fd9575f805160206147798339815191525c975b610d118a35612da5565b9891806080528160a05288600160ff1b14610f64575b50505b604296602b9190600160ff1b811015610265576080518911610f5d5730915b608051841161026557610db8936040925f60a0513595610dd68760601c97610d8f601760a051013560601c998a81109a62ffffff60018060a01b039460481c1691612af1565b1694888414610f42576401000276a4965b88519a8b928a6020850152606084019060a05161297b565b6001600160a01b03919091168983015203601f1981018a52896128c2565b8551630251596160e31b81526001600160a01b039182166004820152602481018890526044810193909352909316606482015260a0608482015294859283918290610e259060a4830190610bee565b03925af1908115610f37575f905f92610efb575b610e49935015610ef4575061296b565b608051909611610e76573060805160171161026557601760a051016017608051039060a052608052610d2a565b969198939a9460409198939a965091013511610ee5575b159081610ed6575b50610ea857506001019293949190610c7c565b90610ed2604051928392632c4029e960e01b84526004840152604060248401526044830190610bee565b0390fd5b600160ff1b161590505f610e95565b631ce9aa4b60e11b5f5260045ffd5b905061296b565b9150506040823d8211610f2f575b81610f16604093836128c2565b8101031261026557816020610e49935191015191610e39565b3d9150610f09565b6040513d5f823e3d90fd5b73fffd8963efd1fc6a506488495d951d5263988d2596610da0565b8991610d49565b601491929850106102cc576020602491604051928380926370a0823160e01b82523060048301523560601c5afa908115610f37575f91610fa8575b50955f80610d27565b90506020813d8211610fd1575b81610fc2602093836128c2565b8101031261026557515f610f9f565b3d9150610fb5565b3097610d07565b6001819c969299949b9798939a959c145f146110ab57509061100760208201359282612a90565b6080830135156110a4575f805160206147798339815191525c915b604061102e8535612da5565b9401355f805160206147998339815191525d600160ff1b85101561026557611059936102608661296b565b90919015611095575061106b9061296b565b03611086575f5f805160206147998339815191525d5b610e8d565b636a70124760e11b5f5260045ffd5b61109f915061296b565b61106b565b3091611022565b600281036110e2575061108191604081013591505f805160206147798339815191525c6110db6020830135612da5565b9135612ec2565b9394919390929060038103611269575050508135820163ffffffff60208401351683019163ffffffff8335169360208085019486010191011061125c57604051632a2d80d160e01b602082019081526001600160a01b035f805160206147798339815191525c1660248301526060604483015293909260e4840192803536829003601e190181121561026557810160208101949035906001600160401b038211610265578160071b360386136102655781906060608489015252610104860194905f905b80821061123e57505050936111f25f969482946112009460408a9960018060a01b036111d460208301610b7d565b1660a4880152013560c486015284830360231901606486015261297b565b03601f1981018352826128c2565b5190827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b91610e8d565b909195608080826112516001948b612a0a565b0197019201906111a6565b633b99b53d5f526004601cfd5b919493909250906004810361136757506112866020820135612da5565b906001600160a01b0360408201358116913516806112d35750479081106112c457806112b4575b5050610e8d565b6112bd916131fa565b5f806112ad565b631a84bc4160e21b5f5260045ffd5b91604051916370a0823160e01b8352306004840152602083602481875afa928315610f37575f93611334575b5082106113255781611314575b505050610e8d565b61131d926135d2565b5f808061130c565b630ceb95c760e31b5f5260045ffd5b9092506020813d821161135f575b8161134f602093836128c2565b810103126102655751915f6112ff565b3d9150611342565b6005810361138e5750806040611081920135906113876020820135612da5565b9035612e27565b6006810361144057506040810135906113aa6020820135612da5565b90356001600160a01b0316806113ce57506113c861108192476135a9565b906131fa565b906040516370a0823160e01b8152306004820152602081602481865afa908115610f37575f9161140d575b5061108193611407916135a9565b916135d2565b90506020813d8211611438575b81611427602093836128c2565b8101031261026557516110816113f9565b3d915061141a565b636bb50f4f60e11b5f5260045260245ffd5b6008819c969299949b9798939a959c145f14611671575061147860208301359183612d6d565b9060808401351561166a575f805160206147798339815191525c915b61149e8535612da5565b9282156109df576114ae82612d91565b83600110156109df576114d0611518916114ca60208601612d91565b90613f48565b907f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000613f5f565b948581611650575b5050505f19820182811161029f576001600160a01b039061154b90611546908585612e0a565b612d91565b1693604051926370a0823160e01b845260018060a01b038516928360048601526020856024818a5afa948515610f37575f95611613575b509461159292916020959661328e565b6024604051809581936370a0823160e01b835260048301525afa918215610f37575f926115df575b5060406115ca9293013592612e1a565b1015610e8d57631093d5f360e31b5f5260045ffd5b91506020823d821161160b575b816115f9602093836128c2565b810103126102655790519060406115ba565b3d91506115ec565b92919450946020833d8211611648575b81611630602093836128c2565b81010312610265579151919491939091611592611582565b3d9150611623565b6116629261165d85612d91565b612bce565b5f8085611520565b3091611494565b600981036118bd57506116849082612d6d565b6080830135156118b6575f805160206147798339815191525c915b6116a98435612da5565b917f0000000000000000000000000000000000000000000000000000000000000000937f0000000000000000000000000000000000000000000000000000000000000000955f95600285106118a7576020820135975f19860186811161029f579190825b61174a5750505060400135861161173b5782156109df5761108195856117369261165d85612d91565b61328e565b6345585e0b60e11b5f5260045ffd5b90919897505f1989019789891161029f5761176c61154661178e9a8989612e0a565b61178361177d6115468d8b8b612e0a565b82613f48565b8185879d939d613f5f565b604051630240bc6b60e21b815290916060826004816001600160a01b0387165afa918215610f37575f905f93611873575b506001600160701b039283169c9216916001600160a01b0391821691160361186d5799905b9980158015611865575b61185657826117fc91613578565b916103e88302928084046103e8149015171561029f5761181b91612e1a565b6103e58102908082046103e5149015171561029f576118399161358b565b6001810180911161029f5798801561029f575f190191908261170d565b633dce448b60e11b5f5260045ffd5b5081156117ee565b906117e4565b905061189791925060603d81116118a0575b61188f81836128c2565b810190613258565b5091905f6117bf565b503d611885565b6320db826760e01b5f5260045ffd5b309161169f565b93949193909290600a810361197a5750505063ffffffff60c08301351682019063ffffffff823516908360208085019484010191011061125c576040516302b67b5760e41b602082019081526001600160a01b035f805160206147798339815191525c1660248301525f94859491936112009284926111f2929060a0906119476044870182612a0a565b600180831b0361195960808301610b7d565b1660c4870152013560e485015261010061010485015261012484019161297b565b91949390929091600b8103611ab057505061199a60208201359135612da5565b81600160ff1b8103611a9a57504791505b816119b7575050610e8d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691823b1561026557604051630d0e30db60e41b81525f8160048185885af18015610f3757611a8a575b50306001600160a01b03831603611a22575b506112ad565b611a46926020925f60405180968195829463a9059cbb60e01b845260048401612def565b03925af18015610f3757611a5c575b8080611a1c565b611a7c9060203d8111611a83575b611a7481836128c2565b810190612dd7565b505f611a55565b503d611a6a565b5f611a94916128c2565b5f611a0a565b4710156119ab57631a84bc4160e21b5f5260045ffd5b600c8103611bcf575050611ac48135612da5565b6040516370a0823160e01b815230600482015290917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602083602481855afa928315610f37575f93611b9b575b506020013582106112c45781611b3357505050610e8d565b803b15610265575f8091602460405180948193632e1a7d4d60e01b83528760048401525af18015610f3757611b8b575b50306001600160a01b03831603611b7b575b8061130c565b611b84916131fa565b5f80611b75565b5f611b95916128c2565b5f611b63565b9092506020813d8211611bc7575b81611bb6602093836128c2565b810103126102655751916020611b1b565b3d9150611ba9565b600d819c939c9b929597989b99949699145f14611d7257508a358b0198893594611c016020808d019e8d030187612bc1565b116102cc576001600160a01b035f805160206147798339815191525c169a935f5b86811015611c62578c6001600160a01b03611c45600784901b8f01602001612d91565b1603611c5357600101611c22565b63e700287760e01b5f5260045ffd5b50989593979694929b919a50985060018060a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b1561026557604051630d58b1db60e01b8152602060048201526024810184905292839160448301915f905b808210611cfc5750505091815f81819503925af18015610f3757611cec575b50610e8d565b5f611cf6916128c2565b5f611ce6565b9193509160019060809081906001600160a01b03611d1988610b7d565b168152838060a01b03611d2e60208901610b7d565b166020820152838060a01b03611d4660408901610b7d565b166040820152838060a01b03611d5e60608901610b7d565b166060820152019401920185939291611cc7565b80929b93989550600e919a97969450145f1461144057506040516370a0823160e01b81526001600160a01b038235811660048301529091906020908390602490829084860135165afa918215610f37575f92611df7575b5060400135111580611081576040516351940b3960e11b6020820152600481529092506112386024826128c2565b9091506020813d8211611e23575b81611e12602093836128c2565b810103126102655751906040611dc9565b3d9150611e05565b6010819c969299949b9798939a959c145f14611f2057506040516348c8949160e01b815260206004820152915f9183918291611e6c9160248401919061297b565b0381837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af18015610f3757611eab5750610e8d565b3d805f833e611eba81836128c2565b810190602081830312610265578051906001600160401b038211610265570181601f82011215610265578051611eef816128fc565b92611efd60405194856128c2565b81845260208284010111610265575f928160208094018483015e0101525f611ce6565b80929495506011919350145f14611fab57509080356001600160e01b03191663853d008560e01b8101611f995750815f92918392604051928392833781018381520390827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b63f801e52560e01b5f5260045260245ffd5b601281036121a957505f805160206147798339815191525c9180356001600160e01b031916630624e65f60e11b81148015612199575b8015612189575b15611f9957506040516331a9108f60e11b81526004828101359082018190527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316949091602081602481895afa908115610f37575f9161216b575b506001600160a01b0391821691168181149182156120ff575b82156120a6575b505015612094575091815f809481946040519384928337810182815203925af19061123861299b565b63bb25d4c560e01b5f5260045260245ffd5b60405163e985e9c560e01b8152600481019290925260248201529050602081604481885afa908115610f37575f916120e1575b505f8061206b565b6120f9915060203d8111611a8357611a7481836128c2565b5f6120d9565b915060405163020604bf60e21b81528360048201526020816024818a5afa8015610f375783915f9161213d575b506001600160a01b03161491612064565b61215e915060203d8111612164575b61215681836128c2565b8101906131db565b5f61212c565b503d61214c565b612183915060203d81116121645761215681836128c2565b5f61204b565b50630852cd8d60e31b8114611fe8565b5063fc6f786560e01b8114611fe1565b6013810361229a57505060405163313b65df60e11b602082019081525f928392906001600160a01b036121db82610b7d565b1660248301526001600160a01b036121f560208301610b7d565b16604483015262ffffff61220b604083016129ca565b16606483015261221d606082016129da565b60020b60848301526001600160a01b0361223960808301610b7d565b1660a483015260a001356001600160a01b031660c480830191909152815261226260e4826128c2565b5190827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b60148103611440575081356001600160e01b0319166322b9af7160e01b8101611f99575080600411610265576122e06122da600319830160048501612a68565b90612a68565b5f5b818110612337575050505f9182914791816040519283928337810184815203917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b612342818385610c12565b3560f81c801590811561237e575b8115612373575b50612364576001016122e2565b635d1d0f9f60e01b5f5260045ffd5b60039150145f612357565b600181149150612350565b9097939a6040829b9798939a96949b105f146124975750602181036114405750906123b391613143565b6123dd6040959395519460208601966324856bc360e01b885260406024880152606487019161297b565b92602319858503016044860152818452602084019160208160051b86010194845f90601e19813603015b84831061243d575050505050505050918161242e5f9493859403601f1981018352826128c2565b519082305af19061123861299b565b9091929394959697601f19858203018852883582811215610265578301602081019190356001600160401b0381116102655780360383136102655761248760209283928b9561297b565b9a01980196959493019190612407565b94939290604081036114405750810190602081830312610265578035906001600160401b0382116102655701906101a08282031261026557604051906101a082016001600160401b03811183821017612884576040526124f683610b7d565b825261250460208401610b7d565b906020830191825261251860408501610b7d565b6040840190815261252a888601610b7d565b92888501938452608085016080870135815260a086019660a0810135885260c087019460c0820135865261256060e08301610b7d565b60e089019081526125746101008401612d5c565b6101008a019081526125896101208501612d5c565b916101208b0192835261259f6101408601612d5c565b6101408c01908152936101608601356001600160401b03811161026557610180916125cb91880161294d565b956101608d0196875201359586151590818803610265576101808d0197885251965f91600160ff1b8914612802575b5051156126f1575085985b9a519651975199519b519a51905191519251935194516001600160a01b039c8d169c7f000000000000000000000000000000000000000000000000000000000000000081169c9b81169b9981169998811698919763ffffffff9788169796871696909516949316928c3b15610265576040519d8e9c8d9b8c9b633dc9c91960e11b8d5260048d015260248c015260448b015260648a0152608489015260a488015260c487015260e48601526101048501526101248401526101448301526101648201610180905261018482016126da91610bee565b03915a945f95f18015610f3757611cec5750610e8d565b885160405163095ea7b360e01b60208201908152929b926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169316905f90819061275a8561274c8f8960248401612def565b03601f1981018752866128c2565b84519082855af161276961299b565b816127d3575b50806127c9575b15612784575b505050612605565b6127bc6127c1936040519063095ea7b360e01b602083015260248201525f6044820152604481526127b66064826128c2565b82613edd565b613edd565b5f808061277c565b50803b1515612776565b80518015925082156127e8575b50505f61276f565b6127fb9250602080918301019101612dd7565b5f806127e0565b909750156128135747965b5f6125fa565b88516040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa908115610f37575f91612853575b509661280d565b90506020813d821161287c575b8161286d602093836128c2565b8101031261026557515f61284c565b3d9150612860565b634e487b7160e01b5f52604160045260245ffd5b631fec674760e31b5f5260045ffd5b60a081019081106001600160401b0382111761288457604052565b601f909101601f19168101906001600160401b0382119082101761288457604052565b6001600160401b0381116128845760051b60200190565b6001600160401b03811161288457601f01601f191660200190565b929192612923826128fc565b9161293160405193846128c2565b829481845281830111610265578281602093845f960137010152565b9080601f830112156102655781602061296893359101612917565b90565b600160ff1b811461029f575f0390565b908060209392818452848401375f828201840152601f01601f1916010190565b3d156129c5573d906129ac826128fc565b916129ba60405193846128c2565b82523d5f602084013e565b606090565b359062ffffff8216820361026557565b35908160020b820361026557565b90816020910312610265575190565b359065ffffffffffff8216820361026557565b60609065ffffffffffff90612a629083906001600160a01b03612a2c82610b7d565b1686526001600160a01b03612a4360208301610b7d565b16602087015283612a56604083016129f7565b166040870152016129f7565b16910152565b909163ffffffff82351682019263ffffffff8435169260208086019585010191011061125c57565b909163ffffffff60608301351682019263ffffffff8435169260208086019585010191011061125c57565b6001600160f81b0319815260609190911b6001600160601b03191660018201526015810191909152603581019190915260550190565b916001600160a01b0382811690841611612bb9575b604080516001600160a01b0394851660208201908152949093169083015262ffffff166060808301919091528152612b3f6080826128c2565b51902060405190612ba982612b9b60208201937f0000000000000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000086612abb565b03601f1981018452836128c2565b905190206001600160a01b031690565b909190612b06565b9190820180921161029f57565b909291906001600160a01b0384163003612bee57612bec9350612e27565b565b91926001600160a01b038411612c1157612bec936001600160a01b031692612ec2565b63c4bd89a960e01b5f5260045ffd5b9092602b81106102cc57825f6040943595612cf38760601c93612cab601782013560601c99612c64878c1097889c62ffffff60018060a01b039460481c1691612af1565b1696868614612d41576401000276a49b5b612c8d8b519485938d6020860152606085019161297b565b6001600160a01b03919091168b83015203601f1981018352826128c2565b8751998a9788968795630251596160e31b875260018060a01b031660048701526024860152604485015260018060a01b0316606484015260a0608484015260a4830190610bee565b03925af18015610f37575f925f91612d0a57509192565b9250506040823d604011612d39575b81612d26604093836128c2565b8101031261026557602082519201519192565b3d9150612d19565b73fffd8963efd1fc6a506488495d951d5263988d259b612c75565b359063ffffffff8216820361026557565b916060830135830191612d8a602084359581860195030185612bc1565b116102cc57565b356001600160a01b03811681036102655790565b6001600160a01b03811660018103612dcb5750505f805160206147798339815191525c90565b60020361296857503090565b90816020910312610265575180151581036102655790565b6001600160a01b039091168152602081019190915260400190565b91908110156109df5760051b0190565b9190820391821161029f57565b9091906001600160a01b031680612e425750612bec916131fa565b600160ff1b8214612e58575b91612bec926135d2565b6040516370a0823160e01b815230600482015292909150602083602481855afa8015610f37575f90612e8e575b90925090612e4e565b506020833d602011612eba575b81612ea8602093836128c2565b8101031261026557612bec9251612e85565b3d9150612e9b565b91907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b1561026557604051631b63c28b60e11b81526001600160a01b039182166004820152928116602484015293841660448301529190921660648301525f908290608490829084905af18015610f3757612f465750565b5f612bec916128c2565b60ff8114612f965760ff811690601f8211612f875760405191612f746040846128c2565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b506040515f80548060011c9160018216918215613069575b6020841083146130555783855284929081156130365750600114612fd9575b612968925003826128c2565b505f80805290917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b81831061301a57505090602061296892820101612fcd565b6020919350806001915483858801015201910190918392613002565b6020925061296894915060ff191682840152151560051b820101612fcd565b634e487b7160e01b5f52602260045260245ffd5b92607f1692612fae565b60ff81146130975760ff811690601f8211612f875760405191612f746040846128c2565b506040515f6001548060011c9160018216918215613139575b60208410831461305557838552849290811561303657506001146130da57612968925003826128c2565b5060015f90815290917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b81831061311d57505090602061296892820101612fcd565b6020919350806001915483858801015201910190918392613105565b92607f16926130b0565b604081351891606082019363ffffffff6040840135169363ffffffe0601f8601169060608201602086013518179084019260608401359463ffffffff861694641fffffffe0608082019760051b1680915f925b8084106131ae57506080925001019101101761125c57565b90916020809163ffffffe0601f60808089890101359b848d18179b88010135011601019301929190613196565b9081602091031261026557516001600160a01b03811681036102655790565b5f80809381935af11561320957565b60405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606490fd5b51906001600160701b038216820361026557565b908160609103126102655761326c81613244565b91604061327b60208401613244565b92015163ffffffff811681036102655790565b91600282106135695781156109df576132a683612d91565b82600110156109df576132c2906114ca60208697959601612d91565b506001198401945f198501945f9460209392869290915b8884106132ec5750505050505050505050565b6132fa611546858486612e0a565b61330b611546600187018587612e0a565b604051630240bc6b60e21b81526001600160a01b03909316969092916060836004818b5afa928315610f375789905f905f95613542575b506001600160a01b03928316939092168314936024926001600160701b03918216929116851561353c5791935b604051938480926370a0823160e01b82528d60048301525afa918215610f37575f9261350d575b5080820392811592838015613505575b61185657826103e586029586046103e5149114171561029f576133c99084613578565b916103e882029182046103e814171561029f576133ef926133e991612bc1565b9061358b565b90156134fe575f90915b8b8610156134f5579061341a613464926114ca61154660028a01888a612e0a565b8193917f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000613f5f565b915b96604051906134758a836128c2565b5f82528b368b840137803b15610265576134c9945f80946040519788958694859363022c0d9f60e01b85526004850152602484015260018060a01b0389166044840152608060648401526084830190610bee565b03925af1918215610f37576001926134e5575b509301926132d9565b5f6134ef916128c2565b5f6134dc565b5087905f613466565b5f916133f9565b5081156133a6565b9091508981813d8311613535575b61352581836128c2565b810103126102655751905f613396565b503d61351b565b9361336f565b602493929550613560915060603d81116118a05761188f81836128c2565b50949192613342565b632b94ab4360e21b5f5260045ffd5b8181029291811591840414171561029f57565b8115613595570490565b634e487b7160e01b5f52601260045260245ffd5b61271082116135c357612710916135bf91613578565b0490565b636f5500f360e11b5f5260045ffd5b5f91826044926020956040519363a9059cbb60e01b8552600485015260248401525af13d15601f3d1160015f51141617161561360a57565b60405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606490fd5b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480613734575b1561369c577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261372e60c0826128c2565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614613673565b815191906041830361378d576137869250602082015190606060408401519301515f1a90613fb4565b9192909190565b50505f9160029190565b60048110156137f757806137a9575050565b600181036137c05763f645eedf60e01b5f5260045ffd5b600281036137db575063fce698f760e01b5f5260045260245ffd5b6003146137e55750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b929190600b841015613d7657600784036139ea5761382a929350614385565b60208101906138398282614393565b5f9391508061384784612d91565b92613854606086016142fb565b6001600160801b038116156139d3575b60408601916138738388614393565b8015159586925090826139c8575b50506139b9575f9591949395945b8486106138ed575050505050505060800160018060801b036138b0826142fb565b6001600160801b03909316921682106138c7575050565b6138d0906142fb565b638b063d7360e01b5f5260018060801b031660045260245260445ffd5b86985061394261393d6139186139118961390b878e9d9b9c9d614393565b906143c8565b958661463c565b6001600160801b03909416936139316080880188610c1e565b929091865f03916144cc565b614704565b98613960575b5060016139558993612d91565b96019493959161388f565b61397e906001600160801b038a1690670de0b6b3a76400000261358b565b6139928761398c868b614393565b90612e0a565b358082116139a05750613948565b8763a9b7edf760e01b5f5260045260245260445260645ffd5b63947446a560e01b5f5260045ffd5b14159050855f613881565b506139e56139e085614044565b6144a8565b613864565b60068403613ac5576139fd9293506142ec565b613a0960c082016142fb565b6001600160801b03811615613a74575b613a6161393d60e092613a40613a3160a0870161430f565b916001600160801b031661296b565b90613a4f610100870187610c1e565b929091613a5c368961431c565b6144cc565b91016001600160801b036138b0826142fb565b50613a8160a0820161430f565b15613aab5760e0613a6161393d613aa26139e0613a9d86612d91565b614044565b92505050613a19565b60e0613a6161393d613aa26139e0613a9d60208701612d91565b60098403613c8057613ad8929350614385565b6020810190613ae78282614393565b5f939150613af7606084016142fb565b90613b0184612d91565b916001600160801b03811615613c6e575b604085019082613b228388614393565b801515958692509082613c63575b50506139b95792949390835b613b965750505050505060800160018060801b03613b59826142fb565b6001600160801b0390931692168211613b70575050565b613b79906142fb565b6312bacdd360e01b5f5260018060801b031660045260245260445ffd5b85975061391190613bf0613be6613bc2613bb4898c9b999a9b614393565b5f198b0196918791906143c8565b6001600160801b039094169384613bdc6080890189610c1e565b93909215906144cc565b600f0b5f036144a8565b98613c10575b5050613c028791612d91565b9294935f1901929083613b3c565b613c2d906001600160801b038a16670de0b6b3a76400000261358b565b90613c3c8161398c868b614393565b3590818311613c4b5750613bf6565b63e651804360e01b5f5260045260245260445260645ffd5b14159050815f613b30565b50613c7b6139e08361428f565b613b12565b60088414613c9e575050505b635cda29d760e01b5f5260045260245ffd5b613ca99293506142ec565b613cb560c082016142fb565b6001600160801b03811615613d1e575b613d0b6139e0613d0360e093613cdd60a0870161430f565b90613cec610100880188610c1e565b9290916001600160801b031690613a5c368a61431c565b600f0b61296b565b91016001600160801b03613b59826142fb565b50613d2b60a0820161430f565b15613d5c5760e0613d0b6139e0613d03613d526139e0613d4d60208801612d91565b61428f565b9350505050613cc5565b60e0613d0b6139e0613d03613d526139e0613d4d87612d91565b92600c8103613dce5750613d8a919261427c565b90613d948161428f565b91808311613db7575090612bec915f805160206147798339815191525c90614159565b90506312bacdd360e01b5f5260045260245260445ffd5b600f8103613e255750613de1919261427c565b90613deb81614044565b91808310613e0e575090612bec915f805160206147798339815191525c9061409b565b9050638b063d7360e01b5f5260045260245260445ffd5b600b8103613e6b5750613e3c90612bec929361402c565b15613e6057613e5a825f805160206147798339815191525c92614134565b91614159565b613e5a823092614134565b600e8103613e9e5750613e92613e88613e9892612bec949561402c565b9282949291612da5565b92614120565b9161409b565b9260108414613eaf57505050613c8c565b612bec929350613ec5613ece92613e989261402c565b92919390612da5565b91613ed884614044565b6135a9565b5f80613f059260018060a01b03169360208151910182865af1613efe61299b565b908361471a565b8051908115159182613f2d575b5050613f1b5750565b635274afe760e01b5f5260045260245ffd5b613f409250602080918301019101612dd7565b155f80613f12565b6001600160a01b038281169082161015610c675791565b6040516001600160601b0319606094851b8116602083019081529590941b90931660348401526028835290929091612ba99190613f9d6048826128c2565b519020612b9b604051948592602084019586612abb565b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038411614021579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15610f37575f516001600160a01b0381161561401757905f905f90565b505f906001905f90565b5050505f9160039190565b9060601161125c578035916040602083013592013590565b61406f81307f00000000000000000000000000000000000000000000000000000000000000006143ea565b905f821261407b575090565b634c085bf160e01b5f9081526001600160a01b0391909116600452602490fd5b90821561411b577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b1561026557604051630b0d9c0960e01b81526001600160a01b03938416600482015291909216602482015260448101929092525f908290606490829084905af18015610f3757612f465750565b505050565b9081614130576129689150614044565b5090565b90600160ff1b820361414a576129689150614466565b8161413057612968915061428f565b5f918315614276577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691823b1561026557604051632961046560e21b81526001600160a01b0390911660048201819052905f8160248183885af18015610f3757614261575b508061422d575050602090600460405180958193630476982d60e21b83525af190811561422157506141f65750565b6142179060203d60201161421a575b61420f81836128c2565b8101906129e8565b50565b503d614205565b604051903d90823e3d90fd5b8394836020949361423d93612bce565b600460405180958193630476982d60e21b83525af190811561422157506141f65750565b61426e9194505f906128c2565b5f925f6141c7565b50505050565b919060401161125c576020823592013590565b6142ba81307f00000000000000000000000000000000000000000000000000000000000000006143ea565b905f82136142cc57506129689061296b565b63019a8d9360e51b5f9081526001600160a01b0391909116600452602490fd5b906101401161125c5780350190565b356001600160801b03811681036102655790565b3580151581036102655790565b91908260a091031261026557604051614334816128a7565b608061438081839561434581610b7d565b855261435360208201610b7d565b6020860152614364604082016129ca565b6040860152614375606082016129da565b606086015201610b7d565b910152565b9060a01161125c5780350190565b903590601e198136030182121561026557018035906001600160401b03821161026557602001918160051b3603831361026557565b91908110156109df5760051b81013590609e1981360301821215610265570190565b6001600160a01b039182165f9081529282166020908152604093849020935163789add5560e11b815260048101949094529183916024918391165afa908115610f37575f91614437575090565b90506020813d60201161445e575b81614452602093836128c2565b81010312610265575190565b3d9150614445565b6001600160a01b03168061447957504790565b6020602491604051928380926370a0823160e01b82523060048301525afa908115610f37575f91614437575090565b6001600160801b03811691908290036144bd57565b6393dafdf160e01b5f5260045ffd5b93928115614621576401000276a4945b6040519160608301906001600160401b0382118483101761288457604091825293151580845260208481018781526001600160a01b03998a168685019081528451633cf3645360e21b815286518c166004820152868401518c1660248201529486015162ffffff166044860152606086015160020b60648601526080909501518a1660848501529451151560a4840152935160c4830152915190961660e48701526101206101048701529390918591829161459c9161012484019161297b565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1928315610f37575f936145ed575b505f13036145e757600f0b90565b60801d90565b9092506020813d602011614619575b81614609602093836128c2565b810103126102655751915f6145d9565b3d91506145fc565b73fffd8963efd1fc6a506488495d951d5263988d25946144dc565b905f608060405161464c816128a7565b828152826020820152826040820152826060820152015261466c82612d91565b6001600160a01b0382811692908216808410156146fa57505b6001600160a01b031691821492602081013562ffffff811690819003610265576040820135918260020b80930361026557606001359260018060a01b03841680940361026557604051946146d8866128a7565b85526001600160a01b0316602085015260408401526060830152608082015291565b9150508190614685565b5f81600f0b126144bd576001600160801b031690565b9061473e575080511561472f57805190602001fd5b630a12f52160e11b5f5260045ffd5b8151158061476f575b61474f575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b1561474756fe0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a708af28d9864a81dfdf71cab65f4e5d79a0cf9b083905fb8971425e6cb581b3f692a42de8dec63499ed8713dc6815ea14006a1f8e80e1664c66e3beb461bb65b0da17350132762f24cc4b86e10621ea1e0b5c33483a51cca86a1b11e7ed029b6eb6d317c76a4357223a1868125ee857a1f31cabfcec288f6cdd0ea8c52b6a71ee31a164736f6c634300081a000a",
70776
- deployedBytecode: "0x60c0806040526004361015610095575b50361561001a575f80fd5b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141580610062575b61005357005b631c5deabb60e11b5f5260045ffd5b50337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141561004d565b5f3560e01c9081631a27b20114610b345750806324856bc314610aad5780633593564c14610a0257806344684dc31461067b5780638021fef714610637578063817122dc146105f357806384b0196e146104fb57806391dd73461461040b578063d04d79a2146103ae578063d0c9f6cb1461036a578063d737d0c714610338578063dc4c90d3146102f45763fa461e3314610130575f61000f565b34610265576060366003190112610265576024356004356044356001600160401b03811161026557610166903690600401610b91565b5f8313918215806102ea575b6102db57818101604082820312610265578135906001600160401b0382116102655761019f91830161294d565b5060208101356001600160a01b0381169290839003610265576101c191612a68565b90601790602b83106102cc578035968760601c956101ef62ffffff8585013560601c9a60481c168a89612af1565b336001600160a01b03909116036102bd57156102b357508685105b156102205750505061021e93503391612bce565b005b91935091939482602b0180602b1161029f578410610269575082821161026557918190039101600160ff1b8410156102655761021e93610260339161296b565b612c20565b5f80fd5b925050505f805160206147998339815191529291925c82116102905761021e923391612bce565b6339cedf2960e11b5f5260045ffd5b634e487b7160e01b5f52601160045260245ffd5b955084871061020a565b6332b13d9160e01b5f5260045ffd5b633b99b53d60e01b5f5260045ffd5b63316cf0eb60e01b5f5260045ffd5b505f851315610172565b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610265575f366003190112610265576040516001600160a01b035f805160206147798339815191525c168152602090f35b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610265575f36600319011261026557604080516001600160a01b035f805160206147f98339815191525c1681525f805160206147b98339815191525c60208201525f805160206147d98339815191525c91810191909152606090f35b34610265576020366003190112610265576004356001600160401b0381116102655761043b903690600401610b91565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036104ec5761047491613143565b908183036104dd575f5b8381106104b1576104ad6040516104966020826128c2565b5f8152604051918291602083526020830190610bee565b0390f35b806104d76104c26001938789610c12565b3560f81c6104d1838787610c50565b9161380b565b0161047e565b63aaad13f760e01b5f5260045ffd5b63570c108560e11b5f5260045ffd5b34610265575f366003190112610265576105976105377f0000000000000000000000000000000000000000000000000000000000000000612f50565b6105607f0000000000000000000000000000000000000000000000000000000000000000613073565b60206105a56040519261057383856128c2565b5f84525f368137604051958695600f60f81b875260e08588015260e0870190610bee565b908582036040870152610bee565b4660608501523060808501525f60a085015283810360c08501528180845192838152019301915f5b8281106105dc57505050500390f35b8351855286955093810193928101926001016105cd565b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610265575f366003190112610265576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b610100366003190112610265576004356001600160401b038111610265576106a7903690600401610b91565b6024356001600160401b038111610265576106c6903690600401610bbe565b9160443560843580151581036102655760c4356001600160401b038111610265576106f5903690600401610b91565b9160e4358042116109f35790889161070c896128e5565b61071960405191826128c2565b8981526107258a6128e5565b6020820190601f19013682375f5b8b811061099a5750604051915160208301929183915f5b81811061098157505050936108399693604293836107796108429b99956108339903601f1981018352826128c2565b51902091156109775761079033935b8c3691612917565b60208151910120926040519260208401947f4b503a2e339bf072a489301f3eec7abaefc520266c462796ed9267bbcc6e407c8652604085015260608401528a608084015260643560a084015260018060a01b031660c083015260a43560e08301526101008201526101008152610808610120826128c2565b519020610813613641565b906040519161190160f01b83526002830152602282015220923691612917565b9061375d565b90929192613797565b600160a43501610919575b5f805160206147f98339815191525d5f805160206147b98339815191525d6064355f805160206147d98339815191525d33301461090b575f805160206147798339815191525c6001600160a01b03166108fc576108b993335f805160206147798339815191525d610c6b565b5f5f805160206147798339815191525d5b5f5f805160206147f98339815191525d5f5f805160206147b98339815191525d5f5f805160206147d98339815191525d005b6337affdbf60e11b5f5260045ffd5b61091493610c6b565b6108ca565b60018060a01b038116805f52600260205260405f2060a4355f5260205260ff60405f205416610969575f52600260205260405f2060a4355f5260205260405f20600160ff1982541617905561084d565b623f613760e71b5f5260045ffd5b6107905f93610788565b825184528f98506020938401939092019160010161074a565b9091929394506109b56109ae828d8d610c50565b3691612917565b602081519101209083518110156109df5760019160208260051b8601015201908b94939291610733565b634e487b7160e01b5f52603260045260245ffd5b632dfb7c8b60e11b5f5260045ffd5b6060366003190112610265576004356001600160401b03811161026557610a2d903690600401610b91565b6024356001600160401b03811161026557610a4c903690600401610bbe565b9160443542116109f357333014610aa4575f805160206147798339815191525c6001600160a01b03166108fc57610a9293335f805160206147798339815191525d610c6b565b5f5f805160206147798339815191525d005b61021e93610c6b565b6040366003190112610265576004356001600160401b03811161026557610ad8903690600401610b91565b6024356001600160401b03811161026557610af7903690600401610bbe565b91333014610aa4575f805160206147798339815191525c6001600160a01b03166108fc57610a9293335f805160206147798339815191525d610c6b565b34610265576040366003190112610265576004356001600160a01b0381169190829003610265576020915f526002825260405f206024355f52825260ff60405f20541615158152f35b35906001600160a01b038216820361026557565b9181601f84011215610265578235916001600160401b038311610265576020838186019501011161026557565b9181601f84011215610265578235916001600160401b038311610265576020808501948460051b01011161026557565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b908210156109df570190565b903590601e198136030182121561026557018035906001600160401b0382116102655760200191813603831361026557565b908210156109df57610c679160051b810190610c1e565b9091565b90939284810361289857919293905f925b828410610c8a575050505050565b610c9a8484849596979894610c12565b3593610ca7868389610c50565b919093606098607f8860f81c1696600197602181105f14612389576010811015611e2b5760088110156114525780610fe05750610ce960208801359588612a90565b909690608089013515610fd9575f805160206147798339815191525c975b610d118a35612da5565b9891806080528160a05288600160ff1b14610f64575b50505b604296602b9190600160ff1b811015610265576080518911610f5d5730915b608051841161026557610db8936040925f60a0513595610dd68760601c97610d8f601760a051013560601c998a81109a62ffffff60018060a01b039460481c1691612af1565b1694888414610f42576401000276a4965b88519a8b928a6020850152606084019060a05161297b565b6001600160a01b03919091168983015203601f1981018a52896128c2565b8551630251596160e31b81526001600160a01b039182166004820152602481018890526044810193909352909316606482015260a0608482015294859283918290610e259060a4830190610bee565b03925af1908115610f37575f905f92610efb575b610e49935015610ef4575061296b565b608051909611610e76573060805160171161026557601760a051016017608051039060a052608052610d2a565b969198939a9460409198939a965091013511610ee5575b159081610ed6575b50610ea857506001019293949190610c7c565b90610ed2604051928392632c4029e960e01b84526004840152604060248401526044830190610bee565b0390fd5b600160ff1b161590505f610e95565b631ce9aa4b60e11b5f5260045ffd5b905061296b565b9150506040823d8211610f2f575b81610f16604093836128c2565b8101031261026557816020610e49935191015191610e39565b3d9150610f09565b6040513d5f823e3d90fd5b73fffd8963efd1fc6a506488495d951d5263988d2596610da0565b8991610d49565b601491929850106102cc576020602491604051928380926370a0823160e01b82523060048301523560601c5afa908115610f37575f91610fa8575b50955f80610d27565b90506020813d8211610fd1575b81610fc2602093836128c2565b8101031261026557515f610f9f565b3d9150610fb5565b3097610d07565b6001819c969299949b9798939a959c145f146110ab57509061100760208201359282612a90565b6080830135156110a4575f805160206147798339815191525c915b604061102e8535612da5565b9401355f805160206147998339815191525d600160ff1b85101561026557611059936102608661296b565b90919015611095575061106b9061296b565b03611086575f5f805160206147998339815191525d5b610e8d565b636a70124760e11b5f5260045ffd5b61109f915061296b565b61106b565b3091611022565b600281036110e2575061108191604081013591505f805160206147798339815191525c6110db6020830135612da5565b9135612ec2565b9394919390929060038103611269575050508135820163ffffffff60208401351683019163ffffffff8335169360208085019486010191011061125c57604051632a2d80d160e01b602082019081526001600160a01b035f805160206147798339815191525c1660248301526060604483015293909260e4840192803536829003601e190181121561026557810160208101949035906001600160401b038211610265578160071b360386136102655781906060608489015252610104860194905f905b80821061123e57505050936111f25f969482946112009460408a9960018060a01b036111d460208301610b7d565b1660a4880152013560c486015284830360231901606486015261297b565b03601f1981018352826128c2565b5190827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b91610e8d565b909195608080826112516001948b612a0a565b0197019201906111a6565b633b99b53d5f526004601cfd5b919493909250906004810361136757506112866020820135612da5565b906001600160a01b0360408201358116913516806112d35750479081106112c457806112b4575b5050610e8d565b6112bd916131fa565b5f806112ad565b631a84bc4160e21b5f5260045ffd5b91604051916370a0823160e01b8352306004840152602083602481875afa928315610f37575f93611334575b5082106113255781611314575b505050610e8d565b61131d926135d2565b5f808061130c565b630ceb95c760e31b5f5260045ffd5b9092506020813d821161135f575b8161134f602093836128c2565b810103126102655751915f6112ff565b3d9150611342565b6005810361138e5750806040611081920135906113876020820135612da5565b9035612e27565b6006810361144057506040810135906113aa6020820135612da5565b90356001600160a01b0316806113ce57506113c861108192476135a9565b906131fa565b906040516370a0823160e01b8152306004820152602081602481865afa908115610f37575f9161140d575b5061108193611407916135a9565b916135d2565b90506020813d8211611438575b81611427602093836128c2565b8101031261026557516110816113f9565b3d915061141a565b636bb50f4f60e11b5f5260045260245ffd5b6008819c969299949b9798939a959c145f14611671575061147860208301359183612d6d565b9060808401351561166a575f805160206147798339815191525c915b61149e8535612da5565b9282156109df576114ae82612d91565b83600110156109df576114d0611518916114ca60208601612d91565b90613f48565b907f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000613f5f565b948581611650575b5050505f19820182811161029f576001600160a01b039061154b90611546908585612e0a565b612d91565b1693604051926370a0823160e01b845260018060a01b038516928360048601526020856024818a5afa948515610f37575f95611613575b509461159292916020959661328e565b6024604051809581936370a0823160e01b835260048301525afa918215610f37575f926115df575b5060406115ca9293013592612e1a565b1015610e8d57631093d5f360e31b5f5260045ffd5b91506020823d821161160b575b816115f9602093836128c2565b810103126102655790519060406115ba565b3d91506115ec565b92919450946020833d8211611648575b81611630602093836128c2565b81010312610265579151919491939091611592611582565b3d9150611623565b6116629261165d85612d91565b612bce565b5f8085611520565b3091611494565b600981036118bd57506116849082612d6d565b6080830135156118b6575f805160206147798339815191525c915b6116a98435612da5565b917f0000000000000000000000000000000000000000000000000000000000000000937f0000000000000000000000000000000000000000000000000000000000000000955f95600285106118a7576020820135975f19860186811161029f579190825b61174a5750505060400135861161173b5782156109df5761108195856117369261165d85612d91565b61328e565b6345585e0b60e11b5f5260045ffd5b90919897505f1989019789891161029f5761176c61154661178e9a8989612e0a565b61178361177d6115468d8b8b612e0a565b82613f48565b8185879d939d613f5f565b604051630240bc6b60e21b815290916060826004816001600160a01b0387165afa918215610f37575f905f93611873575b506001600160701b039283169c9216916001600160a01b0391821691160361186d5799905b9980158015611865575b61185657826117fc91613578565b916103e88302928084046103e8149015171561029f5761181b91612e1a565b6103e58102908082046103e5149015171561029f576118399161358b565b6001810180911161029f5798801561029f575f190191908261170d565b633dce448b60e11b5f5260045ffd5b5081156117ee565b906117e4565b905061189791925060603d81116118a0575b61188f81836128c2565b810190613258565b5091905f6117bf565b503d611885565b6320db826760e01b5f5260045ffd5b309161169f565b93949193909290600a810361197a5750505063ffffffff60c08301351682019063ffffffff823516908360208085019484010191011061125c576040516302b67b5760e41b602082019081526001600160a01b035f805160206147798339815191525c1660248301525f94859491936112009284926111f2929060a0906119476044870182612a0a565b600180831b0361195960808301610b7d565b1660c4870152013560e485015261010061010485015261012484019161297b565b91949390929091600b8103611ab057505061199a60208201359135612da5565b81600160ff1b8103611a9a57504791505b816119b7575050610e8d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691823b1561026557604051630d0e30db60e41b81525f8160048185885af18015610f3757611a8a575b50306001600160a01b03831603611a22575b506112ad565b611a46926020925f60405180968195829463a9059cbb60e01b845260048401612def565b03925af18015610f3757611a5c575b8080611a1c565b611a7c9060203d8111611a83575b611a7481836128c2565b810190612dd7565b505f611a55565b503d611a6a565b5f611a94916128c2565b5f611a0a565b4710156119ab57631a84bc4160e21b5f5260045ffd5b600c8103611bcf575050611ac48135612da5565b6040516370a0823160e01b815230600482015290917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690602083602481855afa928315610f37575f93611b9b575b506020013582106112c45781611b3357505050610e8d565b803b15610265575f8091602460405180948193632e1a7d4d60e01b83528760048401525af18015610f3757611b8b575b50306001600160a01b03831603611b7b575b8061130c565b611b84916131fa565b5f80611b75565b5f611b95916128c2565b5f611b63565b9092506020813d8211611bc7575b81611bb6602093836128c2565b810103126102655751916020611b1b565b3d9150611ba9565b600d819c939c9b929597989b99949699145f14611d7257508a358b0198893594611c016020808d019e8d030187612bc1565b116102cc576001600160a01b035f805160206147798339815191525c169a935f5b86811015611c62578c6001600160a01b03611c45600784901b8f01602001612d91565b1603611c5357600101611c22565b63e700287760e01b5f5260045ffd5b50989593979694929b919a50985060018060a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b1561026557604051630d58b1db60e01b8152602060048201526024810184905292839160448301915f905b808210611cfc5750505091815f81819503925af18015610f3757611cec575b50610e8d565b5f611cf6916128c2565b5f611ce6565b9193509160019060809081906001600160a01b03611d1988610b7d565b168152838060a01b03611d2e60208901610b7d565b166020820152838060a01b03611d4660408901610b7d565b166040820152838060a01b03611d5e60608901610b7d565b166060820152019401920185939291611cc7565b80929b93989550600e919a97969450145f1461144057506040516370a0823160e01b81526001600160a01b038235811660048301529091906020908390602490829084860135165afa918215610f37575f92611df7575b5060400135111580611081576040516351940b3960e11b6020820152600481529092506112386024826128c2565b9091506020813d8211611e23575b81611e12602093836128c2565b810103126102655751906040611dc9565b3d9150611e05565b6010819c969299949b9798939a959c145f14611f2057506040516348c8949160e01b815260206004820152915f9183918291611e6c9160248401919061297b565b0381837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af18015610f3757611eab5750610e8d565b3d805f833e611eba81836128c2565b810190602081830312610265578051906001600160401b038211610265570181601f82011215610265578051611eef816128fc565b92611efd60405194856128c2565b81845260208284010111610265575f928160208094018483015e0101525f611ce6565b80929495506011919350145f14611fab57509080356001600160e01b03191663853d008560e01b8101611f995750815f92918392604051928392833781018381520390827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b63f801e52560e01b5f5260045260245ffd5b601281036121a957505f805160206147798339815191525c9180356001600160e01b031916630624e65f60e11b81148015612199575b8015612189575b15611f9957506040516331a9108f60e11b81526004828101359082018190527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316949091602081602481895afa908115610f37575f9161216b575b506001600160a01b0391821691168181149182156120ff575b82156120a6575b505015612094575091815f809481946040519384928337810182815203925af19061123861299b565b63bb25d4c560e01b5f5260045260245ffd5b60405163e985e9c560e01b8152600481019290925260248201529050602081604481885afa908115610f37575f916120e1575b505f8061206b565b6120f9915060203d8111611a8357611a7481836128c2565b5f6120d9565b915060405163020604bf60e21b81528360048201526020816024818a5afa8015610f375783915f9161213d575b506001600160a01b03161491612064565b61215e915060203d8111612164575b61215681836128c2565b8101906131db565b5f61212c565b503d61214c565b612183915060203d81116121645761215681836128c2565b5f61204b565b50630852cd8d60e31b8114611fe8565b5063fc6f786560e01b8114611fe1565b6013810361229a57505060405163313b65df60e11b602082019081525f928392906001600160a01b036121db82610b7d565b1660248301526001600160a01b036121f560208301610b7d565b16604483015262ffffff61220b604083016129ca565b16606483015261221d606082016129da565b60020b60848301526001600160a01b0361223960808301610b7d565b1660a483015260a001356001600160a01b031660c480830191909152815261226260e4826128c2565b5190827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b60148103611440575081356001600160e01b0319166322b9af7160e01b8101611f99575080600411610265576122e06122da600319830160048501612a68565b90612a68565b5f5b818110612337575050505f9182914791816040519283928337810184815203917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19061123861299b565b612342818385610c12565b3560f81c801590811561237e575b8115612373575b50612364576001016122e2565b635d1d0f9f60e01b5f5260045ffd5b60039150145f612357565b600181149150612350565b9097939a6040829b9798939a96949b105f146124975750602181036114405750906123b391613143565b6123dd6040959395519460208601966324856bc360e01b885260406024880152606487019161297b565b92602319858503016044860152818452602084019160208160051b86010194845f90601e19813603015b84831061243d575050505050505050918161242e5f9493859403601f1981018352826128c2565b519082305af19061123861299b565b9091929394959697601f19858203018852883582811215610265578301602081019190356001600160401b0381116102655780360383136102655761248760209283928b9561297b565b9a01980196959493019190612407565b94939290604081036114405750810190602081830312610265578035906001600160401b0382116102655701906101a08282031261026557604051906101a082016001600160401b03811183821017612884576040526124f683610b7d565b825261250460208401610b7d565b906020830191825261251860408501610b7d565b6040840190815261252a888601610b7d565b92888501938452608085016080870135815260a086019660a0810135885260c087019460c0820135865261256060e08301610b7d565b60e089019081526125746101008401612d5c565b6101008a019081526125896101208501612d5c565b916101208b0192835261259f6101408601612d5c565b6101408c01908152936101608601356001600160401b03811161026557610180916125cb91880161294d565b956101608d0196875201359586151590818803610265576101808d0197885251965f91600160ff1b8914612802575b5051156126f1575085985b9a519651975199519b519a51905191519251935194516001600160a01b039c8d169c7f000000000000000000000000000000000000000000000000000000000000000081169c9b81169b9981169998811698919763ffffffff9788169796871696909516949316928c3b15610265576040519d8e9c8d9b8c9b633dc9c91960e11b8d5260048d015260248c015260448b015260648a0152608489015260a488015260c487015260e48601526101048501526101248401526101448301526101648201610180905261018482016126da91610bee565b03915a945f95f18015610f3757611cec5750610e8d565b885160405163095ea7b360e01b60208201908152929b926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169316905f90819061275a8561274c8f8960248401612def565b03601f1981018752866128c2565b84519082855af161276961299b565b816127d3575b50806127c9575b15612784575b505050612605565b6127bc6127c1936040519063095ea7b360e01b602083015260248201525f6044820152604481526127b66064826128c2565b82613edd565b613edd565b5f808061277c565b50803b1515612776565b80518015925082156127e8575b50505f61276f565b6127fb9250602080918301019101612dd7565b5f806127e0565b909750156128135747965b5f6125fa565b88516040516370a0823160e01b815230600482015290602090829060249082906001600160a01b03165afa908115610f37575f91612853575b509661280d565b90506020813d821161287c575b8161286d602093836128c2565b8101031261026557515f61284c565b3d9150612860565b634e487b7160e01b5f52604160045260245ffd5b631fec674760e31b5f5260045ffd5b60a081019081106001600160401b0382111761288457604052565b601f909101601f19168101906001600160401b0382119082101761288457604052565b6001600160401b0381116128845760051b60200190565b6001600160401b03811161288457601f01601f191660200190565b929192612923826128fc565b9161293160405193846128c2565b829481845281830111610265578281602093845f960137010152565b9080601f830112156102655781602061296893359101612917565b90565b600160ff1b811461029f575f0390565b908060209392818452848401375f828201840152601f01601f1916010190565b3d156129c5573d906129ac826128fc565b916129ba60405193846128c2565b82523d5f602084013e565b606090565b359062ffffff8216820361026557565b35908160020b820361026557565b90816020910312610265575190565b359065ffffffffffff8216820361026557565b60609065ffffffffffff90612a629083906001600160a01b03612a2c82610b7d565b1686526001600160a01b03612a4360208301610b7d565b16602087015283612a56604083016129f7565b166040870152016129f7565b16910152565b909163ffffffff82351682019263ffffffff8435169260208086019585010191011061125c57565b909163ffffffff60608301351682019263ffffffff8435169260208086019585010191011061125c57565b6001600160f81b0319815260609190911b6001600160601b03191660018201526015810191909152603581019190915260550190565b916001600160a01b0382811690841611612bb9575b604080516001600160a01b0394851660208201908152949093169083015262ffffff166060808301919091528152612b3f6080826128c2565b51902060405190612ba982612b9b60208201937f0000000000000000000000000000000000000000000000000000000000000000907f000000000000000000000000000000000000000000000000000000000000000086612abb565b03601f1981018452836128c2565b905190206001600160a01b031690565b909190612b06565b9190820180921161029f57565b909291906001600160a01b0384163003612bee57612bec9350612e27565b565b91926001600160a01b038411612c1157612bec936001600160a01b031692612ec2565b63c4bd89a960e01b5f5260045ffd5b9092602b81106102cc57825f6040943595612cf38760601c93612cab601782013560601c99612c64878c1097889c62ffffff60018060a01b039460481c1691612af1565b1696868614612d41576401000276a49b5b612c8d8b519485938d6020860152606085019161297b565b6001600160a01b03919091168b83015203601f1981018352826128c2565b8751998a9788968795630251596160e31b875260018060a01b031660048701526024860152604485015260018060a01b0316606484015260a0608484015260a4830190610bee565b03925af18015610f37575f925f91612d0a57509192565b9250506040823d604011612d39575b81612d26604093836128c2565b8101031261026557602082519201519192565b3d9150612d19565b73fffd8963efd1fc6a506488495d951d5263988d259b612c75565b359063ffffffff8216820361026557565b916060830135830191612d8a602084359581860195030185612bc1565b116102cc57565b356001600160a01b03811681036102655790565b6001600160a01b03811660018103612dcb5750505f805160206147798339815191525c90565b60020361296857503090565b90816020910312610265575180151581036102655790565b6001600160a01b039091168152602081019190915260400190565b91908110156109df5760051b0190565b9190820391821161029f57565b9091906001600160a01b031680612e425750612bec916131fa565b600160ff1b8214612e58575b91612bec926135d2565b6040516370a0823160e01b815230600482015292909150602083602481855afa8015610f37575f90612e8e575b90925090612e4e565b506020833d602011612eba575b81612ea8602093836128c2565b8101031261026557612bec9251612e85565b3d9150612e9b565b91907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690813b1561026557604051631b63c28b60e11b81526001600160a01b039182166004820152928116602484015293841660448301529190921660648301525f908290608490829084905af18015610f3757612f465750565b5f612bec916128c2565b60ff8114612f965760ff811690601f8211612f875760405191612f746040846128c2565b6020808452838101919036833783525290565b632cd44ac360e21b5f5260045ffd5b506040515f80548060011c9160018216918215613069575b6020841083146130555783855284929081156130365750600114612fd9575b612968925003826128c2565b505f80805290917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b81831061301a57505090602061296892820101612fcd565b6020919350806001915483858801015201910190918392613002565b6020925061296894915060ff191682840152151560051b820101612fcd565b634e487b7160e01b5f52602260045260245ffd5b92607f1692612fae565b60ff81146130975760ff811690601f8211612f875760405191612f746040846128c2565b506040515f6001548060011c9160018216918215613139575b60208410831461305557838552849290811561303657506001146130da57612968925003826128c2565b5060015f90815290917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b81831061311d57505090602061296892820101612fcd565b6020919350806001915483858801015201910190918392613105565b92607f16926130b0565b604081351891606082019363ffffffff6040840135169363ffffffe0601f8601169060608201602086013518179084019260608401359463ffffffff861694641fffffffe0608082019760051b1680915f925b8084106131ae57506080925001019101101761125c57565b90916020809163ffffffe0601f60808089890101359b848d18179b88010135011601019301929190613196565b9081602091031261026557516001600160a01b03811681036102655790565b5f80809381935af11561320957565b60405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606490fd5b51906001600160701b038216820361026557565b908160609103126102655761326c81613244565b91604061327b60208401613244565b92015163ffffffff811681036102655790565b91600282106135695781156109df576132a683612d91565b82600110156109df576132c2906114ca60208697959601612d91565b506001198401945f198501945f9460209392869290915b8884106132ec5750505050505050505050565b6132fa611546858486612e0a565b61330b611546600187018587612e0a565b604051630240bc6b60e21b81526001600160a01b03909316969092916060836004818b5afa928315610f375789905f905f95613542575b506001600160a01b03928316939092168314936024926001600160701b03918216929116851561353c5791935b604051938480926370a0823160e01b82528d60048301525afa918215610f37575f9261350d575b5080820392811592838015613505575b61185657826103e586029586046103e5149114171561029f576133c99084613578565b916103e882029182046103e814171561029f576133ef926133e991612bc1565b9061358b565b90156134fe575f90915b8b8610156134f5579061341a613464926114ca61154660028a01888a612e0a565b8193917f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000613f5f565b915b96604051906134758a836128c2565b5f82528b368b840137803b15610265576134c9945f80946040519788958694859363022c0d9f60e01b85526004850152602484015260018060a01b0389166044840152608060648401526084830190610bee565b03925af1918215610f37576001926134e5575b509301926132d9565b5f6134ef916128c2565b5f6134dc565b5087905f613466565b5f916133f9565b5081156133a6565b9091508981813d8311613535575b61352581836128c2565b810103126102655751905f613396565b503d61351b565b9361336f565b602493929550613560915060603d81116118a05761188f81836128c2565b50949192613342565b632b94ab4360e21b5f5260045ffd5b8181029291811591840414171561029f57565b8115613595570490565b634e487b7160e01b5f52601260045260245ffd5b61271082116135c357612710916135bf91613578565b0490565b636f5500f360e11b5f5260045ffd5b5f91826044926020956040519363a9059cbb60e01b8552600485015260248401525af13d15601f3d1160015f51141617161561360a57565b60405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606490fd5b307f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161480613734575b1561369c577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261372e60c0826128c2565b51902090565b507f00000000000000000000000000000000000000000000000000000000000000004614613673565b815191906041830361378d576137869250602082015190606060408401519301515f1a90613fb4565b9192909190565b50505f9160029190565b60048110156137f757806137a9575050565b600181036137c05763f645eedf60e01b5f5260045ffd5b600281036137db575063fce698f760e01b5f5260045260245ffd5b6003146137e55750565b6335e2f38360e21b5f5260045260245ffd5b634e487b7160e01b5f52602160045260245ffd5b929190600b841015613d7657600784036139ea5761382a929350614385565b60208101906138398282614393565b5f9391508061384784612d91565b92613854606086016142fb565b6001600160801b038116156139d3575b60408601916138738388614393565b8015159586925090826139c8575b50506139b9575f9591949395945b8486106138ed575050505050505060800160018060801b036138b0826142fb565b6001600160801b03909316921682106138c7575050565b6138d0906142fb565b638b063d7360e01b5f5260018060801b031660045260245260445ffd5b86985061394261393d6139186139118961390b878e9d9b9c9d614393565b906143c8565b958661463c565b6001600160801b03909416936139316080880188610c1e565b929091865f03916144cc565b614704565b98613960575b5060016139558993612d91565b96019493959161388f565b61397e906001600160801b038a1690670de0b6b3a76400000261358b565b6139928761398c868b614393565b90612e0a565b358082116139a05750613948565b8763a9b7edf760e01b5f5260045260245260445260645ffd5b63947446a560e01b5f5260045ffd5b14159050855f613881565b506139e56139e085614044565b6144a8565b613864565b60068403613ac5576139fd9293506142ec565b613a0960c082016142fb565b6001600160801b03811615613a74575b613a6161393d60e092613a40613a3160a0870161430f565b916001600160801b031661296b565b90613a4f610100870187610c1e565b929091613a5c368961431c565b6144cc565b91016001600160801b036138b0826142fb565b50613a8160a0820161430f565b15613aab5760e0613a6161393d613aa26139e0613a9d86612d91565b614044565b92505050613a19565b60e0613a6161393d613aa26139e0613a9d60208701612d91565b60098403613c8057613ad8929350614385565b6020810190613ae78282614393565b5f939150613af7606084016142fb565b90613b0184612d91565b916001600160801b03811615613c6e575b604085019082613b228388614393565b801515958692509082613c63575b50506139b95792949390835b613b965750505050505060800160018060801b03613b59826142fb565b6001600160801b0390931692168211613b70575050565b613b79906142fb565b6312bacdd360e01b5f5260018060801b031660045260245260445ffd5b85975061391190613bf0613be6613bc2613bb4898c9b999a9b614393565b5f198b0196918791906143c8565b6001600160801b039094169384613bdc6080890189610c1e565b93909215906144cc565b600f0b5f036144a8565b98613c10575b5050613c028791612d91565b9294935f1901929083613b3c565b613c2d906001600160801b038a16670de0b6b3a76400000261358b565b90613c3c8161398c868b614393565b3590818311613c4b5750613bf6565b63e651804360e01b5f5260045260245260445260645ffd5b14159050815f613b30565b50613c7b6139e08361428f565b613b12565b60088414613c9e575050505b635cda29d760e01b5f5260045260245ffd5b613ca99293506142ec565b613cb560c082016142fb565b6001600160801b03811615613d1e575b613d0b6139e0613d0360e093613cdd60a0870161430f565b90613cec610100880188610c1e565b9290916001600160801b031690613a5c368a61431c565b600f0b61296b565b91016001600160801b03613b59826142fb565b50613d2b60a0820161430f565b15613d5c5760e0613d0b6139e0613d03613d526139e0613d4d60208801612d91565b61428f565b9350505050613cc5565b60e0613d0b6139e0613d03613d526139e0613d4d87612d91565b92600c8103613dce5750613d8a919261427c565b90613d948161428f565b91808311613db7575090612bec915f805160206147798339815191525c90614159565b90506312bacdd360e01b5f5260045260245260445ffd5b600f8103613e255750613de1919261427c565b90613deb81614044565b91808310613e0e575090612bec915f805160206147798339815191525c9061409b565b9050638b063d7360e01b5f5260045260245260445ffd5b600b8103613e6b5750613e3c90612bec929361402c565b15613e6057613e5a825f805160206147798339815191525c92614134565b91614159565b613e5a823092614134565b600e8103613e9e5750613e92613e88613e9892612bec949561402c565b9282949291612da5565b92614120565b9161409b565b9260108414613eaf57505050613c8c565b612bec929350613ec5613ece92613e989261402c565b92919390612da5565b91613ed884614044565b6135a9565b5f80613f059260018060a01b03169360208151910182865af1613efe61299b565b908361471a565b8051908115159182613f2d575b5050613f1b5750565b635274afe760e01b5f5260045260245ffd5b613f409250602080918301019101612dd7565b155f80613f12565b6001600160a01b038281169082161015610c675791565b6040516001600160601b0319606094851b8116602083019081529590941b90931660348401526028835290929091612ba99190613f9d6048826128c2565b519020612b9b604051948592602084019586612abb565b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b038411614021579160209360809260ff5f9560405194855216868401526040830152606082015282805260015afa15610f37575f516001600160a01b0381161561401757905f905f90565b505f906001905f90565b5050505f9160039190565b9060601161125c578035916040602083013592013590565b61406f81307f00000000000000000000000000000000000000000000000000000000000000006143ea565b905f821261407b575090565b634c085bf160e01b5f9081526001600160a01b0391909116600452602490fd5b90821561411b577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b1561026557604051630b0d9c0960e01b81526001600160a01b03938416600482015291909216602482015260448101929092525f908290606490829084905af18015610f3757612f465750565b505050565b9081614130576129689150614044565b5090565b90600160ff1b820361414a576129689150614466565b8161413057612968915061428f565b5f918315614276577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691823b1561026557604051632961046560e21b81526001600160a01b0390911660048201819052905f8160248183885af18015610f3757614261575b508061422d575050602090600460405180958193630476982d60e21b83525af190811561422157506141f65750565b6142179060203d60201161421a575b61420f81836128c2565b8101906129e8565b50565b503d614205565b604051903d90823e3d90fd5b8394836020949361423d93612bce565b600460405180958193630476982d60e21b83525af190811561422157506141f65750565b61426e9194505f906128c2565b5f925f6141c7565b50505050565b919060401161125c576020823592013590565b6142ba81307f00000000000000000000000000000000000000000000000000000000000000006143ea565b905f82136142cc57506129689061296b565b63019a8d9360e51b5f9081526001600160a01b0391909116600452602490fd5b906101401161125c5780350190565b356001600160801b03811681036102655790565b3580151581036102655790565b91908260a091031261026557604051614334816128a7565b608061438081839561434581610b7d565b855261435360208201610b7d565b6020860152614364604082016129ca565b6040860152614375606082016129da565b606086015201610b7d565b910152565b9060a01161125c5780350190565b903590601e198136030182121561026557018035906001600160401b03821161026557602001918160051b3603831361026557565b91908110156109df5760051b81013590609e1981360301821215610265570190565b6001600160a01b039182165f9081529282166020908152604093849020935163789add5560e11b815260048101949094529183916024918391165afa908115610f37575f91614437575090565b90506020813d60201161445e575b81614452602093836128c2565b81010312610265575190565b3d9150614445565b6001600160a01b03168061447957504790565b6020602491604051928380926370a0823160e01b82523060048301525afa908115610f37575f91614437575090565b6001600160801b03811691908290036144bd57565b6393dafdf160e01b5f5260045ffd5b93928115614621576401000276a4945b6040519160608301906001600160401b0382118483101761288457604091825293151580845260208481018781526001600160a01b03998a168685019081528451633cf3645360e21b815286518c166004820152868401518c1660248201529486015162ffffff166044860152606086015160020b60648601526080909501518a1660848501529451151560a4840152935160c4830152915190961660e48701526101206101048701529390918591829161459c9161012484019161297b565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1928315610f37575f936145ed575b505f13036145e757600f0b90565b60801d90565b9092506020813d602011614619575b81614609602093836128c2565b810103126102655751915f6145d9565b3d91506145fc565b73fffd8963efd1fc6a506488495d951d5263988d25946144dc565b905f608060405161464c816128a7565b828152826020820152826040820152826060820152015261466c82612d91565b6001600160a01b0382811692908216808410156146fa57505b6001600160a01b031691821492602081013562ffffff811690819003610265576040820135918260020b80930361026557606001359260018060a01b03841680940361026557604051946146d8866128a7565b85526001600160a01b0316602085015260408401526060830152608082015291565b9150508190614685565b5f81600f0b126144bd576001600160801b031690565b9061473e575080511561472f57805190602001fd5b630a12f52160e11b5f5260045ffd5b8151158061476f575b61474f575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b1561474756fe0e87e1788ebd9ed6a7e63c70a374cd3283e41cad601d21fbe27863899ed4a708af28d9864a81dfdf71cab65f4e5d79a0cf9b083905fb8971425e6cb581b3f692a42de8dec63499ed8713dc6815ea14006a1f8e80e1664c66e3beb461bb65b0da17350132762f24cc4b86e10621ea1e0b5c33483a51cca86a1b11e7ed029b6eb6d317c76a4357223a1868125ee857a1f31cabfcec288f6cdd0ea8c52b6a71ee31a164736f6c634300081a000a",
70777
- linkReferences: {},
70778
- deployedLinkReferences: {}
70779
- };
70780
-
70781
- // ../node_modules/@uniswap/universal-router-sdk/dist/esm/src/swapRouter.js
70782
- var import_abi30 = __toESM(require_lib18(), 1);
70783
- var import_ethers8 = __toESM(require_lib49(), 1);
70784
-
70785
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/entities/pool.js
70786
- var import_jsbi21 = __toESM(require_jsbi_cjs(), 1);
70787
-
70788
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/constants.js
70789
- var FACTORY_ADDRESS = "0x1F98431c8aD98523631AE4a59f267346ea31F984";
70790
- var ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
70791
- var POOL_INIT_CODE_HASH = "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54";
70792
- function poolInitCodeHash(chainId) {
70793
- switch (chainId) {
70794
- case ChainId.ZKSYNC:
70795
- return "0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed";
70796
- default:
70797
- return POOL_INIT_CODE_HASH;
70798
- }
70799
- }
70800
- var FeeAmount;
70801
- (function(FeeAmount2) {
70802
- FeeAmount2[FeeAmount2["LOWEST"] = 100] = "LOWEST";
70803
- FeeAmount2[FeeAmount2["LOW_200"] = 200] = "LOW_200";
70804
- FeeAmount2[FeeAmount2["LOW_300"] = 300] = "LOW_300";
70805
- FeeAmount2[FeeAmount2["LOW_400"] = 400] = "LOW_400";
70806
- FeeAmount2[FeeAmount2["LOW"] = 500] = "LOW";
70807
- FeeAmount2[FeeAmount2["MEDIUM"] = 3000] = "MEDIUM";
70808
- FeeAmount2[FeeAmount2["HIGH"] = 1e4] = "HIGH";
70809
- })(FeeAmount || (FeeAmount = {}));
70810
- var TICK_SPACINGS = {
70811
- [FeeAmount.LOWEST]: 1,
70812
- [FeeAmount.LOW_200]: 4,
70813
- [FeeAmount.LOW_300]: 6,
70814
- [FeeAmount.LOW_400]: 8,
70815
- [FeeAmount.LOW]: 10,
70816
- [FeeAmount.MEDIUM]: 60,
70817
- [FeeAmount.HIGH]: 200
70818
- };
70819
-
70820
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/internalConstants.js
70821
- var import_jsbi7 = __toESM(require_jsbi_cjs(), 1);
70822
- var NEGATIVE_ONE = import_jsbi7.default.BigInt(-1);
70823
- var ZERO2 = import_jsbi7.default.BigInt(0);
70824
- var ONE2 = import_jsbi7.default.BigInt(1);
70825
- var Q96 = import_jsbi7.default.exponentiate(import_jsbi7.default.BigInt(2), import_jsbi7.default.BigInt(96));
70826
- var Q192 = import_jsbi7.default.exponentiate(Q96, import_jsbi7.default.BigInt(2));
70827
-
70828
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/computePoolAddress.js
70829
- var import_abi23 = __toESM(require_lib18(), 1);
70830
- var import_address17 = __toESM(require_lib6(), 1);
70831
- var import_solidity4 = __toESM(require_lib46(), 1);
70832
- function computePoolAddress({ factoryAddress, tokenA, tokenB, fee, initCodeHashManualOverride, chainId }) {
70833
- const [token0, token1] = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA];
70834
- const salt = import_solidity4.keccak256(["bytes"], [import_abi23.defaultAbiCoder.encode(["address", "address", "uint24"], [token0.address, token1.address, fee])]);
70835
- const initCodeHash = initCodeHashManualOverride !== null && initCodeHashManualOverride !== undefined ? initCodeHashManualOverride : poolInitCodeHash(chainId);
70836
- switch (chainId) {
70837
- case ChainId.ZKSYNC:
70838
- return computeZksyncCreate2Address(factoryAddress, initCodeHash, salt);
70839
- default:
70840
- return import_address17.getCreate2Address(factoryAddress, salt, initCodeHash);
70841
- }
70842
- }
70843
-
70844
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/swapMath.js
70845
- var import_jsbi10 = __toESM(require_jsbi_cjs(), 1);
70846
-
70847
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/fullMath.js
70848
- var import_jsbi8 = __toESM(require_jsbi_cjs(), 1);
70849
- class FullMath {
70850
- constructor() {}
70851
- static mulDivRoundingUp(a, b, denominator) {
70852
- const product = import_jsbi8.default.multiply(a, b);
70853
- let result = import_jsbi8.default.divide(product, denominator);
70854
- if (import_jsbi8.default.notEqual(import_jsbi8.default.remainder(product, denominator), ZERO2))
70855
- result = import_jsbi8.default.add(result, ONE2);
70856
- return result;
70857
- }
70858
- }
70859
-
70860
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/sqrtPriceMath.js
70861
- var import_jsbi9 = __toESM(require_jsbi_cjs(), 1);
70862
- var MaxUint160 = import_jsbi9.default.subtract(import_jsbi9.default.exponentiate(import_jsbi9.default.BigInt(2), import_jsbi9.default.BigInt(160)), ONE2);
70863
- function multiplyIn256(x, y) {
70864
- const product = import_jsbi9.default.multiply(x, y);
70865
- return import_jsbi9.default.bitwiseAnd(product, MaxUint256);
70866
- }
70867
- function addIn256(x, y) {
70868
- const sum = import_jsbi9.default.add(x, y);
70869
- return import_jsbi9.default.bitwiseAnd(sum, MaxUint256);
70870
- }
70871
-
70872
- class SqrtPriceMath {
70873
- constructor() {}
70874
- static getAmount0Delta(sqrtRatioAX96, sqrtRatioBX96, liquidity, roundUp) {
70875
- if (import_jsbi9.default.greaterThan(sqrtRatioAX96, sqrtRatioBX96)) {
70876
- [sqrtRatioAX96, sqrtRatioBX96] = [sqrtRatioBX96, sqrtRatioAX96];
70877
- }
70878
- const numerator1 = import_jsbi9.default.leftShift(liquidity, import_jsbi9.default.BigInt(96));
70879
- const numerator2 = import_jsbi9.default.subtract(sqrtRatioBX96, sqrtRatioAX96);
70880
- return roundUp ? FullMath.mulDivRoundingUp(FullMath.mulDivRoundingUp(numerator1, numerator2, sqrtRatioBX96), ONE2, sqrtRatioAX96) : import_jsbi9.default.divide(import_jsbi9.default.divide(import_jsbi9.default.multiply(numerator1, numerator2), sqrtRatioBX96), sqrtRatioAX96);
70881
- }
70882
- static getAmount1Delta(sqrtRatioAX96, sqrtRatioBX96, liquidity, roundUp) {
70883
- if (import_jsbi9.default.greaterThan(sqrtRatioAX96, sqrtRatioBX96)) {
70884
- [sqrtRatioAX96, sqrtRatioBX96] = [sqrtRatioBX96, sqrtRatioAX96];
70885
- }
70886
- return roundUp ? FullMath.mulDivRoundingUp(liquidity, import_jsbi9.default.subtract(sqrtRatioBX96, sqrtRatioAX96), Q96) : import_jsbi9.default.divide(import_jsbi9.default.multiply(liquidity, import_jsbi9.default.subtract(sqrtRatioBX96, sqrtRatioAX96)), Q96);
70887
- }
70888
- static getNextSqrtPriceFromInput(sqrtPX96, liquidity, amountIn, zeroForOne) {
70889
- invariant(import_jsbi9.default.greaterThan(sqrtPX96, ZERO2));
70890
- invariant(import_jsbi9.default.greaterThan(liquidity, ZERO2));
70891
- return zeroForOne ? this.getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amountIn, true) : this.getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amountIn, true);
70892
- }
70893
- static getNextSqrtPriceFromOutput(sqrtPX96, liquidity, amountOut, zeroForOne) {
70894
- invariant(import_jsbi9.default.greaterThan(sqrtPX96, ZERO2));
70895
- invariant(import_jsbi9.default.greaterThan(liquidity, ZERO2));
70896
- return zeroForOne ? this.getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amountOut, false) : this.getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amountOut, false);
70897
- }
70898
- static getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amount, add) {
70899
- if (import_jsbi9.default.equal(amount, ZERO2))
70900
- return sqrtPX96;
70901
- const numerator1 = import_jsbi9.default.leftShift(liquidity, import_jsbi9.default.BigInt(96));
70902
- if (add) {
70903
- let product = multiplyIn256(amount, sqrtPX96);
70904
- if (import_jsbi9.default.equal(import_jsbi9.default.divide(product, amount), sqrtPX96)) {
70905
- const denominator = addIn256(numerator1, product);
70906
- if (import_jsbi9.default.greaterThanOrEqual(denominator, numerator1)) {
70907
- return FullMath.mulDivRoundingUp(numerator1, sqrtPX96, denominator);
70035
+ var abi2 = [{ inputs: [{ components: [{ internalType: "address", name: "permit2", type: "address" }, { internalType: "address", name: "weth9", type: "address" }, { internalType: "address", name: "v2Factory", type: "address" }, { internalType: "address", name: "v3Factory", type: "address" }, { internalType: "bytes32", name: "pairInitCodeHash", type: "bytes32" }, { internalType: "bytes32", name: "poolInitCodeHash", type: "bytes32" }, { internalType: "address", name: "v4PoolManager", type: "address" }, { internalType: "address", name: "v3NFTPositionManager", type: "address" }, { internalType: "address", name: "v4PositionManager", type: "address" }, { internalType: "address", name: "spokePool", type: "address" }], internalType: "struct RouterParameters", name: "params", type: "tuple" }], stateMutability: "nonpayable", type: "constructor" }, { inputs: [{ internalType: "address", name: "target", type: "address" }], name: "AddressEmptyCode", type: "error" }, { inputs: [{ internalType: "address", name: "account", type: "address" }], name: "AddressInsufficientBalance", type: "error" }, { inputs: [], name: "BalanceTooLow", type: "error" }, { inputs: [], name: "ContractLocked", type: "error" }, { inputs: [{ internalType: "Currency", name: "currency", type: "address" }], name: "DeltaNotNegative", type: "error" }, { inputs: [{ internalType: "Currency", name: "currency", type: "address" }], name: "DeltaNotPositive", type: "error" }, { inputs: [], name: "ECDSAInvalidSignature", type: "error" }, { inputs: [{ internalType: "uint256", name: "length", type: "uint256" }], name: "ECDSAInvalidSignatureLength", type: "error" }, { inputs: [{ internalType: "bytes32", name: "s", type: "bytes32" }], name: "ECDSAInvalidSignatureS", type: "error" }, { inputs: [], name: "ETHNotAccepted", type: "error" }, { inputs: [{ internalType: "uint256", name: "commandIndex", type: "uint256" }, { internalType: "bytes", name: "message", type: "bytes" }], name: "ExecutionFailed", type: "error" }, { inputs: [], name: "FailedInnerCall", type: "error" }, { inputs: [], name: "FromAddressIsNotOwner", type: "error" }, { inputs: [], name: "InputLengthMismatch", type: "error" }, { inputs: [], name: "InsufficientBalance", type: "error" }, { inputs: [], name: "InsufficientETH", type: "error" }, { inputs: [], name: "InsufficientToken", type: "error" }, { inputs: [{ internalType: "bytes4", name: "action", type: "bytes4" }], name: "InvalidAction", type: "error" }, { inputs: [], name: "InvalidBips", type: "error" }, { inputs: [{ internalType: "uint256", name: "commandType", type: "uint256" }], name: "InvalidCommandType", type: "error" }, { inputs: [], name: "InvalidEthSender", type: "error" }, { inputs: [], name: "InvalidHopSlippageLength", type: "error" }, { inputs: [], name: "InvalidPath", type: "error" }, { inputs: [], name: "InvalidReserves", type: "error" }, { inputs: [], name: "InvalidShortString", type: "error" }, { inputs: [], name: "LengthMismatch", type: "error" }, { inputs: [], name: "NonceAlreadyUsed", type: "error" }, { inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], name: "NotAuthorizedForToken", type: "error" }, { inputs: [], name: "NotPoolManager", type: "error" }, { inputs: [], name: "OnlyMintAllowed", type: "error" }, { inputs: [{ internalType: "address", name: "token", type: "address" }], name: "SafeERC20FailedOperation", type: "error" }, { inputs: [], name: "SliceOutOfBounds", type: "error" }, { inputs: [{ internalType: "string", name: "str", type: "string" }], name: "StringTooLong", type: "error" }, { inputs: [], name: "TransactionDeadlinePassed", type: "error" }, { inputs: [], name: "UnsafeCast", type: "error" }, { inputs: [{ internalType: "uint256", name: "action", type: "uint256" }], name: "UnsupportedAction", type: "error" }, { inputs: [], name: "V2InvalidPath", type: "error" }, { inputs: [], name: "V2TooLittleReceived", type: "error" }, { inputs: [], name: "V2TooMuchRequested", type: "error" }, { inputs: [], name: "V3InvalidAmountOut", type: "error" }, { inputs: [], name: "V3InvalidCaller", type: "error" }, { inputs: [], name: "V3InvalidSwap", type: "error" }, { inputs: [], name: "V3TooLittleReceived", type: "error" }, { inputs: [], name: "V3TooMuchRequested", type: "error" }, { inputs: [{ internalType: "uint256", name: "minAmountOutReceived", type: "uint256" }, { internalType: "uint256", name: "amountReceived", type: "uint256" }], name: "V4TooLittleReceived", type: "error" }, { inputs: [{ internalType: "uint256", name: "hopIndex", type: "uint256" }, { internalType: "uint256", name: "maxPrice", type: "uint256" }, { internalType: "uint256", name: "price", type: "uint256" }], name: "V4TooLittleReceivedPerHop", type: "error" }, { inputs: [{ internalType: "uint256", name: "maxAmountInRequested", type: "uint256" }, { internalType: "uint256", name: "amountRequested", type: "uint256" }], name: "V4TooMuchRequested", type: "error" }, { inputs: [{ internalType: "uint256", name: "hopIndex", type: "uint256" }, { internalType: "uint256", name: "maxPrice", type: "uint256" }, { internalType: "uint256", name: "price", type: "uint256" }], name: "V4TooMuchRequestedPerHop", type: "error" }, { anonymous: false, inputs: [], name: "EIP712DomainChanged", type: "event" }, { inputs: [], name: "SPOKE_POOL", outputs: [{ internalType: "contract IV3SpokePool", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "V3_POSITION_MANAGER", outputs: [{ internalType: "contract INonfungiblePositionManager", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "V4_POSITION_MANAGER", outputs: [{ internalType: "contract IPositionManager", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "eip712Domain", outputs: [{ internalType: "bytes1", name: "fields", type: "bytes1" }, { internalType: "string", name: "name", type: "string" }, { internalType: "string", name: "version", type: "string" }, { internalType: "uint256", name: "chainId", type: "uint256" }, { internalType: "address", name: "verifyingContract", type: "address" }, { internalType: "bytes32", name: "salt", type: "bytes32" }, { internalType: "uint256[]", name: "extensions", type: "uint256[]" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "bytes", name: "commands", type: "bytes" }, { internalType: "bytes[]", name: "inputs", type: "bytes[]" }], name: "execute", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "commands", type: "bytes" }, { internalType: "bytes[]", name: "inputs", type: "bytes[]" }, { internalType: "uint256", name: "deadline", type: "uint256" }], name: "execute", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes", name: "commands", type: "bytes" }, { internalType: "bytes[]", name: "inputs", type: "bytes[]" }, { internalType: "bytes32", name: "intent", type: "bytes32" }, { internalType: "bytes32", name: "data", type: "bytes32" }, { internalType: "bool", name: "verifySender", type: "bool" }, { internalType: "bytes32", name: "nonce", type: "bytes32" }, { internalType: "bytes", name: "signature", type: "bytes" }, { internalType: "uint256", name: "deadline", type: "uint256" }], name: "executeSigned", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [], name: "msgSender", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "user", type: "address" }, { internalType: "bytes32", name: "nonce", type: "bytes32" }], name: "noncesUsed", outputs: [{ internalType: "bool", name: "used", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [], name: "poolManager", outputs: [{ internalType: "contract IPoolManager", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [], name: "signedRouteContext", outputs: [{ internalType: "address", name: "signer", type: "address" }, { internalType: "bytes32", name: "intent", type: "bytes32" }, { internalType: "bytes32", name: "data", type: "bytes32" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "int256", name: "amount0Delta", type: "int256" }, { internalType: "int256", name: "amount1Delta", type: "int256" }, { internalType: "bytes", name: "data", type: "bytes" }], name: "uniswapV3SwapCallback", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "bytes", name: "data", type: "bytes" }], name: "unlockCallback", outputs: [{ internalType: "bytes", name: "", type: "bytes" }], stateMutability: "nonpayable", type: "function" }, { stateMutability: "payable", type: "receive" }];
70036
+ var UniversalRouter_default = { abi: abi2 };
70037
+
70038
+ // ../node_modules/@uniswap/universal-router-sdk/dist/esm/src/swapRouter.js
70039
+ var import_abi30 = __toESM(require_lib18(), 1);
70040
+ var import_ethers8 = __toESM(require_lib49(), 1);
70041
+
70042
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/entities/pool.js
70043
+ var import_jsbi21 = __toESM(require_jsbi_cjs(), 1);
70044
+
70045
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/constants.js
70046
+ var FACTORY_ADDRESS = "0x1F98431c8aD98523631AE4a59f267346ea31F984";
70047
+ var ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
70048
+ var POOL_INIT_CODE_HASH = "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54";
70049
+ function poolInitCodeHash(chainId) {
70050
+ switch (chainId) {
70051
+ case ChainId.ZKSYNC:
70052
+ return "0x010013f177ea1fcbc4520f9a3ca7cd2d1d77959e05aa66484027cb38e712aeed";
70053
+ default:
70054
+ return POOL_INIT_CODE_HASH;
70055
+ }
70056
+ }
70057
+ var FeeAmount;
70058
+ (function(FeeAmount2) {
70059
+ FeeAmount2[FeeAmount2["LOWEST"] = 100] = "LOWEST";
70060
+ FeeAmount2[FeeAmount2["LOW_200"] = 200] = "LOW_200";
70061
+ FeeAmount2[FeeAmount2["LOW_300"] = 300] = "LOW_300";
70062
+ FeeAmount2[FeeAmount2["LOW_400"] = 400] = "LOW_400";
70063
+ FeeAmount2[FeeAmount2["LOW"] = 500] = "LOW";
70064
+ FeeAmount2[FeeAmount2["MEDIUM"] = 3000] = "MEDIUM";
70065
+ FeeAmount2[FeeAmount2["HIGH"] = 1e4] = "HIGH";
70066
+ })(FeeAmount || (FeeAmount = {}));
70067
+ var TICK_SPACINGS = {
70068
+ [FeeAmount.LOWEST]: 1,
70069
+ [FeeAmount.LOW_200]: 4,
70070
+ [FeeAmount.LOW_300]: 6,
70071
+ [FeeAmount.LOW_400]: 8,
70072
+ [FeeAmount.LOW]: 10,
70073
+ [FeeAmount.MEDIUM]: 60,
70074
+ [FeeAmount.HIGH]: 200
70075
+ };
70076
+
70077
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/internalConstants.js
70078
+ var import_jsbi7 = __toESM(require_jsbi_cjs(), 1);
70079
+ var NEGATIVE_ONE = import_jsbi7.default.BigInt(-1);
70080
+ var ZERO2 = import_jsbi7.default.BigInt(0);
70081
+ var ONE2 = import_jsbi7.default.BigInt(1);
70082
+ var Q96 = import_jsbi7.default.exponentiate(import_jsbi7.default.BigInt(2), import_jsbi7.default.BigInt(96));
70083
+ var Q192 = import_jsbi7.default.exponentiate(Q96, import_jsbi7.default.BigInt(2));
70084
+
70085
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/computePoolAddress.js
70086
+ var import_abi23 = __toESM(require_lib18(), 1);
70087
+ var import_address17 = __toESM(require_lib6(), 1);
70088
+ var import_solidity4 = __toESM(require_lib46(), 1);
70089
+ function computePoolAddress({ factoryAddress, tokenA, tokenB, fee, initCodeHashManualOverride, chainId }) {
70090
+ const [token0, token1] = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA];
70091
+ const salt = import_solidity4.keccak256(["bytes"], [import_abi23.defaultAbiCoder.encode(["address", "address", "uint24"], [token0.address, token1.address, fee])]);
70092
+ const initCodeHash = initCodeHashManualOverride !== null && initCodeHashManualOverride !== undefined ? initCodeHashManualOverride : poolInitCodeHash(chainId);
70093
+ switch (chainId) {
70094
+ case ChainId.ZKSYNC:
70095
+ return computeZksyncCreate2Address(factoryAddress, initCodeHash, salt);
70096
+ default:
70097
+ return import_address17.getCreate2Address(factoryAddress, salt, initCodeHash);
70098
+ }
70099
+ }
70100
+
70101
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/swapMath.js
70102
+ var import_jsbi10 = __toESM(require_jsbi_cjs(), 1);
70103
+
70104
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/fullMath.js
70105
+ var import_jsbi8 = __toESM(require_jsbi_cjs(), 1);
70106
+ class FullMath {
70107
+ constructor() {}
70108
+ static mulDivRoundingUp(a, b, denominator) {
70109
+ const product = import_jsbi8.default.multiply(a, b);
70110
+ let result = import_jsbi8.default.divide(product, denominator);
70111
+ if (import_jsbi8.default.notEqual(import_jsbi8.default.remainder(product, denominator), ZERO2))
70112
+ result = import_jsbi8.default.add(result, ONE2);
70113
+ return result;
70114
+ }
70115
+ }
70116
+
70117
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/utils/sqrtPriceMath.js
70118
+ var import_jsbi9 = __toESM(require_jsbi_cjs(), 1);
70119
+ var MaxUint160 = import_jsbi9.default.subtract(import_jsbi9.default.exponentiate(import_jsbi9.default.BigInt(2), import_jsbi9.default.BigInt(160)), ONE2);
70120
+ function multiplyIn256(x, y) {
70121
+ const product = import_jsbi9.default.multiply(x, y);
70122
+ return import_jsbi9.default.bitwiseAnd(product, MaxUint256);
70123
+ }
70124
+ function addIn256(x, y) {
70125
+ const sum = import_jsbi9.default.add(x, y);
70126
+ return import_jsbi9.default.bitwiseAnd(sum, MaxUint256);
70127
+ }
70128
+
70129
+ class SqrtPriceMath {
70130
+ constructor() {}
70131
+ static getAmount0Delta(sqrtRatioAX96, sqrtRatioBX96, liquidity, roundUp) {
70132
+ if (import_jsbi9.default.greaterThan(sqrtRatioAX96, sqrtRatioBX96)) {
70133
+ [sqrtRatioAX96, sqrtRatioBX96] = [sqrtRatioBX96, sqrtRatioAX96];
70134
+ }
70135
+ const numerator1 = import_jsbi9.default.leftShift(liquidity, import_jsbi9.default.BigInt(96));
70136
+ const numerator2 = import_jsbi9.default.subtract(sqrtRatioBX96, sqrtRatioAX96);
70137
+ return roundUp ? FullMath.mulDivRoundingUp(FullMath.mulDivRoundingUp(numerator1, numerator2, sqrtRatioBX96), ONE2, sqrtRatioAX96) : import_jsbi9.default.divide(import_jsbi9.default.divide(import_jsbi9.default.multiply(numerator1, numerator2), sqrtRatioBX96), sqrtRatioAX96);
70138
+ }
70139
+ static getAmount1Delta(sqrtRatioAX96, sqrtRatioBX96, liquidity, roundUp) {
70140
+ if (import_jsbi9.default.greaterThan(sqrtRatioAX96, sqrtRatioBX96)) {
70141
+ [sqrtRatioAX96, sqrtRatioBX96] = [sqrtRatioBX96, sqrtRatioAX96];
70142
+ }
70143
+ return roundUp ? FullMath.mulDivRoundingUp(liquidity, import_jsbi9.default.subtract(sqrtRatioBX96, sqrtRatioAX96), Q96) : import_jsbi9.default.divide(import_jsbi9.default.multiply(liquidity, import_jsbi9.default.subtract(sqrtRatioBX96, sqrtRatioAX96)), Q96);
70144
+ }
70145
+ static getNextSqrtPriceFromInput(sqrtPX96, liquidity, amountIn, zeroForOne) {
70146
+ invariant(import_jsbi9.default.greaterThan(sqrtPX96, ZERO2));
70147
+ invariant(import_jsbi9.default.greaterThan(liquidity, ZERO2));
70148
+ return zeroForOne ? this.getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amountIn, true) : this.getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amountIn, true);
70149
+ }
70150
+ static getNextSqrtPriceFromOutput(sqrtPX96, liquidity, amountOut, zeroForOne) {
70151
+ invariant(import_jsbi9.default.greaterThan(sqrtPX96, ZERO2));
70152
+ invariant(import_jsbi9.default.greaterThan(liquidity, ZERO2));
70153
+ return zeroForOne ? this.getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amountOut, false) : this.getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amountOut, false);
70154
+ }
70155
+ static getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amount, add) {
70156
+ if (import_jsbi9.default.equal(amount, ZERO2))
70157
+ return sqrtPX96;
70158
+ const numerator1 = import_jsbi9.default.leftShift(liquidity, import_jsbi9.default.BigInt(96));
70159
+ if (add) {
70160
+ let product = multiplyIn256(amount, sqrtPX96);
70161
+ if (import_jsbi9.default.equal(import_jsbi9.default.divide(product, amount), sqrtPX96)) {
70162
+ const denominator = addIn256(numerator1, product);
70163
+ if (import_jsbi9.default.greaterThanOrEqual(denominator, numerator1)) {
70164
+ return FullMath.mulDivRoundingUp(numerator1, sqrtPX96, denominator);
70908
70165
  }
70909
70166
  }
70910
70167
  return FullMath.mulDivRoundingUp(numerator1, ONE2, import_jsbi9.default.add(import_jsbi9.default.divide(numerator1, sqrtPX96), amount));
@@ -71647,1701 +70904,287 @@ function tradeComparator(a, b) {
71647
70904
  invariant(a.outputAmount.currency.equals(b.outputAmount.currency), "OUTPUT_CURRENCY");
71648
70905
  if (a.outputAmount.equalTo(b.outputAmount)) {
71649
70906
  if (a.inputAmount.equalTo(b.inputAmount)) {
71650
- const aHops = a.swaps.reduce((total, cur) => total + cur.route.tokenPath.length, 0);
71651
- const bHops = b.swaps.reduce((total, cur) => total + cur.route.tokenPath.length, 0);
71652
- return aHops - bHops;
71653
- }
71654
- if (a.inputAmount.lessThan(b.inputAmount)) {
71655
- return -1;
71656
- } else {
71657
- return 1;
71658
- }
71659
- } else {
71660
- if (a.outputAmount.lessThan(b.outputAmount)) {
71661
- return 1;
71662
- } else {
71663
- return -1;
71664
- }
71665
- }
71666
- }
71667
-
71668
- class Trade {
71669
- get route() {
71670
- invariant(this.swaps.length === 1, "MULTIPLE_ROUTES");
71671
- return this.swaps[0].route;
71672
- }
71673
- get inputAmount() {
71674
- if (this._inputAmount) {
71675
- return this._inputAmount;
71676
- }
71677
- const inputCurrency = this.swaps[0].inputAmount.currency;
71678
- const totalInputFromRoutes = this.swaps.map(({ inputAmount }) => inputAmount).reduce((total, cur) => total.add(cur), CurrencyAmount.fromRawAmount(inputCurrency, 0));
71679
- this._inputAmount = totalInputFromRoutes;
71680
- return this._inputAmount;
71681
- }
71682
- get outputAmount() {
71683
- if (this._outputAmount) {
71684
- return this._outputAmount;
71685
- }
71686
- const outputCurrency = this.swaps[0].outputAmount.currency;
71687
- const totalOutputFromRoutes = this.swaps.map(({ outputAmount }) => outputAmount).reduce((total, cur) => total.add(cur), CurrencyAmount.fromRawAmount(outputCurrency, 0));
71688
- this._outputAmount = totalOutputFromRoutes;
71689
- return this._outputAmount;
71690
- }
71691
- get executionPrice() {
71692
- var _a;
71693
- return (_a = this._executionPrice) !== null && _a !== undefined ? _a : this._executionPrice = new Price(this.inputAmount.currency, this.outputAmount.currency, this.inputAmount.quotient, this.outputAmount.quotient);
71694
- }
71695
- get priceImpact() {
71696
- if (this._priceImpact) {
71697
- return this._priceImpact;
71698
- }
71699
- let spotOutputAmount = CurrencyAmount.fromRawAmount(this.outputAmount.currency, 0);
71700
- for (const { route, inputAmount } of this.swaps) {
71701
- const midPrice = route.midPrice;
71702
- spotOutputAmount = spotOutputAmount.add(midPrice.quote(inputAmount));
71703
- }
71704
- const priceImpact = spotOutputAmount.subtract(this.outputAmount).divide(spotOutputAmount);
71705
- this._priceImpact = new Percent(priceImpact.numerator, priceImpact.denominator);
71706
- return this._priceImpact;
71707
- }
71708
- static async exactIn(route, amountIn) {
71709
- return Trade.fromRoute(route, amountIn, TradeType.EXACT_INPUT);
71710
- }
71711
- static async exactOut(route, amountOut) {
71712
- return Trade.fromRoute(route, amountOut, TradeType.EXACT_OUTPUT);
71713
- }
71714
- static async fromRoute(route, amount, tradeType) {
71715
- const amounts = new Array(route.tokenPath.length);
71716
- let inputAmount;
71717
- let outputAmount;
71718
- if (tradeType === TradeType.EXACT_INPUT) {
71719
- invariant(amount.currency.equals(route.input), "INPUT");
71720
- amounts[0] = amount.wrapped;
71721
- for (let i = 0;i < route.tokenPath.length - 1; i++) {
71722
- const pool = route.pools[i];
71723
- const [outputAmount2] = await pool.getOutputAmount(amounts[i]);
71724
- amounts[i + 1] = outputAmount2;
71725
- }
71726
- inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amount.numerator, amount.denominator);
71727
- outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amounts[amounts.length - 1].numerator, amounts[amounts.length - 1].denominator);
71728
- } else {
71729
- invariant(amount.currency.equals(route.output), "OUTPUT");
71730
- amounts[amounts.length - 1] = amount.wrapped;
71731
- for (let i = route.tokenPath.length - 1;i > 0; i--) {
71732
- const pool = route.pools[i - 1];
71733
- const [inputAmount2] = await pool.getInputAmount(amounts[i]);
71734
- amounts[i - 1] = inputAmount2;
71735
- }
71736
- inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amounts[0].numerator, amounts[0].denominator);
71737
- outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amount.numerator, amount.denominator);
71738
- }
71739
- return new Trade({
71740
- routes: [{ inputAmount, outputAmount, route }],
71741
- tradeType
71742
- });
71743
- }
71744
- static async fromRoutes(routes, tradeType) {
71745
- const populatedRoutes = [];
71746
- for (const { route, amount } of routes) {
71747
- const amounts = new Array(route.tokenPath.length);
71748
- let inputAmount;
71749
- let outputAmount;
71750
- if (tradeType === TradeType.EXACT_INPUT) {
71751
- invariant(amount.currency.equals(route.input), "INPUT");
71752
- inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amount.numerator, amount.denominator);
71753
- amounts[0] = CurrencyAmount.fromFractionalAmount(route.input.wrapped, amount.numerator, amount.denominator);
71754
- for (let i = 0;i < route.tokenPath.length - 1; i++) {
71755
- const pool = route.pools[i];
71756
- const [outputAmount2] = await pool.getOutputAmount(amounts[i]);
71757
- amounts[i + 1] = outputAmount2;
71758
- }
71759
- outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amounts[amounts.length - 1].numerator, amounts[amounts.length - 1].denominator);
71760
- } else {
71761
- invariant(amount.currency.equals(route.output), "OUTPUT");
71762
- outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amount.numerator, amount.denominator);
71763
- amounts[amounts.length - 1] = CurrencyAmount.fromFractionalAmount(route.output.wrapped, amount.numerator, amount.denominator);
71764
- for (let i = route.tokenPath.length - 1;i > 0; i--) {
71765
- const pool = route.pools[i - 1];
71766
- const [inputAmount2] = await pool.getInputAmount(amounts[i]);
71767
- amounts[i - 1] = inputAmount2;
71768
- }
71769
- inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amounts[0].numerator, amounts[0].denominator);
71770
- }
71771
- populatedRoutes.push({ route, inputAmount, outputAmount });
71772
- }
71773
- return new Trade({
71774
- routes: populatedRoutes,
71775
- tradeType
71776
- });
71777
- }
71778
- static createUncheckedTrade(constructorArguments) {
71779
- return new Trade({
71780
- ...constructorArguments,
71781
- routes: [
71782
- {
71783
- inputAmount: constructorArguments.inputAmount,
71784
- outputAmount: constructorArguments.outputAmount,
71785
- route: constructorArguments.route
71786
- }
71787
- ]
71788
- });
71789
- }
71790
- static createUncheckedTradeWithMultipleRoutes(constructorArguments) {
71791
- return new Trade(constructorArguments);
71792
- }
71793
- constructor({ routes, tradeType }) {
71794
- const inputCurrency = routes[0].inputAmount.currency;
71795
- const outputCurrency = routes[0].outputAmount.currency;
71796
- invariant(routes.every(({ route }) => inputCurrency.wrapped.equals(route.input.wrapped)), "INPUT_CURRENCY_MATCH");
71797
- invariant(routes.every(({ route }) => outputCurrency.wrapped.equals(route.output.wrapped)), "OUTPUT_CURRENCY_MATCH");
71798
- const numPools = routes.map(({ route }) => route.pools.length).reduce((total, cur) => total + cur, 0);
71799
- const poolAddressSet = new Set;
71800
- for (const { route } of routes) {
71801
- for (const pool of route.pools) {
71802
- poolAddressSet.add(Pool.getAddress(pool.token0, pool.token1, pool.fee));
71803
- }
71804
- }
71805
- invariant(numPools === poolAddressSet.size, "POOLS_DUPLICATED");
71806
- this.swaps = routes;
71807
- this.tradeType = tradeType;
71808
- }
71809
- minimumAmountOut(slippageTolerance, amountOut = this.outputAmount) {
71810
- invariant(!slippageTolerance.lessThan(ZERO2), "SLIPPAGE_TOLERANCE");
71811
- if (this.tradeType === TradeType.EXACT_OUTPUT) {
71812
- return amountOut;
71813
- } else {
71814
- const slippageAdjustedAmountOut = new Fraction(ONE2).subtract(slippageTolerance).multiply(amountOut.quotient).quotient;
71815
- const clampedAmount = import_jsbi23.default.greaterThan(slippageAdjustedAmountOut, import_jsbi23.default.BigInt(0)) ? slippageAdjustedAmountOut : import_jsbi23.default.BigInt(0);
71816
- return CurrencyAmount.fromRawAmount(amountOut.currency, clampedAmount);
71817
- }
71818
- }
71819
- maximumAmountIn(slippageTolerance, amountIn = this.inputAmount) {
71820
- invariant(!slippageTolerance.lessThan(ZERO2), "SLIPPAGE_TOLERANCE");
71821
- if (this.tradeType === TradeType.EXACT_INPUT) {
71822
- return amountIn;
71823
- } else {
71824
- const slippageAdjustedAmountIn = new Fraction(ONE2).add(slippageTolerance).multiply(amountIn.quotient).quotient;
71825
- return CurrencyAmount.fromRawAmount(amountIn.currency, slippageAdjustedAmountIn);
71826
- }
71827
- }
71828
- worstExecutionPrice(slippageTolerance) {
71829
- return new Price(this.inputAmount.currency, this.outputAmount.currency, this.maximumAmountIn(slippageTolerance).quotient, this.minimumAmountOut(slippageTolerance).quotient);
71830
- }
71831
- static async bestTradeExactIn(pools, currencyAmountIn, currencyOut, { maxNumResults = 3, maxHops = 3 } = {}, currentPools = [], nextAmountIn = currencyAmountIn, bestTrades = []) {
71832
- invariant(pools.length > 0, "POOLS");
71833
- invariant(maxHops > 0, "MAX_HOPS");
71834
- invariant(currencyAmountIn === nextAmountIn || currentPools.length > 0, "INVALID_RECURSION");
71835
- const amountIn = nextAmountIn.wrapped;
71836
- const tokenOut = currencyOut.wrapped;
71837
- for (let i = 0;i < pools.length; i++) {
71838
- const pool = pools[i];
71839
- if (!pool.token0.equals(amountIn.currency) && !pool.token1.equals(amountIn.currency))
71840
- continue;
71841
- let amountOut;
71842
- try {
71843
- [amountOut] = await pool.getOutputAmount(amountIn);
71844
- } catch (error) {
71845
- if (error.isInsufficientInputAmountError) {
71846
- continue;
71847
- }
71848
- throw error;
71849
- }
71850
- if (amountOut.currency.isToken && amountOut.currency.equals(tokenOut)) {
71851
- sortedInsert(bestTrades, await Trade.fromRoute(new Route([...currentPools, pool], currencyAmountIn.currency, currencyOut), currencyAmountIn, TradeType.EXACT_INPUT), maxNumResults, tradeComparator);
71852
- } else if (maxHops > 1 && pools.length > 1) {
71853
- const poolsExcludingThisPool = pools.slice(0, i).concat(pools.slice(i + 1, pools.length));
71854
- await Trade.bestTradeExactIn(poolsExcludingThisPool, currencyAmountIn, currencyOut, {
71855
- maxNumResults,
71856
- maxHops: maxHops - 1
71857
- }, [...currentPools, pool], amountOut, bestTrades);
71858
- }
71859
- }
71860
- return bestTrades;
71861
- }
71862
- static async bestTradeExactOut(pools, currencyIn, currencyAmountOut, { maxNumResults = 3, maxHops = 3 } = {}, currentPools = [], nextAmountOut = currencyAmountOut, bestTrades = []) {
71863
- invariant(pools.length > 0, "POOLS");
71864
- invariant(maxHops > 0, "MAX_HOPS");
71865
- invariant(currencyAmountOut === nextAmountOut || currentPools.length > 0, "INVALID_RECURSION");
71866
- const amountOut = nextAmountOut.wrapped;
71867
- const tokenIn = currencyIn.wrapped;
71868
- for (let i = 0;i < pools.length; i++) {
71869
- const pool = pools[i];
71870
- if (!pool.token0.equals(amountOut.currency) && !pool.token1.equals(amountOut.currency))
71871
- continue;
71872
- let amountIn;
71873
- try {
71874
- [amountIn] = await pool.getInputAmount(amountOut);
71875
- } catch (error) {
71876
- if (error.isInsufficientReservesError) {
71877
- continue;
71878
- }
71879
- throw error;
71880
- }
71881
- if (amountIn.currency.equals(tokenIn)) {
71882
- sortedInsert(bestTrades, await Trade.fromRoute(new Route([pool, ...currentPools], currencyIn, currencyAmountOut.currency), currencyAmountOut, TradeType.EXACT_OUTPUT), maxNumResults, tradeComparator);
71883
- } else if (maxHops > 1 && pools.length > 1) {
71884
- const poolsExcludingThisPool = pools.slice(0, i).concat(pools.slice(i + 1, pools.length));
71885
- await Trade.bestTradeExactOut(poolsExcludingThisPool, currencyIn, currencyAmountOut, {
71886
- maxNumResults,
71887
- maxHops: maxHops - 1
71888
- }, [pool, ...currentPools], amountIn, bestTrades);
71889
- }
71890
- }
71891
- return bestTrades;
71892
- }
71893
- }
71894
-
71895
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/multicall.js
71896
- var import_abi24 = __toESM(require_lib18(), 1);
71897
- // ../node_modules/@uniswap/v3-periphery/artifacts/contracts/interfaces/IMulticall.sol/IMulticall.json
71898
- var IMulticall_default = {
71899
- _format: "hh-sol-artifact-1",
71900
- contractName: "IMulticall",
71901
- sourceName: "contracts/interfaces/IMulticall.sol",
71902
- abi: [
71903
- {
71904
- inputs: [
71905
- {
71906
- internalType: "bytes[]",
71907
- name: "data",
71908
- type: "bytes[]"
71909
- }
71910
- ],
71911
- name: "multicall",
71912
- outputs: [
71913
- {
71914
- internalType: "bytes[]",
71915
- name: "results",
71916
- type: "bytes[]"
71917
- }
71918
- ],
71919
- stateMutability: "payable",
71920
- type: "function"
71921
- }
71922
- ],
71923
- bytecode: "0x",
71924
- deployedBytecode: "0x",
71925
- linkReferences: {},
71926
- deployedLinkReferences: {}
71927
- };
71928
-
71929
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/multicall.js
71930
- class Multicall {
71931
- constructor() {}
71932
- static encodeMulticall(calldatas) {
71933
- if (!Array.isArray(calldatas)) {
71934
- calldatas = [calldatas];
71935
- }
71936
- return calldatas.length === 1 ? calldatas[0] : Multicall.INTERFACE.encodeFunctionData("multicall", [calldatas]);
71937
- }
71938
- static decodeMulticall(multicall2) {
71939
- return Multicall.INTERFACE.decodeFunctionData("multicall", multicall2).data;
71940
- }
71941
- }
71942
- Multicall.INTERFACE = new import_abi24.Interface(IMulticall_default.abi);
71943
-
71944
- // ../node_modules/@uniswap/v3-sdk/dist/esm/src/nonfungiblePositionManager.js
71945
- var import_jsbi24 = __toESM(require_jsbi_cjs(), 1);
71946
- var import_abi27 = __toESM(require_lib18(), 1);
71947
- // ../node_modules/@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json
71948
- var NonfungiblePositionManager_default = {
71949
- _format: "hh-sol-artifact-1",
71950
- contractName: "NonfungiblePositionManager",
71951
- sourceName: "contracts/NonfungiblePositionManager.sol",
71952
- abi: [
71953
- {
71954
- inputs: [
71955
- {
71956
- internalType: "address",
71957
- name: "_factory",
71958
- type: "address"
71959
- },
71960
- {
71961
- internalType: "address",
71962
- name: "_WETH9",
71963
- type: "address"
71964
- },
71965
- {
71966
- internalType: "address",
71967
- name: "_tokenDescriptor_",
71968
- type: "address"
71969
- }
71970
- ],
71971
- stateMutability: "nonpayable",
71972
- type: "constructor"
71973
- },
71974
- {
71975
- anonymous: false,
71976
- inputs: [
71977
- {
71978
- indexed: true,
71979
- internalType: "address",
71980
- name: "owner",
71981
- type: "address"
71982
- },
71983
- {
71984
- indexed: true,
71985
- internalType: "address",
71986
- name: "approved",
71987
- type: "address"
71988
- },
71989
- {
71990
- indexed: true,
71991
- internalType: "uint256",
71992
- name: "tokenId",
71993
- type: "uint256"
71994
- }
71995
- ],
71996
- name: "Approval",
71997
- type: "event"
71998
- },
71999
- {
72000
- anonymous: false,
72001
- inputs: [
72002
- {
72003
- indexed: true,
72004
- internalType: "address",
72005
- name: "owner",
72006
- type: "address"
72007
- },
72008
- {
72009
- indexed: true,
72010
- internalType: "address",
72011
- name: "operator",
72012
- type: "address"
72013
- },
72014
- {
72015
- indexed: false,
72016
- internalType: "bool",
72017
- name: "approved",
72018
- type: "bool"
72019
- }
72020
- ],
72021
- name: "ApprovalForAll",
72022
- type: "event"
72023
- },
72024
- {
72025
- anonymous: false,
72026
- inputs: [
72027
- {
72028
- indexed: true,
72029
- internalType: "uint256",
72030
- name: "tokenId",
72031
- type: "uint256"
72032
- },
72033
- {
72034
- indexed: false,
72035
- internalType: "address",
72036
- name: "recipient",
72037
- type: "address"
72038
- },
72039
- {
72040
- indexed: false,
72041
- internalType: "uint256",
72042
- name: "amount0",
72043
- type: "uint256"
72044
- },
72045
- {
72046
- indexed: false,
72047
- internalType: "uint256",
72048
- name: "amount1",
72049
- type: "uint256"
72050
- }
72051
- ],
72052
- name: "Collect",
72053
- type: "event"
72054
- },
72055
- {
72056
- anonymous: false,
72057
- inputs: [
72058
- {
72059
- indexed: true,
72060
- internalType: "uint256",
72061
- name: "tokenId",
72062
- type: "uint256"
72063
- },
72064
- {
72065
- indexed: false,
72066
- internalType: "uint128",
72067
- name: "liquidity",
72068
- type: "uint128"
72069
- },
72070
- {
72071
- indexed: false,
72072
- internalType: "uint256",
72073
- name: "amount0",
72074
- type: "uint256"
72075
- },
72076
- {
72077
- indexed: false,
72078
- internalType: "uint256",
72079
- name: "amount1",
72080
- type: "uint256"
72081
- }
72082
- ],
72083
- name: "DecreaseLiquidity",
72084
- type: "event"
72085
- },
72086
- {
72087
- anonymous: false,
72088
- inputs: [
72089
- {
72090
- indexed: true,
72091
- internalType: "uint256",
72092
- name: "tokenId",
72093
- type: "uint256"
72094
- },
72095
- {
72096
- indexed: false,
72097
- internalType: "uint128",
72098
- name: "liquidity",
72099
- type: "uint128"
72100
- },
72101
- {
72102
- indexed: false,
72103
- internalType: "uint256",
72104
- name: "amount0",
72105
- type: "uint256"
72106
- },
72107
- {
72108
- indexed: false,
72109
- internalType: "uint256",
72110
- name: "amount1",
72111
- type: "uint256"
72112
- }
72113
- ],
72114
- name: "IncreaseLiquidity",
72115
- type: "event"
72116
- },
72117
- {
72118
- anonymous: false,
72119
- inputs: [
72120
- {
72121
- indexed: true,
72122
- internalType: "address",
72123
- name: "from",
72124
- type: "address"
72125
- },
72126
- {
72127
- indexed: true,
72128
- internalType: "address",
72129
- name: "to",
72130
- type: "address"
72131
- },
72132
- {
72133
- indexed: true,
72134
- internalType: "uint256",
72135
- name: "tokenId",
72136
- type: "uint256"
72137
- }
72138
- ],
72139
- name: "Transfer",
72140
- type: "event"
72141
- },
72142
- {
72143
- inputs: [],
72144
- name: "DOMAIN_SEPARATOR",
72145
- outputs: [
72146
- {
72147
- internalType: "bytes32",
72148
- name: "",
72149
- type: "bytes32"
72150
- }
72151
- ],
72152
- stateMutability: "view",
72153
- type: "function"
72154
- },
72155
- {
72156
- inputs: [],
72157
- name: "PERMIT_TYPEHASH",
72158
- outputs: [
72159
- {
72160
- internalType: "bytes32",
72161
- name: "",
72162
- type: "bytes32"
72163
- }
72164
- ],
72165
- stateMutability: "view",
72166
- type: "function"
72167
- },
72168
- {
72169
- inputs: [],
72170
- name: "WETH9",
72171
- outputs: [
72172
- {
72173
- internalType: "address",
72174
- name: "",
72175
- type: "address"
72176
- }
72177
- ],
72178
- stateMutability: "view",
72179
- type: "function"
72180
- },
72181
- {
72182
- inputs: [
72183
- {
72184
- internalType: "address",
72185
- name: "to",
72186
- type: "address"
72187
- },
72188
- {
72189
- internalType: "uint256",
72190
- name: "tokenId",
72191
- type: "uint256"
72192
- }
72193
- ],
72194
- name: "approve",
72195
- outputs: [],
72196
- stateMutability: "nonpayable",
72197
- type: "function"
72198
- },
72199
- {
72200
- inputs: [
72201
- {
72202
- internalType: "address",
72203
- name: "owner",
72204
- type: "address"
72205
- }
72206
- ],
72207
- name: "balanceOf",
72208
- outputs: [
72209
- {
72210
- internalType: "uint256",
72211
- name: "",
72212
- type: "uint256"
72213
- }
72214
- ],
72215
- stateMutability: "view",
72216
- type: "function"
72217
- },
72218
- {
72219
- inputs: [],
72220
- name: "baseURI",
72221
- outputs: [
72222
- {
72223
- internalType: "string",
72224
- name: "",
72225
- type: "string"
72226
- }
72227
- ],
72228
- stateMutability: "pure",
72229
- type: "function"
72230
- },
72231
- {
72232
- inputs: [
72233
- {
72234
- internalType: "uint256",
72235
- name: "tokenId",
72236
- type: "uint256"
72237
- }
72238
- ],
72239
- name: "burn",
72240
- outputs: [],
72241
- stateMutability: "payable",
72242
- type: "function"
72243
- },
72244
- {
72245
- inputs: [
72246
- {
72247
- components: [
72248
- {
72249
- internalType: "uint256",
72250
- name: "tokenId",
72251
- type: "uint256"
72252
- },
72253
- {
72254
- internalType: "address",
72255
- name: "recipient",
72256
- type: "address"
72257
- },
72258
- {
72259
- internalType: "uint128",
72260
- name: "amount0Max",
72261
- type: "uint128"
72262
- },
72263
- {
72264
- internalType: "uint128",
72265
- name: "amount1Max",
72266
- type: "uint128"
72267
- }
72268
- ],
72269
- internalType: "struct INonfungiblePositionManager.CollectParams",
72270
- name: "params",
72271
- type: "tuple"
72272
- }
72273
- ],
72274
- name: "collect",
72275
- outputs: [
72276
- {
72277
- internalType: "uint256",
72278
- name: "amount0",
72279
- type: "uint256"
72280
- },
72281
- {
72282
- internalType: "uint256",
72283
- name: "amount1",
72284
- type: "uint256"
72285
- }
72286
- ],
72287
- stateMutability: "payable",
72288
- type: "function"
72289
- },
72290
- {
72291
- inputs: [
72292
- {
72293
- internalType: "address",
72294
- name: "token0",
72295
- type: "address"
72296
- },
72297
- {
72298
- internalType: "address",
72299
- name: "token1",
72300
- type: "address"
72301
- },
72302
- {
72303
- internalType: "uint24",
72304
- name: "fee",
72305
- type: "uint24"
72306
- },
72307
- {
72308
- internalType: "uint160",
72309
- name: "sqrtPriceX96",
72310
- type: "uint160"
72311
- }
72312
- ],
72313
- name: "createAndInitializePoolIfNecessary",
72314
- outputs: [
72315
- {
72316
- internalType: "address",
72317
- name: "pool",
72318
- type: "address"
72319
- }
72320
- ],
72321
- stateMutability: "payable",
72322
- type: "function"
72323
- },
72324
- {
72325
- inputs: [
72326
- {
72327
- components: [
72328
- {
72329
- internalType: "uint256",
72330
- name: "tokenId",
72331
- type: "uint256"
72332
- },
72333
- {
72334
- internalType: "uint128",
72335
- name: "liquidity",
72336
- type: "uint128"
72337
- },
72338
- {
72339
- internalType: "uint256",
72340
- name: "amount0Min",
72341
- type: "uint256"
72342
- },
72343
- {
72344
- internalType: "uint256",
72345
- name: "amount1Min",
72346
- type: "uint256"
72347
- },
72348
- {
72349
- internalType: "uint256",
72350
- name: "deadline",
72351
- type: "uint256"
72352
- }
72353
- ],
72354
- internalType: "struct INonfungiblePositionManager.DecreaseLiquidityParams",
72355
- name: "params",
72356
- type: "tuple"
72357
- }
72358
- ],
72359
- name: "decreaseLiquidity",
72360
- outputs: [
72361
- {
72362
- internalType: "uint256",
72363
- name: "amount0",
72364
- type: "uint256"
72365
- },
72366
- {
72367
- internalType: "uint256",
72368
- name: "amount1",
72369
- type: "uint256"
72370
- }
72371
- ],
72372
- stateMutability: "payable",
72373
- type: "function"
72374
- },
72375
- {
72376
- inputs: [],
72377
- name: "factory",
72378
- outputs: [
72379
- {
72380
- internalType: "address",
72381
- name: "",
72382
- type: "address"
72383
- }
72384
- ],
72385
- stateMutability: "view",
72386
- type: "function"
72387
- },
72388
- {
72389
- inputs: [
72390
- {
72391
- internalType: "uint256",
72392
- name: "tokenId",
72393
- type: "uint256"
72394
- }
72395
- ],
72396
- name: "getApproved",
72397
- outputs: [
72398
- {
72399
- internalType: "address",
72400
- name: "",
72401
- type: "address"
72402
- }
72403
- ],
72404
- stateMutability: "view",
72405
- type: "function"
72406
- },
72407
- {
72408
- inputs: [
72409
- {
72410
- components: [
72411
- {
72412
- internalType: "uint256",
72413
- name: "tokenId",
72414
- type: "uint256"
72415
- },
72416
- {
72417
- internalType: "uint256",
72418
- name: "amount0Desired",
72419
- type: "uint256"
72420
- },
72421
- {
72422
- internalType: "uint256",
72423
- name: "amount1Desired",
72424
- type: "uint256"
72425
- },
72426
- {
72427
- internalType: "uint256",
72428
- name: "amount0Min",
72429
- type: "uint256"
72430
- },
72431
- {
72432
- internalType: "uint256",
72433
- name: "amount1Min",
72434
- type: "uint256"
72435
- },
72436
- {
72437
- internalType: "uint256",
72438
- name: "deadline",
72439
- type: "uint256"
72440
- }
72441
- ],
72442
- internalType: "struct INonfungiblePositionManager.IncreaseLiquidityParams",
72443
- name: "params",
72444
- type: "tuple"
72445
- }
72446
- ],
72447
- name: "increaseLiquidity",
72448
- outputs: [
72449
- {
72450
- internalType: "uint128",
72451
- name: "liquidity",
72452
- type: "uint128"
72453
- },
72454
- {
72455
- internalType: "uint256",
72456
- name: "amount0",
72457
- type: "uint256"
72458
- },
72459
- {
72460
- internalType: "uint256",
72461
- name: "amount1",
72462
- type: "uint256"
72463
- }
72464
- ],
72465
- stateMutability: "payable",
72466
- type: "function"
72467
- },
72468
- {
72469
- inputs: [
72470
- {
72471
- internalType: "address",
72472
- name: "owner",
72473
- type: "address"
72474
- },
72475
- {
72476
- internalType: "address",
72477
- name: "operator",
72478
- type: "address"
72479
- }
72480
- ],
72481
- name: "isApprovedForAll",
72482
- outputs: [
72483
- {
72484
- internalType: "bool",
72485
- name: "",
72486
- type: "bool"
72487
- }
72488
- ],
72489
- stateMutability: "view",
72490
- type: "function"
72491
- },
72492
- {
72493
- inputs: [
72494
- {
72495
- components: [
72496
- {
72497
- internalType: "address",
72498
- name: "token0",
72499
- type: "address"
72500
- },
72501
- {
72502
- internalType: "address",
72503
- name: "token1",
72504
- type: "address"
72505
- },
72506
- {
72507
- internalType: "uint24",
72508
- name: "fee",
72509
- type: "uint24"
72510
- },
72511
- {
72512
- internalType: "int24",
72513
- name: "tickLower",
72514
- type: "int24"
72515
- },
72516
- {
72517
- internalType: "int24",
72518
- name: "tickUpper",
72519
- type: "int24"
72520
- },
72521
- {
72522
- internalType: "uint256",
72523
- name: "amount0Desired",
72524
- type: "uint256"
72525
- },
72526
- {
72527
- internalType: "uint256",
72528
- name: "amount1Desired",
72529
- type: "uint256"
72530
- },
72531
- {
72532
- internalType: "uint256",
72533
- name: "amount0Min",
72534
- type: "uint256"
72535
- },
72536
- {
72537
- internalType: "uint256",
72538
- name: "amount1Min",
72539
- type: "uint256"
72540
- },
72541
- {
72542
- internalType: "address",
72543
- name: "recipient",
72544
- type: "address"
72545
- },
72546
- {
72547
- internalType: "uint256",
72548
- name: "deadline",
72549
- type: "uint256"
72550
- }
72551
- ],
72552
- internalType: "struct INonfungiblePositionManager.MintParams",
72553
- name: "params",
72554
- type: "tuple"
72555
- }
72556
- ],
72557
- name: "mint",
72558
- outputs: [
72559
- {
72560
- internalType: "uint256",
72561
- name: "tokenId",
72562
- type: "uint256"
72563
- },
72564
- {
72565
- internalType: "uint128",
72566
- name: "liquidity",
72567
- type: "uint128"
72568
- },
72569
- {
72570
- internalType: "uint256",
72571
- name: "amount0",
72572
- type: "uint256"
72573
- },
72574
- {
72575
- internalType: "uint256",
72576
- name: "amount1",
72577
- type: "uint256"
72578
- }
72579
- ],
72580
- stateMutability: "payable",
72581
- type: "function"
72582
- },
72583
- {
72584
- inputs: [
72585
- {
72586
- internalType: "bytes[]",
72587
- name: "data",
72588
- type: "bytes[]"
72589
- }
72590
- ],
72591
- name: "multicall",
72592
- outputs: [
72593
- {
72594
- internalType: "bytes[]",
72595
- name: "results",
72596
- type: "bytes[]"
72597
- }
72598
- ],
72599
- stateMutability: "payable",
72600
- type: "function"
72601
- },
72602
- {
72603
- inputs: [],
72604
- name: "name",
72605
- outputs: [
72606
- {
72607
- internalType: "string",
72608
- name: "",
72609
- type: "string"
72610
- }
72611
- ],
72612
- stateMutability: "view",
72613
- type: "function"
72614
- },
72615
- {
72616
- inputs: [
72617
- {
72618
- internalType: "uint256",
72619
- name: "tokenId",
72620
- type: "uint256"
72621
- }
72622
- ],
72623
- name: "ownerOf",
72624
- outputs: [
72625
- {
72626
- internalType: "address",
72627
- name: "",
72628
- type: "address"
72629
- }
72630
- ],
72631
- stateMutability: "view",
72632
- type: "function"
72633
- },
72634
- {
72635
- inputs: [
72636
- {
72637
- internalType: "address",
72638
- name: "spender",
72639
- type: "address"
72640
- },
72641
- {
72642
- internalType: "uint256",
72643
- name: "tokenId",
72644
- type: "uint256"
72645
- },
72646
- {
72647
- internalType: "uint256",
72648
- name: "deadline",
72649
- type: "uint256"
72650
- },
72651
- {
72652
- internalType: "uint8",
72653
- name: "v",
72654
- type: "uint8"
72655
- },
72656
- {
72657
- internalType: "bytes32",
72658
- name: "r",
72659
- type: "bytes32"
72660
- },
72661
- {
72662
- internalType: "bytes32",
72663
- name: "s",
72664
- type: "bytes32"
72665
- }
72666
- ],
72667
- name: "permit",
72668
- outputs: [],
72669
- stateMutability: "payable",
72670
- type: "function"
72671
- },
72672
- {
72673
- inputs: [
72674
- {
72675
- internalType: "uint256",
72676
- name: "tokenId",
72677
- type: "uint256"
72678
- }
72679
- ],
72680
- name: "positions",
72681
- outputs: [
72682
- {
72683
- internalType: "uint96",
72684
- name: "nonce",
72685
- type: "uint96"
72686
- },
72687
- {
72688
- internalType: "address",
72689
- name: "operator",
72690
- type: "address"
72691
- },
72692
- {
72693
- internalType: "address",
72694
- name: "token0",
72695
- type: "address"
72696
- },
72697
- {
72698
- internalType: "address",
72699
- name: "token1",
72700
- type: "address"
72701
- },
72702
- {
72703
- internalType: "uint24",
72704
- name: "fee",
72705
- type: "uint24"
72706
- },
72707
- {
72708
- internalType: "int24",
72709
- name: "tickLower",
72710
- type: "int24"
72711
- },
72712
- {
72713
- internalType: "int24",
72714
- name: "tickUpper",
72715
- type: "int24"
72716
- },
72717
- {
72718
- internalType: "uint128",
72719
- name: "liquidity",
72720
- type: "uint128"
72721
- },
72722
- {
72723
- internalType: "uint256",
72724
- name: "feeGrowthInside0LastX128",
72725
- type: "uint256"
72726
- },
72727
- {
72728
- internalType: "uint256",
72729
- name: "feeGrowthInside1LastX128",
72730
- type: "uint256"
72731
- },
72732
- {
72733
- internalType: "uint128",
72734
- name: "tokensOwed0",
72735
- type: "uint128"
72736
- },
72737
- {
72738
- internalType: "uint128",
72739
- name: "tokensOwed1",
72740
- type: "uint128"
72741
- }
72742
- ],
72743
- stateMutability: "view",
72744
- type: "function"
72745
- },
72746
- {
72747
- inputs: [],
72748
- name: "refundETH",
72749
- outputs: [],
72750
- stateMutability: "payable",
72751
- type: "function"
72752
- },
72753
- {
72754
- inputs: [
72755
- {
72756
- internalType: "address",
72757
- name: "from",
72758
- type: "address"
72759
- },
72760
- {
72761
- internalType: "address",
72762
- name: "to",
72763
- type: "address"
72764
- },
72765
- {
72766
- internalType: "uint256",
72767
- name: "tokenId",
72768
- type: "uint256"
72769
- }
72770
- ],
72771
- name: "safeTransferFrom",
72772
- outputs: [],
72773
- stateMutability: "nonpayable",
72774
- type: "function"
72775
- },
72776
- {
72777
- inputs: [
72778
- {
72779
- internalType: "address",
72780
- name: "from",
72781
- type: "address"
72782
- },
72783
- {
72784
- internalType: "address",
72785
- name: "to",
72786
- type: "address"
72787
- },
72788
- {
72789
- internalType: "uint256",
72790
- name: "tokenId",
72791
- type: "uint256"
72792
- },
72793
- {
72794
- internalType: "bytes",
72795
- name: "_data",
72796
- type: "bytes"
72797
- }
72798
- ],
72799
- name: "safeTransferFrom",
72800
- outputs: [],
72801
- stateMutability: "nonpayable",
72802
- type: "function"
72803
- },
72804
- {
72805
- inputs: [
72806
- {
72807
- internalType: "address",
72808
- name: "token",
72809
- type: "address"
72810
- },
72811
- {
72812
- internalType: "uint256",
72813
- name: "value",
72814
- type: "uint256"
72815
- },
72816
- {
72817
- internalType: "uint256",
72818
- name: "deadline",
72819
- type: "uint256"
72820
- },
72821
- {
72822
- internalType: "uint8",
72823
- name: "v",
72824
- type: "uint8"
72825
- },
72826
- {
72827
- internalType: "bytes32",
72828
- name: "r",
72829
- type: "bytes32"
72830
- },
72831
- {
72832
- internalType: "bytes32",
72833
- name: "s",
72834
- type: "bytes32"
72835
- }
72836
- ],
72837
- name: "selfPermit",
72838
- outputs: [],
72839
- stateMutability: "payable",
72840
- type: "function"
72841
- },
72842
- {
72843
- inputs: [
72844
- {
72845
- internalType: "address",
72846
- name: "token",
72847
- type: "address"
72848
- },
72849
- {
72850
- internalType: "uint256",
72851
- name: "nonce",
72852
- type: "uint256"
72853
- },
72854
- {
72855
- internalType: "uint256",
72856
- name: "expiry",
72857
- type: "uint256"
72858
- },
72859
- {
72860
- internalType: "uint8",
72861
- name: "v",
72862
- type: "uint8"
72863
- },
72864
- {
72865
- internalType: "bytes32",
72866
- name: "r",
72867
- type: "bytes32"
72868
- },
72869
- {
72870
- internalType: "bytes32",
72871
- name: "s",
72872
- type: "bytes32"
72873
- }
72874
- ],
72875
- name: "selfPermitAllowed",
72876
- outputs: [],
72877
- stateMutability: "payable",
72878
- type: "function"
72879
- },
72880
- {
72881
- inputs: [
72882
- {
72883
- internalType: "address",
72884
- name: "token",
72885
- type: "address"
72886
- },
72887
- {
72888
- internalType: "uint256",
72889
- name: "nonce",
72890
- type: "uint256"
72891
- },
72892
- {
72893
- internalType: "uint256",
72894
- name: "expiry",
72895
- type: "uint256"
72896
- },
72897
- {
72898
- internalType: "uint8",
72899
- name: "v",
72900
- type: "uint8"
72901
- },
72902
- {
72903
- internalType: "bytes32",
72904
- name: "r",
72905
- type: "bytes32"
72906
- },
72907
- {
72908
- internalType: "bytes32",
72909
- name: "s",
72910
- type: "bytes32"
72911
- }
72912
- ],
72913
- name: "selfPermitAllowedIfNecessary",
72914
- outputs: [],
72915
- stateMutability: "payable",
72916
- type: "function"
72917
- },
72918
- {
72919
- inputs: [
72920
- {
72921
- internalType: "address",
72922
- name: "token",
72923
- type: "address"
72924
- },
72925
- {
72926
- internalType: "uint256",
72927
- name: "value",
72928
- type: "uint256"
72929
- },
72930
- {
72931
- internalType: "uint256",
72932
- name: "deadline",
72933
- type: "uint256"
72934
- },
72935
- {
72936
- internalType: "uint8",
72937
- name: "v",
72938
- type: "uint8"
72939
- },
72940
- {
72941
- internalType: "bytes32",
72942
- name: "r",
72943
- type: "bytes32"
72944
- },
72945
- {
72946
- internalType: "bytes32",
72947
- name: "s",
72948
- type: "bytes32"
72949
- }
72950
- ],
72951
- name: "selfPermitIfNecessary",
72952
- outputs: [],
72953
- stateMutability: "payable",
72954
- type: "function"
72955
- },
72956
- {
72957
- inputs: [
72958
- {
72959
- internalType: "address",
72960
- name: "operator",
72961
- type: "address"
72962
- },
72963
- {
72964
- internalType: "bool",
72965
- name: "approved",
72966
- type: "bool"
72967
- }
72968
- ],
72969
- name: "setApprovalForAll",
72970
- outputs: [],
72971
- stateMutability: "nonpayable",
72972
- type: "function"
72973
- },
72974
- {
72975
- inputs: [
72976
- {
72977
- internalType: "bytes4",
72978
- name: "interfaceId",
72979
- type: "bytes4"
72980
- }
72981
- ],
72982
- name: "supportsInterface",
72983
- outputs: [
72984
- {
72985
- internalType: "bool",
72986
- name: "",
72987
- type: "bool"
72988
- }
72989
- ],
72990
- stateMutability: "view",
72991
- type: "function"
72992
- },
72993
- {
72994
- inputs: [
72995
- {
72996
- internalType: "address",
72997
- name: "token",
72998
- type: "address"
72999
- },
73000
- {
73001
- internalType: "uint256",
73002
- name: "amountMinimum",
73003
- type: "uint256"
73004
- },
73005
- {
73006
- internalType: "address",
73007
- name: "recipient",
73008
- type: "address"
73009
- }
73010
- ],
73011
- name: "sweepToken",
73012
- outputs: [],
73013
- stateMutability: "payable",
73014
- type: "function"
73015
- },
73016
- {
73017
- inputs: [],
73018
- name: "symbol",
73019
- outputs: [
73020
- {
73021
- internalType: "string",
73022
- name: "",
73023
- type: "string"
73024
- }
73025
- ],
73026
- stateMutability: "view",
73027
- type: "function"
73028
- },
73029
- {
73030
- inputs: [
73031
- {
73032
- internalType: "uint256",
73033
- name: "index",
73034
- type: "uint256"
73035
- }
73036
- ],
73037
- name: "tokenByIndex",
73038
- outputs: [
73039
- {
73040
- internalType: "uint256",
73041
- name: "",
73042
- type: "uint256"
73043
- }
73044
- ],
73045
- stateMutability: "view",
73046
- type: "function"
73047
- },
73048
- {
73049
- inputs: [
73050
- {
73051
- internalType: "address",
73052
- name: "owner",
73053
- type: "address"
73054
- },
73055
- {
73056
- internalType: "uint256",
73057
- name: "index",
73058
- type: "uint256"
73059
- }
73060
- ],
73061
- name: "tokenOfOwnerByIndex",
73062
- outputs: [
73063
- {
73064
- internalType: "uint256",
73065
- name: "",
73066
- type: "uint256"
73067
- }
73068
- ],
73069
- stateMutability: "view",
73070
- type: "function"
73071
- },
73072
- {
73073
- inputs: [
73074
- {
73075
- internalType: "uint256",
73076
- name: "tokenId",
73077
- type: "uint256"
73078
- }
73079
- ],
73080
- name: "tokenURI",
73081
- outputs: [
73082
- {
73083
- internalType: "string",
73084
- name: "",
73085
- type: "string"
70907
+ const aHops = a.swaps.reduce((total, cur) => total + cur.route.tokenPath.length, 0);
70908
+ const bHops = b.swaps.reduce((total, cur) => total + cur.route.tokenPath.length, 0);
70909
+ return aHops - bHops;
70910
+ }
70911
+ if (a.inputAmount.lessThan(b.inputAmount)) {
70912
+ return -1;
70913
+ } else {
70914
+ return 1;
70915
+ }
70916
+ } else {
70917
+ if (a.outputAmount.lessThan(b.outputAmount)) {
70918
+ return 1;
70919
+ } else {
70920
+ return -1;
70921
+ }
70922
+ }
70923
+ }
70924
+
70925
+ class Trade {
70926
+ get route() {
70927
+ invariant(this.swaps.length === 1, "MULTIPLE_ROUTES");
70928
+ return this.swaps[0].route;
70929
+ }
70930
+ get inputAmount() {
70931
+ if (this._inputAmount) {
70932
+ return this._inputAmount;
70933
+ }
70934
+ const inputCurrency = this.swaps[0].inputAmount.currency;
70935
+ const totalInputFromRoutes = this.swaps.map(({ inputAmount }) => inputAmount).reduce((total, cur) => total.add(cur), CurrencyAmount.fromRawAmount(inputCurrency, 0));
70936
+ this._inputAmount = totalInputFromRoutes;
70937
+ return this._inputAmount;
70938
+ }
70939
+ get outputAmount() {
70940
+ if (this._outputAmount) {
70941
+ return this._outputAmount;
70942
+ }
70943
+ const outputCurrency = this.swaps[0].outputAmount.currency;
70944
+ const totalOutputFromRoutes = this.swaps.map(({ outputAmount }) => outputAmount).reduce((total, cur) => total.add(cur), CurrencyAmount.fromRawAmount(outputCurrency, 0));
70945
+ this._outputAmount = totalOutputFromRoutes;
70946
+ return this._outputAmount;
70947
+ }
70948
+ get executionPrice() {
70949
+ var _a;
70950
+ return (_a = this._executionPrice) !== null && _a !== undefined ? _a : this._executionPrice = new Price(this.inputAmount.currency, this.outputAmount.currency, this.inputAmount.quotient, this.outputAmount.quotient);
70951
+ }
70952
+ get priceImpact() {
70953
+ if (this._priceImpact) {
70954
+ return this._priceImpact;
70955
+ }
70956
+ let spotOutputAmount = CurrencyAmount.fromRawAmount(this.outputAmount.currency, 0);
70957
+ for (const { route, inputAmount } of this.swaps) {
70958
+ const midPrice = route.midPrice;
70959
+ spotOutputAmount = spotOutputAmount.add(midPrice.quote(inputAmount));
70960
+ }
70961
+ const priceImpact = spotOutputAmount.subtract(this.outputAmount).divide(spotOutputAmount);
70962
+ this._priceImpact = new Percent(priceImpact.numerator, priceImpact.denominator);
70963
+ return this._priceImpact;
70964
+ }
70965
+ static async exactIn(route, amountIn) {
70966
+ return Trade.fromRoute(route, amountIn, TradeType.EXACT_INPUT);
70967
+ }
70968
+ static async exactOut(route, amountOut) {
70969
+ return Trade.fromRoute(route, amountOut, TradeType.EXACT_OUTPUT);
70970
+ }
70971
+ static async fromRoute(route, amount, tradeType) {
70972
+ const amounts = new Array(route.tokenPath.length);
70973
+ let inputAmount;
70974
+ let outputAmount;
70975
+ if (tradeType === TradeType.EXACT_INPUT) {
70976
+ invariant(amount.currency.equals(route.input), "INPUT");
70977
+ amounts[0] = amount.wrapped;
70978
+ for (let i = 0;i < route.tokenPath.length - 1; i++) {
70979
+ const pool = route.pools[i];
70980
+ const [outputAmount2] = await pool.getOutputAmount(amounts[i]);
70981
+ amounts[i + 1] = outputAmount2;
70982
+ }
70983
+ inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amount.numerator, amount.denominator);
70984
+ outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amounts[amounts.length - 1].numerator, amounts[amounts.length - 1].denominator);
70985
+ } else {
70986
+ invariant(amount.currency.equals(route.output), "OUTPUT");
70987
+ amounts[amounts.length - 1] = amount.wrapped;
70988
+ for (let i = route.tokenPath.length - 1;i > 0; i--) {
70989
+ const pool = route.pools[i - 1];
70990
+ const [inputAmount2] = await pool.getInputAmount(amounts[i]);
70991
+ amounts[i - 1] = inputAmount2;
70992
+ }
70993
+ inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amounts[0].numerator, amounts[0].denominator);
70994
+ outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amount.numerator, amount.denominator);
70995
+ }
70996
+ return new Trade({
70997
+ routes: [{ inputAmount, outputAmount, route }],
70998
+ tradeType
70999
+ });
71000
+ }
71001
+ static async fromRoutes(routes, tradeType) {
71002
+ const populatedRoutes = [];
71003
+ for (const { route, amount } of routes) {
71004
+ const amounts = new Array(route.tokenPath.length);
71005
+ let inputAmount;
71006
+ let outputAmount;
71007
+ if (tradeType === TradeType.EXACT_INPUT) {
71008
+ invariant(amount.currency.equals(route.input), "INPUT");
71009
+ inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amount.numerator, amount.denominator);
71010
+ amounts[0] = CurrencyAmount.fromFractionalAmount(route.input.wrapped, amount.numerator, amount.denominator);
71011
+ for (let i = 0;i < route.tokenPath.length - 1; i++) {
71012
+ const pool = route.pools[i];
71013
+ const [outputAmount2] = await pool.getOutputAmount(amounts[i]);
71014
+ amounts[i + 1] = outputAmount2;
73086
71015
  }
73087
- ],
73088
- stateMutability: "view",
73089
- type: "function"
73090
- },
73091
- {
73092
- inputs: [],
73093
- name: "totalSupply",
73094
- outputs: [
73095
- {
73096
- internalType: "uint256",
73097
- name: "",
73098
- type: "uint256"
71016
+ outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amounts[amounts.length - 1].numerator, amounts[amounts.length - 1].denominator);
71017
+ } else {
71018
+ invariant(amount.currency.equals(route.output), "OUTPUT");
71019
+ outputAmount = CurrencyAmount.fromFractionalAmount(route.output, amount.numerator, amount.denominator);
71020
+ amounts[amounts.length - 1] = CurrencyAmount.fromFractionalAmount(route.output.wrapped, amount.numerator, amount.denominator);
71021
+ for (let i = route.tokenPath.length - 1;i > 0; i--) {
71022
+ const pool = route.pools[i - 1];
71023
+ const [inputAmount2] = await pool.getInputAmount(amounts[i]);
71024
+ amounts[i - 1] = inputAmount2;
73099
71025
  }
73100
- ],
73101
- stateMutability: "view",
73102
- type: "function"
73103
- },
73104
- {
73105
- inputs: [
73106
- {
73107
- internalType: "address",
73108
- name: "from",
73109
- type: "address"
73110
- },
73111
- {
73112
- internalType: "address",
73113
- name: "to",
73114
- type: "address"
73115
- },
71026
+ inputAmount = CurrencyAmount.fromFractionalAmount(route.input, amounts[0].numerator, amounts[0].denominator);
71027
+ }
71028
+ populatedRoutes.push({ route, inputAmount, outputAmount });
71029
+ }
71030
+ return new Trade({
71031
+ routes: populatedRoutes,
71032
+ tradeType
71033
+ });
71034
+ }
71035
+ static createUncheckedTrade(constructorArguments) {
71036
+ return new Trade({
71037
+ ...constructorArguments,
71038
+ routes: [
73116
71039
  {
73117
- internalType: "uint256",
73118
- name: "tokenId",
73119
- type: "uint256"
71040
+ inputAmount: constructorArguments.inputAmount,
71041
+ outputAmount: constructorArguments.outputAmount,
71042
+ route: constructorArguments.route
73120
71043
  }
73121
- ],
73122
- name: "transferFrom",
73123
- outputs: [],
73124
- stateMutability: "nonpayable",
73125
- type: "function"
73126
- },
73127
- {
73128
- inputs: [
73129
- {
73130
- internalType: "uint256",
73131
- name: "amount0Owed",
73132
- type: "uint256"
73133
- },
73134
- {
73135
- internalType: "uint256",
73136
- name: "amount1Owed",
73137
- type: "uint256"
73138
- },
73139
- {
73140
- internalType: "bytes",
73141
- name: "data",
73142
- type: "bytes"
71044
+ ]
71045
+ });
71046
+ }
71047
+ static createUncheckedTradeWithMultipleRoutes(constructorArguments) {
71048
+ return new Trade(constructorArguments);
71049
+ }
71050
+ constructor({ routes, tradeType }) {
71051
+ const inputCurrency = routes[0].inputAmount.currency;
71052
+ const outputCurrency = routes[0].outputAmount.currency;
71053
+ invariant(routes.every(({ route }) => inputCurrency.wrapped.equals(route.input.wrapped)), "INPUT_CURRENCY_MATCH");
71054
+ invariant(routes.every(({ route }) => outputCurrency.wrapped.equals(route.output.wrapped)), "OUTPUT_CURRENCY_MATCH");
71055
+ const numPools = routes.map(({ route }) => route.pools.length).reduce((total, cur) => total + cur, 0);
71056
+ const poolAddressSet = new Set;
71057
+ for (const { route } of routes) {
71058
+ for (const pool of route.pools) {
71059
+ poolAddressSet.add(Pool.getAddress(pool.token0, pool.token1, pool.fee));
71060
+ }
71061
+ }
71062
+ invariant(numPools === poolAddressSet.size, "POOLS_DUPLICATED");
71063
+ this.swaps = routes;
71064
+ this.tradeType = tradeType;
71065
+ }
71066
+ minimumAmountOut(slippageTolerance, amountOut = this.outputAmount) {
71067
+ invariant(!slippageTolerance.lessThan(ZERO2), "SLIPPAGE_TOLERANCE");
71068
+ if (this.tradeType === TradeType.EXACT_OUTPUT) {
71069
+ return amountOut;
71070
+ } else {
71071
+ const slippageAdjustedAmountOut = new Fraction(ONE2).subtract(slippageTolerance).multiply(amountOut.quotient).quotient;
71072
+ const clampedAmount = import_jsbi23.default.greaterThan(slippageAdjustedAmountOut, import_jsbi23.default.BigInt(0)) ? slippageAdjustedAmountOut : import_jsbi23.default.BigInt(0);
71073
+ return CurrencyAmount.fromRawAmount(amountOut.currency, clampedAmount);
71074
+ }
71075
+ }
71076
+ maximumAmountIn(slippageTolerance, amountIn = this.inputAmount) {
71077
+ invariant(!slippageTolerance.lessThan(ZERO2), "SLIPPAGE_TOLERANCE");
71078
+ if (this.tradeType === TradeType.EXACT_INPUT) {
71079
+ return amountIn;
71080
+ } else {
71081
+ const slippageAdjustedAmountIn = new Fraction(ONE2).add(slippageTolerance).multiply(amountIn.quotient).quotient;
71082
+ return CurrencyAmount.fromRawAmount(amountIn.currency, slippageAdjustedAmountIn);
71083
+ }
71084
+ }
71085
+ worstExecutionPrice(slippageTolerance) {
71086
+ return new Price(this.inputAmount.currency, this.outputAmount.currency, this.maximumAmountIn(slippageTolerance).quotient, this.minimumAmountOut(slippageTolerance).quotient);
71087
+ }
71088
+ static async bestTradeExactIn(pools, currencyAmountIn, currencyOut, { maxNumResults = 3, maxHops = 3 } = {}, currentPools = [], nextAmountIn = currencyAmountIn, bestTrades = []) {
71089
+ invariant(pools.length > 0, "POOLS");
71090
+ invariant(maxHops > 0, "MAX_HOPS");
71091
+ invariant(currencyAmountIn === nextAmountIn || currentPools.length > 0, "INVALID_RECURSION");
71092
+ const amountIn = nextAmountIn.wrapped;
71093
+ const tokenOut = currencyOut.wrapped;
71094
+ for (let i = 0;i < pools.length; i++) {
71095
+ const pool = pools[i];
71096
+ if (!pool.token0.equals(amountIn.currency) && !pool.token1.equals(amountIn.currency))
71097
+ continue;
71098
+ let amountOut;
71099
+ try {
71100
+ [amountOut] = await pool.getOutputAmount(amountIn);
71101
+ } catch (error) {
71102
+ if (error.isInsufficientInputAmountError) {
71103
+ continue;
73143
71104
  }
73144
- ],
73145
- name: "uniswapV3MintCallback",
73146
- outputs: [],
73147
- stateMutability: "nonpayable",
73148
- type: "function"
73149
- },
73150
- {
73151
- inputs: [
73152
- {
73153
- internalType: "uint256",
73154
- name: "amountMinimum",
73155
- type: "uint256"
73156
- },
73157
- {
73158
- internalType: "address",
73159
- name: "recipient",
73160
- type: "address"
71105
+ throw error;
71106
+ }
71107
+ if (amountOut.currency.isToken && amountOut.currency.equals(tokenOut)) {
71108
+ sortedInsert(bestTrades, await Trade.fromRoute(new Route([...currentPools, pool], currencyAmountIn.currency, currencyOut), currencyAmountIn, TradeType.EXACT_INPUT), maxNumResults, tradeComparator);
71109
+ } else if (maxHops > 1 && pools.length > 1) {
71110
+ const poolsExcludingThisPool = pools.slice(0, i).concat(pools.slice(i + 1, pools.length));
71111
+ await Trade.bestTradeExactIn(poolsExcludingThisPool, currencyAmountIn, currencyOut, {
71112
+ maxNumResults,
71113
+ maxHops: maxHops - 1
71114
+ }, [...currentPools, pool], amountOut, bestTrades);
71115
+ }
71116
+ }
71117
+ return bestTrades;
71118
+ }
71119
+ static async bestTradeExactOut(pools, currencyIn, currencyAmountOut, { maxNumResults = 3, maxHops = 3 } = {}, currentPools = [], nextAmountOut = currencyAmountOut, bestTrades = []) {
71120
+ invariant(pools.length > 0, "POOLS");
71121
+ invariant(maxHops > 0, "MAX_HOPS");
71122
+ invariant(currencyAmountOut === nextAmountOut || currentPools.length > 0, "INVALID_RECURSION");
71123
+ const amountOut = nextAmountOut.wrapped;
71124
+ const tokenIn = currencyIn.wrapped;
71125
+ for (let i = 0;i < pools.length; i++) {
71126
+ const pool = pools[i];
71127
+ if (!pool.token0.equals(amountOut.currency) && !pool.token1.equals(amountOut.currency))
71128
+ continue;
71129
+ let amountIn;
71130
+ try {
71131
+ [amountIn] = await pool.getInputAmount(amountOut);
71132
+ } catch (error) {
71133
+ if (error.isInsufficientReservesError) {
71134
+ continue;
73161
71135
  }
73162
- ],
73163
- name: "unwrapWETH9",
73164
- outputs: [],
73165
- stateMutability: "payable",
73166
- type: "function"
73167
- },
73168
- {
73169
- stateMutability: "payable",
73170
- type: "receive"
71136
+ throw error;
71137
+ }
71138
+ if (amountIn.currency.equals(tokenIn)) {
71139
+ sortedInsert(bestTrades, await Trade.fromRoute(new Route([pool, ...currentPools], currencyIn, currencyAmountOut.currency), currencyAmountOut, TradeType.EXACT_OUTPUT), maxNumResults, tradeComparator);
71140
+ } else if (maxHops > 1 && pools.length > 1) {
71141
+ const poolsExcludingThisPool = pools.slice(0, i).concat(pools.slice(i + 1, pools.length));
71142
+ await Trade.bestTradeExactOut(poolsExcludingThisPool, currencyIn, currencyAmountOut, {
71143
+ maxNumResults,
71144
+ maxHops: maxHops - 1
71145
+ }, [pool, ...currentPools], amountIn, bestTrades);
71146
+ }
73171
71147
  }
73172
- ],
73173
- bytecode: "0x610120604052600d80546001600160b01b0319166001176001600160b01b0316600160b01b1790553480156200003457600080fd5b50604051620062e9380380620062e98339810160408190526200005791620002db565b82826040518060400160405280601b81526020017f556e697377617020563320506f736974696f6e73204e46542d563100000000008152506040518060400160405280600a815260200169554e492d56332d504f5360b01b815250604051806040016040528060018152602001603160f81b8152508282620000e66301ffc9a760e01b6200018d60201b60201c565b8151620000fb90600690602085019062000212565b5080516200011190600790602084019062000212565b50620001246380ac58cd60e01b6200018d565b62000136635b5e139f60e01b6200018d565b6200014863780e9d6360e01b6200018d565b50508251602093840120608052805192019190912060a052506001600160601b0319606092831b811660c05290821b811660e05291901b166101005250620003249050565b6001600160e01b03198082161415620001ed576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826200024a576000855562000295565b82601f106200026557805160ff191683800117855562000295565b8280016001018555821562000295579182015b828111156200029557825182559160200191906001019062000278565b50620002a3929150620002a7565b5090565b5b80821115620002a35760008155600101620002a8565b80516001600160a01b0381168114620002d657600080fd5b919050565b600080600060608486031215620002f0578283fd5b620002fb84620002be565b92506200030b60208501620002be565b91506200031b60408501620002be565b90509250925092565b60805160a05160c05160601c60e05160601c6101005160601c615f40620003a960003980612a835250806102995280611718528061180e52806118965280613e5d5280613ea35280613f17525080610aa75280610dde5280610ea55280612a1d5280612b235280612e4452806136e15250806114ff5250806114de5250615f406000f3fe6080604052600436106102895760003560e01c80636352211e11610153578063ac9650d8116100cb578063d34879971161007f578063e985e9c511610064578063e985e9c5146106f5578063f3995c6714610715578063fc6f7865146107285761030d565b8063d3487997146106c2578063df2ab5bb146106e25761030d565b8063c2e3140a116100b0578063c2e3140a1461067a578063c45a01551461068d578063c87b56dd146106a25761030d565b8063ac9650d81461063a578063b88d4fde1461065a5761030d565b8063883164561161012257806399fbab881161010757806399fbab88146105cf578063a22cb46514610607578063a4a78f0c146106275761030d565b8063883164561461059757806395d89b41146105ba5761030d565b80636352211e1461052f5780636c0360eb1461054f57806370a08231146105645780637ac2ff7b146105845761030d565b806323b872dd1161020157806342966c68116101b557806349404b7c1161019a57806349404b7c146104e75780634aa4a4fc146104fa5780634f6ccce71461050f5761030d565b806342966c68146104c15780634659a494146104d45761030d565b806330adf81f116101e657806330adf81f146104775780633644e5151461048c57806342842e0e146104a15761030d565b806323b872dd146104375780632f745c59146104575761030d565b80630c49ccbe1161025857806313ead5621161023d57806313ead562146103e057806318160ddd146103f3578063219f5d17146104155761030d565b80630c49ccbe146103b757806312210e8a146103d85761030d565b806301ffc9a71461031257806306fdde0314610348578063081812fc1461036a578063095ea7b3146103975761030d565b3661030d57336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461030b576040805162461bcd60e51b815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b34801561031e57600080fd5b5061033261032d3660046153a6565b61073b565b60405161033f919061591e565b60405180910390f35b34801561035457600080fd5b5061035d610776565b60405161033f9190615971565b34801561037657600080fd5b5061038a6103853660046156b8565b61080c565b60405161033f91906157e2565b3480156103a357600080fd5b5061030b6103b2366004615270565b610868565b6103ca6103c5366004615483565b61093e565b60405161033f929190615b42565b61030b610daa565b61038a6103ee366004615103565b610dbc565b3480156103ff57600080fd5b506104086110c9565b60405161033f9190615929565b610428610423366004615494565b6110da565b60405161033f93929190615afd565b34801561044357600080fd5b5061030b61045236600461515c565b611413565b34801561046357600080fd5b50610408610472366004615270565b61146a565b34801561048357600080fd5b50610408611495565b34801561049857600080fd5b506104086114b9565b3480156104ad57600080fd5b5061030b6104bc36600461515c565b611577565b61030b6104cf3660046156b8565b611592565b61030b6104e23660046152dc565b611661565b61030b6104f53660046156d0565b611714565b34801561050657600080fd5b5061038a611894565b34801561051b57600080fd5b5061040861052a3660046156b8565b6118b8565b34801561053b57600080fd5b5061038a61054a3660046156b8565b6118ce565b34801561055b57600080fd5b5061035d6118f6565b34801561057057600080fd5b5061040861057f3660046150af565b6118fb565b61030b6105923660046152dc565b611963565b6105aa6105a5366004615550565b611e0f565b60405161033f9493929190615b1e565b3480156105c657600080fd5b5061035d612370565b3480156105db57600080fd5b506105ef6105ea3660046156b8565b6123d1565b60405161033f9c9b9a99989796959493929190615b50565b34801561061357600080fd5b5061030b610622366004615243565b612600565b61030b6106353660046152dc565b612723565b61064d610648366004615337565b6127d5565b60405161033f91906158a0565b34801561066657600080fd5b5061030b61067536600461519c565b612915565b61030b6106883660046152dc565b612973565b34801561069957600080fd5b5061038a612a1b565b3480156106ae57600080fd5b5061035d6106bd3660046156b8565b612a3f565b3480156106ce57600080fd5b5061030b6106dd366004615717565b612b0e565b61030b6106f036600461529b565b612b8c565b34801561070157600080fd5b506103326107103660046150cb565b612c6f565b61030b6107233660046152dc565b612c9d565b6103ca61073636600461546c565b612d28565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108025780601f106107d757610100808354040283529160200191610802565b820191906000526020600020905b8154815290600101906020018083116107e557829003601f168201915b5050505050905090565b600061081782613246565b61083c5760405162461bcd60e51b8152600401610833906159bb565b60405180910390fd5b506000908152600c60205260409020546c0100000000000000000000000090046001600160a01b031690565b6000610873826118ce565b9050806001600160a01b0316836001600160a01b031614156108c65760405162461bcd60e51b8152600401808060200182810382526021815260200180615ee26021913960400191505060405180910390fd5b806001600160a01b03166108d8613253565b6001600160a01b031614806108f457506108f481610710613253565b61092f5760405162461bcd60e51b8152600401808060200182810382526038815260200180615e0c6038913960400191505060405180910390fd5b6109398383613257565b505050565b600080823561094d33826132db565b6109695760405162461bcd60e51b815260040161083390615984565b836080013580610977613377565b11156109ca576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b60006109dc6040870160208801615562565b6001600160801b0316116109ef57600080fd5b84356000908152600c602090815260409182902060018101549092600160801b9091046001600160801b031691610a2a918901908901615562565b6001600160801b0316816001600160801b03161015610a4857600080fd5b60018281015469ffffffffffffffffffff166000908152600b60209081526040808320815160608101835281546001600160a01b039081168252919095015490811692850192909252600160a01b90910462ffffff1690830152610acc7f00000000000000000000000000000000000000000000000000000000000000008361337b565b60018501549091506001600160a01b0382169063a34123a7906a01000000000000000000008104600290810b91600160681b9004900b610b1260408e0160208f01615562565b6040518463ffffffff1660e01b8152600401610b309392919061594b565b6040805180830381600087803b158015610b4957600080fd5b505af1158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8191906156f4565b909850965060408901358810801590610b9e575088606001358710155b610bba5760405162461bcd60e51b815260040161083390615a18565b6001840154600090610bea9030906a01000000000000000000008104600290810b91600160681b9004900b613477565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401610c1b9190615929565b60a06040518083038186803b158015610c3357600080fd5b505afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b91906155ac565b50509250925050610c9087600201548303876001600160801b0316600160801b6134d1565b6004880180546fffffffffffffffffffffffffffffffff198116928e016001600160801b039182160181169290921790556003880154610cda91908303908816600160801b6134d1565b6004880180546001600160801b03808216938e01600160801b9283900482160116029190911790556002870182905560038701819055610d2060408d0160208e01615562565b86038760010160106101000a8154816001600160801b0302191690836001600160801b031602179055508b600001357f26f6a048ee9138f2c0ce266f322cb99228e8d619ae2bff30c67f8dcf9d2377b48d6020016020810190610d839190615562565b8d8d604051610d9493929190615afd565b60405180910390a2505050505050505050915091565b4715610dba57610dba3347613580565b565b6000836001600160a01b0316856001600160a01b031610610ddc57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631698ee828686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff168152602001935050505060206040518083038186803b158015610e6757600080fd5b505afa158015610e7b573d6000803e3d6000fd5b505050506040513d6020811015610e9157600080fd5b505190506001600160a01b038116610fe0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a16712958686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff1681526020019350505050602060405180830381600087803b158015610f3057600080fd5b505af1158015610f44573d6000803e3d6000fd5b505050506040513d6020811015610f5a57600080fd5b5051604080517ff637731d0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291519293509083169163f637731d9160248082019260009290919082900301818387803b158015610fc357600080fd5b505af1158015610fd7573d6000803e3d6000fd5b505050506110c1565b6000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561101b57600080fd5b505afa15801561102f573d6000803e3d6000fd5b505050506040513d60e081101561104557600080fd5b505190506001600160a01b0381166110bf57816001600160a01b031663f637731d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156110a657600080fd5b505af11580156110ba573d6000803e3d6000fd5b505050505b505b949350505050565b60006110d56002613689565b905090565b60008060008360a00135806110ed613377565b1115611140576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b84356000908152600c6020908152604080832060018082015469ffffffffffffffffffff81168652600b855283862084516060808201875282546001600160a01b039081168352929094015480831682890190815262ffffff600160a01b9092048216838901908152885161014081018a528451861681529151909416818a01529251168287015230828501526a01000000000000000000008304600290810b810b608080850191909152600160681b909404810b900b60a0830152958c013560c0820152938b013560e0850152908a0135610100840152890135610120830152929061122c90613694565b6001870154939a50919850965091506000906112669030906a01000000000000000000008104600290810b91600160681b9004900b613477565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b81526004016112979190615929565b60a06040518083038186803b1580156112af57600080fd5b505afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e791906155ac565b50509250925050611323866002015483038760010160109054906101000a90046001600160801b03166001600160801b0316600160801b6134d1565b6004870180546001600160801b0380821690930183166fffffffffffffffffffffffffffffffff19909116179055600387015460018801546113739291840391600160801b9182900416906134d1565b6004870180546001600160801b03600160801b80830482169094018116840291811691909117909155600288018490556003880183905560018801805483810483168e018316909302929091169190911790556040518b35907f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f906113fd908d908d908d90615afd565b60405180910390a2505050505050509193909250565b61142461141e613253565b826132db565b61145f5760405162461bcd60e51b8152600401808060200182810382526031815260200180615f036031913960400191505060405180910390fd5b6109398383836138cf565b6001600160a01b038216600090815260016020526040812061148c9083613a1b565b90505b92915050565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad81565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611526613a27565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120905090565b61093983838360405180602001604052806000815250612915565b8061159d33826132db565b6115b95760405162461bcd60e51b815260040161083390615984565b6000828152600c602052604090206001810154600160801b90046001600160801b03161580156115f4575060048101546001600160801b0316155b801561161257506004810154600160801b90046001600160801b0316155b61162e5760405162461bcd60e51b815260040161083390615a86565b6000838152600c602052604081208181556001810182905560028101829055600381018290556004015561093983613a2b565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e4810183905290516001600160a01b03881691638fcbaf0c9161010480830192600092919082900301818387803b1580156116f457600080fd5b505af1158015611708573d6000803e3d6000fd5b50505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d60208110156117ad57600080fd5b5051905082811015611806576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b8015610939577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561187257600080fd5b505af1158015611886573d6000803e3d6000fd5b505050506109398282613580565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806118c6600284613af8565b509392505050565b600061148f82604051806060016040528060298152602001615e6e6029913960029190613b16565b606090565b60006001600160a01b0382166119425760405162461bcd60e51b815260040180806020018281038252602a815260200180615e44602a913960400191505060405180910390fd5b6001600160a01b038216600090815260016020526040902061148f90613689565b8361196c613377565b11156119bf576040805162461bcd60e51b815260206004820152600e60248201527f5065726d69742065787069726564000000000000000000000000000000000000604482015290519081900360640190fd5b60006119c96114b9565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad88886119f581613b23565b604080516020808201969096526001600160a01b03909416848201526060840192909252608083015260a08083018a90528151808403909101815260c0830182528051908401207f190100000000000000000000000000000000000000000000000000000000000060e084015260e283019490945261010280830194909452805180830390940184526101229091019052815191012090506000611a98876118ce565b9050806001600160a01b0316886001600160a01b03161415611aeb5760405162461bcd60e51b8152600401808060200182810382526027815260200180615d6f6027913960400191505060405180910390fd5b611af481613b62565b15611ccf576040805160208082018790528183018690527fff0000000000000000000000000000000000000000000000000000000000000060f889901b16606083015282516041818403018152606183018085527f1626ba7e0000000000000000000000000000000000000000000000000000000090526065830186815260858401948552815160a585015281516001600160a01b03871695631626ba7e958995919260c59091019185019080838360005b83811015611bbe578181015183820152602001611ba6565b50505050905090810190601f168015611beb5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611c0957600080fd5b505afa158015611c1d573d6000803e3d6000fd5b505050506040513d6020811015611c3357600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e0000000000000000000000000000000000000000000000000000000014611cca576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b611dfb565b600060018387878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611d2b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d93576040805162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b816001600160a01b0316816001600160a01b031614611df9576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b505b611e058888613257565b5050505050505050565b60008060008084610140013580611e24613377565b1115611e77576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b604080516101408101909152600090611f439080611e9860208b018b6150af565b6001600160a01b03168152602001896020016020810190611eb991906150af565b6001600160a01b03168152602001611ed760608b0160408c0161569e565b62ffffff168152306020820152604001611ef760808b0160608c016153e6565b60020b8152602001611f0f60a08b0160808c016153e6565b60020b81526020018960a0013581526020018960c0013581526020018960e001358152602001896101000135815250613694565b92975090955093509050611fb7611f6261014089016101208a016150af565b600d80547fffffffffffffffffffff000000000000000000000000000000000000000000008116600175ffffffffffffffffffffffffffffffffffffffffffff92831690810190921617909155975087613b68565b6000611fe230611fcd60808b0160608c016153e6565b611fdd60a08c0160808d016153e6565b613477565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b81526004016120139190615929565b60a06040518083038186803b15801561202b57600080fd5b505afa15801561203f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206391906155ac565b5050925092505060006120dc8560405180606001604052808e600001602081019061208e91906150af565b6001600160a01b031681526020018e60200160208101906120af91906150af565b6001600160a01b031681526020018e60400160208101906120d0919061569e565b62ffffff169052613c96565b905060405180610140016040528060006bffffffffffffffffffffffff16815260200160006001600160a01b031681526020018269ffffffffffffffffffff1681526020018c606001602081019061213491906153e6565b60020b815260200161214c60a08e0160808f016153e6565b60020b81526020018a6001600160801b0316815260200184815260200183815260200160006001600160801b0316815260200160006001600160801b0316815250600c60008c815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160006101000a81548169ffffffffffffffffffff021916908369ffffffffffffffffffff160217905550606082015181600101600a6101000a81548162ffffff021916908360020b62ffffff160217905550608082015181600101600d6101000a81548162ffffff021916908360020b62ffffff16021790555060a08201518160010160106101000a8154816001600160801b0302191690836001600160801b0316021790555060c0820151816002015560e082015181600301556101008201518160040160006101000a8154816001600160801b0302191690836001600160801b031602179055506101208201518160040160106101000a8154816001600160801b0302191690836001600160801b03160217905550905050897f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f8a8a8a60405161235b93929190615afd565b60405180910390a25050505050509193509193565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108025780601f106107d757610100808354040283529160200191610802565b6000818152600c6020908152604080832081516101408101835281546bffffffffffffffffffffffff811682526001600160a01b036c010000000000000000000000009091041693810193909352600181015469ffffffffffffffffffff81169284018390526a01000000000000000000008104600290810b810b810b6060860152600160681b8204810b810b810b60808601526001600160801b03600160801b92839004811660a08701529083015460c0860152600383015460e0860152600490920154808316610100860152041661012083015282918291829182918291829182918291829182918291906124da5760405162461bcd60e51b815260040161083390615a4f565b6000600b6000836040015169ffffffffffffffffffff1669ffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905081600001518260200151826000015183602001518460400151866060015187608001518860a001518960c001518a60e001518b61010001518c61012001519d509d509d509d509d509d509d509d509d509d509d509d50505091939597999b5091939597999b565b612608613253565b6001600160a01b0316826001600160a01b0316141561266e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061267b613253565b6001600160a01b0390811682526020808301939093526040918201600090812091871680825291909352912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091556126dd613253565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051600019916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b15801561278d57600080fd5b505afa1580156127a1573d6000803e3d6000fd5b505050506040513d60208110156127b757600080fd5b505110156127cd576127cd868686868686611661565b505050505050565b60608167ffffffffffffffff811180156127ee57600080fd5b5060405190808252806020026020018201604052801561282257816020015b606081526020019060019003908161280d5790505b50905060005b8281101561290e576000803086868581811061284057fe5b90506020028101906128529190615bef565b6040516128609291906157d2565b600060405180830381855af49150503d806000811461289b576040519150601f19603f3d011682016040523d82523d6000602084013e6128a0565b606091505b5091509150816128ec576044815110156128b957600080fd5b600481019050808060200190518101906128d39190615402565b60405162461bcd60e51b81526004016108339190615971565b808484815181106128f957fe5b60209081029190910101525050600101612828565b5092915050565b612926612920613253565b836132db565b6129615760405162461bcd60e51b8152600401808060200182810382526031815260200180615f036031913960400191505060405180910390fd5b61296d84848484613de6565b50505050565b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905186916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b1580156129db57600080fd5b505afa1580156129ef573d6000803e3d6000fd5b505050506040513d6020811015612a0557600080fd5b505110156127cd576127cd868686868686612c9d565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060612a4a82613246565b612a5357600080fd5b6040517fe9dc63750000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e9dc637590612aba9030908690600401615932565b60006040518083038186803b158015612ad257600080fd5b505afa158015612ae6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261148f9190810190615402565b6000612b1c828401846154a5565b9050612b4c7f00000000000000000000000000000000000000000000000000000000000000008260000151613e38565b508415612b67578051516020820151612b6791903388613e5b565b8315612b8557612b8581600001516020015182602001513387613e5b565b5050505050565b6000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612bdb57600080fd5b505afa158015612bef573d6000803e3d6000fd5b505050506040513d6020811015612c0557600080fd5b5051905082811015612c5e576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b801561296d5761296d848383613feb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c4810183905290516001600160a01b0388169163d505accf9160e480830192600092919082900301818387803b1580156116f457600080fd5b6000808235612d3733826132db565b612d535760405162461bcd60e51b815260040161083390615984565b6000612d656060860160408701615562565b6001600160801b03161180612d9257506000612d876080860160608701615562565b6001600160801b0316115b612d9b57600080fd5b600080612dae60408701602088016150af565b6001600160a01b031614612dd157612dcc60408601602087016150af565b612dd3565b305b85356000908152600c6020908152604080832060018082015469ffffffffffffffffffff168552600b8452828520835160608101855281546001600160a01b039081168252919092015490811694820194909452600160a01b90930462ffffff169183019190915292935090612e697f00000000000000000000000000000000000000000000000000000000000000008361337b565b600484015460018501549192506001600160801b0380821692600160801b92839004821692900416156130865760018501546040517fa34123a70000000000000000000000000000000000000000000000000000000081526001600160a01b0385169163a34123a791612f00916a01000000000000000000008104600290810b92600160681b909204900b9060009060040161594b565b6040805180830381600087803b158015612f1957600080fd5b505af1158015612f2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f5191906156f4565b5050600185015460009081906001600160a01b0386169063514ea4bf90612f969030906a01000000000000000000008104600290810b91600160681b9004900b613477565b6040518263ffffffff1660e01b8152600401612fb29190615929565b60a06040518083038186803b158015612fca57600080fd5b505afa158015612fde573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061300291906155ac565b5050925092505061303e876002015483038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b6134d1565b84019350613077876003015482038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b6134d1565b60028801929092556003870155015b6000806001600160801b0384166130a360608e0160408f01615562565b6001600160801b0316116130c6576130c160608d0160408e01615562565b6130c8565b835b836001600160801b03168d60600160208101906130e59190615562565b6001600160801b0316116131085761310360808e0160608f01615562565b61310a565b835b60018901546040517f4f1eb3d80000000000000000000000000000000000000000000000000000000081529294509092506001600160a01b03871691634f1eb3d89161317d918c916a01000000000000000000008104600290810b92600160681b909204900b9088908890600401615839565b6040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ce919061557e565b6004890180546fffffffffffffffffffffffffffffffff196001600160801b03918216600160801b878a0384160217168689038216179091556040519281169d50169a508c35907f40d0efd1a53d60ecbf40971b9daf7dc90178c3aadc7aab1765632738fa8b8f0190610d94908b9086908690615876565b600061148f60028361417b565b3390565b6000818152600c6020526040902080546bffffffffffffffffffffffff166c010000000000000000000000006001600160a01b0385169081029190911790915581906132a2826118ce565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006132e682613246565b6133215760405162461bcd60e51b815260040180806020018281038252602c815260200180615de0602c913960400191505060405180910390fd5b600061332c836118ce565b9050806001600160a01b0316846001600160a01b031614806133675750836001600160a01b031661335c8461080c565b6001600160a01b0316145b806110c157506110c18185612c6f565b4290565b600081602001516001600160a01b031682600001516001600160a01b0316106133a357600080fd5b50805160208083015160409384015184516001600160a01b0394851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b6bffffffffffffffffffffffff191660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b604080516bffffffffffffffffffffffff19606086901b16602080830191909152600285810b60e890811b60348501529085900b901b60378301528251601a818403018152603a90920190925280519101205b9392505050565b600080806000198587098686029250828110908390030390508061350757600084116134fc57600080fd5b5082900490506134ca565b80841161351357600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106135cc5780518252601f1990920191602091820191016135ad565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461362e576040519150601f19603f3d011682016040523d82523d6000602084013e613633565b606091505b5050905080610939576040805162461bcd60e51b815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600061148f82614187565b6000806000806000604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b03168152602001876040015162ffffff1681525090506137067f00000000000000000000000000000000000000000000000000000000000000008261337b565b91506000826001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561374357600080fd5b505afa158015613757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061377b919061560d565b50505050505090506000613792886080015161418b565b905060006137a38960a0015161418b565b90506137ba8383838c60c001518d60e001516144d9565b9750505050816001600160a01b0316633c8a7d8d876060015188608001518960a00151896040518060400160405280888152602001336001600160a01b031681525060405160200161380c9190615abd565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161383b9594939291906157f6565b6040805180830381600087803b15801561385457600080fd5b505af1158015613868573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061388c91906156f4565b610100880151919550935084108015906138ab57508561012001518310155b6138c75760405162461bcd60e51b815260040161083390615a18565b509193509193565b826001600160a01b03166138e2826118ce565b6001600160a01b0316146139275760405162461bcd60e51b8152600401808060200182810382526029815260200180615eb96029913960400191505060405180910390fd5b6001600160a01b03821661396c5760405162461bcd60e51b8152600401808060200182810382526024815260200180615d966024913960400191505060405180910390fd5b613977838383610939565b613982600082613257565b6001600160a01b03831660009081526001602052604090206139a4908261459d565b506001600160a01b03821660009081526001602052604090206139c790826145a9565b506139d4600282846145b5565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061148c83836145cb565b4690565b6000613a36826118ce565b9050613a4481600084610939565b613a4f600083613257565b6000828152600860205260409020546002600019610100600184161502019091160415613a8d576000828152600860205260408120613a8d9161501f565b6001600160a01b0381166000908152600160205260409020613aaf908361459d565b50613abb60028361462f565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080613b07868661463b565b909450925050505b9250929050565b60006110c18484846146b6565b6000908152600c6020526040902080546bffffffffffffffffffffffff19811660016bffffffffffffffffffffffff9283169081019092161790915590565b3b151590565b6001600160a01b038216613bc3576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b613bcc81613246565b15613c1e576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b613c2a60008383610939565b6001600160a01b0382166000908152600160205260409020613c4c90826145a9565b50613c59600282846145b5565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0382166000908152600a602052604090205469ffffffffffffffffffff168061148f5750600d8054600169ffffffffffffffffffff76010000000000000000000000000000000000000000000080840482168381019092160275ffffffffffffffffffffffffffffffffffffffffffff909316929092179092556001600160a01b038085166000908152600a6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001686179055848352600b825291829020865181549085167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617825591870151950180549287015162ffffff16600160a01b027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff969094169290911691909117939093161790915592915050565b613df18484846138cf565b613dfd84848484614780565b61296d5760405162461bcd60e51b8152600401808060200182810382526032815260200180615d3d6032913960400191505060405180910390fd5b6000613e44838361337b565b9050336001600160a01b0382161461148f57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316148015613e9c5750804710155b15613fbe577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015613efc57600080fd5b505af1158015613f10573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613f8c57600080fd5b505af1158015613fa0573d6000803e3d6000fd5b505050506040513d6020811015613fb657600080fd5b5061296d9050565b6001600160a01b038316301415613fdf57613fda848383613feb565b61296d565b61296d8484848461495c565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b602083106140955780518252601f199092019160209182019101614076565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146140f7576040519150601f19603f3d011682016040523d82523d6000602084013e6140fc565b606091505b509150915081801561412a57508051158061412a575080806020019051602081101561412757600080fd5b50515b612b85576040805162461bcd60e51b815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600061148c8383614af4565b5490565b60008060008360020b126141a2578260020b6141aa565b8260020b6000035b9050620d89e8811115614204576040805162461bcd60e51b815260206004820152600160248201527f5400000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006001821661421857600160801b61422a565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561425e576ffff97272373d413259a46990580e213a0260801c5b600482161561427d576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b600882161561429c576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156142bb576fffcb9843d60f6159c9db58835c9266440260801c5b60208216156142da576fff973b41fa98c081472e6896dfb254c00260801c5b60408216156142f9576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615614318576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615614338576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615614358576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615614378576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615614398576fe7159475a2c29b7443b29c7fa6e889d90260801c5b6110008216156143b8576fd097f3bdfd2022b8845ad8f792aa58250260801c5b6120008216156143d8576fa9f746462d870fdf8a65dc1f90e061e50260801c5b6140008216156143f8576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615614418576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615614439576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615614459576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615614478576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615614495576b048a170391f7dc42444e8fa20260801c5b60008460020b13156144b05780600019816144ac57fe5b0490505b6401000000008106156144c45760016144c7565b60005b60ff16602082901c0192505050919050565b6000836001600160a01b0316856001600160a01b031611156144f9579293925b846001600160a01b0316866001600160a01b0316116145245761451d858585614b0c565b9050614594565b836001600160a01b0316866001600160a01b0316101561458657600061454b878686614b0c565b9050600061455a878986614b78565b9050806001600160801b0316826001600160801b03161061457b578061457d565b815b92505050614594565b614591858584614b78565b90505b95945050505050565b600061148c8383614bbe565b600061148c8383614c84565b60006110c184846001600160a01b038516614cce565b8154600090821061460d5760405162461bcd60e51b8152600401808060200182810382526022815260200180615d1b6022913960400191505060405180910390fd5b82600001828154811061461c57fe5b9060005260206000200154905092915050565b600061148c8383614d65565b81546000908190831061467f5760405162461bcd60e51b8152600401808060200182810382526022815260200180615e976022913960400191505060405180910390fd5b600084600001848154811061469057fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816147515760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156147165781810151838201526020016146fe565b50505050905090810190601f1680156147435780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061476457fe5b9060005260206000209060020201600101549150509392505050565b6000614794846001600160a01b0316613b62565b6147a0575060016110c1565b60006148f17f150b7a02000000000000000000000000000000000000000000000000000000006147ce613253565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561483557818101518382015260200161481d565b50505050905090810190601f1680156148625780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001615d3d603291396001600160a01b0388169190614e39565b9050600081806020019051602081101561490a57600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001492505050949350505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b60208310614a0e5780518252601f1990920191602091820191016149ef565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614a70576040519150601f19603f3d011682016040523d82523d6000602084013e614a75565b606091505b5091509150818015614aa3575080511580614aa35750808060200190516020811015614aa057600080fd5b50515b6127cd576040805162461bcd60e51b815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60009081526001919091016020526040902054151590565b6000826001600160a01b0316846001600160a01b03161115614b2c579192915b6000614b58856001600160a01b0316856001600160a01b03166c010000000000000000000000006134d1565b9050614594614b7384838888036001600160a01b03166134d1565b614e48565b6000826001600160a01b0316846001600160a01b03161115614b98579192915b6110c1614b73836c010000000000000000000000008787036001600160a01b03166134d1565b60008181526001830160205260408120548015614c7a5783546000198083019190810190600090879083908110614bf157fe5b9060005260206000200154905080876000018481548110614c0e57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080614c3e57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061148f565b600091505061148f565b6000614c908383614af4565b614cc65750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561148f565b50600061148f565b600082815260018401602052604081205480614d335750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556134ca565b82856000016001830381548110614d4657fe5b90600052602060002090600202016001018190555060009150506134ca565b60008181526001830160205260408120548015614c7a5783546000198083019190810190600090879083908110614d9857fe5b9060005260206000209060020201905080876000018481548110614db857fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080614df757fe5b600082815260208082206002600019909401938402018281556001908101839055929093558881528982019092526040822091909155945061148f9350505050565b60606110c18484600085614e5e565b806001600160801b038116811461077157600080fd5b606082471015614e9f5760405162461bcd60e51b8152600401808060200182810382526026815260200180615dba6026913960400191505060405180910390fd5b614ea885613b62565b614ef9576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310614f375780518252601f199092019160209182019101614f18565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614f99576040519150601f19603f3d011682016040523d82523d6000602084013e614f9e565b606091505b5091509150614fae828286614fb9565b979650505050505050565b60608315614fc85750816134ca565b825115614fd85782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156147165781810151838201526020016146fe565b50805460018160011615610100020316600290046000825580601f106150455750615063565b601f0160209004906000526020600020908101906150639190615066565b50565b5b8082111561507b5760008155600101615067565b5090565b803561077181615cc4565b805161ffff8116811461077157600080fd5b803562ffffff8116811461077157600080fd5b6000602082840312156150c0578081fd5b81356134ca81615cc4565b600080604083850312156150dd578081fd5b82356150e881615cc4565b915060208301356150f881615cc4565b809150509250929050565b60008060008060808587031215615118578182fd5b843561512381615cc4565b9350602085013561513381615cc4565b92506151416040860161509c565b9150606085013561515181615cc4565b939692955090935050565b600080600060608486031215615170578081fd5b833561517b81615cc4565b9250602084013561518b81615cc4565b929592945050506040919091013590565b600080600080608085870312156151b1578182fd5b84356151bc81615cc4565b935060208501356151cc81615cc4565b925060408501359150606085013567ffffffffffffffff8111156151ee578182fd5b8501601f810187136151fe578182fd5b803561521161520c82615c76565b615c52565b818152886020838501011115615225578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215615255578182fd5b823561526081615cc4565b915060208301356150f881615cd9565b60008060408385031215615282578182fd5b823561528d81615cc4565b946020939093013593505050565b6000806000606084860312156152af578081fd5b83356152ba81615cc4565b92506020840135915060408401356152d181615cc4565b809150509250925092565b60008060008060008060c087890312156152f4578384fd5b86356152ff81615cc4565b95506020870135945060408701359350606087013561531d81615d0b565b9598949750929560808101359460a0909101359350915050565b60008060208385031215615349578182fd5b823567ffffffffffffffff80821115615360578384fd5b818501915085601f830112615373578384fd5b813581811115615381578485fd5b8660208083028501011115615394578485fd5b60209290920196919550909350505050565b6000602082840312156153b7578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146134ca578182fd5b6000602082840312156153f7578081fd5b81356134ca81615ce7565b600060208284031215615413578081fd5b815167ffffffffffffffff811115615429578182fd5b8201601f81018413615439578182fd5b805161544761520c82615c76565b81815285602083850101111561545b578384fd5b614594826020830160208601615c98565b60006080828403121561547d578081fd5b50919050565b600060a0828403121561547d578081fd5b600060c0828403121561547d578081fd5b600081830360808112156154b7578182fd5b6040516040810167ffffffffffffffff82821081831117156154d557fe5b8160405260608412156154e6578485fd5b60a08301935081841081851117156154fa57fe5b50826040528435925061550c83615cc4565b91825260208401359161551e83615cc4565b8260608301526155306040860161509c565b608083015281526155436060850161507f565b6020820152949350505050565b6000610160828403121561547d578081fd5b600060208284031215615573578081fd5b81356134ca81615cf6565b60008060408385031215615590578182fd5b825161559b81615cf6565b60208401519092506150f881615cf6565b600080600080600060a086880312156155c3578283fd5b85516155ce81615cf6565b80955050602086015193506040860151925060608601516155ee81615cf6565b60808701519092506155ff81615cf6565b809150509295509295909350565b600080600080600080600060e0888a031215615627578485fd5b875161563281615cc4565b602089015190975061564381615ce7565b95506156516040890161508a565b945061565f6060890161508a565b935061566d6080890161508a565b925060a088015161567d81615d0b565b60c089015190925061568e81615cd9565b8091505092959891949750929550565b6000602082840312156156af578081fd5b61148c8261509c565b6000602082840312156156c9578081fd5b5035919050565b600080604083850312156156e2578182fd5b8235915060208301356150f881615cc4565b60008060408385031215615706578182fd5b505080516020909101519092909150565b6000806000806060858703121561572c578182fd5b8435935060208501359250604085013567ffffffffffffffff80821115615751578384fd5b818701915087601f830112615764578384fd5b813581811115615772578485fd5b886020828501011115615783578485fd5b95989497505060200194505050565b600081518084526157aa816020860160208601615c98565b601f01601f19169290920160200192915050565b60020b9052565b6001600160801b03169052565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b60006001600160a01b03871682528560020b60208301528460020b60408301526001600160801b038416606083015260a06080830152614fae60a0830184615792565b6001600160a01b03959095168552600293840b60208601529190920b60408401526001600160801b03918216606084015216608082015260a00190565b6001600160a01b039390931683526001600160801b03918216602084015216604082015260600190565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015615911577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526158ff858351615792565b945092850192908501906001016158c5565b5092979650505050505050565b901515815260200190565b90815260200190565b6001600160a01b03929092168252602082015260400190565b600293840b81529190920b60208201526001600160801b03909116604082015260600190565b60006020825261148c6020830184615792565b6020808252600c908201527f4e6f7420617070726f7665640000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f507269636520736c69707061676520636865636b000000000000000000000000604082015260600190565b60208082526010908201527f496e76616c696420746f6b656e20494400000000000000000000000000000000604082015260600190565b6020808252600b908201527f4e6f7420636c6561726564000000000000000000000000000000000000000000604082015260600190565b815180516001600160a01b03908116835260208083015182168185015260409283015162ffffff1692840192909252920151909116606082015260800190565b6001600160801b039390931683526020830191909152604082015260600190565b9384526001600160801b039290921660208401526040830152606082015260800190565b918252602082015260400190565b6bffffffffffffffffffffffff8d1681526001600160a01b038c811660208301528b811660408301528a16606082015262ffffff89166080820152600288900b60a08201526101808101615ba760c08301896157be565b615bb460e08301886157c5565b8561010083015284610120830152615bd06101408301856157c5565b615bde6101608301846157c5565b9d9c50505050505050505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615c23578283fd5b83018035915067ffffffffffffffff821115615c3d578283fd5b602001915036819003821315613b0f57600080fd5b60405181810167ffffffffffffffff81118282101715615c6e57fe5b604052919050565b600067ffffffffffffffff821115615c8a57fe5b50601f01601f191660200190565b60005b83811015615cb3578181015183820152602001615c9b565b8381111561296d5750506000910152565b6001600160a01b038116811461506357600080fd5b801515811461506357600080fd5b8060020b811461506357600080fd5b6001600160801b038116811461506357600080fd5b60ff8116811461506357600080fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732315065726d69743a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a164736f6c6343000706000a",
73174
- deployedBytecode: "0x6080604052600436106102895760003560e01c80636352211e11610153578063ac9650d8116100cb578063d34879971161007f578063e985e9c511610064578063e985e9c5146106f5578063f3995c6714610715578063fc6f7865146107285761030d565b8063d3487997146106c2578063df2ab5bb146106e25761030d565b8063c2e3140a116100b0578063c2e3140a1461067a578063c45a01551461068d578063c87b56dd146106a25761030d565b8063ac9650d81461063a578063b88d4fde1461065a5761030d565b8063883164561161012257806399fbab881161010757806399fbab88146105cf578063a22cb46514610607578063a4a78f0c146106275761030d565b8063883164561461059757806395d89b41146105ba5761030d565b80636352211e1461052f5780636c0360eb1461054f57806370a08231146105645780637ac2ff7b146105845761030d565b806323b872dd1161020157806342966c68116101b557806349404b7c1161019a57806349404b7c146104e75780634aa4a4fc146104fa5780634f6ccce71461050f5761030d565b806342966c68146104c15780634659a494146104d45761030d565b806330adf81f116101e657806330adf81f146104775780633644e5151461048c57806342842e0e146104a15761030d565b806323b872dd146104375780632f745c59146104575761030d565b80630c49ccbe1161025857806313ead5621161023d57806313ead562146103e057806318160ddd146103f3578063219f5d17146104155761030d565b80630c49ccbe146103b757806312210e8a146103d85761030d565b806301ffc9a71461031257806306fdde0314610348578063081812fc1461036a578063095ea7b3146103975761030d565b3661030d57336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461030b576040805162461bcd60e51b815260206004820152600960248201527f4e6f742057455448390000000000000000000000000000000000000000000000604482015290519081900360640190fd5b005b600080fd5b34801561031e57600080fd5b5061033261032d3660046153a6565b61073b565b60405161033f919061591e565b60405180910390f35b34801561035457600080fd5b5061035d610776565b60405161033f9190615971565b34801561037657600080fd5b5061038a6103853660046156b8565b61080c565b60405161033f91906157e2565b3480156103a357600080fd5b5061030b6103b2366004615270565b610868565b6103ca6103c5366004615483565b61093e565b60405161033f929190615b42565b61030b610daa565b61038a6103ee366004615103565b610dbc565b3480156103ff57600080fd5b506104086110c9565b60405161033f9190615929565b610428610423366004615494565b6110da565b60405161033f93929190615afd565b34801561044357600080fd5b5061030b61045236600461515c565b611413565b34801561046357600080fd5b50610408610472366004615270565b61146a565b34801561048357600080fd5b50610408611495565b34801561049857600080fd5b506104086114b9565b3480156104ad57600080fd5b5061030b6104bc36600461515c565b611577565b61030b6104cf3660046156b8565b611592565b61030b6104e23660046152dc565b611661565b61030b6104f53660046156d0565b611714565b34801561050657600080fd5b5061038a611894565b34801561051b57600080fd5b5061040861052a3660046156b8565b6118b8565b34801561053b57600080fd5b5061038a61054a3660046156b8565b6118ce565b34801561055b57600080fd5b5061035d6118f6565b34801561057057600080fd5b5061040861057f3660046150af565b6118fb565b61030b6105923660046152dc565b611963565b6105aa6105a5366004615550565b611e0f565b60405161033f9493929190615b1e565b3480156105c657600080fd5b5061035d612370565b3480156105db57600080fd5b506105ef6105ea3660046156b8565b6123d1565b60405161033f9c9b9a99989796959493929190615b50565b34801561061357600080fd5b5061030b610622366004615243565b612600565b61030b6106353660046152dc565b612723565b61064d610648366004615337565b6127d5565b60405161033f91906158a0565b34801561066657600080fd5b5061030b61067536600461519c565b612915565b61030b6106883660046152dc565b612973565b34801561069957600080fd5b5061038a612a1b565b3480156106ae57600080fd5b5061035d6106bd3660046156b8565b612a3f565b3480156106ce57600080fd5b5061030b6106dd366004615717565b612b0e565b61030b6106f036600461529b565b612b8c565b34801561070157600080fd5b506103326107103660046150cb565b612c6f565b61030b6107233660046152dc565b612c9d565b6103ca61073636600461546c565b612d28565b7fffffffff00000000000000000000000000000000000000000000000000000000811660009081526020819052604090205460ff165b919050565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108025780601f106107d757610100808354040283529160200191610802565b820191906000526020600020905b8154815290600101906020018083116107e557829003601f168201915b5050505050905090565b600061081782613246565b61083c5760405162461bcd60e51b8152600401610833906159bb565b60405180910390fd5b506000908152600c60205260409020546c0100000000000000000000000090046001600160a01b031690565b6000610873826118ce565b9050806001600160a01b0316836001600160a01b031614156108c65760405162461bcd60e51b8152600401808060200182810382526021815260200180615ee26021913960400191505060405180910390fd5b806001600160a01b03166108d8613253565b6001600160a01b031614806108f457506108f481610710613253565b61092f5760405162461bcd60e51b8152600401808060200182810382526038815260200180615e0c6038913960400191505060405180910390fd5b6109398383613257565b505050565b600080823561094d33826132db565b6109695760405162461bcd60e51b815260040161083390615984565b836080013580610977613377565b11156109ca576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b60006109dc6040870160208801615562565b6001600160801b0316116109ef57600080fd5b84356000908152600c602090815260409182902060018101549092600160801b9091046001600160801b031691610a2a918901908901615562565b6001600160801b0316816001600160801b03161015610a4857600080fd5b60018281015469ffffffffffffffffffff166000908152600b60209081526040808320815160608101835281546001600160a01b039081168252919095015490811692850192909252600160a01b90910462ffffff1690830152610acc7f00000000000000000000000000000000000000000000000000000000000000008361337b565b60018501549091506001600160a01b0382169063a34123a7906a01000000000000000000008104600290810b91600160681b9004900b610b1260408e0160208f01615562565b6040518463ffffffff1660e01b8152600401610b309392919061594b565b6040805180830381600087803b158015610b4957600080fd5b505af1158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8191906156f4565b909850965060408901358810801590610b9e575088606001358710155b610bba5760405162461bcd60e51b815260040161083390615a18565b6001840154600090610bea9030906a01000000000000000000008104600290810b91600160681b9004900b613477565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401610c1b9190615929565b60a06040518083038186803b158015610c3357600080fd5b505afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b91906155ac565b50509250925050610c9087600201548303876001600160801b0316600160801b6134d1565b6004880180546fffffffffffffffffffffffffffffffff198116928e016001600160801b039182160181169290921790556003880154610cda91908303908816600160801b6134d1565b6004880180546001600160801b03808216938e01600160801b9283900482160116029190911790556002870182905560038701819055610d2060408d0160208e01615562565b86038760010160106101000a8154816001600160801b0302191690836001600160801b031602179055508b600001357f26f6a048ee9138f2c0ce266f322cb99228e8d619ae2bff30c67f8dcf9d2377b48d6020016020810190610d839190615562565b8d8d604051610d9493929190615afd565b60405180910390a2505050505050505050915091565b4715610dba57610dba3347613580565b565b6000836001600160a01b0316856001600160a01b031610610ddc57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631698ee828686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff168152602001935050505060206040518083038186803b158015610e6757600080fd5b505afa158015610e7b573d6000803e3d6000fd5b505050506040513d6020811015610e9157600080fd5b505190506001600160a01b038116610fe0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a16712958686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018262ffffff1681526020019350505050602060405180830381600087803b158015610f3057600080fd5b505af1158015610f44573d6000803e3d6000fd5b505050506040513d6020811015610f5a57600080fd5b5051604080517ff637731d0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015291519293509083169163f637731d9160248082019260009290919082900301818387803b158015610fc357600080fd5b505af1158015610fd7573d6000803e3d6000fd5b505050506110c1565b6000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561101b57600080fd5b505afa15801561102f573d6000803e3d6000fd5b505050506040513d60e081101561104557600080fd5b505190506001600160a01b0381166110bf57816001600160a01b031663f637731d846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050600060405180830381600087803b1580156110a657600080fd5b505af11580156110ba573d6000803e3d6000fd5b505050505b505b949350505050565b60006110d56002613689565b905090565b60008060008360a00135806110ed613377565b1115611140576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b84356000908152600c6020908152604080832060018082015469ffffffffffffffffffff81168652600b855283862084516060808201875282546001600160a01b039081168352929094015480831682890190815262ffffff600160a01b9092048216838901908152885161014081018a528451861681529151909416818a01529251168287015230828501526a01000000000000000000008304600290810b810b608080850191909152600160681b909404810b900b60a0830152958c013560c0820152938b013560e0850152908a0135610100840152890135610120830152929061122c90613694565b6001870154939a50919850965091506000906112669030906a01000000000000000000008104600290810b91600160681b9004900b613477565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b81526004016112979190615929565b60a06040518083038186803b1580156112af57600080fd5b505afa1580156112c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e791906155ac565b50509250925050611323866002015483038760010160109054906101000a90046001600160801b03166001600160801b0316600160801b6134d1565b6004870180546001600160801b0380821690930183166fffffffffffffffffffffffffffffffff19909116179055600387015460018801546113739291840391600160801b9182900416906134d1565b6004870180546001600160801b03600160801b80830482169094018116840291811691909117909155600288018490556003880183905560018801805483810483168e018316909302929091169190911790556040518b35907f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f906113fd908d908d908d90615afd565b60405180910390a2505050505050509193909250565b61142461141e613253565b826132db565b61145f5760405162461bcd60e51b8152600401808060200182810382526031815260200180615f036031913960400191505060405180910390fd5b6109398383836138cf565b6001600160a01b038216600090815260016020526040812061148c9083613a1b565b90505b92915050565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad81565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000611526613a27565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b031681526020019550505050505060405160208183030381529060405280519060200120905090565b61093983838360405180602001604052806000815250612915565b8061159d33826132db565b6115b95760405162461bcd60e51b815260040161083390615984565b6000828152600c602052604090206001810154600160801b90046001600160801b03161580156115f4575060048101546001600160801b0316155b801561161257506004810154600160801b90046001600160801b0316155b61162e5760405162461bcd60e51b815260040161083390615a86565b6000838152600c602052604081208181556001810182905560028101829055600381018290556004015561093983613a2b565b604080517f8fcbaf0c00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101879052606481018690526001608482015260ff851660a482015260c4810184905260e4810183905290516001600160a01b03881691638fcbaf0c9161010480830192600092919082900301818387803b1580156116f457600080fd5b505af1158015611708573d6000803e3d6000fd5b50505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d60208110156117ad57600080fd5b5051905082811015611806576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e742057455448390000000000000000000000000000604482015290519081900360640190fd5b8015610939577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561187257600080fd5b505af1158015611886573d6000803e3d6000fd5b505050506109398282613580565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806118c6600284613af8565b509392505050565b600061148f82604051806060016040528060298152602001615e6e6029913960029190613b16565b606090565b60006001600160a01b0382166119425760405162461bcd60e51b815260040180806020018281038252602a815260200180615e44602a913960400191505060405180910390fd5b6001600160a01b038216600090815260016020526040902061148f90613689565b8361196c613377565b11156119bf576040805162461bcd60e51b815260206004820152600e60248201527f5065726d69742065787069726564000000000000000000000000000000000000604482015290519081900360640190fd5b60006119c96114b9565b7f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad88886119f581613b23565b604080516020808201969096526001600160a01b03909416848201526060840192909252608083015260a08083018a90528151808403909101815260c0830182528051908401207f190100000000000000000000000000000000000000000000000000000000000060e084015260e283019490945261010280830194909452805180830390940184526101229091019052815191012090506000611a98876118ce565b9050806001600160a01b0316886001600160a01b03161415611aeb5760405162461bcd60e51b8152600401808060200182810382526027815260200180615d6f6027913960400191505060405180910390fd5b611af481613b62565b15611ccf576040805160208082018790528183018690527fff0000000000000000000000000000000000000000000000000000000000000060f889901b16606083015282516041818403018152606183018085527f1626ba7e0000000000000000000000000000000000000000000000000000000090526065830186815260858401948552815160a585015281516001600160a01b03871695631626ba7e958995919260c59091019185019080838360005b83811015611bbe578181015183820152602001611ba6565b50505050905090810190601f168015611beb5780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015611c0957600080fd5b505afa158015611c1d573d6000803e3d6000fd5b505050506040513d6020811015611c3357600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f1626ba7e0000000000000000000000000000000000000000000000000000000014611cca576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b611dfb565b600060018387878760405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611d2b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d93576040805162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e6174757265000000000000000000000000000000604482015290519081900360640190fd5b816001600160a01b0316816001600160a01b031614611df9576040805162461bcd60e51b815260206004820152600c60248201527f556e617574686f72697a65640000000000000000000000000000000000000000604482015290519081900360640190fd5b505b611e058888613257565b5050505050505050565b60008060008084610140013580611e24613377565b1115611e77576040805162461bcd60e51b815260206004820152601360248201527f5472616e73616374696f6e20746f6f206f6c6400000000000000000000000000604482015290519081900360640190fd5b604080516101408101909152600090611f439080611e9860208b018b6150af565b6001600160a01b03168152602001896020016020810190611eb991906150af565b6001600160a01b03168152602001611ed760608b0160408c0161569e565b62ffffff168152306020820152604001611ef760808b0160608c016153e6565b60020b8152602001611f0f60a08b0160808c016153e6565b60020b81526020018960a0013581526020018960c0013581526020018960e001358152602001896101000135815250613694565b92975090955093509050611fb7611f6261014089016101208a016150af565b600d80547fffffffffffffffffffff000000000000000000000000000000000000000000008116600175ffffffffffffffffffffffffffffffffffffffffffff92831690810190921617909155975087613b68565b6000611fe230611fcd60808b0160608c016153e6565b611fdd60a08c0160808d016153e6565b613477565b9050600080836001600160a01b031663514ea4bf846040518263ffffffff1660e01b81526004016120139190615929565b60a06040518083038186803b15801561202b57600080fd5b505afa15801561203f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206391906155ac565b5050925092505060006120dc8560405180606001604052808e600001602081019061208e91906150af565b6001600160a01b031681526020018e60200160208101906120af91906150af565b6001600160a01b031681526020018e60400160208101906120d0919061569e565b62ffffff169052613c96565b905060405180610140016040528060006bffffffffffffffffffffffff16815260200160006001600160a01b031681526020018269ffffffffffffffffffff1681526020018c606001602081019061213491906153e6565b60020b815260200161214c60a08e0160808f016153e6565b60020b81526020018a6001600160801b0316815260200184815260200183815260200160006001600160801b0316815260200160006001600160801b0316815250600c60008c815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160006101000a81548169ffffffffffffffffffff021916908369ffffffffffffffffffff160217905550606082015181600101600a6101000a81548162ffffff021916908360020b62ffffff160217905550608082015181600101600d6101000a81548162ffffff021916908360020b62ffffff16021790555060a08201518160010160106101000a8154816001600160801b0302191690836001600160801b0316021790555060c0820151816002015560e082015181600301556101008201518160040160006101000a8154816001600160801b0302191690836001600160801b031602179055506101208201518160040160106101000a8154816001600160801b0302191690836001600160801b03160217905550905050897f3067048beee31b25b2f1681f88dac838c8bba36af25bfb2b7cf7473a5847e35f8a8a8a60405161235b93929190615afd565b60405180910390a25050505050509193509193565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156108025780601f106107d757610100808354040283529160200191610802565b6000818152600c6020908152604080832081516101408101835281546bffffffffffffffffffffffff811682526001600160a01b036c010000000000000000000000009091041693810193909352600181015469ffffffffffffffffffff81169284018390526a01000000000000000000008104600290810b810b810b6060860152600160681b8204810b810b810b60808601526001600160801b03600160801b92839004811660a08701529083015460c0860152600383015460e0860152600490920154808316610100860152041661012083015282918291829182918291829182918291829182918291906124da5760405162461bcd60e51b815260040161083390615a4f565b6000600b6000836040015169ffffffffffffffffffff1669ffffffffffffffffffff1681526020019081526020016000206040518060600160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900462ffffff1662ffffff1662ffffff1681525050905081600001518260200151826000015183602001518460400151866060015187608001518860a001518960c001518a60e001518b61010001518c61012001519d509d509d509d509d509d509d509d509d509d509d509d50505091939597999b5091939597999b565b612608613253565b6001600160a01b0316826001600160a01b0316141561266e576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061267b613253565b6001600160a01b0390811682526020808301939093526040918201600090812091871680825291909352912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091556126dd613253565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201529051600019916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b15801561278d57600080fd5b505afa1580156127a1573d6000803e3d6000fd5b505050506040513d60208110156127b757600080fd5b505110156127cd576127cd868686868686611661565b505050505050565b60608167ffffffffffffffff811180156127ee57600080fd5b5060405190808252806020026020018201604052801561282257816020015b606081526020019060019003908161280d5790505b50905060005b8281101561290e576000803086868581811061284057fe5b90506020028101906128529190615bef565b6040516128609291906157d2565b600060405180830381855af49150503d806000811461289b576040519150601f19603f3d011682016040523d82523d6000602084013e6128a0565b606091505b5091509150816128ec576044815110156128b957600080fd5b600481019050808060200190518101906128d39190615402565b60405162461bcd60e51b81526004016108339190615971565b808484815181106128f957fe5b60209081029190910101525050600101612828565b5092915050565b612926612920613253565b836132db565b6129615760405162461bcd60e51b8152600401808060200182810382526031815260200180615f036031913960400191505060405180910390fd5b61296d84848484613de6565b50505050565b604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152905186916001600160a01b0389169163dd62ed3e91604480820192602092909190829003018186803b1580156129db57600080fd5b505afa1580156129ef573d6000803e3d6000fd5b505050506040513d6020811015612a0557600080fd5b505110156127cd576127cd868686868686612c9d565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060612a4a82613246565b612a5357600080fd5b6040517fe9dc63750000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e9dc637590612aba9030908690600401615932565b60006040518083038186803b158015612ad257600080fd5b505afa158015612ae6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261148f9190810190615402565b6000612b1c828401846154a5565b9050612b4c7f00000000000000000000000000000000000000000000000000000000000000008260000151613e38565b508415612b67578051516020820151612b6791903388613e5b565b8315612b8557612b8581600001516020015182602001513387613e5b565b5050505050565b6000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612bdb57600080fd5b505afa158015612bef573d6000803e3d6000fd5b505050506040513d6020811015612c0557600080fd5b5051905082811015612c5e576040805162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e7420746f6b656e0000000000000000000000000000604482015290519081900360640190fd5b801561296d5761296d848383613feb565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b604080517fd505accf000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018790526064810186905260ff8516608482015260a4810184905260c4810183905290516001600160a01b0388169163d505accf9160e480830192600092919082900301818387803b1580156116f457600080fd5b6000808235612d3733826132db565b612d535760405162461bcd60e51b815260040161083390615984565b6000612d656060860160408701615562565b6001600160801b03161180612d9257506000612d876080860160608701615562565b6001600160801b0316115b612d9b57600080fd5b600080612dae60408701602088016150af565b6001600160a01b031614612dd157612dcc60408601602087016150af565b612dd3565b305b85356000908152600c6020908152604080832060018082015469ffffffffffffffffffff168552600b8452828520835160608101855281546001600160a01b039081168252919092015490811694820194909452600160a01b90930462ffffff169183019190915292935090612e697f00000000000000000000000000000000000000000000000000000000000000008361337b565b600484015460018501549192506001600160801b0380821692600160801b92839004821692900416156130865760018501546040517fa34123a70000000000000000000000000000000000000000000000000000000081526001600160a01b0385169163a34123a791612f00916a01000000000000000000008104600290810b92600160681b909204900b9060009060040161594b565b6040805180830381600087803b158015612f1957600080fd5b505af1158015612f2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f5191906156f4565b5050600185015460009081906001600160a01b0386169063514ea4bf90612f969030906a01000000000000000000008104600290810b91600160681b9004900b613477565b6040518263ffffffff1660e01b8152600401612fb29190615929565b60a06040518083038186803b158015612fca57600080fd5b505afa158015612fde573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061300291906155ac565b5050925092505061303e876002015483038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b6134d1565b84019350613077876003015482038860010160109054906101000a90046001600160801b03166001600160801b0316600160801b6134d1565b60028801929092556003870155015b6000806001600160801b0384166130a360608e0160408f01615562565b6001600160801b0316116130c6576130c160608d0160408e01615562565b6130c8565b835b836001600160801b03168d60600160208101906130e59190615562565b6001600160801b0316116131085761310360808e0160608f01615562565b61310a565b835b60018901546040517f4f1eb3d80000000000000000000000000000000000000000000000000000000081529294509092506001600160a01b03871691634f1eb3d89161317d918c916a01000000000000000000008104600290810b92600160681b909204900b9088908890600401615839565b6040805180830381600087803b15801561319657600080fd5b505af11580156131aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ce919061557e565b6004890180546fffffffffffffffffffffffffffffffff196001600160801b03918216600160801b878a0384160217168689038216179091556040519281169d50169a508c35907f40d0efd1a53d60ecbf40971b9daf7dc90178c3aadc7aab1765632738fa8b8f0190610d94908b9086908690615876565b600061148f60028361417b565b3390565b6000818152600c6020526040902080546bffffffffffffffffffffffff166c010000000000000000000000006001600160a01b0385169081029190911790915581906132a2826118ce565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006132e682613246565b6133215760405162461bcd60e51b815260040180806020018281038252602c815260200180615de0602c913960400191505060405180910390fd5b600061332c836118ce565b9050806001600160a01b0316846001600160a01b031614806133675750836001600160a01b031661335c8461080c565b6001600160a01b0316145b806110c157506110c18185612c6f565b4290565b600081602001516001600160a01b031682600001516001600160a01b0316106133a357600080fd5b50805160208083015160409384015184516001600160a01b0394851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301207fff0000000000000000000000000000000000000000000000000000000000000060a085015294901b6bffffffffffffffffffffffff191660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b604080516bffffffffffffffffffffffff19606086901b16602080830191909152600285810b60e890811b60348501529085900b901b60378301528251601a818403018152603a90920190925280519101205b9392505050565b600080806000198587098686029250828110908390030390508061350757600084116134fc57600080fd5b5082900490506134ca565b80841161351357600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106135cc5780518252601f1990920191602091820191016135ad565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461362e576040519150601f19603f3d011682016040523d82523d6000602084013e613633565b606091505b5050905080610939576040805162461bcd60e51b815260206004820152600360248201527f5354450000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600061148f82614187565b6000806000806000604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b03168152602001876040015162ffffff1681525090506137067f00000000000000000000000000000000000000000000000000000000000000008261337b565b91506000826001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561374357600080fd5b505afa158015613757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061377b919061560d565b50505050505090506000613792886080015161418b565b905060006137a38960a0015161418b565b90506137ba8383838c60c001518d60e001516144d9565b9750505050816001600160a01b0316633c8a7d8d876060015188608001518960a00151896040518060400160405280888152602001336001600160a01b031681525060405160200161380c9190615abd565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161383b9594939291906157f6565b6040805180830381600087803b15801561385457600080fd5b505af1158015613868573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061388c91906156f4565b610100880151919550935084108015906138ab57508561012001518310155b6138c75760405162461bcd60e51b815260040161083390615a18565b509193509193565b826001600160a01b03166138e2826118ce565b6001600160a01b0316146139275760405162461bcd60e51b8152600401808060200182810382526029815260200180615eb96029913960400191505060405180910390fd5b6001600160a01b03821661396c5760405162461bcd60e51b8152600401808060200182810382526024815260200180615d966024913960400191505060405180910390fd5b613977838383610939565b613982600082613257565b6001600160a01b03831660009081526001602052604090206139a4908261459d565b506001600160a01b03821660009081526001602052604090206139c790826145a9565b506139d4600282846145b5565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061148c83836145cb565b4690565b6000613a36826118ce565b9050613a4481600084610939565b613a4f600083613257565b6000828152600860205260409020546002600019610100600184161502019091160415613a8d576000828152600860205260408120613a8d9161501f565b6001600160a01b0381166000908152600160205260409020613aaf908361459d565b50613abb60028361462f565b5060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000808080613b07868661463b565b909450925050505b9250929050565b60006110c18484846146b6565b6000908152600c6020526040902080546bffffffffffffffffffffffff19811660016bffffffffffffffffffffffff9283169081019092161790915590565b3b151590565b6001600160a01b038216613bc3576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b613bcc81613246565b15613c1e576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b613c2a60008383610939565b6001600160a01b0382166000908152600160205260409020613c4c90826145a9565b50613c59600282846145b5565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0382166000908152600a602052604090205469ffffffffffffffffffff168061148f5750600d8054600169ffffffffffffffffffff76010000000000000000000000000000000000000000000080840482168381019092160275ffffffffffffffffffffffffffffffffffffffffffff909316929092179092556001600160a01b038085166000908152600a6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffff000000000000000000001686179055848352600b825291829020865181549085167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617825591870151950180549287015162ffffff16600160a01b027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff969094169290911691909117939093161790915592915050565b613df18484846138cf565b613dfd84848484614780565b61296d5760405162461bcd60e51b8152600401808060200182810382526032815260200180615d3d6032913960400191505060405180910390fd5b6000613e44838361337b565b9050336001600160a01b0382161461148f57600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316148015613e9c5750804710155b15613fbe577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015613efc57600080fd5b505af1158015613f10573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015613f8c57600080fd5b505af1158015613fa0573d6000803e3d6000fd5b505050506040513d6020811015613fb657600080fd5b5061296d9050565b6001600160a01b038316301415613fdf57613fda848383613feb565b61296d565b61296d8484848461495c565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251825160009485949389169392918291908083835b602083106140955780518252601f199092019160209182019101614076565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146140f7576040519150601f19603f3d011682016040523d82523d6000602084013e6140fc565b606091505b509150915081801561412a57508051158061412a575080806020019051602081101561412757600080fd5b50515b612b85576040805162461bcd60e51b815260206004820152600260248201527f5354000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600061148c8383614af4565b5490565b60008060008360020b126141a2578260020b6141aa565b8260020b6000035b9050620d89e8811115614204576040805162461bcd60e51b815260206004820152600160248201527f5400000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60006001821661421857600160801b61422a565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff169050600282161561425e576ffff97272373d413259a46990580e213a0260801c5b600482161561427d576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b600882161561429c576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156142bb576fffcb9843d60f6159c9db58835c9266440260801c5b60208216156142da576fff973b41fa98c081472e6896dfb254c00260801c5b60408216156142f9576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615614318576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615614338576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615614358576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615614378576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615614398576fe7159475a2c29b7443b29c7fa6e889d90260801c5b6110008216156143b8576fd097f3bdfd2022b8845ad8f792aa58250260801c5b6120008216156143d8576fa9f746462d870fdf8a65dc1f90e061e50260801c5b6140008216156143f8576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615614418576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615614439576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615614459576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615614478576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615614495576b048a170391f7dc42444e8fa20260801c5b60008460020b13156144b05780600019816144ac57fe5b0490505b6401000000008106156144c45760016144c7565b60005b60ff16602082901c0192505050919050565b6000836001600160a01b0316856001600160a01b031611156144f9579293925b846001600160a01b0316866001600160a01b0316116145245761451d858585614b0c565b9050614594565b836001600160a01b0316866001600160a01b0316101561458657600061454b878686614b0c565b9050600061455a878986614b78565b9050806001600160801b0316826001600160801b03161061457b578061457d565b815b92505050614594565b614591858584614b78565b90505b95945050505050565b600061148c8383614bbe565b600061148c8383614c84565b60006110c184846001600160a01b038516614cce565b8154600090821061460d5760405162461bcd60e51b8152600401808060200182810382526022815260200180615d1b6022913960400191505060405180910390fd5b82600001828154811061461c57fe5b9060005260206000200154905092915050565b600061148c8383614d65565b81546000908190831061467f5760405162461bcd60e51b8152600401808060200182810382526022815260200180615e976022913960400191505060405180910390fd5b600084600001848154811061469057fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205482816147515760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156147165781810151838201526020016146fe565b50505050905090810190601f1680156147435780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5084600001600182038154811061476457fe5b9060005260206000209060020201600101549150509392505050565b6000614794846001600160a01b0316613b62565b6147a0575060016110c1565b60006148f17f150b7a02000000000000000000000000000000000000000000000000000000006147ce613253565b88878760405160240180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561483557818101518382015260200161481d565b50505050905090810190601f1680156148625780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051806060016040528060328152602001615d3d603291396001600160a01b0388169190614e39565b9050600081806020019051602081101561490a57600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001492505050949350505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000178152925182516000948594938a169392918291908083835b60208310614a0e5780518252601f1990920191602091820191016149ef565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614a70576040519150601f19603f3d011682016040523d82523d6000602084013e614a75565b606091505b5091509150818015614aa3575080511580614aa35750808060200190516020811015614aa057600080fd5b50515b6127cd576040805162461bcd60e51b815260206004820152600360248201527f5354460000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60009081526001919091016020526040902054151590565b6000826001600160a01b0316846001600160a01b03161115614b2c579192915b6000614b58856001600160a01b0316856001600160a01b03166c010000000000000000000000006134d1565b9050614594614b7384838888036001600160a01b03166134d1565b614e48565b6000826001600160a01b0316846001600160a01b03161115614b98579192915b6110c1614b73836c010000000000000000000000008787036001600160a01b03166134d1565b60008181526001830160205260408120548015614c7a5783546000198083019190810190600090879083908110614bf157fe5b9060005260206000200154905080876000018481548110614c0e57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080614c3e57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061148f565b600091505061148f565b6000614c908383614af4565b614cc65750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561148f565b50600061148f565b600082815260018401602052604081205480614d335750506040805180820182528381526020808201848152865460018181018955600089815284812095516002909302909501918255915190820155865486845281880190925292909120556134ca565b82856000016001830381548110614d4657fe5b90600052602060002090600202016001018190555060009150506134ca565b60008181526001830160205260408120548015614c7a5783546000198083019190810190600090879083908110614d9857fe5b9060005260206000209060020201905080876000018481548110614db857fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080614df757fe5b600082815260208082206002600019909401938402018281556001908101839055929093558881528982019092526040822091909155945061148f9350505050565b60606110c18484600085614e5e565b806001600160801b038116811461077157600080fd5b606082471015614e9f5760405162461bcd60e51b8152600401808060200182810382526026815260200180615dba6026913960400191505060405180910390fd5b614ea885613b62565b614ef9576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310614f375780518252601f199092019160209182019101614f18565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614f99576040519150601f19603f3d011682016040523d82523d6000602084013e614f9e565b606091505b5091509150614fae828286614fb9565b979650505050505050565b60608315614fc85750816134ca565b825115614fd85782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156147165781810151838201526020016146fe565b50805460018160011615610100020316600290046000825580601f106150455750615063565b601f0160209004906000526020600020908101906150639190615066565b50565b5b8082111561507b5760008155600101615067565b5090565b803561077181615cc4565b805161ffff8116811461077157600080fd5b803562ffffff8116811461077157600080fd5b6000602082840312156150c0578081fd5b81356134ca81615cc4565b600080604083850312156150dd578081fd5b82356150e881615cc4565b915060208301356150f881615cc4565b809150509250929050565b60008060008060808587031215615118578182fd5b843561512381615cc4565b9350602085013561513381615cc4565b92506151416040860161509c565b9150606085013561515181615cc4565b939692955090935050565b600080600060608486031215615170578081fd5b833561517b81615cc4565b9250602084013561518b81615cc4565b929592945050506040919091013590565b600080600080608085870312156151b1578182fd5b84356151bc81615cc4565b935060208501356151cc81615cc4565b925060408501359150606085013567ffffffffffffffff8111156151ee578182fd5b8501601f810187136151fe578182fd5b803561521161520c82615c76565b615c52565b818152886020838501011115615225578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215615255578182fd5b823561526081615cc4565b915060208301356150f881615cd9565b60008060408385031215615282578182fd5b823561528d81615cc4565b946020939093013593505050565b6000806000606084860312156152af578081fd5b83356152ba81615cc4565b92506020840135915060408401356152d181615cc4565b809150509250925092565b60008060008060008060c087890312156152f4578384fd5b86356152ff81615cc4565b95506020870135945060408701359350606087013561531d81615d0b565b9598949750929560808101359460a0909101359350915050565b60008060208385031215615349578182fd5b823567ffffffffffffffff80821115615360578384fd5b818501915085601f830112615373578384fd5b813581811115615381578485fd5b8660208083028501011115615394578485fd5b60209290920196919550909350505050565b6000602082840312156153b7578081fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146134ca578182fd5b6000602082840312156153f7578081fd5b81356134ca81615ce7565b600060208284031215615413578081fd5b815167ffffffffffffffff811115615429578182fd5b8201601f81018413615439578182fd5b805161544761520c82615c76565b81815285602083850101111561545b578384fd5b614594826020830160208601615c98565b60006080828403121561547d578081fd5b50919050565b600060a0828403121561547d578081fd5b600060c0828403121561547d578081fd5b600081830360808112156154b7578182fd5b6040516040810167ffffffffffffffff82821081831117156154d557fe5b8160405260608412156154e6578485fd5b60a08301935081841081851117156154fa57fe5b50826040528435925061550c83615cc4565b91825260208401359161551e83615cc4565b8260608301526155306040860161509c565b608083015281526155436060850161507f565b6020820152949350505050565b6000610160828403121561547d578081fd5b600060208284031215615573578081fd5b81356134ca81615cf6565b60008060408385031215615590578182fd5b825161559b81615cf6565b60208401519092506150f881615cf6565b600080600080600060a086880312156155c3578283fd5b85516155ce81615cf6565b80955050602086015193506040860151925060608601516155ee81615cf6565b60808701519092506155ff81615cf6565b809150509295509295909350565b600080600080600080600060e0888a031215615627578485fd5b875161563281615cc4565b602089015190975061564381615ce7565b95506156516040890161508a565b945061565f6060890161508a565b935061566d6080890161508a565b925060a088015161567d81615d0b565b60c089015190925061568e81615cd9565b8091505092959891949750929550565b6000602082840312156156af578081fd5b61148c8261509c565b6000602082840312156156c9578081fd5b5035919050565b600080604083850312156156e2578182fd5b8235915060208301356150f881615cc4565b60008060408385031215615706578182fd5b505080516020909101519092909150565b6000806000806060858703121561572c578182fd5b8435935060208501359250604085013567ffffffffffffffff80821115615751578384fd5b818701915087601f830112615764578384fd5b813581811115615772578485fd5b886020828501011115615783578485fd5b95989497505060200194505050565b600081518084526157aa816020860160208601615c98565b601f01601f19169290920160200192915050565b60020b9052565b6001600160801b03169052565b6000828483379101908152919050565b6001600160a01b0391909116815260200190565b60006001600160a01b03871682528560020b60208301528460020b60408301526001600160801b038416606083015260a06080830152614fae60a0830184615792565b6001600160a01b03959095168552600293840b60208601529190920b60408401526001600160801b03918216606084015216608082015260a00190565b6001600160a01b039390931683526001600160801b03918216602084015216604082015260600190565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015615911577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526158ff858351615792565b945092850192908501906001016158c5565b5092979650505050505050565b901515815260200190565b90815260200190565b6001600160a01b03929092168252602082015260400190565b600293840b81529190920b60208201526001600160801b03909116604082015260600190565b60006020825261148c6020830184615792565b6020808252600c908201527f4e6f7420617070726f7665640000000000000000000000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201527f697374656e7420746f6b656e0000000000000000000000000000000000000000606082015260800190565b60208082526014908201527f507269636520736c69707061676520636865636b000000000000000000000000604082015260600190565b60208082526010908201527f496e76616c696420746f6b656e20494400000000000000000000000000000000604082015260600190565b6020808252600b908201527f4e6f7420636c6561726564000000000000000000000000000000000000000000604082015260600190565b815180516001600160a01b03908116835260208083015182168185015260409283015162ffffff1692840192909252920151909116606082015260800190565b6001600160801b039390931683526020830191909152604082015260600190565b9384526001600160801b039290921660208401526040830152606082015260800190565b918252602082015260400190565b6bffffffffffffffffffffffff8d1681526001600160a01b038c811660208301528b811660408301528a16606082015262ffffff89166080820152600288900b60a08201526101808101615ba760c08301896157be565b615bb460e08301886157c5565b8561010083015284610120830152615bd06101408301856157c5565b615bde6101608301846157c5565b9d9c50505050505050505050505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615c23578283fd5b83018035915067ffffffffffffffff821115615c3d578283fd5b602001915036819003821315613b0f57600080fd5b60405181810167ffffffffffffffff81118282101715615c6e57fe5b604052919050565b600067ffffffffffffffff821115615c8a57fe5b50601f01601f191660200190565b60005b83811015615cb3578181015183820152602001615c9b565b8381111561296d5750506000910152565b6001600160a01b038116811461506357600080fd5b801515811461506357600080fd5b8060020b811461506357600080fd5b6001600160801b038116811461506357600080fd5b60ff8116811461506357600080fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732315065726d69743a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e7366657220746f20746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a164736f6c6343000706000a",
73175
- linkReferences: {},
73176
- deployedLinkReferences: {}
73177
- };
71148
+ return bestTrades;
71149
+ }
71150
+ }
71151
+
71152
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/multicall.js
71153
+ var import_abi24 = __toESM(require_lib18(), 1);
71154
+
71155
+ // ../node_modules/@uniswap/v3-periphery/artifacts/contracts/interfaces/IMulticall.sol/IMulticall.json
71156
+ var abi3 = [{ inputs: [{ internalType: "bytes[]", name: "data", type: "bytes[]" }], name: "multicall", outputs: [{ internalType: "bytes[]", name: "results", type: "bytes[]" }], stateMutability: "payable", type: "function" }];
71157
+ var IMulticall_default = { abi: abi3 };
71158
+
71159
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/multicall.js
71160
+ class Multicall {
71161
+ constructor() {}
71162
+ static encodeMulticall(calldatas) {
71163
+ if (!Array.isArray(calldatas)) {
71164
+ calldatas = [calldatas];
71165
+ }
71166
+ return calldatas.length === 1 ? calldatas[0] : Multicall.INTERFACE.encodeFunctionData("multicall", [calldatas]);
71167
+ }
71168
+ static decodeMulticall(multicall2) {
71169
+ return Multicall.INTERFACE.decodeFunctionData("multicall", multicall2).data;
71170
+ }
71171
+ }
71172
+ Multicall.INTERFACE = new import_abi24.Interface(IMulticall_default.abi);
71173
+
71174
+ // ../node_modules/@uniswap/v3-sdk/dist/esm/src/nonfungiblePositionManager.js
71175
+ var import_jsbi24 = __toESM(require_jsbi_cjs(), 1);
71176
+ var import_abi27 = __toESM(require_lib18(), 1);
71177
+
71178
+ // ../node_modules/@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json
71179
+ var abi4 = [{ inputs: [{ internalType: "address", name: "_factory", type: "address" }, { internalType: "address", name: "_WETH9", type: "address" }, { internalType: "address", name: "_tokenDescriptor_", type: "address" }], stateMutability: "nonpayable", type: "constructor" }, { anonymous: false, inputs: [{ indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "approved", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" }], name: "Approval", type: "event" }, { anonymous: false, inputs: [{ indexed: true, internalType: "address", name: "owner", type: "address" }, { indexed: true, internalType: "address", name: "operator", type: "address" }, { indexed: false, internalType: "bool", name: "approved", type: "bool" }], name: "ApprovalForAll", type: "event" }, { anonymous: false, inputs: [{ indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" }, { indexed: false, internalType: "address", name: "recipient", type: "address" }, { indexed: false, internalType: "uint256", name: "amount0", type: "uint256" }, { indexed: false, internalType: "uint256", name: "amount1", type: "uint256" }], name: "Collect", type: "event" }, { anonymous: false, inputs: [{ indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" }, { indexed: false, internalType: "uint128", name: "liquidity", type: "uint128" }, { indexed: false, internalType: "uint256", name: "amount0", type: "uint256" }, { indexed: false, internalType: "uint256", name: "amount1", type: "uint256" }], name: "DecreaseLiquidity", type: "event" }, { anonymous: false, inputs: [{ indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" }, { indexed: false, internalType: "uint128", name: "liquidity", type: "uint128" }, { indexed: false, internalType: "uint256", name: "amount0", type: "uint256" }, { indexed: false, internalType: "uint256", name: "amount1", type: "uint256" }], name: "IncreaseLiquidity", type: "event" }, { anonymous: false, inputs: [{ indexed: true, internalType: "address", name: "from", type: "address" }, { indexed: true, internalType: "address", name: "to", type: "address" }, { indexed: true, internalType: "uint256", name: "tokenId", type: "uint256" }], name: "Transfer", type: "event" }, { inputs: [], name: "DOMAIN_SEPARATOR", outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], stateMutability: "view", type: "function" }, { inputs: [], name: "PERMIT_TYPEHASH", outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], stateMutability: "view", type: "function" }, { inputs: [], name: "WETH9", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }], name: "approve", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "balanceOf", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [], name: "baseURI", outputs: [{ internalType: "string", name: "", type: "string" }], stateMutability: "pure", type: "function" }, { inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], name: "burn", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ components: [{ internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }, { internalType: "uint128", name: "amount0Max", type: "uint128" }, { internalType: "uint128", name: "amount1Max", type: "uint128" }], internalType: "struct INonfungiblePositionManager.CollectParams", name: "params", type: "tuple" }], name: "collect", outputs: [{ internalType: "uint256", name: "amount0", type: "uint256" }, { internalType: "uint256", name: "amount1", type: "uint256" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token0", type: "address" }, { internalType: "address", name: "token1", type: "address" }, { internalType: "uint24", name: "fee", type: "uint24" }, { internalType: "uint160", name: "sqrtPriceX96", type: "uint160" }], name: "createAndInitializePoolIfNecessary", outputs: [{ internalType: "address", name: "pool", type: "address" }], stateMutability: "payable", type: "function" }, { inputs: [{ components: [{ internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "uint128", name: "liquidity", type: "uint128" }, { internalType: "uint256", name: "amount0Min", type: "uint256" }, { internalType: "uint256", name: "amount1Min", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }], internalType: "struct INonfungiblePositionManager.DecreaseLiquidityParams", name: "params", type: "tuple" }], name: "decreaseLiquidity", outputs: [{ internalType: "uint256", name: "amount0", type: "uint256" }, { internalType: "uint256", name: "amount1", type: "uint256" }], stateMutability: "payable", type: "function" }, { inputs: [], name: "factory", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], name: "getApproved", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [{ components: [{ internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "uint256", name: "amount0Desired", type: "uint256" }, { internalType: "uint256", name: "amount1Desired", type: "uint256" }, { internalType: "uint256", name: "amount0Min", type: "uint256" }, { internalType: "uint256", name: "amount1Min", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }], internalType: "struct INonfungiblePositionManager.IncreaseLiquidityParams", name: "params", type: "tuple" }], name: "increaseLiquidity", outputs: [{ internalType: "uint128", name: "liquidity", type: "uint128" }, { internalType: "uint256", name: "amount0", type: "uint256" }, { internalType: "uint256", name: "amount1", type: "uint256" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "owner", type: "address" }, { internalType: "address", name: "operator", type: "address" }], name: "isApprovedForAll", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [{ components: [{ internalType: "address", name: "token0", type: "address" }, { internalType: "address", name: "token1", type: "address" }, { internalType: "uint24", name: "fee", type: "uint24" }, { internalType: "int24", name: "tickLower", type: "int24" }, { internalType: "int24", name: "tickUpper", type: "int24" }, { internalType: "uint256", name: "amount0Desired", type: "uint256" }, { internalType: "uint256", name: "amount1Desired", type: "uint256" }, { internalType: "uint256", name: "amount0Min", type: "uint256" }, { internalType: "uint256", name: "amount1Min", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }, { internalType: "uint256", name: "deadline", type: "uint256" }], internalType: "struct INonfungiblePositionManager.MintParams", name: "params", type: "tuple" }], name: "mint", outputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "uint128", name: "liquidity", type: "uint128" }, { internalType: "uint256", name: "amount0", type: "uint256" }, { internalType: "uint256", name: "amount1", type: "uint256" }], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "bytes[]", name: "data", type: "bytes[]" }], name: "multicall", outputs: [{ internalType: "bytes[]", name: "results", type: "bytes[]" }], stateMutability: "payable", type: "function" }, { inputs: [], name: "name", outputs: [{ internalType: "string", name: "", type: "string" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], name: "ownerOf", outputs: [{ internalType: "address", name: "", type: "address" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "spender", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "permit", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], name: "positions", outputs: [{ internalType: "uint96", name: "nonce", type: "uint96" }, { internalType: "address", name: "operator", type: "address" }, { internalType: "address", name: "token0", type: "address" }, { internalType: "address", name: "token1", type: "address" }, { internalType: "uint24", name: "fee", type: "uint24" }, { internalType: "int24", name: "tickLower", type: "int24" }, { internalType: "int24", name: "tickUpper", type: "int24" }, { internalType: "uint128", name: "liquidity", type: "uint128" }, { internalType: "uint256", name: "feeGrowthInside0LastX128", type: "uint256" }, { internalType: "uint256", name: "feeGrowthInside1LastX128", type: "uint256" }, { internalType: "uint128", name: "tokensOwed0", type: "uint128" }, { internalType: "uint128", name: "tokensOwed1", type: "uint128" }], stateMutability: "view", type: "function" }, { inputs: [], name: "refundETH", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }], name: "safeTransferFrom", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }, { internalType: "bytes", name: "_data", type: "bytes" }], name: "safeTransferFrom", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "value", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermit", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "nonce", type: "uint256" }, { internalType: "uint256", name: "expiry", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermitAllowed", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "nonce", type: "uint256" }, { internalType: "uint256", name: "expiry", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermitAllowedIfNecessary", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "value", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermitIfNecessary", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "operator", type: "address" }, { internalType: "bool", name: "approved", type: "bool" }], name: "setApprovalForAll", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }], name: "supportsInterface", outputs: [{ internalType: "bool", name: "", type: "bool" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "amountMinimum", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }], name: "sweepToken", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [], name: "symbol", outputs: [{ internalType: "string", name: "", type: "string" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "uint256", name: "index", type: "uint256" }], name: "tokenByIndex", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "owner", type: "address" }, { internalType: "uint256", name: "index", type: "uint256" }], name: "tokenOfOwnerByIndex", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }], name: "tokenURI", outputs: [{ internalType: "string", name: "", type: "string" }], stateMutability: "view", type: "function" }, { inputs: [], name: "totalSupply", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function" }, { inputs: [{ internalType: "address", name: "from", type: "address" }, { internalType: "address", name: "to", type: "address" }, { internalType: "uint256", name: "tokenId", type: "uint256" }], name: "transferFrom", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint256", name: "amount0Owed", type: "uint256" }, { internalType: "uint256", name: "amount1Owed", type: "uint256" }, { internalType: "bytes", name: "data", type: "bytes" }], name: "uniswapV3MintCallback", outputs: [], stateMutability: "nonpayable", type: "function" }, { inputs: [{ internalType: "uint256", name: "amountMinimum", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }], name: "unwrapWETH9", outputs: [], stateMutability: "payable", type: "function" }, { stateMutability: "payable", type: "receive" }];
71180
+ var NonfungiblePositionManager_default = { abi: abi4 };
73178
71181
 
73179
71182
  // ../node_modules/@uniswap/v3-sdk/dist/esm/src/selfPermit.js
73180
71183
  var import_abi25 = __toESM(require_lib18(), 1);
71184
+
73181
71185
  // ../node_modules/@uniswap/v3-periphery/artifacts/contracts/interfaces/ISelfPermit.sol/ISelfPermit.json
73182
- var ISelfPermit_default = {
73183
- _format: "hh-sol-artifact-1",
73184
- contractName: "ISelfPermit",
73185
- sourceName: "contracts/interfaces/ISelfPermit.sol",
73186
- abi: [
73187
- {
73188
- inputs: [
73189
- {
73190
- internalType: "address",
73191
- name: "token",
73192
- type: "address"
73193
- },
73194
- {
73195
- internalType: "uint256",
73196
- name: "value",
73197
- type: "uint256"
73198
- },
73199
- {
73200
- internalType: "uint256",
73201
- name: "deadline",
73202
- type: "uint256"
73203
- },
73204
- {
73205
- internalType: "uint8",
73206
- name: "v",
73207
- type: "uint8"
73208
- },
73209
- {
73210
- internalType: "bytes32",
73211
- name: "r",
73212
- type: "bytes32"
73213
- },
73214
- {
73215
- internalType: "bytes32",
73216
- name: "s",
73217
- type: "bytes32"
73218
- }
73219
- ],
73220
- name: "selfPermit",
73221
- outputs: [],
73222
- stateMutability: "payable",
73223
- type: "function"
73224
- },
73225
- {
73226
- inputs: [
73227
- {
73228
- internalType: "address",
73229
- name: "token",
73230
- type: "address"
73231
- },
73232
- {
73233
- internalType: "uint256",
73234
- name: "nonce",
73235
- type: "uint256"
73236
- },
73237
- {
73238
- internalType: "uint256",
73239
- name: "expiry",
73240
- type: "uint256"
73241
- },
73242
- {
73243
- internalType: "uint8",
73244
- name: "v",
73245
- type: "uint8"
73246
- },
73247
- {
73248
- internalType: "bytes32",
73249
- name: "r",
73250
- type: "bytes32"
73251
- },
73252
- {
73253
- internalType: "bytes32",
73254
- name: "s",
73255
- type: "bytes32"
73256
- }
73257
- ],
73258
- name: "selfPermitAllowed",
73259
- outputs: [],
73260
- stateMutability: "payable",
73261
- type: "function"
73262
- },
73263
- {
73264
- inputs: [
73265
- {
73266
- internalType: "address",
73267
- name: "token",
73268
- type: "address"
73269
- },
73270
- {
73271
- internalType: "uint256",
73272
- name: "nonce",
73273
- type: "uint256"
73274
- },
73275
- {
73276
- internalType: "uint256",
73277
- name: "expiry",
73278
- type: "uint256"
73279
- },
73280
- {
73281
- internalType: "uint8",
73282
- name: "v",
73283
- type: "uint8"
73284
- },
73285
- {
73286
- internalType: "bytes32",
73287
- name: "r",
73288
- type: "bytes32"
73289
- },
73290
- {
73291
- internalType: "bytes32",
73292
- name: "s",
73293
- type: "bytes32"
73294
- }
73295
- ],
73296
- name: "selfPermitAllowedIfNecessary",
73297
- outputs: [],
73298
- stateMutability: "payable",
73299
- type: "function"
73300
- },
73301
- {
73302
- inputs: [
73303
- {
73304
- internalType: "address",
73305
- name: "token",
73306
- type: "address"
73307
- },
73308
- {
73309
- internalType: "uint256",
73310
- name: "value",
73311
- type: "uint256"
73312
- },
73313
- {
73314
- internalType: "uint256",
73315
- name: "deadline",
73316
- type: "uint256"
73317
- },
73318
- {
73319
- internalType: "uint8",
73320
- name: "v",
73321
- type: "uint8"
73322
- },
73323
- {
73324
- internalType: "bytes32",
73325
- name: "r",
73326
- type: "bytes32"
73327
- },
73328
- {
73329
- internalType: "bytes32",
73330
- name: "s",
73331
- type: "bytes32"
73332
- }
73333
- ],
73334
- name: "selfPermitIfNecessary",
73335
- outputs: [],
73336
- stateMutability: "payable",
73337
- type: "function"
73338
- }
73339
- ],
73340
- bytecode: "0x",
73341
- deployedBytecode: "0x",
73342
- linkReferences: {},
73343
- deployedLinkReferences: {}
73344
- };
71186
+ var abi5 = [{ inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "value", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermit", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "nonce", type: "uint256" }, { internalType: "uint256", name: "expiry", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermitAllowed", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "nonce", type: "uint256" }, { internalType: "uint256", name: "expiry", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermitAllowedIfNecessary", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "value", type: "uint256" }, { internalType: "uint256", name: "deadline", type: "uint256" }, { internalType: "uint8", name: "v", type: "uint8" }, { internalType: "bytes32", name: "r", type: "bytes32" }, { internalType: "bytes32", name: "s", type: "bytes32" }], name: "selfPermitIfNecessary", outputs: [], stateMutability: "payable", type: "function" }];
71187
+ var ISelfPermit_default = { abi: abi5 };
73345
71188
 
73346
71189
  // ../node_modules/@uniswap/v3-sdk/dist/esm/src/selfPermit.js
73347
71190
  function isAllowedPermit(permitOptions) {
@@ -73372,127 +71215,10 @@ SelfPermit.INTERFACE = new import_abi25.Interface(ISelfPermit_default.abi);
73372
71215
 
73373
71216
  // ../node_modules/@uniswap/v3-sdk/dist/esm/src/payments.js
73374
71217
  var import_abi26 = __toESM(require_lib18(), 1);
71218
+
73375
71219
  // ../node_modules/@uniswap/v3-periphery/artifacts/contracts/interfaces/IPeripheryPaymentsWithFee.sol/IPeripheryPaymentsWithFee.json
73376
- var IPeripheryPaymentsWithFee_default = {
73377
- _format: "hh-sol-artifact-1",
73378
- contractName: "IPeripheryPaymentsWithFee",
73379
- sourceName: "contracts/interfaces/IPeripheryPaymentsWithFee.sol",
73380
- abi: [
73381
- {
73382
- inputs: [],
73383
- name: "refundETH",
73384
- outputs: [],
73385
- stateMutability: "payable",
73386
- type: "function"
73387
- },
73388
- {
73389
- inputs: [
73390
- {
73391
- internalType: "address",
73392
- name: "token",
73393
- type: "address"
73394
- },
73395
- {
73396
- internalType: "uint256",
73397
- name: "amountMinimum",
73398
- type: "uint256"
73399
- },
73400
- {
73401
- internalType: "address",
73402
- name: "recipient",
73403
- type: "address"
73404
- }
73405
- ],
73406
- name: "sweepToken",
73407
- outputs: [],
73408
- stateMutability: "payable",
73409
- type: "function"
73410
- },
73411
- {
73412
- inputs: [
73413
- {
73414
- internalType: "address",
73415
- name: "token",
73416
- type: "address"
73417
- },
73418
- {
73419
- internalType: "uint256",
73420
- name: "amountMinimum",
73421
- type: "uint256"
73422
- },
73423
- {
73424
- internalType: "address",
73425
- name: "recipient",
73426
- type: "address"
73427
- },
73428
- {
73429
- internalType: "uint256",
73430
- name: "feeBips",
73431
- type: "uint256"
73432
- },
73433
- {
73434
- internalType: "address",
73435
- name: "feeRecipient",
73436
- type: "address"
73437
- }
73438
- ],
73439
- name: "sweepTokenWithFee",
73440
- outputs: [],
73441
- stateMutability: "payable",
73442
- type: "function"
73443
- },
73444
- {
73445
- inputs: [
73446
- {
73447
- internalType: "uint256",
73448
- name: "amountMinimum",
73449
- type: "uint256"
73450
- },
73451
- {
73452
- internalType: "address",
73453
- name: "recipient",
73454
- type: "address"
73455
- }
73456
- ],
73457
- name: "unwrapWETH9",
73458
- outputs: [],
73459
- stateMutability: "payable",
73460
- type: "function"
73461
- },
73462
- {
73463
- inputs: [
73464
- {
73465
- internalType: "uint256",
73466
- name: "amountMinimum",
73467
- type: "uint256"
73468
- },
73469
- {
73470
- internalType: "address",
73471
- name: "recipient",
73472
- type: "address"
73473
- },
73474
- {
73475
- internalType: "uint256",
73476
- name: "feeBips",
73477
- type: "uint256"
73478
- },
73479
- {
73480
- internalType: "address",
73481
- name: "feeRecipient",
73482
- type: "address"
73483
- }
73484
- ],
73485
- name: "unwrapWETH9WithFee",
73486
- outputs: [],
73487
- stateMutability: "payable",
73488
- type: "function"
73489
- }
73490
- ],
73491
- bytecode: "0x",
73492
- deployedBytecode: "0x",
73493
- linkReferences: {},
73494
- deployedLinkReferences: {}
73495
- };
71220
+ var abi6 = [{ inputs: [], name: "refundETH", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "amountMinimum", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }], name: "sweepToken", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "address", name: "token", type: "address" }, { internalType: "uint256", name: "amountMinimum", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }, { internalType: "uint256", name: "feeBips", type: "uint256" }, { internalType: "address", name: "feeRecipient", type: "address" }], name: "sweepTokenWithFee", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint256", name: "amountMinimum", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }], name: "unwrapWETH9", outputs: [], stateMutability: "payable", type: "function" }, { inputs: [{ internalType: "uint256", name: "amountMinimum", type: "uint256" }, { internalType: "address", name: "recipient", type: "address" }, { internalType: "uint256", name: "feeBips", type: "uint256" }, { internalType: "address", name: "feeRecipient", type: "address" }], name: "unwrapWETH9WithFee", outputs: [], stateMutability: "payable", type: "function" }];
71221
+ var IPeripheryPaymentsWithFee_default = { abi: abi6 };
73496
71222
 
73497
71223
  // ../node_modules/@uniswap/v3-sdk/dist/esm/src/payments.js
73498
71224
  class Payments {
@@ -77108,7 +74834,7 @@ function createCommand2(type, parameters, urVersion) {
77108
74834
  const commandDef = isAtLeastV2_1_12(urVersion) && type in V2V3_SWAP_COMMANDS_V2_1_1 ? V2V3_SWAP_COMMANDS_V2_1_1[type] : COMMAND_DEFINITION[type];
77109
74835
  switch (commandDef.parser) {
77110
74836
  case Parser.Abi:
77111
- const encodedInput = import_utils46.defaultAbiCoder.encode(commandDef.params.map((abi2) => abi2.type), parameters);
74837
+ const encodedInput = import_utils46.defaultAbiCoder.encode(commandDef.params.map((abi7) => abi7.type), parameters);
77112
74838
  return { type, encodedInput };
77113
74839
  case Parser.V4Actions:
77114
74840
  return { type, encodedInput: parameters[0] };
@@ -81837,6 +79563,11 @@ function action(task) {
81837
79563
  }
81838
79564
  };
81839
79565
  }
79566
+ function requireBroadcastConfirmation(yes) {
79567
+ if (!yes) {
79568
+ throw new Error("Transaction not broadcast. Review the command details and rerun with --yes to confirm.");
79569
+ }
79570
+ }
81840
79571
  function createProgram(version4, overrides = {}) {
81841
79572
  const handlers = { ...defaultHandlers, ...overrides };
81842
79573
  const program2 = new Command().name("mc").description("Mint Club V2 CLI — bonding curves and bounded local Uniswap routing across supported chains").version(version4).option("-c, --chain <chain>", `Blockchain to use: ${SUPPORTED_CHAIN_KEYS.join(", ")}`, "base");
@@ -81850,11 +79581,13 @@ function createProgram(version4, overrides = {}) {
81850
79581
  const chain = selectedChain();
81851
79582
  await handlers.info(await token(input, chain), chain);
81852
79583
  })());
81853
- program2.command("buy").description("Buy (mint) tokens with the reserve token").argument("<token>", "Token address or symbol").requiredOption("-a, --amount <n>", "Tokens to buy").option("-m, --max-cost <n>", "Maximum reserve-token cost").action((input, options) => action(async () => {
79584
+ program2.command("buy").description("Buy (mint) tokens with the reserve token").argument("<token>", "Token address or symbol").requiredOption("-a, --amount <n>", "Tokens to buy").option("-m, --max-cost <n>", "Maximum reserve-token cost").option("-y, --yes", "Confirm and broadcast this transaction").action((input, options) => action(async () => {
79585
+ requireBroadcastConfirmation(options.yes);
81854
79586
  const chain = selectedChain();
81855
79587
  await handlers.buy(await token(input, chain), options.amount, options.maxCost, requireKey(), chain);
81856
79588
  })());
81857
- program2.command("sell").description("Sell (burn) tokens for the reserve token").argument("<token>", "Token address or symbol").requiredOption("-a, --amount <n>", "Tokens to sell").option("-m, --min-refund <n>", "Minimum reserve-token refund").action((input, options) => action(async () => {
79589
+ program2.command("sell").description("Sell (burn) tokens for the reserve token").argument("<token>", "Token address or symbol").requiredOption("-a, --amount <n>", "Tokens to sell").option("-m, --min-refund <n>", "Minimum reserve-token refund").option("-y, --yes", "Confirm and broadcast this transaction").action((input, options) => action(async () => {
79590
+ requireBroadcastConfirmation(options.yes);
81858
79591
  const chain = selectedChain();
81859
79592
  await handlers.sell(await token(input, chain), options.amount, options.minRefund, requireKey(), chain);
81860
79593
  })());
@@ -81870,7 +79603,8 @@ function createProgram(version4, overrides = {}) {
81870
79603
  yes: options.yes
81871
79604
  }, chain);
81872
79605
  })());
81873
- program2.command("zap-buy").description("Buy a Mint Club token from a routed native/ERC-20 asset via MCV2_ZapV2").argument("<token>", "Mint Club token address or symbol").requiredOption("-i, --input-token <token>", "Exact-input token address or symbol").requiredOption("-a, --input-amount <n>", "Exact input amount").option("-m, --min-tokens <n>", "Minimum Mint Club tokens to receive").option("-s, --slippage <pct>", "Slippage tolerance %", "1").action((input, options) => action(async () => {
79606
+ program2.command("zap-buy").description("Buy a Mint Club token from a routed native/ERC-20 asset via MCV2_ZapV2").argument("<token>", "Mint Club token address or symbol").requiredOption("-i, --input-token <token>", "Exact-input token address or symbol").requiredOption("-a, --input-amount <n>", "Exact input amount").option("-m, --min-tokens <n>", "Minimum Mint Club tokens to receive").option("-s, --slippage <pct>", "Slippage tolerance %", "1").option("-y, --yes", "Confirm and broadcast this transaction").action((input, options) => action(async () => {
79607
+ requireBroadcastConfirmation(options.yes);
81874
79608
  const chain = selectedChain();
81875
79609
  await handlers.zapBuy({
81876
79610
  privateKey: requireKey(),
@@ -81882,7 +79616,8 @@ function createProgram(version4, overrides = {}) {
81882
79616
  chain
81883
79617
  });
81884
79618
  })());
81885
- program2.command("zap-sell").description("Sell a Mint Club token into a routed native/ERC-20 asset via MCV2_ZapV2").argument("<token>", "Mint Club token address or symbol").requiredOption("-a, --amount <n>", "Mint Club tokens to sell").requiredOption("-o, --output-token <token>", "Output token address or symbol").option("-m, --min-output <n>", "Minimum output-token amount").option("-s, --slippage <pct>", "Slippage tolerance %", "1").action((input, options) => action(async () => {
79619
+ program2.command("zap-sell").description("Sell a Mint Club token into a routed native/ERC-20 asset via MCV2_ZapV2").argument("<token>", "Mint Club token address or symbol").requiredOption("-a, --amount <n>", "Mint Club tokens to sell").requiredOption("-o, --output-token <token>", "Output token address or symbol").option("-m, --min-output <n>", "Minimum output-token amount").option("-s, --slippage <pct>", "Slippage tolerance %", "1").option("-y, --yes", "Confirm and broadcast this transaction").action((input, options) => action(async () => {
79620
+ requireBroadcastConfirmation(options.yes);
81886
79621
  const chain = selectedChain();
81887
79622
  await handlers.zapSell({
81888
79623
  privateKey: requireKey(),
@@ -81894,11 +79629,12 @@ function createProgram(version4, overrides = {}) {
81894
79629
  chain
81895
79630
  });
81896
79631
  })());
81897
- program2.command("send").description("Send native currency, ERC-20, or ERC-1155 tokens").argument("<to>", "Recipient address").requiredOption("-a, --amount <n>", "Amount to send").option("-t, --token <token>", "Token address or symbol").option("--token-id <id>", "ERC-1155 token ID").action((to, options) => action(async () => {
79632
+ program2.command("send").description("Send native currency, ERC-20, or ERC-1155 tokens").argument("<to>", "Recipient address").requiredOption("-a, --amount <n>", "Amount to send").option("-t, --token <token>", "Token address or symbol").option("--token-id <id>", "ERC-1155 token ID").option("-y, --yes", "Confirm and broadcast this transaction").action((to, options) => action(async () => {
79633
+ requireBroadcastConfirmation(options.yes);
81898
79634
  const chain = selectedChain();
81899
79635
  const resolvedToken = options.token ? await token(options.token, chain) : undefined;
81900
79636
  const nativeToken = resolvedToken?.toLowerCase() === ZERO_ADDRESS.toLowerCase();
81901
- if (nativeToken && options.tokenId !== undefined) {
79637
+ if (options.tokenId !== undefined && (!resolvedToken || nativeToken)) {
81902
79638
  throw new Error("--token-id requires an ERC-1155 contract address");
81903
79639
  }
81904
79640
  await handlers.send(to, options.amount, requireKey(), {
@@ -81906,7 +79642,7 @@ function createProgram(version4, overrides = {}) {
81906
79642
  tokenId: options.tokenId
81907
79643
  }, chain);
81908
79644
  })());
81909
- program2.command("wallet").description("Show wallet balances, or generate/import a key").option("-g, --generate", "Generate a new wallet").option("-s, --set-private-key <key>", "Import a key (prefer PRIVATE_KEY; command arguments may be exposed)").action((options) => action(() => handlers.wallet(options, selectedChain()))());
79645
+ program2.command("wallet").description("Show wallet balances or generate a dedicated key").option("-g, --generate", "Generate a new wallet").action((options) => action(() => handlers.wallet(options, selectedChain()))());
81910
79646
  program2.command("upgrade").description("Upgrade @mint.club/v2-cli to the latest version").action(() => action(() => handlers.upgrade())());
81911
79647
  return program2;
81912
79648
  }
@@ -81914,5 +79650,5 @@ function createProgram(version4, overrides = {}) {
81914
79650
  // src/index.ts
81915
79651
  import_dotenv.config({ path: resolve3(homedir3(), ".mintclub", ".env") });
81916
79652
  import_dotenv.config();
81917
- var version4 = "2.0.0";
79653
+ var version4 = "2.0.1";
81918
79654
  await createProgram(version4).parseAsync();