punkkit-sdk 1.0.21 → 1.0.24

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.mjs CHANGED
@@ -9022,10 +9022,10 @@ var init_lib15 = __esm({
9022
9022
  }
9023
9023
  };
9024
9024
  VoidSigner = class _VoidSigner extends Signer {
9025
- constructor(address, provider) {
9025
+ constructor(address, provider2) {
9026
9026
  super();
9027
9027
  defineReadOnly(this, "address", address);
9028
- defineReadOnly(this, "provider", provider || null);
9028
+ defineReadOnly(this, "provider", provider2 || null);
9029
9029
  }
9030
9030
  getAddress() {
9031
9031
  return Promise.resolve(this.address);
@@ -9044,8 +9044,8 @@ var init_lib15 = __esm({
9044
9044
  _signTypedData(domain, types, value) {
9045
9045
  return this._fail("VoidSigner cannot sign typed data", "signTypedData");
9046
9046
  }
9047
- connect(provider) {
9048
- return new _VoidSigner(this.address, provider);
9047
+ connect(provider2) {
9048
+ return new _VoidSigner(this.address, provider2);
9049
9049
  }
9050
9050
  };
9051
9051
  }
@@ -15863,10 +15863,10 @@ var init_lib23 = __esm({
15863
15863
  }
15864
15864
  };
15865
15865
  VoidSigner2 = class _VoidSigner extends Signer2 {
15866
- constructor(address, provider) {
15866
+ constructor(address, provider2) {
15867
15867
  super();
15868
15868
  defineReadOnly2(this, "address", address);
15869
- defineReadOnly2(this, "provider", provider || null);
15869
+ defineReadOnly2(this, "provider", provider2 || null);
15870
15870
  }
15871
15871
  getAddress() {
15872
15872
  return Promise.resolve(this.address);
@@ -15885,8 +15885,8 @@ var init_lib23 = __esm({
15885
15885
  _signTypedData(domain, types, value) {
15886
15886
  return this._fail("VoidSigner cannot sign typed data", "signTypedData");
15887
15887
  }
15888
- connect(provider) {
15889
- return new _VoidSigner(this.address, provider);
15888
+ connect(provider2) {
15889
+ return new _VoidSigner(this.address, provider2);
15890
15890
  }
15891
15891
  };
15892
15892
  }
@@ -18189,7 +18189,7 @@ var init_lib31 = __esm({
18189
18189
  };
18190
18190
  logger31 = new Logger(version25);
18191
18191
  Wallet = class _Wallet extends Signer {
18192
- constructor(privateKey, provider) {
18192
+ constructor(privateKey, provider2) {
18193
18193
  super();
18194
18194
  if (isAccount(privateKey)) {
18195
18195
  const signingKey = new SigningKey(privateKey.privateKey);
@@ -18231,10 +18231,10 @@ var init_lib31 = __esm({
18231
18231
  defineReadOnly(this, "_mnemonic", () => null);
18232
18232
  defineReadOnly(this, "address", computeAddress(this.publicKey));
18233
18233
  }
18234
- if (provider && !Provider.isProvider(provider)) {
18235
- logger31.throwArgumentError("invalid provider", "provider", provider);
18234
+ if (provider2 && !Provider.isProvider(provider2)) {
18235
+ logger31.throwArgumentError("invalid provider", "provider", provider2);
18236
18236
  }
18237
- defineReadOnly(this, "provider", provider || null);
18237
+ defineReadOnly(this, "provider", provider2 || null);
18238
18238
  }
18239
18239
  get mnemonic() {
18240
18240
  return this._mnemonic();
@@ -18248,8 +18248,8 @@ var init_lib31 = __esm({
18248
18248
  getAddress() {
18249
18249
  return Promise.resolve(this.address);
18250
18250
  }
18251
- connect(provider) {
18252
- return new _Wallet(this, provider);
18251
+ connect(provider2) {
18252
+ return new _Wallet(this, provider2);
18253
18253
  }
18254
18254
  signTransaction(transaction) {
18255
18255
  return resolveProperties(transaction).then((tx) => {
@@ -18436,9 +18436,9 @@ function ethDefaultProvider(network) {
18436
18436
  if (providers2.PocketProvider && options.pocket !== "-") {
18437
18437
  const skip = ["goerli", "ropsten", "rinkeby", "sepolia"];
18438
18438
  try {
18439
- const provider = new providers2.PocketProvider(network, options.pocket);
18440
- if (provider.network && skip.indexOf(provider.network.name) === -1) {
18441
- providerList.push(provider);
18439
+ const provider2 = new providers2.PocketProvider(network, options.pocket);
18440
+ if (provider2.network && skip.indexOf(provider2.network.name) === -1) {
18441
+ providerList.push(provider2);
18442
18442
  }
18443
18443
  } catch (error) {
18444
18444
  }
@@ -18452,9 +18452,9 @@ function ethDefaultProvider(network) {
18452
18452
  if (providers2.AnkrProvider && options.ankr !== "-") {
18453
18453
  try {
18454
18454
  const skip = ["ropsten"];
18455
- const provider = new providers2.AnkrProvider(network, options.ankr);
18456
- if (provider.network && skip.indexOf(provider.network.name) === -1) {
18457
- providerList.push(provider);
18455
+ const provider2 = new providers2.AnkrProvider(network, options.ankr);
18456
+ if (provider2.network && skip.indexOf(provider2.network.name) === -1) {
18457
+ providerList.push(provider2);
18458
18458
  }
18459
18459
  } catch (error) {
18460
18460
  }
@@ -19991,10 +19991,10 @@ var init_base_provider = __esm({
19991
19991
  ];
19992
19992
  Resolver = class {
19993
19993
  // The resolvedAddress is only for creating a ReverseLookup resolver
19994
- constructor(provider, address, name, resolvedAddress) {
19995
- defineReadOnly(this, "provider", provider);
19994
+ constructor(provider2, address, name, resolvedAddress) {
19995
+ defineReadOnly(this, "provider", provider2);
19996
19996
  defineReadOnly(this, "name", name);
19997
- defineReadOnly(this, "address", provider.formatter.address(address));
19997
+ defineReadOnly(this, "address", provider2.formatter.address(address));
19998
19998
  defineReadOnly(this, "_resolvedAddress", resolvedAddress);
19999
19999
  }
20000
20000
  supportsWildcard() {
@@ -21746,12 +21746,12 @@ var init_json_rpc_provider = __esm({
21746
21746
  errorGas = ["call", "estimateGas"];
21747
21747
  _constructorGuard7 = {};
21748
21748
  JsonRpcSigner = class extends Signer {
21749
- constructor(constructorGuard, provider, addressOrIndex) {
21749
+ constructor(constructorGuard, provider2, addressOrIndex) {
21750
21750
  super();
21751
21751
  if (constructorGuard !== _constructorGuard7) {
21752
21752
  throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");
21753
21753
  }
21754
- defineReadOnly(this, "provider", provider);
21754
+ defineReadOnly(this, "provider", provider2);
21755
21755
  if (addressOrIndex == null) {
21756
21756
  addressOrIndex = 0;
21757
21757
  }
@@ -21765,7 +21765,7 @@ var init_json_rpc_provider = __esm({
21765
21765
  logger36.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex);
21766
21766
  }
21767
21767
  }
21768
- connect(provider) {
21768
+ connect(provider2) {
21769
21769
  return logger36.throwError("cannot alter JSON-RPC Signer connection", Logger.errors.UNSUPPORTED_OPERATION, {
21770
21770
  operation: "connect"
21771
21771
  });
@@ -21920,9 +21920,9 @@ var init_json_rpc_provider = __esm({
21920
21920
  }
21921
21921
  unlock(password) {
21922
21922
  return __awaiter13(this, void 0, void 0, function* () {
21923
- const provider = this.provider;
21923
+ const provider2 = this.provider;
21924
21924
  const address = yield this.getAddress();
21925
- return provider.send("personal_unlockAccount", [address.toLowerCase(), password, null]);
21925
+ return provider2.send("personal_unlockAccount", [address.toLowerCase(), password, null]);
21926
21926
  });
21927
21927
  }
21928
21928
  };
@@ -22681,10 +22681,10 @@ var init_alchemy_provider = __esm({
22681
22681
  defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
22682
22682
  AlchemyWebSocketProvider = class extends WebSocketProvider {
22683
22683
  constructor(network, apiKey) {
22684
- const provider = new AlchemyProvider(network, apiKey);
22685
- const url = provider.connection.url.replace(/^http/i, "ws").replace(".alchemyapi.", ".ws.alchemyapi.");
22686
- super(url, provider.network);
22687
- defineReadOnly(this, "apiKey", provider.apiKey);
22684
+ const provider2 = new AlchemyProvider(network, apiKey);
22685
+ const url = provider2.connection.url.replace(/^http/i, "ws").replace(".alchemyapi.", ".ws.alchemyapi.");
22686
+ super(url, provider2.network);
22687
+ defineReadOnly(this, "apiKey", provider2.apiKey);
22688
22688
  }
22689
22689
  isCommunityResource() {
22690
22690
  return this.apiKey === defaultApiKey;
@@ -23437,7 +23437,7 @@ function normalizedTally(normalize3, quorum) {
23437
23437
  return void 0;
23438
23438
  };
23439
23439
  }
23440
- function getProcessFunc(provider, method, params) {
23440
+ function getProcessFunc(provider2, method, params) {
23441
23441
  let normalize3 = serialize2;
23442
23442
  switch (method) {
23443
23443
  case "getBlockNumber":
@@ -23451,10 +23451,10 @@ function getProcessFunc(provider, method, params) {
23451
23451
  if (values.indexOf(blockNumber + 1) >= 0) {
23452
23452
  blockNumber++;
23453
23453
  }
23454
- if (blockNumber >= provider._highestBlockNumber) {
23455
- provider._highestBlockNumber = blockNumber;
23454
+ if (blockNumber >= provider2._highestBlockNumber) {
23455
+ provider2._highestBlockNumber = blockNumber;
23456
23456
  }
23457
- return provider._highestBlockNumber;
23457
+ return provider2._highestBlockNumber;
23458
23458
  };
23459
23459
  case "getGasPrice":
23460
23460
  return function(configs) {
@@ -23514,19 +23514,19 @@ function getProcessFunc(provider, method, params) {
23514
23514
  default:
23515
23515
  throw new Error("unknown method: " + method);
23516
23516
  }
23517
- return normalizedTally(normalize3, provider.quorum);
23517
+ return normalizedTally(normalize3, provider2.quorum);
23518
23518
  }
23519
23519
  function waitForSync(config2, blockNumber) {
23520
23520
  return __awaiter18(this, void 0, void 0, function* () {
23521
- const provider = config2.provider;
23522
- if (provider.blockNumber != null && provider.blockNumber >= blockNumber || blockNumber === -1) {
23523
- return provider;
23521
+ const provider2 = config2.provider;
23522
+ if (provider2.blockNumber != null && provider2.blockNumber >= blockNumber || blockNumber === -1) {
23523
+ return provider2;
23524
23524
  }
23525
23525
  return poll(() => {
23526
23526
  return new Promise((resolve, reject) => {
23527
23527
  setTimeout(function() {
23528
- if (provider.blockNumber >= blockNumber) {
23529
- return resolve(provider);
23528
+ if (provider2.blockNumber >= blockNumber) {
23529
+ return resolve(provider2);
23530
23530
  }
23531
23531
  if (config2.cancelled) {
23532
23532
  return resolve(null);
@@ -23534,56 +23534,56 @@ function waitForSync(config2, blockNumber) {
23534
23534
  return resolve(void 0);
23535
23535
  }, 0);
23536
23536
  });
23537
- }, { oncePoll: provider });
23537
+ }, { oncePoll: provider2 });
23538
23538
  });
23539
23539
  }
23540
23540
  function getRunner(config2, currentBlockNumber, method, params) {
23541
23541
  return __awaiter18(this, void 0, void 0, function* () {
23542
- let provider = config2.provider;
23542
+ let provider2 = config2.provider;
23543
23543
  switch (method) {
23544
23544
  case "getBlockNumber":
23545
23545
  case "getGasPrice":
23546
- return provider[method]();
23546
+ return provider2[method]();
23547
23547
  case "getEtherPrice":
23548
- if (provider.getEtherPrice) {
23549
- return provider.getEtherPrice();
23548
+ if (provider2.getEtherPrice) {
23549
+ return provider2.getEtherPrice();
23550
23550
  }
23551
23551
  break;
23552
23552
  case "getBalance":
23553
23553
  case "getTransactionCount":
23554
23554
  case "getCode":
23555
23555
  if (params.blockTag && isHexString(params.blockTag)) {
23556
- provider = yield waitForSync(config2, currentBlockNumber);
23556
+ provider2 = yield waitForSync(config2, currentBlockNumber);
23557
23557
  }
23558
- return provider[method](params.address, params.blockTag || "latest");
23558
+ return provider2[method](params.address, params.blockTag || "latest");
23559
23559
  case "getStorageAt":
23560
23560
  if (params.blockTag && isHexString(params.blockTag)) {
23561
- provider = yield waitForSync(config2, currentBlockNumber);
23561
+ provider2 = yield waitForSync(config2, currentBlockNumber);
23562
23562
  }
23563
- return provider.getStorageAt(params.address, params.position, params.blockTag || "latest");
23563
+ return provider2.getStorageAt(params.address, params.position, params.blockTag || "latest");
23564
23564
  case "getBlock":
23565
23565
  if (params.blockTag && isHexString(params.blockTag)) {
23566
- provider = yield waitForSync(config2, currentBlockNumber);
23566
+ provider2 = yield waitForSync(config2, currentBlockNumber);
23567
23567
  }
23568
- return provider[params.includeTransactions ? "getBlockWithTransactions" : "getBlock"](params.blockTag || params.blockHash);
23568
+ return provider2[params.includeTransactions ? "getBlockWithTransactions" : "getBlock"](params.blockTag || params.blockHash);
23569
23569
  case "call":
23570
23570
  case "estimateGas":
23571
23571
  if (params.blockTag && isHexString(params.blockTag)) {
23572
- provider = yield waitForSync(config2, currentBlockNumber);
23572
+ provider2 = yield waitForSync(config2, currentBlockNumber);
23573
23573
  }
23574
23574
  if (method === "call" && params.blockTag) {
23575
- return provider[method](params.transaction, params.blockTag);
23575
+ return provider2[method](params.transaction, params.blockTag);
23576
23576
  }
23577
- return provider[method](params.transaction);
23577
+ return provider2[method](params.transaction);
23578
23578
  case "getTransaction":
23579
23579
  case "getTransactionReceipt":
23580
- return provider[method](params.transactionHash);
23580
+ return provider2[method](params.transactionHash);
23581
23581
  case "getLogs": {
23582
23582
  let filter = params.filter;
23583
23583
  if (filter.fromBlock && isHexString(filter.fromBlock) || filter.toBlock && isHexString(filter.toBlock)) {
23584
- provider = yield waitForSync(config2, currentBlockNumber);
23584
+ provider2 = yield waitForSync(config2, currentBlockNumber);
23585
23585
  }
23586
- return provider.getLogs(filter);
23586
+ return provider2.getLogs(filter);
23587
23587
  }
23588
23588
  }
23589
23589
  return logger43.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, {
@@ -23888,8 +23888,8 @@ var init_infura_provider = __esm({
23888
23888
  defaultProjectId = "84842078b09946638c03157f83405213";
23889
23889
  InfuraWebSocketProvider = class extends WebSocketProvider {
23890
23890
  constructor(network, apiKey) {
23891
- const provider = new InfuraProvider(network, apiKey);
23892
- const connection = provider.connection;
23891
+ const provider2 = new InfuraProvider(network, apiKey);
23892
+ const connection = provider2.connection;
23893
23893
  if (connection.password) {
23894
23894
  logger44.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
23895
23895
  operation: "InfuraProvider.getWebSocketProvider()"
@@ -23897,9 +23897,9 @@ var init_infura_provider = __esm({
23897
23897
  }
23898
23898
  const url = connection.url.replace(/^http/i, "ws").replace("/v3/", "/ws/v3/");
23899
23899
  super(url, network);
23900
- defineReadOnly(this, "apiKey", provider.projectId);
23901
- defineReadOnly(this, "projectId", provider.projectId);
23902
- defineReadOnly(this, "projectSecret", provider.projectSecret);
23900
+ defineReadOnly(this, "apiKey", provider2.projectId);
23901
+ defineReadOnly(this, "projectId", provider2.projectId);
23902
+ defineReadOnly(this, "projectSecret", provider2.projectSecret);
23903
23903
  }
23904
23904
  isCommunityResource() {
23905
23905
  return this.projectId === defaultProjectId;
@@ -24185,7 +24185,7 @@ var init_pocket_provider = __esm({
24185
24185
  });
24186
24186
 
24187
24187
  // node_modules/@ethersproject/providers/lib.esm/web3-provider.js
24188
- function buildWeb3LegacyFetcher(provider, sendFunc) {
24188
+ function buildWeb3LegacyFetcher(provider2, sendFunc) {
24189
24189
  const fetcher = "Web3LegacyFetcher";
24190
24190
  return function(method, params) {
24191
24191
  const request = {
@@ -24230,7 +24230,7 @@ function buildWeb3LegacyFetcher(provider, sendFunc) {
24230
24230
  });
24231
24231
  };
24232
24232
  }
24233
- function buildEip1193Fetcher(provider) {
24233
+ function buildEip1193Fetcher(provider2) {
24234
24234
  return function(method, params) {
24235
24235
  if (params == null) {
24236
24236
  params = [];
@@ -24242,7 +24242,7 @@ function buildEip1193Fetcher(provider) {
24242
24242
  request: deepCopy(request),
24243
24243
  provider: this
24244
24244
  });
24245
- return provider.request(request).then((response) => {
24245
+ return provider2.request(request).then((response) => {
24246
24246
  this.emit("debug", {
24247
24247
  action: "response",
24248
24248
  fetcher: "Eip1193Fetcher",
@@ -24274,33 +24274,33 @@ var init_web3_provider = __esm({
24274
24274
  logger47 = new Logger(version28);
24275
24275
  _nextId = 1;
24276
24276
  Web3Provider = class extends JsonRpcProvider {
24277
- constructor(provider, network) {
24278
- if (provider == null) {
24279
- logger47.throwArgumentError("missing provider", "provider", provider);
24277
+ constructor(provider2, network) {
24278
+ if (provider2 == null) {
24279
+ logger47.throwArgumentError("missing provider", "provider", provider2);
24280
24280
  }
24281
24281
  let path = null;
24282
24282
  let jsonRpcFetchFunc = null;
24283
24283
  let subprovider = null;
24284
- if (typeof provider === "function") {
24284
+ if (typeof provider2 === "function") {
24285
24285
  path = "unknown:";
24286
- jsonRpcFetchFunc = provider;
24286
+ jsonRpcFetchFunc = provider2;
24287
24287
  } else {
24288
- path = provider.host || provider.path || "";
24289
- if (!path && provider.isMetaMask) {
24288
+ path = provider2.host || provider2.path || "";
24289
+ if (!path && provider2.isMetaMask) {
24290
24290
  path = "metamask";
24291
24291
  }
24292
- subprovider = provider;
24293
- if (provider.request) {
24292
+ subprovider = provider2;
24293
+ if (provider2.request) {
24294
24294
  if (path === "") {
24295
24295
  path = "eip-1193:";
24296
24296
  }
24297
- jsonRpcFetchFunc = buildEip1193Fetcher(provider);
24298
- } else if (provider.sendAsync) {
24299
- jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.sendAsync.bind(provider));
24300
- } else if (provider.send) {
24301
- jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));
24297
+ jsonRpcFetchFunc = buildEip1193Fetcher(provider2);
24298
+ } else if (provider2.sendAsync) {
24299
+ jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider2, provider2.sendAsync.bind(provider2));
24300
+ } else if (provider2.send) {
24301
+ jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider2, provider2.send.bind(provider2));
24302
24302
  } else {
24303
- logger47.throwArgumentError("unsupported provider", "provider", provider);
24303
+ logger47.throwArgumentError("unsupported provider", "provider", provider2);
24304
24304
  }
24305
24305
  if (!path) {
24306
24306
  path = "unknown:";
@@ -31545,13 +31545,13 @@ function loadConfig() {
31545
31545
  coinbase: getEnvValue("Coinbase", "0xAa9e62EB6d74d66Ff6720D1A8143c8237067Ff58")
31546
31546
  },
31547
31547
  uniswap: {
31548
- create2: getEnvValue("Create2", "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853"),
31549
- token0: getEnvValue("Token0", "0x3E8d9Ad590542AE8731960202CE0334B5c7c317D"),
31550
- token1: getEnvValue("Token1", "0xF8407E61094a14601a7224AB628152B309788659"),
31551
- poolManager: getEnvValue("PoolManager", "0x58a9D1fC9a29C82769B8166a11d26d46Cc3cd95B"),
31552
- liquidPool: getEnvValue("LiquidPool", "0x4bB1cD7b8bdebb062317E0751D6B386b1904B41c"),
31553
- limitOrder: getEnvValue("LimitOrder", "0x2Ca71973EDA040187098A11377459c68cadE5040"),
31554
- dynamicFee: getEnvValue("DynamicFee", "0x603c0F84139fDc3B95600c56aB843306eBFdD040")
31548
+ create2: getEnvValue("Create2", "0xCD8a1C3ba11CF5ECfa6267617243239504a98d90"),
31549
+ token0: getEnvValue("Token0", "0x62B771ec87108E06E32291e81D4a9ec6b75B9393"),
31550
+ token1: getEnvValue("Token1", "0xD0Fe15DCd319b834AB34e17AE3a82e9Ec0756fD1"),
31551
+ poolManager: getEnvValue("PoolManager", "0xf1a3B2d7c11889Ec3146392ABaDD4fac3EEbd831"),
31552
+ liquidPool: getEnvValue("LiquidPool", "0x46eDC5824c1a323aBd886842A59B7B3BbAaC2d83"),
31553
+ limitOrder: getEnvValue("LimitOrder", "0x9c525D6B8f2E90653DC034c8506AB7ad8FfC9040"),
31554
+ dynamicFee: getEnvValue("DynamicFee", "0xba80244ffA7ae0662f70464043514daED0E71040")
31555
31555
  }
31556
31556
  },
31557
31557
  abiPaths: {
@@ -33396,76 +33396,619 @@ var init_LiquidPool = __esm({
33396
33396
  stateMutability: "nonpayable",
33397
33397
  type: "constructor"
33398
33398
  },
33399
+ {
33400
+ inputs: [
33401
+ {
33402
+ internalType: "address",
33403
+ name: "sender",
33404
+ type: "address"
33405
+ },
33406
+ {
33407
+ internalType: "uint256",
33408
+ name: "tokenId",
33409
+ type: "uint256"
33410
+ },
33411
+ {
33412
+ internalType: "address",
33413
+ name: "owner",
33414
+ type: "address"
33415
+ }
33416
+ ],
33417
+ name: "ERC721IncorrectOwner",
33418
+ type: "error"
33419
+ },
33420
+ {
33421
+ inputs: [
33422
+ {
33423
+ internalType: "address",
33424
+ name: "operator",
33425
+ type: "address"
33426
+ },
33427
+ {
33428
+ internalType: "uint256",
33429
+ name: "tokenId",
33430
+ type: "uint256"
33431
+ }
33432
+ ],
33433
+ name: "ERC721InsufficientApproval",
33434
+ type: "error"
33435
+ },
33436
+ {
33437
+ inputs: [
33438
+ {
33439
+ internalType: "address",
33440
+ name: "approver",
33441
+ type: "address"
33442
+ }
33443
+ ],
33444
+ name: "ERC721InvalidApprover",
33445
+ type: "error"
33446
+ },
33447
+ {
33448
+ inputs: [
33449
+ {
33450
+ internalType: "address",
33451
+ name: "operator",
33452
+ type: "address"
33453
+ }
33454
+ ],
33455
+ name: "ERC721InvalidOperator",
33456
+ type: "error"
33457
+ },
33458
+ {
33459
+ inputs: [
33460
+ {
33461
+ internalType: "address",
33462
+ name: "owner",
33463
+ type: "address"
33464
+ }
33465
+ ],
33466
+ name: "ERC721InvalidOwner",
33467
+ type: "error"
33468
+ },
33469
+ {
33470
+ inputs: [
33471
+ {
33472
+ internalType: "address",
33473
+ name: "receiver",
33474
+ type: "address"
33475
+ }
33476
+ ],
33477
+ name: "ERC721InvalidReceiver",
33478
+ type: "error"
33479
+ },
33480
+ {
33481
+ inputs: [
33482
+ {
33483
+ internalType: "address",
33484
+ name: "sender",
33485
+ type: "address"
33486
+ }
33487
+ ],
33488
+ name: "ERC721InvalidSender",
33489
+ type: "error"
33490
+ },
33491
+ {
33492
+ inputs: [
33493
+ {
33494
+ internalType: "uint256",
33495
+ name: "tokenId",
33496
+ type: "uint256"
33497
+ }
33498
+ ],
33499
+ name: "ERC721NonexistentToken",
33500
+ type: "error"
33501
+ },
33502
+ {
33503
+ inputs: [],
33504
+ name: "InvalidFuncSig",
33505
+ type: "error"
33506
+ },
33507
+ {
33508
+ inputs: [
33509
+ {
33510
+ internalType: "address",
33511
+ name: "token",
33512
+ type: "address"
33513
+ }
33514
+ ],
33515
+ name: "SafeERC20FailedOperation",
33516
+ type: "error"
33517
+ },
33518
+ {
33519
+ anonymous: false,
33520
+ inputs: [
33521
+ {
33522
+ indexed: true,
33523
+ internalType: "address",
33524
+ name: "owner",
33525
+ type: "address"
33526
+ },
33527
+ {
33528
+ indexed: true,
33529
+ internalType: "address",
33530
+ name: "approved",
33531
+ type: "address"
33532
+ },
33533
+ {
33534
+ indexed: true,
33535
+ internalType: "uint256",
33536
+ name: "tokenId",
33537
+ type: "uint256"
33538
+ }
33539
+ ],
33540
+ name: "Approval",
33541
+ type: "event"
33542
+ },
33543
+ {
33544
+ anonymous: false,
33545
+ inputs: [
33546
+ {
33547
+ indexed: true,
33548
+ internalType: "address",
33549
+ name: "owner",
33550
+ type: "address"
33551
+ },
33552
+ {
33553
+ indexed: true,
33554
+ internalType: "address",
33555
+ name: "operator",
33556
+ type: "address"
33557
+ },
33558
+ {
33559
+ indexed: false,
33560
+ internalType: "bool",
33561
+ name: "approved",
33562
+ type: "bool"
33563
+ }
33564
+ ],
33565
+ name: "ApprovalForAll",
33566
+ type: "event"
33567
+ },
33568
+ {
33569
+ anonymous: false,
33570
+ inputs: [
33571
+ {
33572
+ indexed: true,
33573
+ internalType: "address",
33574
+ name: "from",
33575
+ type: "address"
33576
+ },
33577
+ {
33578
+ indexed: true,
33579
+ internalType: "address",
33580
+ name: "to",
33581
+ type: "address"
33582
+ },
33583
+ {
33584
+ indexed: true,
33585
+ internalType: "uint256",
33586
+ name: "tokenId",
33587
+ type: "uint256"
33588
+ }
33589
+ ],
33590
+ name: "Transfer",
33591
+ type: "event"
33592
+ },
33593
+ {
33594
+ inputs: [
33595
+ {
33596
+ components: [
33597
+ {
33598
+ internalType: "int24",
33599
+ name: "tickLower",
33600
+ type: "int24"
33601
+ },
33602
+ {
33603
+ internalType: "int24",
33604
+ name: "tickUpper",
33605
+ type: "int24"
33606
+ },
33607
+ {
33608
+ internalType: "int256",
33609
+ name: "liquidityDelta",
33610
+ type: "int256"
33611
+ }
33612
+ ],
33613
+ internalType: "struct LiquidPool.LiquidityParams",
33614
+ name: "params",
33615
+ type: "tuple"
33616
+ },
33617
+ {
33618
+ internalType: "bytes",
33619
+ name: "hookData",
33620
+ type: "bytes"
33621
+ }
33622
+ ],
33623
+ name: "addLiquidity",
33624
+ outputs: [],
33625
+ stateMutability: "nonpayable",
33626
+ type: "function"
33627
+ },
33628
+ {
33629
+ inputs: [
33630
+ {
33631
+ internalType: "address",
33632
+ name: "to",
33633
+ type: "address"
33634
+ },
33635
+ {
33636
+ internalType: "uint256",
33637
+ name: "tokenId",
33638
+ type: "uint256"
33639
+ }
33640
+ ],
33641
+ name: "approve",
33642
+ outputs: [],
33643
+ stateMutability: "nonpayable",
33644
+ type: "function"
33645
+ },
33646
+ {
33647
+ inputs: [
33648
+ {
33649
+ internalType: "address",
33650
+ name: "owner",
33651
+ type: "address"
33652
+ }
33653
+ ],
33654
+ name: "balanceOf",
33655
+ outputs: [
33656
+ {
33657
+ internalType: "uint256",
33658
+ name: "",
33659
+ type: "uint256"
33660
+ }
33661
+ ],
33662
+ stateMutability: "view",
33663
+ type: "function"
33664
+ },
33665
+ {
33666
+ inputs: [
33667
+ {
33668
+ internalType: "uint256",
33669
+ name: "amount0",
33670
+ type: "uint256"
33671
+ },
33672
+ {
33673
+ internalType: "uint256",
33674
+ name: "amount1",
33675
+ type: "uint256"
33676
+ },
33677
+ {
33678
+ internalType: "bytes",
33679
+ name: "hookData",
33680
+ type: "bytes"
33681
+ }
33682
+ ],
33683
+ name: "donate",
33684
+ outputs: [],
33685
+ stateMutability: "nonpayable",
33686
+ type: "function"
33687
+ },
33688
+ {
33689
+ inputs: [
33690
+ {
33691
+ components: [
33692
+ {
33693
+ internalType: "bool",
33694
+ name: "zeroForOne",
33695
+ type: "bool"
33696
+ },
33697
+ {
33698
+ internalType: "int256",
33699
+ name: "amountSpecified",
33700
+ type: "int256"
33701
+ },
33702
+ {
33703
+ internalType: "uint160",
33704
+ name: "sqrtPriceLimitX96",
33705
+ type: "uint160"
33706
+ }
33707
+ ],
33708
+ internalType: "struct SwapParams",
33709
+ name: "params",
33710
+ type: "tuple"
33711
+ },
33712
+ {
33713
+ internalType: "bytes",
33714
+ name: "hookData",
33715
+ type: "bytes"
33716
+ }
33717
+ ],
33718
+ name: "executeSwap",
33719
+ outputs: [],
33720
+ stateMutability: "nonpayable",
33721
+ type: "function"
33722
+ },
33723
+ {
33724
+ inputs: [
33725
+ {
33726
+ internalType: "uint256",
33727
+ name: "tokenId",
33728
+ type: "uint256"
33729
+ }
33730
+ ],
33731
+ name: "getApproved",
33732
+ outputs: [
33733
+ {
33734
+ internalType: "address",
33735
+ name: "",
33736
+ type: "address"
33737
+ }
33738
+ ],
33739
+ stateMutability: "view",
33740
+ type: "function"
33741
+ },
33742
+ {
33743
+ inputs: [
33744
+ {
33745
+ internalType: "address",
33746
+ name: "owner",
33747
+ type: "address"
33748
+ }
33749
+ ],
33750
+ name: "getPosition",
33751
+ outputs: [
33752
+ {
33753
+ components: [
33754
+ {
33755
+ internalType: "uint256",
33756
+ name: "tokenId",
33757
+ type: "uint256"
33758
+ },
33759
+ {
33760
+ internalType: "int24",
33761
+ name: "tickLower",
33762
+ type: "int24"
33763
+ },
33764
+ {
33765
+ internalType: "int24",
33766
+ name: "tickUpper",
33767
+ type: "int24"
33768
+ },
33769
+ {
33770
+ internalType: "int256",
33771
+ name: "liquidity",
33772
+ type: "int256"
33773
+ }
33774
+ ],
33775
+ internalType: "struct LiquidPool.PositionInfo[]",
33776
+ name: "",
33777
+ type: "tuple[]"
33778
+ }
33779
+ ],
33780
+ stateMutability: "view",
33781
+ type: "function"
33782
+ },
33783
+ {
33784
+ inputs: [],
33785
+ name: "getSlot0",
33786
+ outputs: [
33787
+ {
33788
+ internalType: "uint160",
33789
+ name: "sqrtPriceX96",
33790
+ type: "uint160"
33791
+ },
33792
+ {
33793
+ internalType: "int24",
33794
+ name: "tick",
33795
+ type: "int24"
33796
+ },
33797
+ {
33798
+ internalType: "uint24",
33799
+ name: "protocolFee",
33800
+ type: "uint24"
33801
+ },
33802
+ {
33803
+ internalType: "uint24",
33804
+ name: "lpFee",
33805
+ type: "uint24"
33806
+ }
33807
+ ],
33808
+ stateMutability: "view",
33809
+ type: "function"
33810
+ },
33811
+ {
33812
+ inputs: [
33813
+ {
33814
+ internalType: "address",
33815
+ name: "owner",
33816
+ type: "address"
33817
+ },
33818
+ {
33819
+ internalType: "address",
33820
+ name: "operator",
33821
+ type: "address"
33822
+ }
33823
+ ],
33824
+ name: "isApprovedForAll",
33825
+ outputs: [
33826
+ {
33827
+ internalType: "bool",
33828
+ name: "",
33829
+ type: "bool"
33830
+ }
33831
+ ],
33832
+ stateMutability: "view",
33833
+ type: "function"
33834
+ },
33835
+ {
33836
+ inputs: [],
33837
+ name: "name",
33838
+ outputs: [
33839
+ {
33840
+ internalType: "string",
33841
+ name: "",
33842
+ type: "string"
33843
+ }
33844
+ ],
33845
+ stateMutability: "view",
33846
+ type: "function"
33847
+ },
33848
+ {
33849
+ inputs: [],
33850
+ name: "nextTokenId",
33851
+ outputs: [
33852
+ {
33853
+ internalType: "uint256",
33854
+ name: "",
33855
+ type: "uint256"
33856
+ }
33857
+ ],
33858
+ stateMutability: "view",
33859
+ type: "function"
33860
+ },
33861
+ {
33862
+ inputs: [
33863
+ {
33864
+ internalType: "uint256",
33865
+ name: "tokenId",
33866
+ type: "uint256"
33867
+ }
33868
+ ],
33869
+ name: "ownerOf",
33870
+ outputs: [
33871
+ {
33872
+ internalType: "address",
33873
+ name: "",
33874
+ type: "address"
33875
+ }
33876
+ ],
33877
+ stateMutability: "view",
33878
+ type: "function"
33879
+ },
33880
+ {
33881
+ inputs: [
33882
+ {
33883
+ internalType: "address",
33884
+ name: "",
33885
+ type: "address"
33886
+ },
33887
+ {
33888
+ internalType: "uint256",
33889
+ name: "",
33890
+ type: "uint256"
33891
+ }
33892
+ ],
33893
+ name: "ownerTokens",
33894
+ outputs: [
33895
+ {
33896
+ internalType: "uint256",
33897
+ name: "",
33898
+ type: "uint256"
33899
+ }
33900
+ ],
33901
+ stateMutability: "view",
33902
+ type: "function"
33903
+ },
33399
33904
  {
33400
33905
  inputs: [],
33401
- name: "InvalidFuncSig",
33402
- type: "error"
33906
+ name: "poolManager",
33907
+ outputs: [
33908
+ {
33909
+ internalType: "contract IPoolManager",
33910
+ name: "",
33911
+ type: "address"
33912
+ }
33913
+ ],
33914
+ stateMutability: "view",
33915
+ type: "function"
33403
33916
  },
33404
33917
  {
33405
33918
  inputs: [
33406
33919
  {
33407
- internalType: "address",
33408
- name: "token",
33409
- type: "address"
33920
+ internalType: "bytes32",
33921
+ name: "",
33922
+ type: "bytes32"
33410
33923
  }
33411
33924
  ],
33412
- name: "SafeERC20FailedOperation",
33413
- type: "error"
33925
+ name: "positionIdByHash",
33926
+ outputs: [
33927
+ {
33928
+ internalType: "uint256",
33929
+ name: "",
33930
+ type: "uint256"
33931
+ }
33932
+ ],
33933
+ stateMutability: "view",
33934
+ type: "function"
33414
33935
  },
33415
33936
  {
33416
33937
  inputs: [
33417
33938
  {
33418
- components: [
33419
- {
33420
- internalType: "int24",
33421
- name: "tickLower",
33422
- type: "int24"
33423
- },
33424
- {
33425
- internalType: "int24",
33426
- name: "tickUpper",
33427
- type: "int24"
33428
- },
33429
- {
33430
- internalType: "int256",
33431
- name: "liquidityDelta",
33432
- type: "int256"
33433
- }
33434
- ],
33435
- internalType: "struct LiquidPool.LiquidityParams",
33436
- name: "params",
33437
- type: "tuple"
33939
+ internalType: "uint256",
33940
+ name: "",
33941
+ type: "uint256"
33942
+ }
33943
+ ],
33944
+ name: "positions",
33945
+ outputs: [
33946
+ {
33947
+ internalType: "int24",
33948
+ name: "tickLower",
33949
+ type: "int24"
33438
33950
  },
33439
33951
  {
33440
- internalType: "bytes",
33441
- name: "hookData",
33442
- type: "bytes"
33952
+ internalType: "int24",
33953
+ name: "tickUpper",
33954
+ type: "int24"
33955
+ },
33956
+ {
33957
+ internalType: "int256",
33958
+ name: "liquidity",
33959
+ type: "int256"
33443
33960
  }
33444
33961
  ],
33445
- name: "addLiquidity",
33446
- outputs: [],
33447
- stateMutability: "nonpayable",
33962
+ stateMutability: "view",
33448
33963
  type: "function"
33449
33964
  },
33450
33965
  {
33451
33966
  inputs: [
33967
+ {
33968
+ internalType: "address",
33969
+ name: "from",
33970
+ type: "address"
33971
+ },
33972
+ {
33973
+ internalType: "address",
33974
+ name: "to",
33975
+ type: "address"
33976
+ },
33452
33977
  {
33453
33978
  internalType: "uint256",
33454
- name: "amount0",
33979
+ name: "tokenId",
33455
33980
  type: "uint256"
33981
+ }
33982
+ ],
33983
+ name: "safeTransferFrom",
33984
+ outputs: [],
33985
+ stateMutability: "nonpayable",
33986
+ type: "function"
33987
+ },
33988
+ {
33989
+ inputs: [
33990
+ {
33991
+ internalType: "address",
33992
+ name: "from",
33993
+ type: "address"
33994
+ },
33995
+ {
33996
+ internalType: "address",
33997
+ name: "to",
33998
+ type: "address"
33456
33999
  },
33457
34000
  {
33458
34001
  internalType: "uint256",
33459
- name: "amount1",
34002
+ name: "tokenId",
33460
34003
  type: "uint256"
33461
34004
  },
33462
34005
  {
33463
34006
  internalType: "bytes",
33464
- name: "hookData",
34007
+ name: "data",
33465
34008
  type: "bytes"
33466
34009
  }
33467
34010
  ],
33468
- name: "donate",
34011
+ name: "safeTransferFrom",
33469
34012
  outputs: [],
33470
34013
  stateMutability: "nonpayable",
33471
34014
  type: "function"
@@ -33473,61 +34016,35 @@ var init_LiquidPool = __esm({
33473
34016
  {
33474
34017
  inputs: [
33475
34018
  {
33476
- components: [
33477
- {
33478
- internalType: "bool",
33479
- name: "zeroForOne",
33480
- type: "bool"
33481
- },
33482
- {
33483
- internalType: "int256",
33484
- name: "amountSpecified",
33485
- type: "int256"
33486
- },
33487
- {
33488
- internalType: "uint160",
33489
- name: "sqrtPriceLimitX96",
33490
- type: "uint160"
33491
- }
33492
- ],
33493
- internalType: "struct SwapParams",
33494
- name: "params",
33495
- type: "tuple"
34019
+ internalType: "address",
34020
+ name: "operator",
34021
+ type: "address"
33496
34022
  },
33497
34023
  {
33498
- internalType: "bytes",
33499
- name: "hookData",
33500
- type: "bytes"
34024
+ internalType: "bool",
34025
+ name: "approved",
34026
+ type: "bool"
33501
34027
  }
33502
34028
  ],
33503
- name: "executeSwap",
34029
+ name: "setApprovalForAll",
33504
34030
  outputs: [],
33505
34031
  stateMutability: "nonpayable",
33506
34032
  type: "function"
33507
34033
  },
33508
34034
  {
33509
- inputs: [],
33510
- name: "getSlot0",
33511
- outputs: [
33512
- {
33513
- internalType: "uint160",
33514
- name: "sqrtPriceX96",
33515
- type: "uint160"
33516
- },
33517
- {
33518
- internalType: "int24",
33519
- name: "tick",
33520
- type: "int24"
33521
- },
34035
+ inputs: [
33522
34036
  {
33523
- internalType: "uint24",
33524
- name: "protocolFee",
33525
- type: "uint24"
33526
- },
34037
+ internalType: "bytes4",
34038
+ name: "interfaceId",
34039
+ type: "bytes4"
34040
+ }
34041
+ ],
34042
+ name: "supportsInterface",
34043
+ outputs: [
33527
34044
  {
33528
- internalType: "uint24",
33529
- name: "lpFee",
33530
- type: "uint24"
34045
+ internalType: "bool",
34046
+ name: "",
34047
+ type: "bool"
33531
34048
  }
33532
34049
  ],
33533
34050
  stateMutability: "view",
@@ -33535,17 +34052,59 @@ var init_LiquidPool = __esm({
33535
34052
  },
33536
34053
  {
33537
34054
  inputs: [],
33538
- name: "poolManager",
34055
+ name: "symbol",
33539
34056
  outputs: [
33540
34057
  {
33541
- internalType: "contract IPoolManager",
34058
+ internalType: "string",
33542
34059
  name: "",
33543
- type: "address"
34060
+ type: "string"
34061
+ }
34062
+ ],
34063
+ stateMutability: "view",
34064
+ type: "function"
34065
+ },
34066
+ {
34067
+ inputs: [
34068
+ {
34069
+ internalType: "uint256",
34070
+ name: "tokenId",
34071
+ type: "uint256"
34072
+ }
34073
+ ],
34074
+ name: "tokenURI",
34075
+ outputs: [
34076
+ {
34077
+ internalType: "string",
34078
+ name: "",
34079
+ type: "string"
33544
34080
  }
33545
34081
  ],
33546
34082
  stateMutability: "view",
33547
34083
  type: "function"
33548
34084
  },
34085
+ {
34086
+ inputs: [
34087
+ {
34088
+ internalType: "address",
34089
+ name: "from",
34090
+ type: "address"
34091
+ },
34092
+ {
34093
+ internalType: "address",
34094
+ name: "to",
34095
+ type: "address"
34096
+ },
34097
+ {
34098
+ internalType: "uint256",
34099
+ name: "tokenId",
34100
+ type: "uint256"
34101
+ }
34102
+ ],
34103
+ name: "transferFrom",
34104
+ outputs: [],
34105
+ stateMutability: "nonpayable",
34106
+ type: "function"
34107
+ },
33549
34108
  {
33550
34109
  inputs: [
33551
34110
  {
@@ -33566,8 +34125,8 @@ var init_LiquidPool = __esm({
33566
34125
  type: "function"
33567
34126
  }
33568
34127
  ],
33569
- bytecode: "0x60a0604052346101a85760405161122238819003601f8101601f191683016001600160401b038111848210176101ac578392829160405283398101039060c082126101a8578051916001600160a01b03831683036101a85760a090601f1901126101a85760405160a081016001600160401b038111828210176101ac5760405261008b602083016101c0565b8152610099604083016101c0565b6020820190815260608301519162ffffff831683036101a857604081019283526080840151938460020b85036101a8576060820194855260a00151946001600160a01b03861686036101a857608082810196875252515f80546001600160a01b039283166001600160a01b0319918216179091559151600180549451955160b81b62ffffff60b81b1662ffffff60a01b60a09790971b969096169183166001600160d01b031990951694909417179390931790915591516002805491909216921691909117905560405161104d90816101d582396080518181816073015281816101590152818161034e0152818161056d0152818161077b01528181610bb901528181610ca20152610dba0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036101a85756fe6080806040526004361015610012575f80fd5b5f3560e01c90816336981033146109365750806362fc9e53146108a757806391dd7346146103bb578063a303bdab1461021a578063c9ae5e0c146100a65763dc4c90d31461005e575f80fd5b346100a2575f3660031901126100a2576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5f80fd5b346100a2575f3660031901126100a25760405160a08101908082106001600160401b038311176102065760a091604052600180831b035f54168152600154600180841b038116602083015262ffffff81841c16604083015260b81c60020b6060820152600180831b0360025416608082015220604051602081019182526006604082015260408152610139606082610a55565b519020604051631e2eaeaf60e01b815260048101919091526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156101fb575f906101c8575b60809062ffffff6040519160018060a01b03811683528060a01c60020b6020840152818160b81c16604084015260d01c166060820152f35b506020813d6020116101f3575b816101e260209383610a55565b810103126100a25760809051610190565b3d91506101d5565b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b346100a2573660031901608081126100a2576060136100a2576064356001600160401b0381116100a257610252903690600401610a76565b90600435908160020b918281036100a25750602435908160020b938483036100a2576103015f946102f3610327946102e394610349996102f398506040519461029a86610a3a565b855260208501526044356040850152336060850152604051958694602086019060608091805160020b8452602081015160020b6020850152604081015160408501520151910152565b60a08085015260c0840191610ac7565b03601f198101835282610a55565b604051928391600160e01b60208401523360408401526060808401526080830190610aa3565b604051809381926348c8949160e01b8352602060048401526024830190610aa3565b0381837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af180156101fb5761038457005b3d805f833e6103938183610a55565b81016020828203126100a25781516001600160401b0381116100a2576103b99201610b02565b005b346100a25760203660031901126100a2576004356001600160401b0381116100a2576103eb903690600401610a76565b81016060828203126100a257813563ffffffff60e01b81168091036100a25760208301356001600160a01b03811693908490036100a2576040810135906001600160401b0382116100a257019082601f830112156100a257813561044e81610ae7565b9261045c6040519485610a55565b8184526020840194602083830101116100a257815f926020809301873784010152600160e01b810361068e57508051810181810360a081126100a2576080136100a2576104b4604051936104af85610a3a565b610b97565b83526104c260408301610b97565b6020840152606082015160408401526080820151606084015260a08201516001600160401b0381116100a257604092602061050592816105549501920101610b02565b9261056883519485938493632d35e7ed60e11b855261052660048601610b57565b8051600290810b60a48701526020820151900b60c4860152604081015160e486015260600151610104850152565b610140610124840152610144830190610aa3565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af180156101fb575f915f91610652575b509161062692815f5260036020526105db60405f20546105cd8360801d8260801d01610ffa565b92600f0b90600f0b01610ffa565b6001600160801b03169060801b17815f52600360205260405f205561060e60018060a01b035f5416828460801d91610ba5565b600154600f9290920b916001600160a01b0316610ba5565b61064e604051610637602082610a55565b5f8152604051918291602083526020830190610aa3565b0390f35b9150506040813d604011610686575b8161066e60409383610a55565b810103126100a25780516020909101516106266105a6565b3d9150610661565b919291600160e11b810361080f575080518101818103608081126100a2576060136100a257604051936106c085610a1f565b5180151581036100a25784526040820151602085015260608201516001600160a01b03811681036100a257604085015260808201516001600160401b0381116100a2576020928361071992816107629501920101610b02565b936107766040519586938493633cf3645360e21b855261073b60048601610b57565b8051151560a4860152602081015160c4860152604001516001600160a01b031660e4850152565b610120610104840152610124830190610aa3565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19081156101fb575f916107d9575b5f546107d4935061060e90608084901d9083906001600160a01b0316610ba5565b610626565b90506020823d602011610807575b816107f460209383610a55565b810103126100a2576107d49151906107b3565b3d91506107e7565b909290600360e01b036108985782518301906060848303126100a25751926040810151906060810151906001600160401b0382116100a25760206108599281809601920101610b02565b93610776604051958693849363234266d760e01b855261087b60048601610b57565b60a485015260c484015261010060e4840152610104830190610aa3565b63e593665760e01b5f5260045ffd5b346100a25760603660031901126100a2576044356001600160401b0381116100a2575f6102f36103276109106108e4610349953690600401610a76565b6102f3604093929351938492600435602085015260243560408501526060808501526080840191610ac7565b604051928391600360e01b60208401523360408401526060808401526080830190610aa3565b346100a2573660031901608081126100a2576060136100a25761095881610a1f565b60043580151581036100a257815260243560208201526044356001600160a01b03811681036100a25760408201526064356001600160401b0381116100a2576102f36103276109e96109f9610349956102f36109b95f973690600401610a76565b6040805185511515602080830191909152860151818301529401516001600160a01b031660608501529294859390565b60808085015260a0840191610ac7565b604051928391600160e11b60208401523360408401526060808401526080830190610aa3565b606081019081106001600160401b0382111761020657604052565b608081019081106001600160401b0382111761020657604052565b90601f801991011681019081106001600160401b0382111761020657604052565b9181601f840112156100a2578235916001600160401b0383116100a257602083818601950101116100a257565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b908060209392818452848401375f828201840152601f01601f1916010190565b6001600160401b03811161020657601f01601f191660200190565b81601f820112156100a257805190610b1982610ae7565b92610b276040519485610a55565b828452602083830101116100a257815f9260208093018386015e8301015290565b908160209103126100a2575190565b5f546001600160a01b039081168252600154808216602084015260a081901c62ffffff16604084015260b81c600290810b60608401525416608090910152565b51908160020b82036100a257565b91905f9282600f0b5f81135f14610c5e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15610c5a57604051630b0d9c0960e01b81526001600160a01b0392831660048201529190921660248201526001600160801b0392909216604483015282908290606490829084905af18015610c4f57610c3a575050565b610c45828092610a55565b610c4c5750565b80fd5b6040513d84823e3d90fd5b8480fd5b5f819594939512610c71575b5050505050565b6f7fffffffffffffffffffffffffffffff198114610ea3576001600160a01b038216945f919091039085610d5457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031694506020926001600160801b0392600492610cea91908516908890610eb7565b604051630476982d60e21b8152958693849216905af1908115610d485750610d19575b505b5f80808080610c6a565b610d3a9060203d602011610d41575b610d328183610a55565b810190610b48565b505f610d0d565b503d610d28565b604051903d90823e3d90fd5b92505f6001600160801b036020921693604051838101916323b872dd60e01b835260018060a01b0316602482015230604482015285606482015260648152610d9d608482610a55565b519082885af1156101fb575f513d610e9a5750833b155b610e87577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693843b156100a25760405190632961046560e21b825260048201525f8160248183895af180156101fb57610e68575b5092610e21602092828596610eb7565b600460405180958193630476982d60e21b83525af1908115610d485750610e49575b50610d0f565b610e619060203d602011610d4157610d328183610a55565b505f610e43565b84919350602092610e7c5f610e2193610a55565b5f9492509250610e11565b83635274afe760e01b5f5260045260245ffd5b60011415610db4565b634e487b7160e01b5f52601160045260245ffd5b9091906001600160a01b0381169081610f455750505f80808093855af115610edc5750565b6040516390bfb86560e01b81526001600160a01b0390911660048201525f602482018190526080604483015260a03d601f01601f191690810160648401523d6084840152903d9060a484013e808201600460a482015260c4633d2cec6f60e21b91015260e40190fd5b60205f604481949682604095865198899363a9059cbb60e01b855260018060a01b0316600485015260248401525af13d15601f3d11600185511416171692828152826020820152015215610f965750565b6040516390bfb86560e01b8152600481019190915263a9059cbb60e01b602482015260806044820152601f3d01601f191660a0810160648301523d60848301523d5f60a484013e808201600460a482015260c4633c9fd93960e21b91015260e40190fd5b9081600f0b91820361100857565b6393dafdf160e01b5f5260045ffdfea26469706673582212207c032163a601729da025148f2544be9d37a7fc6a006e78e0b26d52b0098d20c564736f6c634300081a0033",
33570
- deployedBytecode: "0x6080806040526004361015610012575f80fd5b5f3560e01c90816336981033146109365750806362fc9e53146108a757806391dd7346146103bb578063a303bdab1461021a578063c9ae5e0c146100a65763dc4c90d31461005e575f80fd5b346100a2575f3660031901126100a2576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5f80fd5b346100a2575f3660031901126100a25760405160a08101908082106001600160401b038311176102065760a091604052600180831b035f54168152600154600180841b038116602083015262ffffff81841c16604083015260b81c60020b6060820152600180831b0360025416608082015220604051602081019182526006604082015260408152610139606082610a55565b519020604051631e2eaeaf60e01b815260048101919091526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156101fb575f906101c8575b60809062ffffff6040519160018060a01b03811683528060a01c60020b6020840152818160b81c16604084015260d01c166060820152f35b506020813d6020116101f3575b816101e260209383610a55565b810103126100a25760809051610190565b3d91506101d5565b6040513d5f823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b346100a2573660031901608081126100a2576060136100a2576064356001600160401b0381116100a257610252903690600401610a76565b90600435908160020b918281036100a25750602435908160020b938483036100a2576103015f946102f3610327946102e394610349996102f398506040519461029a86610a3a565b855260208501526044356040850152336060850152604051958694602086019060608091805160020b8452602081015160020b6020850152604081015160408501520151910152565b60a08085015260c0840191610ac7565b03601f198101835282610a55565b604051928391600160e01b60208401523360408401526060808401526080830190610aa3565b604051809381926348c8949160e01b8352602060048401526024830190610aa3565b0381837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af180156101fb5761038457005b3d805f833e6103938183610a55565b81016020828203126100a25781516001600160401b0381116100a2576103b99201610b02565b005b346100a25760203660031901126100a2576004356001600160401b0381116100a2576103eb903690600401610a76565b81016060828203126100a257813563ffffffff60e01b81168091036100a25760208301356001600160a01b03811693908490036100a2576040810135906001600160401b0382116100a257019082601f830112156100a257813561044e81610ae7565b9261045c6040519485610a55565b8184526020840194602083830101116100a257815f926020809301873784010152600160e01b810361068e57508051810181810360a081126100a2576080136100a2576104b4604051936104af85610a3a565b610b97565b83526104c260408301610b97565b6020840152606082015160408401526080820151606084015260a08201516001600160401b0381116100a257604092602061050592816105549501920101610b02565b9261056883519485938493632d35e7ed60e11b855261052660048601610b57565b8051600290810b60a48701526020820151900b60c4860152604081015160e486015260600151610104850152565b610140610124840152610144830190610aa3565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af180156101fb575f915f91610652575b509161062692815f5260036020526105db60405f20546105cd8360801d8260801d01610ffa565b92600f0b90600f0b01610ffa565b6001600160801b03169060801b17815f52600360205260405f205561060e60018060a01b035f5416828460801d91610ba5565b600154600f9290920b916001600160a01b0316610ba5565b61064e604051610637602082610a55565b5f8152604051918291602083526020830190610aa3565b0390f35b9150506040813d604011610686575b8161066e60409383610a55565b810103126100a25780516020909101516106266105a6565b3d9150610661565b919291600160e11b810361080f575080518101818103608081126100a2576060136100a257604051936106c085610a1f565b5180151581036100a25784526040820151602085015260608201516001600160a01b03811681036100a257604085015260808201516001600160401b0381116100a2576020928361071992816107629501920101610b02565b936107766040519586938493633cf3645360e21b855261073b60048601610b57565b8051151560a4860152602081015160c4860152604001516001600160a01b031660e4850152565b610120610104840152610124830190610aa3565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af19081156101fb575f916107d9575b5f546107d4935061060e90608084901d9083906001600160a01b0316610ba5565b610626565b90506020823d602011610807575b816107f460209383610a55565b810103126100a2576107d49151906107b3565b3d91506107e7565b909290600360e01b036108985782518301906060848303126100a25751926040810151906060810151906001600160401b0382116100a25760206108599281809601920101610b02565b93610776604051958693849363234266d760e01b855261087b60048601610b57565b60a485015260c484015261010060e4840152610104830190610aa3565b63e593665760e01b5f5260045ffd5b346100a25760603660031901126100a2576044356001600160401b0381116100a2575f6102f36103276109106108e4610349953690600401610a76565b6102f3604093929351938492600435602085015260243560408501526060808501526080840191610ac7565b604051928391600360e01b60208401523360408401526060808401526080830190610aa3565b346100a2573660031901608081126100a2576060136100a25761095881610a1f565b60043580151581036100a257815260243560208201526044356001600160a01b03811681036100a25760408201526064356001600160401b0381116100a2576102f36103276109e96109f9610349956102f36109b95f973690600401610a76565b6040805185511515602080830191909152860151818301529401516001600160a01b031660608501529294859390565b60808085015260a0840191610ac7565b604051928391600160e11b60208401523360408401526060808401526080830190610aa3565b606081019081106001600160401b0382111761020657604052565b608081019081106001600160401b0382111761020657604052565b90601f801991011681019081106001600160401b0382111761020657604052565b9181601f840112156100a2578235916001600160401b0383116100a257602083818601950101116100a257565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b908060209392818452848401375f828201840152601f01601f1916010190565b6001600160401b03811161020657601f01601f191660200190565b81601f820112156100a257805190610b1982610ae7565b92610b276040519485610a55565b828452602083830101116100a257815f9260208093018386015e8301015290565b908160209103126100a2575190565b5f546001600160a01b039081168252600154808216602084015260a081901c62ffffff16604084015260b81c600290810b60608401525416608090910152565b51908160020b82036100a257565b91905f9282600f0b5f81135f14610c5e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15610c5a57604051630b0d9c0960e01b81526001600160a01b0392831660048201529190921660248201526001600160801b0392909216604483015282908290606490829084905af18015610c4f57610c3a575050565b610c45828092610a55565b610c4c5750565b80fd5b6040513d84823e3d90fd5b8480fd5b5f819594939512610c71575b5050505050565b6f7fffffffffffffffffffffffffffffff198114610ea3576001600160a01b038216945f919091039085610d5457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031694506020926001600160801b0392600492610cea91908516908890610eb7565b604051630476982d60e21b8152958693849216905af1908115610d485750610d19575b505b5f80808080610c6a565b610d3a9060203d602011610d41575b610d328183610a55565b810190610b48565b505f610d0d565b503d610d28565b604051903d90823e3d90fd5b92505f6001600160801b036020921693604051838101916323b872dd60e01b835260018060a01b0316602482015230604482015285606482015260648152610d9d608482610a55565b519082885af1156101fb575f513d610e9a5750833b155b610e87577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693843b156100a25760405190632961046560e21b825260048201525f8160248183895af180156101fb57610e68575b5092610e21602092828596610eb7565b600460405180958193630476982d60e21b83525af1908115610d485750610e49575b50610d0f565b610e619060203d602011610d4157610d328183610a55565b505f610e43565b84919350602092610e7c5f610e2193610a55565b5f9492509250610e11565b83635274afe760e01b5f5260045260245ffd5b60011415610db4565b634e487b7160e01b5f52601160045260245ffd5b9091906001600160a01b0381169081610f455750505f80808093855af115610edc5750565b6040516390bfb86560e01b81526001600160a01b0390911660048201525f602482018190526080604483015260a03d601f01601f191690810160648401523d6084840152903d9060a484013e808201600460a482015260c4633d2cec6f60e21b91015260e40190fd5b60205f604481949682604095865198899363a9059cbb60e01b855260018060a01b0316600485015260248401525af13d15601f3d11600185511416171692828152826020820152015215610f965750565b6040516390bfb86560e01b8152600481019190915263a9059cbb60e01b602482015260806044820152601f3d01601f191660a0810160648301523d60848301523d5f60a484013e808201600460a482015260c4633c9fd93960e21b91015260e40190fd5b9081600f0b91820361100857565b6393dafdf160e01b5f5260045ffdfea26469706673582212207c032163a601729da025148f2544be9d37a7fc6a006e78e0b26d52b0098d20c564736f6c634300081a0033",
34128
+ bytecode: "0x60a06040523461048c57612471803803908161001a81610490565b92839283398101039060c0821261048c578051916001600160a01b038316830361048c5760a090601f19011261048c5760405160a081016001600160401b0381118282101761039357604052610072602083016104b5565b8152610080604083016104b5565b6020820190815260608301519162ffffff8316830361048c57604081019283526080840151938460020b850361048c576060820194855260a00151946001600160a01b038616860361048c57608082019586526100dd6040610490565b600e81526d131a5c5d5a59141bdbdb0813919560921b60208201526101026040610490565b6005815264131413919560da1b6020820152815190916001600160401b038211610393575f5490600182811c92168015610482575b60208310146103755781601f849311610415575b50602090601f83116001146103b2575f926103a7575b50508160011b915f199060031b1c1916175f555b8051906001600160401b0382116103935760015490600182811c92168015610389575b60208310146103755781601f849311610307575b50602090601f83116001146102a1575f92610296575b50508160011b915f199060031b1c1916176001555b60805251600680546001600160a01b039283166001600160a01b0319918216179091559151600780549451955160b81b62ffffff60b81b1662ffffff60a01b60a09790971b969096169183166001600160d01b0319909516949094171793909317909155915160088054919092169216919091179055604051611fa790816104ca82396080518181816101960152818161027a015281816106d201528181610b7e01528181610d7401528181611b3501528181611c100152611d280152f35b015190505f806101c2565b60015f9081528281209350601f198516905b8181106102ef57509084600195949392106102d7575b505050811b016001556101d7565b01515f1960f88460031b161c191690555f80806102c9565b929360206001819287860151815501950193016102b3565b60015f529091507fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6601f840160051c8101916020851061036b575b90601f859493920160051c01905b81811061035d57506101ac565b5f8155849350600101610350565b9091508190610342565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610198565b634e487b7160e01b5f52604160045260245ffd5b015190505f80610161565b5f8080528281209350601f198516905b8181106103fd57509084600195949392106103e5575b505050811b015f55610175565b01515f1960f88460031b161c191690555f80806103d8565b929360206001819287860151815501950193016103c2565b5f80529091507f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563601f840160051c81019160208510610478575b90601f859493920160051c01905b81811061046a575061014b565b5f815584935060010161045d565b909150819061044f565b91607f1691610137565b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761039357604052565b51906001600160a01b038216820361048c5756fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a71461150e5750806306fdde0314611456578063081812fc1461141a578063095ea7b314611330578063168677c21461130657806316c197391461115257806323b872dd1461113b57806328b60031146110e35780633698103314610ff757806342842e0e14610fce57806362fc9e5314610f3f5780636352211e14610f0f57806370a0823114610ebe57806375794a3c14610ea157806391dd734614610a0257806395d89b41146108fa57806399fbab88146108b6578063a22cb4651461081b578063a303bdab146103f0578063b88d4fde146103a0578063c87b56dd14610343578063c9ae5e0c146101c5578063dc4c90d3146101805763e985e9c514610126575f80fd5b3461017d57604036600319011261017d57604061014161159d565b9161014a6115b3565b9260018060a01b031681526005602052209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b80fd5b503461017d578060031936011261017d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461017d578060031936011261017d5760405160a08101908082106001600160401b0383111761032f5760a091604052600180831b03600654168152600754600180841b038116602083015262ffffff81841c16604083015260b81c60020b6060820152600180831b036008541660808201522060405160208101918252600660408201526040815261025a606082611662565b519020604051631e2eaeaf60e01b815260048101919091526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156103245782916102ea575b60808262ffffff6040519160018060a01b03811683528060a01c60020b6020840152818160b81c16604084015260d01c166060820152f35b90506020813d60201161031c575b8161030560209383611662565b810103126103185760809150515f6102b2565b5080fd5b3d91506102f8565b6040513d84823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b3461039c57602036600319011261039c5761035f600435611a49565b505f60405161036f602082611662565b52610398604051610381602082611662565b5f8152604051918291602083526020830190611579565b0390f35b5f80fd5b3461039c57608036600319011261039c576103b961159d565b6103c16115b3565b606435916001600160401b03831161039c576103e46103ee9336906004016116cb565b9160443591611909565b005b3461039c5736600319016080811261039c5760601361039c576064356001600160401b03811161039c57610428903690600401611683565b6104306118e9565b6104386118f9565b60405190602082019233845260020b604083015260020b606082015260608152610463608082611662565b51902090815f52600c60205260405f20548015808091610810575b156107b55750509091600a545f1981146107a1576001019182600a55835f52600c6020528260405f20556104b06118e9565b60016104ba6118f9565b604051926104c784611647565b60020b8352602083019060020b815260408301906044358252865f52600b60205260405f2093519062ffffff8554915160181b65ffffff0000001692169065ffffffffffff19161717835551910155331561078e575f838152600260205260409020546001600160a01b0316801515908161075b575b335f818152600360209081526040808320805460010190558883526002909152812080546001600160a01b0319168317905586919083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9080a45061074857335f52600d60205260405f20928354936801000000000000000085101561032f576106cd95610677610677956106ab95610667956105e58a6106859760015f9d018155611603565b819291549060031b91821b918c19901b19161790555b6106036118e9565b9361060c6118f9565b604051956106198761162c565b60020b865260020b602086015260443560408601526060850152604051958694602086019060608091805160020b8452602081015160020b6020850152604081015160408501520151910152565b60a08085015260c08401916118c9565b03601f198101835282611662565b604051928391600160e01b60208401523360408401526060808401526080830190611579565b604051809381926348c8949160e01b8352602060048401526024830190611579565b0381837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561073d5761070857005b3d805f833e6107178183611662565b810160208282031261039c5781516001600160401b03811161039c576103ee9201611a7d565b6040513d5f823e3d90fd5b6339e3563760e11b5f525f60045260245ffd5b5f85815260046020526040902080546001600160a01b0319169055805f52600360205260405f205f19815401905561053d565b633250574960e11b5f525f60045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b156107d7575b506106ab6106676106855f946106776106cd97610677966105fb565b92604435935f52600b602052600160405f20019182545f86820196871291129080158216911516176107a15793909155916106ab6107bb565b505f6044351361047e565b3461039c57604036600319011261039c5761083461159d565b6024359081151580920361039c576001600160a01b03169081156108a357335f52600560205260405f20825f5260205260405f2060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b50630b61174360e31b5f5260045260245ffd5b3461039c57602036600319011261039c576004355f52600b602052606060405f2060018154910154604051918060020b835260181c60020b60208301526040820152f35b3461039c575f36600319011261039c576040515f6001548060011c906001811680156109f8575b6020831081146109e4578285529081156109c05750600114610962575b6103988361094e81850382611662565b604051918291602083526020830190611579565b91905060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6915f905b8082106109a65750909150810160200161094e61093e565b91926001816020925483858801015201910190929161098e565b60ff191660208086019190915291151560051b8401909101915061094e905061093e565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610921565b3461039c57602036600319011261039c576004356001600160401b03811161039c57610a32903690600401611683565b810160608282031261039c5781359163ffffffff60e01b831680930361039c5760208101356001600160a01b038116929083900361039c5760408201356001600160401b03811161039c57610a8792016116cb565b91600160e01b8103610c85575090805181019080820360a0811261039c5760801361039c5760405191610ab98361162c565b610ac560208301611b13565b8352610ad360408301611b13565b6020840152606082015160408401526080820151606084015260a08201516001600160401b03811161039c576040926020610b169281610b659501920101611a7d565b92610b7983519485938493632d35e7ed60e11b8552610b3760048601611ad2565b8051600290810b60a48701526020820151900b60c4860152604081015160e486015260600151610104850152565b610140610124840152610144830190611579565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561073d575f915f91610c49575b5091610c3892815f526009602052610bec60405f2054610bde8360801d8260801d01611f54565b92600f0b90600f0b01611f54565b6001600160801b03169060801b17815f52600960205260405f2055610c2060018060a01b0360065416828460801d91611b21565b600754600f9290920b916001600160a01b0316611b21565b610398604051610381602082611662565b9150506040813d604011610c7d575b81610c6560409383611662565b8101031261039c578051602090910151610c38610bb7565b3d9150610c58565b600160e11b8103610e09575081518201918083036080811261039c5760601361039c5760405192610cb584611647565b6020820151801515810361039c5784526040820151602085015260608201516001600160a01b038116810361039c57604085015260808201516001600160401b03811161039c5760209283610d129281610d5b9501920101611a7d565b93610d6f6040519586938493633cf3645360e21b8552610d3460048601611ad2565b8051151560a4860152602081015160c4860152604001516001600160a01b031660e4850152565b610120610104840152610124830190611579565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af190811561073d575f91610dd3575b600654610dce9350610c2090608084901d9083906001600160a01b0316611b21565b610c38565b90506020823d602011610e01575b81610dee60209383611662565b8101031261039c57610dce915190610dac565b3d9150610de1565b600360e01b03610e92578151820160608382031261039c576020830151926040810151906060810151906001600160401b03821161039c576020610e539281809601920101611a7d565b93610d6f604051958693849363234266d760e01b8552610e7560048601611ad2565b60a485015260c484015261010060e4840152610104830190611579565b63e593665760e01b5f5260045ffd5b3461039c575f36600319011261039c576020600a54604051908152f35b3461039c57602036600319011261039c576001600160a01b03610edf61159d565b168015610efc575f526003602052602060405f2054604051908152f35b6322718ad960e21b5f525f60045260245ffd5b3461039c57602036600319011261039c576020610f2d600435611a49565b6040516001600160a01b039091168152f35b3461039c57606036600319011261039c576044356001600160401b03811161039c575f6106776106ab610fa8610f7c6106cd953690600401611683565b6106776040939293519384926004356020850152602435604085015260608085015260808401916118c9565b604051928391600360e01b60208401523360408401526060808401526080830190611579565b3461039c576103ee610fdf366115c9565b9060405192610fef602085611662565b5f8452611909565b3461039c5736600319016080811261039c5760601361039c5760405161101c81611647565b600435801515810361039c57815260243560208201526044356001600160a01b038116810361039c5760408201526064356001600160401b03811161039c576106776106ab6110ad6110bd6106cd9561067761107d5f973690600401611683565b6040805185511515602080830191909152860151818301529401516001600160a01b031660608501529294859390565b60808085015260a08401916118c9565b604051928391600160e11b60208401523360408401526060808401526080830190611579565b3461039c57604036600319011261039c576110fc61159d565b6001600160a01b03165f908152600d602052604090208054602435919082101561039c5760209161112c91611603565b90549060031b1c604051908152f35b3461039c576103ee61114c366115c9565b9161173c565b3461039c57602036600319011261039c576001600160a01b0361117361159d565b165f52600d60205260405f20604051808260208294549384815201905f5260205f20925f5b8181106112ed5750506111ad92500382611662565b8051906111b982611711565b916111c76040519384611662565b8083526111d6601f1991611711565b015f5b8181106112be5750505f5b815181101561125257806111fa60019284611728565b51805f52600b60205260405f20838154910154906040519261121b8461162c565b83528060020b602084015260181c60020b604083015260608201526112408286611728565b5261124b8185611728565b50016111e4565b826040518091602082016020835281518091526020604084019201905f5b81811061127e575050500390f35b919350916020608060019260608751805183528481015160020b85840152604081015160020b604084015201516060820152019401910191849392611270565b6020906040516112cd8161162c565b5f81525f838201525f60408201525f6060820152828287010152016111d9565b8454835260019485019486945060209093019201611198565b3461039c57602036600319011261039c576004355f52600c602052602060405f2054604051908152f35b3461039c57604036600319011261039c5761134961159d565b60243561135581611a49565b33151580611407575b806113da575b6113c75781906001600160a01b0384811691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f90815260046020526040902080546001600160a01b0319166001600160a01b03909216919091179055005b63a9fbf51f60e01b5f523360045260245ffd5b506001600160a01b0381165f90815260056020908152604080832033845290915290205460ff1615611364565b506001600160a01b03811633141561135e565b3461039c57602036600319011261039c5760043561143781611a49565b505f526004602052602060018060a01b0360405f205416604051908152f35b3461039c575f36600319011261039c576040515f80548060011c90600181168015611504575b6020831081146109e4578285529081156109c057506001146114a8576103988361094e81850382611662565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b8082106114ea5750909150810160200161094e61093e565b9192600181602092548385880101520191019092916114d2565b91607f169161147c565b3461039c57602036600319011261039c576004359063ffffffff60e01b821680920361039c576020916380ac58cd60e01b8114908115611568575b8115611557575b5015158152f35b6301ffc9a760e01b14905083611550565b635b5e139f60e01b81149150611549565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361039c57565b602435906001600160a01b038216820361039c57565b606090600319011261039c576004356001600160a01b038116810361039c57906024356001600160a01b038116810361039c579060443590565b8054821015611618575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b608081019081106001600160401b0382111761032f57604052565b606081019081106001600160401b0382111761032f57604052565b90601f801991011681019081106001600160401b0382111761032f57604052565b9181601f8401121561039c578235916001600160401b03831161039c576020838186019501011161039c57565b6001600160401b03811161032f57601f01601f191660200190565b81601f8201121561039c578035906116e2826116b0565b926116f06040519485611662565b8284526020838301011161039c57815f926020809301838601378301015290565b6001600160401b03811161032f5760051b60200190565b80518210156116185760209160051b010190565b6001600160a01b039091169190821561078e575f828152600260205260409020546001600160a01b031692829033151580611834575b5084611801575b805f52600360205260405f2060018154019055815f52600260205260405f20816bffffffffffffffffffffffff60a01b825416179055847fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a46001600160a01b03168083036117e957505050565b6364283d7b60e01b5f5260045260245260445260645ffd5b5f82815260046020526040902080546001600160a01b0319169055845f52600360205260405f205f198154019055611779565b90915080611878575b1561184a5782905f611772565b828461186257637e27328960e01b5f5260045260245ffd5b63177e802f60e01b5f523360045260245260445ffd5b5033841480156118a7575b8061183d57505f838152600460205260409020546001600160a01b0316331461183d565b505f84815260056020908152604080832033845290915290205460ff16611883565b908060209392818452848401375f828201840152601f01601f1916010190565b6004358060020b810361039c5790565b6024358060020b810361039c5790565b929161191681838661173c565b813b611923575b50505050565b604051630a85bd0160e11b81523360048201526001600160a01b039485166024820152604481019190915260806064820152921691906020908290819061196e906084830190611579565b03815f865af15f9181611a04575b506119d157503d156119ca573d611992816116b0565b906119a06040519283611662565b81523d5f602083013e5b805190816119c55782633250574960e11b5f5260045260245ffd5b602001fd5b60606119aa565b6001600160e01b03191663757a42ff60e11b016119f257505f80808061191d565b633250574960e11b5f5260045260245ffd5b9091506020813d602011611a41575b81611a2060209383611662565b8101031261039c57516001600160e01b03198116810361039c57905f61197c565b3d9150611a13565b5f818152600260205260409020546001600160a01b0316908115611a6b575090565b637e27328960e01b5f5260045260245ffd5b81601f8201121561039c57805190611a94826116b0565b92611aa26040519485611662565b8284526020838301011161039c57815f9260208093018386015e8301015290565b9081602091031261039c575190565b6006546001600160a01b039081168252600754808216602084015260a081901c62ffffff16604084015260b81c60020b606083015260085416608090910152565b51908160020b820361039c57565b91905f9282600f0b5f81135f14611bcc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15611bc857604051630b0d9c0960e01b81526001600160a01b0392831660048201529190921660248201526001600160801b0392909216604483015282908290606490829084905af1801561032457611bb6575050565b611bc1828092611662565b61017d5750565b8480fd5b5f819594939512611bdf575b5050505050565b6f7fffffffffffffffffffffffffffffff1981146107a1576001600160a01b038216945f919091039085611cc257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031694506020926001600160801b0392600492611c5891908516908890611e11565b604051630476982d60e21b8152958693849216905af1908115611cb65750611c87575b505b5f80808080611bd8565b611ca89060203d602011611caf575b611ca08183611662565b810190611ac3565b505f611c7b565b503d611c96565b604051903d90823e3d90fd5b92505f6001600160801b036020921693604051838101916323b872dd60e01b835260018060a01b0316602482015230604482015285606482015260648152611d0b608482611662565b519082885af11561073d575f513d611e085750833b155b611df5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693843b1561039c5760405190632961046560e21b825260048201525f8160248183895af1801561073d57611dd6575b5092611d8f602092828596611e11565b600460405180958193630476982d60e21b83525af1908115611cb65750611db7575b50611c7d565b611dcf9060203d602011611caf57611ca08183611662565b505f611db1565b84919350602092611dea5f611d8f93611662565b5f9492509250611d7f565b83635274afe760e01b5f5260045260245ffd5b60011415611d22565b9091906001600160a01b0381169081611e9f5750505f80808093855af115611e365750565b6040516390bfb86560e01b81526001600160a01b0390911660048201525f602482018190526080604483015260a03d601f01601f191690810160648401523d6084840152903d9060a484013e808201600460a482015260c4633d2cec6f60e21b91015260e40190fd5b60205f604481949682604095865198899363a9059cbb60e01b855260018060a01b0316600485015260248401525af13d15601f3d11600185511416171692828152826020820152015215611ef05750565b6040516390bfb86560e01b8152600481019190915263a9059cbb60e01b602482015260806044820152601f3d01601f191660a0810160648301523d60848301523d5f60a484013e808201600460a482015260c4633c9fd93960e21b91015260e40190fd5b9081600f0b918203611f6257565b6393dafdf160e01b5f5260045ffdfea2646970667358221220b3ed1aea7cb6334eb825ef2ff9505effafcd08d2a89363aebcf63555d8b8fa5964736f6c634300081a0033",
34129
+ deployedBytecode: "0x6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a71461150e5750806306fdde0314611456578063081812fc1461141a578063095ea7b314611330578063168677c21461130657806316c197391461115257806323b872dd1461113b57806328b60031146110e35780633698103314610ff757806342842e0e14610fce57806362fc9e5314610f3f5780636352211e14610f0f57806370a0823114610ebe57806375794a3c14610ea157806391dd734614610a0257806395d89b41146108fa57806399fbab88146108b6578063a22cb4651461081b578063a303bdab146103f0578063b88d4fde146103a0578063c87b56dd14610343578063c9ae5e0c146101c5578063dc4c90d3146101805763e985e9c514610126575f80fd5b3461017d57604036600319011261017d57604061014161159d565b9161014a6115b3565b9260018060a01b031681526005602052209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b80fd5b503461017d578060031936011261017d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461017d578060031936011261017d5760405160a08101908082106001600160401b0383111761032f5760a091604052600180831b03600654168152600754600180841b038116602083015262ffffff81841c16604083015260b81c60020b6060820152600180831b036008541660808201522060405160208101918252600660408201526040815261025a606082611662565b519020604051631e2eaeaf60e01b815260048101919091526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156103245782916102ea575b60808262ffffff6040519160018060a01b03811683528060a01c60020b6020840152818160b81c16604084015260d01c166060820152f35b90506020813d60201161031c575b8161030560209383611662565b810103126103185760809150515f6102b2565b5080fd5b3d91506102f8565b6040513d84823e3d90fd5b634e487b7160e01b5f52604160045260245ffd5b3461039c57602036600319011261039c5761035f600435611a49565b505f60405161036f602082611662565b52610398604051610381602082611662565b5f8152604051918291602083526020830190611579565b0390f35b5f80fd5b3461039c57608036600319011261039c576103b961159d565b6103c16115b3565b606435916001600160401b03831161039c576103e46103ee9336906004016116cb565b9160443591611909565b005b3461039c5736600319016080811261039c5760601361039c576064356001600160401b03811161039c57610428903690600401611683565b6104306118e9565b6104386118f9565b60405190602082019233845260020b604083015260020b606082015260608152610463608082611662565b51902090815f52600c60205260405f20548015808091610810575b156107b55750509091600a545f1981146107a1576001019182600a55835f52600c6020528260405f20556104b06118e9565b60016104ba6118f9565b604051926104c784611647565b60020b8352602083019060020b815260408301906044358252865f52600b60205260405f2093519062ffffff8554915160181b65ffffff0000001692169065ffffffffffff19161717835551910155331561078e575f838152600260205260409020546001600160a01b0316801515908161075b575b335f818152600360209081526040808320805460010190558883526002909152812080546001600160a01b0319168317905586919083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9080a45061074857335f52600d60205260405f20928354936801000000000000000085101561032f576106cd95610677610677956106ab95610667956105e58a6106859760015f9d018155611603565b819291549060031b91821b918c19901b19161790555b6106036118e9565b9361060c6118f9565b604051956106198761162c565b60020b865260020b602086015260443560408601526060850152604051958694602086019060608091805160020b8452602081015160020b6020850152604081015160408501520151910152565b60a08085015260c08401916118c9565b03601f198101835282611662565b604051928391600160e01b60208401523360408401526060808401526080830190611579565b604051809381926348c8949160e01b8352602060048401526024830190611579565b0381837f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561073d5761070857005b3d805f833e6107178183611662565b810160208282031261039c5781516001600160401b03811161039c576103ee9201611a7d565b6040513d5f823e3d90fd5b6339e3563760e11b5f525f60045260245ffd5b5f85815260046020526040902080546001600160a01b0319169055805f52600360205260405f205f19815401905561053d565b633250574960e11b5f525f60045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b156107d7575b506106ab6106676106855f946106776106cd97610677966105fb565b92604435935f52600b602052600160405f20019182545f86820196871291129080158216911516176107a15793909155916106ab6107bb565b505f6044351361047e565b3461039c57604036600319011261039c5761083461159d565b6024359081151580920361039c576001600160a01b03169081156108a357335f52600560205260405f20825f5260205260405f2060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b50630b61174360e31b5f5260045260245ffd5b3461039c57602036600319011261039c576004355f52600b602052606060405f2060018154910154604051918060020b835260181c60020b60208301526040820152f35b3461039c575f36600319011261039c576040515f6001548060011c906001811680156109f8575b6020831081146109e4578285529081156109c05750600114610962575b6103988361094e81850382611662565b604051918291602083526020830190611579565b91905060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6915f905b8082106109a65750909150810160200161094e61093e565b91926001816020925483858801015201910190929161098e565b60ff191660208086019190915291151560051b8401909101915061094e905061093e565b634e487b7160e01b5f52602260045260245ffd5b91607f1691610921565b3461039c57602036600319011261039c576004356001600160401b03811161039c57610a32903690600401611683565b810160608282031261039c5781359163ffffffff60e01b831680930361039c5760208101356001600160a01b038116929083900361039c5760408201356001600160401b03811161039c57610a8792016116cb565b91600160e01b8103610c85575090805181019080820360a0811261039c5760801361039c5760405191610ab98361162c565b610ac560208301611b13565b8352610ad360408301611b13565b6020840152606082015160408401526080820151606084015260a08201516001600160401b03811161039c576040926020610b169281610b659501920101611a7d565b92610b7983519485938493632d35e7ed60e11b8552610b3760048601611ad2565b8051600290810b60a48701526020820151900b60c4860152604081015160e486015260600151610104850152565b610140610124840152610144830190611579565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af1801561073d575f915f91610c49575b5091610c3892815f526009602052610bec60405f2054610bde8360801d8260801d01611f54565b92600f0b90600f0b01611f54565b6001600160801b03169060801b17815f52600960205260405f2055610c2060018060a01b0360065416828460801d91611b21565b600754600f9290920b916001600160a01b0316611b21565b610398604051610381602082611662565b9150506040813d604011610c7d575b81610c6560409383611662565b8101031261039c578051602090910151610c38610bb7565b3d9150610c58565b600160e11b8103610e09575081518201918083036080811261039c5760601361039c5760405192610cb584611647565b6020820151801515810361039c5784526040820151602085015260608201516001600160a01b038116810361039c57604085015260808201516001600160401b03811161039c5760209283610d129281610d5b9501920101611a7d565b93610d6f6040519586938493633cf3645360e21b8552610d3460048601611ad2565b8051151560a4860152602081015160c4860152604001516001600160a01b031660e4850152565b610120610104840152610124830190611579565b03815f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165af190811561073d575f91610dd3575b600654610dce9350610c2090608084901d9083906001600160a01b0316611b21565b610c38565b90506020823d602011610e01575b81610dee60209383611662565b8101031261039c57610dce915190610dac565b3d9150610de1565b600360e01b03610e92578151820160608382031261039c576020830151926040810151906060810151906001600160401b03821161039c576020610e539281809601920101611a7d565b93610d6f604051958693849363234266d760e01b8552610e7560048601611ad2565b60a485015260c484015261010060e4840152610104830190611579565b63e593665760e01b5f5260045ffd5b3461039c575f36600319011261039c576020600a54604051908152f35b3461039c57602036600319011261039c576001600160a01b03610edf61159d565b168015610efc575f526003602052602060405f2054604051908152f35b6322718ad960e21b5f525f60045260245ffd5b3461039c57602036600319011261039c576020610f2d600435611a49565b6040516001600160a01b039091168152f35b3461039c57606036600319011261039c576044356001600160401b03811161039c575f6106776106ab610fa8610f7c6106cd953690600401611683565b6106776040939293519384926004356020850152602435604085015260608085015260808401916118c9565b604051928391600360e01b60208401523360408401526060808401526080830190611579565b3461039c576103ee610fdf366115c9565b9060405192610fef602085611662565b5f8452611909565b3461039c5736600319016080811261039c5760601361039c5760405161101c81611647565b600435801515810361039c57815260243560208201526044356001600160a01b038116810361039c5760408201526064356001600160401b03811161039c576106776106ab6110ad6110bd6106cd9561067761107d5f973690600401611683565b6040805185511515602080830191909152860151818301529401516001600160a01b031660608501529294859390565b60808085015260a08401916118c9565b604051928391600160e11b60208401523360408401526060808401526080830190611579565b3461039c57604036600319011261039c576110fc61159d565b6001600160a01b03165f908152600d602052604090208054602435919082101561039c5760209161112c91611603565b90549060031b1c604051908152f35b3461039c576103ee61114c366115c9565b9161173c565b3461039c57602036600319011261039c576001600160a01b0361117361159d565b165f52600d60205260405f20604051808260208294549384815201905f5260205f20925f5b8181106112ed5750506111ad92500382611662565b8051906111b982611711565b916111c76040519384611662565b8083526111d6601f1991611711565b015f5b8181106112be5750505f5b815181101561125257806111fa60019284611728565b51805f52600b60205260405f20838154910154906040519261121b8461162c565b83528060020b602084015260181c60020b604083015260608201526112408286611728565b5261124b8185611728565b50016111e4565b826040518091602082016020835281518091526020604084019201905f5b81811061127e575050500390f35b919350916020608060019260608751805183528481015160020b85840152604081015160020b604084015201516060820152019401910191849392611270565b6020906040516112cd8161162c565b5f81525f838201525f60408201525f6060820152828287010152016111d9565b8454835260019485019486945060209093019201611198565b3461039c57602036600319011261039c576004355f52600c602052602060405f2054604051908152f35b3461039c57604036600319011261039c5761134961159d565b60243561135581611a49565b33151580611407575b806113da575b6113c75781906001600160a01b0384811691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f90815260046020526040902080546001600160a01b0319166001600160a01b03909216919091179055005b63a9fbf51f60e01b5f523360045260245ffd5b506001600160a01b0381165f90815260056020908152604080832033845290915290205460ff1615611364565b506001600160a01b03811633141561135e565b3461039c57602036600319011261039c5760043561143781611a49565b505f526004602052602060018060a01b0360405f205416604051908152f35b3461039c575f36600319011261039c576040515f80548060011c90600181168015611504575b6020831081146109e4578285529081156109c057506001146114a8576103988361094e81850382611662565b5f8080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563939250905b8082106114ea5750909150810160200161094e61093e565b9192600181602092548385880101520191019092916114d2565b91607f169161147c565b3461039c57602036600319011261039c576004359063ffffffff60e01b821680920361039c576020916380ac58cd60e01b8114908115611568575b8115611557575b5015158152f35b6301ffc9a760e01b14905083611550565b635b5e139f60e01b81149150611549565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b600435906001600160a01b038216820361039c57565b602435906001600160a01b038216820361039c57565b606090600319011261039c576004356001600160a01b038116810361039c57906024356001600160a01b038116810361039c579060443590565b8054821015611618575f5260205f2001905f90565b634e487b7160e01b5f52603260045260245ffd5b608081019081106001600160401b0382111761032f57604052565b606081019081106001600160401b0382111761032f57604052565b90601f801991011681019081106001600160401b0382111761032f57604052565b9181601f8401121561039c578235916001600160401b03831161039c576020838186019501011161039c57565b6001600160401b03811161032f57601f01601f191660200190565b81601f8201121561039c578035906116e2826116b0565b926116f06040519485611662565b8284526020838301011161039c57815f926020809301838601378301015290565b6001600160401b03811161032f5760051b60200190565b80518210156116185760209160051b010190565b6001600160a01b039091169190821561078e575f828152600260205260409020546001600160a01b031692829033151580611834575b5084611801575b805f52600360205260405f2060018154019055815f52600260205260405f20816bffffffffffffffffffffffff60a01b825416179055847fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a46001600160a01b03168083036117e957505050565b6364283d7b60e01b5f5260045260245260445260645ffd5b5f82815260046020526040902080546001600160a01b0319169055845f52600360205260405f205f198154019055611779565b90915080611878575b1561184a5782905f611772565b828461186257637e27328960e01b5f5260045260245ffd5b63177e802f60e01b5f523360045260245260445ffd5b5033841480156118a7575b8061183d57505f838152600460205260409020546001600160a01b0316331461183d565b505f84815260056020908152604080832033845290915290205460ff16611883565b908060209392818452848401375f828201840152601f01601f1916010190565b6004358060020b810361039c5790565b6024358060020b810361039c5790565b929161191681838661173c565b813b611923575b50505050565b604051630a85bd0160e11b81523360048201526001600160a01b039485166024820152604481019190915260806064820152921691906020908290819061196e906084830190611579565b03815f865af15f9181611a04575b506119d157503d156119ca573d611992816116b0565b906119a06040519283611662565b81523d5f602083013e5b805190816119c55782633250574960e11b5f5260045260245ffd5b602001fd5b60606119aa565b6001600160e01b03191663757a42ff60e11b016119f257505f80808061191d565b633250574960e11b5f5260045260245ffd5b9091506020813d602011611a41575b81611a2060209383611662565b8101031261039c57516001600160e01b03198116810361039c57905f61197c565b3d9150611a13565b5f818152600260205260409020546001600160a01b0316908115611a6b575090565b637e27328960e01b5f5260045260245ffd5b81601f8201121561039c57805190611a94826116b0565b92611aa26040519485611662565b8284526020838301011161039c57815f9260208093018386015e8301015290565b9081602091031261039c575190565b6006546001600160a01b039081168252600754808216602084015260a081901c62ffffff16604084015260b81c60020b606083015260085416608090910152565b51908160020b820361039c57565b91905f9282600f0b5f81135f14611bcc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b15611bc857604051630b0d9c0960e01b81526001600160a01b0392831660048201529190921660248201526001600160801b0392909216604483015282908290606490829084905af1801561032457611bb6575050565b611bc1828092611662565b61017d5750565b8480fd5b5f819594939512611bdf575b5050505050565b6f7fffffffffffffffffffffffffffffff1981146107a1576001600160a01b038216945f919091039085611cc257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031694506020926001600160801b0392600492611c5891908516908890611e11565b604051630476982d60e21b8152958693849216905af1908115611cb65750611c87575b505b5f80808080611bd8565b611ca89060203d602011611caf575b611ca08183611662565b810190611ac3565b505f611c7b565b503d611c96565b604051903d90823e3d90fd5b92505f6001600160801b036020921693604051838101916323b872dd60e01b835260018060a01b0316602482015230604482015285606482015260648152611d0b608482611662565b519082885af11561073d575f513d611e085750833b155b611df5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031693843b1561039c5760405190632961046560e21b825260048201525f8160248183895af1801561073d57611dd6575b5092611d8f602092828596611e11565b600460405180958193630476982d60e21b83525af1908115611cb65750611db7575b50611c7d565b611dcf9060203d602011611caf57611ca08183611662565b505f611db1565b84919350602092611dea5f611d8f93611662565b5f9492509250611d7f565b83635274afe760e01b5f5260045260245ffd5b60011415611d22565b9091906001600160a01b0381169081611e9f5750505f80808093855af115611e365750565b6040516390bfb86560e01b81526001600160a01b0390911660048201525f602482018190526080604483015260a03d601f01601f191690810160648401523d6084840152903d9060a484013e808201600460a482015260c4633d2cec6f60e21b91015260e40190fd5b60205f604481949682604095865198899363a9059cbb60e01b855260018060a01b0316600485015260248401525af13d15601f3d11600185511416171692828152826020820152015215611ef05750565b6040516390bfb86560e01b8152600481019190915263a9059cbb60e01b602482015260806044820152601f3d01601f191660a0810160648301523d60848301523d5f60a484013e808201600460a482015260c4633c9fd93960e21b91015260e40190fd5b9081600f0b918203611f6257565b6393dafdf160e01b5f5260045ffdfea2646970667358221220b3ed1aea7cb6334eb825ef2ff9505effafcd08d2a89363aebcf63555d8b8fa5964736f6c634300081a0033",
33571
34130
  linkReferences: {},
33572
34131
  deployedLinkReferences: {}
33573
34132
  };
@@ -35534,24 +36093,24 @@ var init_liqCalculation = __esm({
35534
36093
  function getAbi(artifact) {
35535
36094
  return artifact.abi ? artifact.abi : artifact;
35536
36095
  }
35537
- async function getContract(wallet, name) {
36096
+ async function getContract(wallet2, name) {
35538
36097
  const address = CONTRACT_ADDRESSES[`${name}`];
35539
36098
  console.log(`[SDK] Getting contract ${name} at address: ${address}`);
35540
- if (wallet.provider) {
35541
- const code = await wallet.provider.getCode(address);
36099
+ if (wallet2.provider) {
36100
+ const code = await wallet2.provider.getCode(address);
35542
36101
  if (code === "0x") {
35543
36102
  console.error(`[SDK] WARNING: Contract ${name} at ${address} has NO CODE (it is empty). Check your network connection or deployment.`);
35544
36103
  }
35545
36104
  }
35546
36105
  switch (name) {
35547
36106
  case "Token0":
35548
- return new ethers_exports.Contract(CONTRACT_ADDRESSES.Token0, getAbi(CONTRACTS_ABI.MockERC20), wallet);
36107
+ return new ethers_exports.Contract(CONTRACT_ADDRESSES.Token0, getAbi(CONTRACTS_ABI.MockERC20), wallet2);
35549
36108
  case "Token1":
35550
- return new ethers_exports.Contract(CONTRACT_ADDRESSES.Token1, getAbi(CONTRACTS_ABI.MockERC20), wallet);
36109
+ return new ethers_exports.Contract(CONTRACT_ADDRESSES.Token1, getAbi(CONTRACTS_ABI.MockERC20), wallet2);
35551
36110
  case "LiquidPool":
35552
- return new ethers_exports.Contract(CONTRACT_ADDRESSES.LiquidPool, getAbi(CONTRACTS_ABI.LiquidPool), wallet);
36111
+ return new ethers_exports.Contract(CONTRACT_ADDRESSES.LiquidPool, getAbi(CONTRACTS_ABI.LiquidPool), wallet2);
35553
36112
  case "LimitOrder":
35554
- return new ethers_exports.Contract(CONTRACT_ADDRESSES.LimitOrder, getAbi(CONTRACTS_ABI.LimitOrder), wallet);
36113
+ return new ethers_exports.Contract(CONTRACT_ADDRESSES.LimitOrder, getAbi(CONTRACTS_ABI.LimitOrder), wallet2);
35555
36114
  default:
35556
36115
  throw new Error(`Contract(${name}) initial method not defined`);
35557
36116
  }
@@ -35591,14 +36150,14 @@ var require_place = __commonJS({
35591
36150
  });
35592
36151
  });
35593
36152
  }
35594
- async function placeLimitOrderFrontend(token0, token1, amountIn, priceLimit, poolKey, wallet) {
36153
+ async function placeLimitOrderFrontend(token0, token1, amountIn, priceLimit, poolKey, wallet2) {
35595
36154
  const ticklow = calculateTickFromPriceWithSpacing(priceLimit, poolKey.tickSpacing);
35596
36155
  const tickhigh = ticklow + poolKey.tickSpacing;
35597
36156
  const pricelow = calculatePriceFromTick(ticklow);
35598
36157
  const priceupp = calculatePriceFromTick(tickhigh);
35599
36158
  const sqrt_low = getSqrtPriceAtTick(ticklow);
35600
36159
  const sqrt_upp = getSqrtPriceAtTick(tickhigh);
35601
- const liqPool = await getContract(wallet, "LiquidPool");
36160
+ const liqPool = await getContract(wallet2, "LiquidPool");
35602
36161
  const currentTick = await getCurrentTick(liqPool);
35603
36162
  const priceCurrent = await getPoolPrice(liqPool);
35604
36163
  console.log(`Current pool price: ${priceCurrent}, price low: ${pricelow}, price upp: ${priceupp}`);
@@ -35608,35 +36167,35 @@ var require_place = __commonJS({
35608
36167
  if (ticklow > currentTick) {
35609
36168
  zeroForOne = true;
35610
36169
  liquidity = liquidity0(amountIn, sqrt_low, sqrt_upp);
35611
- if (!await isApproved(token0, wallet.address, CONTRACT_ADDRESSES.LimitOrder, amountIn)) {
36170
+ if (!await isApproved(token0, wallet2.address, CONTRACT_ADDRESSES.LimitOrder, amountIn)) {
35612
36171
  await approveERC20(token0, CONTRACT_ADDRESSES.LimitOrder, amountIn);
35613
36172
  }
35614
36173
  } else if (tickhigh <= currentTick) {
35615
36174
  zeroForOne = false;
35616
36175
  liquidity = liquidity1(amountIn, sqrt_upp, sqrt_low);
35617
- if (!await isApproved(token1, wallet.address, CONTRACT_ADDRESSES.LimitOrder, amountIn)) {
36176
+ if (!await isApproved(token1, wallet2.address, CONTRACT_ADDRESSES.LimitOrder, amountIn)) {
35618
36177
  await approveERC20(token1, CONTRACT_ADDRESSES.LimitOrder, amountIn);
35619
36178
  }
35620
36179
  } else {
35621
36180
  throw new Error("Price mismatch for limit order");
35622
36181
  }
35623
- const hook = await getContract(wallet, "LimitOrder");
36182
+ const hook = await getContract(wallet2, "LimitOrder");
35624
36183
  const epoch = await placeLimitOrder(hook, poolKey, ticklow, zeroForOne, liquidity);
35625
36184
  return epoch;
35626
36185
  }
35627
36186
  async function main3() {
35628
- const provider = new ethers_exports.providers.JsonRpcProvider(RPC_URL);
35629
- const wallet = new ethers_exports.Wallet(PRIVATE_KEY, provider);
35630
- const token0 = await getContract(wallet, "Token0");
35631
- const token1 = await getContract(wallet, "Token1");
35632
- const token0Before = (await getERC20Balance(token0, wallet.address)).valueOf();
35633
- const token1Before = (await getERC20Balance(token1, wallet.address)).valueOf();
36187
+ const provider2 = new ethers_exports.providers.JsonRpcProvider(RPC_URL);
36188
+ const wallet2 = new ethers_exports.Wallet(PRIVATE_KEY, provider2);
36189
+ const token0 = await getContract(wallet2, "Token0");
36190
+ const token1 = await getContract(wallet2, "Token1");
36191
+ const token0Before = (await getERC20Balance(token0, wallet2.address)).valueOf();
36192
+ const token1Before = (await getERC20Balance(token1, wallet2.address)).valueOf();
35634
36193
  const limitPrice = PRICE_LIMIT;
35635
36194
  const amountIn = ethers_exports.utils.parseEther("1000").toBigInt();
35636
- const epo = await placeLimitOrderFrontend(token0, token1, amountIn, limitPrice, POOL_KEYS.limitOrderPoolKey, wallet);
36195
+ const epo = await placeLimitOrderFrontend(token0, token1, amountIn, limitPrice, POOL_KEYS.limitOrderPoolKey, wallet2);
35637
36196
  console.log("epoch:", epo);
35638
- const token0After = (await getERC20Balance(token0, wallet.address)).valueOf();
35639
- const token1After = (await getERC20Balance(token1, wallet.address)).valueOf();
36197
+ const token0After = (await getERC20Balance(token0, wallet2.address)).valueOf();
36198
+ const token1After = (await getERC20Balance(token1, wallet2.address)).valueOf();
35640
36199
  console.log("Token0 change:", token0After - token0Before);
35641
36200
  console.log("Token1 change:", token1After - token1Before);
35642
36201
  }
@@ -35682,6 +36241,7 @@ __export(index_exports, {
35682
36241
  getPoolSqrtPrice: () => getPoolSqrtPrice,
35683
36242
  getProvider: () => getProvider,
35684
36243
  getSqrtPriceAtTick: () => getSqrtPriceAtTick,
36244
+ getUserPositions: () => getUserPositions,
35685
36245
  getVoucherContract: () => getVoucherContract,
35686
36246
  getVoucherInfo: () => getVoucherInfo,
35687
36247
  liquidity0: () => liquidity0,
@@ -37685,8 +38245,8 @@ function getSigner(rpcUrl, privateKey) {
37685
38245
  if (!privateKey) {
37686
38246
  throw new Error("PRIVATE_KEY not set");
37687
38247
  }
37688
- const provider = new lib_exports3.JsonRpcProvider(rpcUrl);
37689
- return new Wallet(privateKey, provider);
38248
+ const provider2 = new lib_exports3.JsonRpcProvider(rpcUrl);
38249
+ return new Wallet(privateKey, provider2);
37690
38250
  }
37691
38251
 
37692
38252
  // src/auction/chainXAuction.ts
@@ -37703,9 +38263,9 @@ function getAuctionContract(signer) {
37703
38263
  async function createAuction(params) {
37704
38264
  const { seller, sourceChainId, activeAuctionCount, auctionType } = params;
37705
38265
  const signer = getSigner(RPC_URL, PRIVATE_KEY);
37706
- const provider = signer.provider;
37707
- const nonce = await provider.getTransactionCount(signer.address);
37708
- const chainId = sourceChainId ?? (await provider.getNetwork()).chainId;
38266
+ const provider2 = signer.provider;
38267
+ const nonce = await provider2.getTransactionCount(signer.address);
38268
+ const chainId = sourceChainId ?? (await provider2.getNetwork()).chainId;
37709
38269
  const auctionId = getAuctionID(
37710
38270
  seller,
37711
38271
  chainId,
@@ -37938,17 +38498,18 @@ init_ERC20();
37938
38498
  // src/uniswap/lib/swap.ts
37939
38499
  async function executeSwap(contract, swapParams, hookData) {
37940
38500
  let tx = await contract.executeSwap(swapParams, hookData);
37941
- await tx.wait();
38501
+ const receipt = await tx.wait();
37942
38502
  console.log("Swap executed successfully");
38503
+ return receipt;
37943
38504
  }
37944
38505
 
37945
38506
  // src/uniswap/1-marketprice/swap.ts
37946
38507
  init_liqCalculation();
37947
38508
  init_contract();
37948
- async function swap(wallet, amountIn, zeroForOne, hookData) {
37949
- const token0 = await getContract(wallet, "MockERC20");
37950
- const token1 = await getContract(wallet, "MockERC20");
37951
- const liqPool = await getContract(wallet, "LiquidPool");
38509
+ async function swap(wallet2, amountIn, zeroForOne, hookData) {
38510
+ const token0 = await getContract(wallet2, "Token0");
38511
+ const token1 = await getContract(wallet2, "Token1");
38512
+ const liqPool = await getContract(wallet2, "LiquidPool");
37952
38513
  const priceCurrent = await getPoolPrice(liqPool);
37953
38514
  const slippageMultiplier = 105;
37954
38515
  const base3 = 100;
@@ -37968,19 +38529,20 @@ async function swap(wallet, amountIn, zeroForOne, hookData) {
37968
38529
  // Price limit after swap to protect against slippage
37969
38530
  };
37970
38531
  const token = zeroForOne ? token0 : token1;
37971
- if (!await isApproved(token, wallet.address, liqPool.address, lib_exports2.MaxUint256.toBigInt())) {
38532
+ if (!await isApproved(token, wallet2.address, liqPool.address, lib_exports2.MaxUint256.toBigInt())) {
37972
38533
  await approveERC20(token, liqPool.address, lib_exports2.MaxUint256.toBigInt());
37973
38534
  }
37974
- await executeSwap(liqPool, swapParams, hookData);
38535
+ const receipt = await executeSwap(liqPool, swapParams, hookData);
38536
+ return receipt;
37975
38537
  }
37976
38538
  async function main() {
37977
- const provider = new lib_exports3.JsonRpcProvider(RPC_URL);
37978
- const wallet = new Wallet(PRIVATE_KEY, provider);
37979
- const token0 = await getContract(wallet, "Token0");
37980
- const token1 = await getContract(wallet, "Token1");
37981
- const liqPool = await getContract(wallet, "LiquidPool");
37982
- const token0Before = await getERC20Balance(token0, wallet.address);
37983
- const token1Before = await getERC20Balance(token1, wallet.address);
38539
+ const provider2 = new lib_exports3.JsonRpcProvider(RPC_URL);
38540
+ const wallet2 = new Wallet(PRIVATE_KEY, provider2);
38541
+ const token0 = await getContract(wallet2, "Token0");
38542
+ const token1 = await getContract(wallet2, "Token1");
38543
+ const liqPool = await getContract(wallet2, "LiquidPool");
38544
+ const token0Before = await getERC20Balance(token0, wallet2.address);
38545
+ const token1Before = await getERC20Balance(token1, wallet2.address);
37984
38546
  console.log("Token0 balance before swapping:", token0Before.toString());
37985
38547
  console.log("Token1 balance before swapping:", token1Before.toString());
37986
38548
  const swapAmount = utils_exports.parseEther("1000").toBigInt();
@@ -37988,9 +38550,9 @@ async function main() {
37988
38550
  const x = zeroForOne ? 0 : 1;
37989
38551
  console.log(`swap ${utils_exports.formatEther(swapAmount)} amount of token${1 - x} from token${x}`);
37990
38552
  const hookData = utils_exports.defaultAbiCoder.encode(["bytes32"], [SALT_LIMITORDER]);
37991
- await swap(wallet, swapAmount, zeroForOne, hookData);
37992
- const token0After = await getERC20Balance(token0, wallet.address);
37993
- const token1After = await getERC20Balance(token1, wallet.address);
38553
+ await swap(wallet2, swapAmount, zeroForOne, hookData);
38554
+ const token0After = await getERC20Balance(token0, wallet2.address);
38555
+ const token1After = await getERC20Balance(token1, wallet2.address);
37994
38556
  const token0Diff = token0After - token0Before;
37995
38557
  const token1Diff = token1After - token1Before;
37996
38558
  console.log("Token0 change:", utils_exports.formatEther(token0Diff));
@@ -38017,15 +38579,15 @@ init_pool();
38017
38579
  init_ERC20();
38018
38580
  init_liqCalculation();
38019
38581
  init_contract();
38020
- async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKey) {
38021
- const token0 = await getContract(wallet, "Token0");
38022
- const token1 = await getContract(wallet, "Token1");
38023
- const liqPool = await getContract(wallet, "LiquidPool");
38582
+ async function addLiq(wallet2, priceLower, priceUpper, amount02, amount12, poolKey) {
38583
+ const token0 = await getContract(wallet2, "Token0");
38584
+ const token1 = await getContract(wallet2, "Token1");
38585
+ const liqPool = await getContract(wallet2, "LiquidPool");
38024
38586
  const amount0Big = BigInt(amount02);
38025
38587
  const amount1Big = BigInt(amount12);
38026
38588
  console.log(`[SDK] Validating network and wallet...`);
38027
- if (wallet.provider) {
38028
- const net = await wallet.provider.getNetwork();
38589
+ if (wallet2.provider) {
38590
+ const net = await wallet2.provider.getNetwork();
38029
38591
  console.log(`[SDK] Wallet connected to chainId: ${net.chainId}`);
38030
38592
  } else {
38031
38593
  console.warn(`[SDK] Wallet has no provider attached!`);
@@ -38039,7 +38601,7 @@ async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKe
38039
38601
  console.log(`[SDK] SqrtPrice fetched: ${sqrtCurrent}`);
38040
38602
  } catch (e) {
38041
38603
  console.error(`[SDK] Failed to fetch sqrtPrice. Attempting diagnosis...`);
38042
- const code = await wallet.provider.getCode(liqPool.address);
38604
+ const code = await wallet2.provider.getCode(liqPool.address);
38043
38605
  console.log(`[SDK] Code length at ${liqPool.address}: ${code.length}`);
38044
38606
  throw e;
38045
38607
  }
@@ -38051,34 +38613,34 @@ async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKe
38051
38613
  };
38052
38614
  console.log("Modify position params:", modifyPositionParams);
38053
38615
  const liqPoolAddr = liqPool.address;
38054
- if (!await isApproved(token0, wallet.address, liqPoolAddr, amount0Add)) {
38616
+ if (!await isApproved(token0, wallet2.address, liqPoolAddr, amount0Add)) {
38055
38617
  await approveERC20(token0, liqPoolAddr, amount0Add);
38056
38618
  }
38057
- if (!await isApproved(token1, wallet.address, liqPoolAddr, amount1Add)) {
38619
+ if (!await isApproved(token1, wallet2.address, liqPoolAddr, amount1Add)) {
38058
38620
  await approveERC20(token1, liqPoolAddr, amount1Add);
38059
38621
  }
38060
38622
  const receipt = await modifyPosition(liqPool, modifyPositionParams, "0x00");
38061
38623
  return receipt;
38062
38624
  }
38063
38625
  async function main2() {
38064
- const provider = new ethers_exports.providers.JsonRpcProvider(RPC_URL);
38065
- const wallet = new Wallet(PRIVATE_KEY, provider);
38626
+ const provider2 = new ethers_exports.providers.JsonRpcProvider(RPC_URL);
38627
+ const wallet2 = new Wallet(PRIVATE_KEY, provider2);
38066
38628
  const tokenContractName = "MockERC20";
38067
38629
  const liqPoolAddress = CONTRACT_ADDRESSES.LiquidPool;
38068
- const token0 = await getContract(wallet, "Token0");
38069
- const token1 = await getContract(wallet, "Token1");
38070
- const liqPool = await getContract(wallet, "LiquidPool");
38071
- const token0Before = (await getERC20Balance(token0, wallet.address)).valueOf();
38072
- const token1Before = (await getERC20Balance(token1, wallet.address)).valueOf();
38630
+ const token0 = await getContract(wallet2, "Token0");
38631
+ const token1 = await getContract(wallet2, "Token1");
38632
+ const liqPool = await getContract(wallet2, "LiquidPool");
38633
+ const token0Before = (await getERC20Balance(token0, wallet2.address)).valueOf();
38634
+ const token1Before = (await getERC20Balance(token1, wallet2.address)).valueOf();
38073
38635
  let poolPrice = await getPoolPrice(liqPool);
38074
38636
  console.log(`Current price of pool before adding liquidity is ${poolPrice}`);
38075
38637
  const priceLower = 0.5;
38076
38638
  const priceUpper = 1.5;
38077
38639
  const amount02 = INITIAL_LIQUIDITY;
38078
38640
  const amount12 = INITIAL_LIQUIDITY;
38079
- await addLiq(wallet, priceLower, priceUpper, amount02, amount12, POOL_KEYS.limitOrderPoolKey);
38080
- const token0After = (await getERC20Balance(token0, wallet.address)).valueOf();
38081
- const token1After = (await getERC20Balance(token1, wallet.address)).valueOf();
38641
+ await addLiq(wallet2, priceLower, priceUpper, amount02, amount12, POOL_KEYS.limitOrderPoolKey);
38642
+ const token0After = (await getERC20Balance(token0, wallet2.address)).valueOf();
38643
+ const token1After = (await getERC20Balance(token1, wallet2.address)).valueOf();
38082
38644
  console.log("Token0 change:", token0After - token0Before);
38083
38645
  console.log("Token1 change:", token1After - token1Before);
38084
38646
  }
@@ -38089,6 +38651,171 @@ if (typeof __require !== "undefined" && typeof module !== "undefined" && __requi
38089
38651
  });
38090
38652
  }
38091
38653
 
38654
+ // src/uniswap/1-marketprice/getPositions.ts
38655
+ init_contract();
38656
+ async function getUserPositions(wallet2, userAddress) {
38657
+ const liqPool = await getContract(wallet2, "LiquidPool");
38658
+ const targetAddress = userAddress || await wallet2.getAddress();
38659
+ console.log(`[SDK] Fetching liquidity NFT positions for address: ${targetAddress}`);
38660
+ try {
38661
+ const positions = await liqPool.getPosition(targetAddress);
38662
+ const formattedPositions = positions.map((pos) => {
38663
+ return {
38664
+ tokenId: pos.tokenId.toNumber(),
38665
+ // tick is int24, so it should fit standard JS number
38666
+ tickLower: pos.tickLower,
38667
+ tickUpper: pos.tickUpper,
38668
+ // liquidity is int256, keep as string to prevent JS precision loss
38669
+ liquidity: pos.liquidity.toString()
38670
+ };
38671
+ });
38672
+ console.log(`[SDK] Found ${formattedPositions.length} position(s).`);
38673
+ return formattedPositions;
38674
+ } catch (error) {
38675
+ console.error(`[SDK] Failed to fetch user positions: `, error);
38676
+ throw error;
38677
+ }
38678
+ }
38679
+
38680
+ // src/uniswap/3-dynamicfee/dynamicfee.ts
38681
+ init_lib49();
38682
+ var provider = new ethers_exports.providers.JsonRpcProvider("http://localhost:8545");
38683
+ var wallet = new ethers_exports.Wallet("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", provider);
38684
+ async function isdepolyed(address) {
38685
+ let code = await provider.getCode(address);
38686
+ if (code !== "0x") {
38687
+ console.log(`The contract ${address} has been deployed.`);
38688
+ } else {
38689
+ console.log(`The contract ${address} has not been deployed. `);
38690
+ }
38691
+ }
38692
+ async function modifyPosition2(contract, poolKey, modifyPositionParams) {
38693
+ let tx = await contract.setPositionParameters(poolKey, modifyPositionParams);
38694
+ await tx.wait();
38695
+ console.log("Position parameters set successfully");
38696
+ tx = await contract.addLiquidity();
38697
+ await tx.wait();
38698
+ }
38699
+ async function initialize(contract, key3, sqrtPriceX96) {
38700
+ let tick = await contract.initialize(key3, sqrtPriceX96);
38701
+ console.log(`Returned tick: ${JSON.stringify(tick)}`);
38702
+ }
38703
+ async function approveERC202(contract, toAddress, amount) {
38704
+ let tx = await contract.approve(toAddress, amount);
38705
+ let receipt = await tx.wait();
38706
+ console.log(`Transaction hash: ${receipt.transactionHash}`);
38707
+ }
38708
+ async function getERC20Balance2(contract, address) {
38709
+ let balance = await contract.balanceOf(address);
38710
+ console.log(`ERC20 Balance: ${balance.toString()}`);
38711
+ return balance;
38712
+ }
38713
+ async function executeSwap2(contract, poolKey, swapParams) {
38714
+ console.log("begin swap");
38715
+ let to0params = {
38716
+ tickLower: 84e4,
38717
+ // lower price 0.5
38718
+ tickUpper: 876600,
38719
+ // upper price 1.5
38720
+ liquidityDelta: 0
38721
+ };
38722
+ let tx1 = await contract.setPositionParameters(poolKey, to0params);
38723
+ await tx1.wait();
38724
+ let tx2 = await contract.setSwapParameters(poolKey, swapParams);
38725
+ console.log("begin swap1");
38726
+ await tx2.wait();
38727
+ console.log("Position parameters set successfully");
38728
+ let tx3 = await contract.executeSwap();
38729
+ await tx3.wait();
38730
+ }
38731
+ async function depolyContract(contractName, params) {
38732
+ const Factory = await ethers_exports.getContractFactory(contractName);
38733
+ let contract;
38734
+ if (params === void 0) {
38735
+ contract = await Factory.deploy();
38736
+ } else {
38737
+ console.log(`params: ${JSON.stringify(params)}`);
38738
+ contract = await Factory.deploy(params);
38739
+ }
38740
+ await contract.deployed();
38741
+ console.log(`${contractName} deployed to ${contract.address}`);
38742
+ return contract;
38743
+ }
38744
+ describe("PoolManager", function() {
38745
+ it("Should return the new greeting once it's changed", async function() {
38746
+ const token0 = await depolyContract("Token0");
38747
+ const token1 = await depolyContract("Token1");
38748
+ const totalSupply0 = await token0.totalSupply();
38749
+ console.log(`Token0 deployed to ${token0.address} with an initial supply ${totalSupply0}`);
38750
+ const totalSupply1 = await token1.totalSupply();
38751
+ console.log(`Token1 deployed to ${token1.address} with an initial supply ${totalSupply1}`);
38752
+ getERC20Balance2(token0, wallet.address);
38753
+ getERC20Balance2(token1, wallet.address);
38754
+ const token0Address = token0.address < token1.address ? token0.address : token1.address;
38755
+ const token1Address = token0.address > token1.address ? token0.address : token1.address;
38756
+ const poolManager = await depolyContract("PoolManager", 88888888888);
38757
+ const poolManagerAddress = poolManager.address;
38758
+ await isdepolyed(poolManagerAddress);
38759
+ const dynamicFee = await depolyContract("DynamicFee", poolManagerAddress);
38760
+ console.log("LimitOrder Contract deployed to:", dynamicFee.address);
38761
+ let sqrtPriceX96 = BigInt("792281625142643375935439503360");
38762
+ const DYNAMIC_FEE_FLAG2 = 8388608;
38763
+ let poolKey = {
38764
+ currency0: token0Address,
38765
+ currency1: token1Address,
38766
+ fee: DYNAMIC_FEE_FLAG2,
38767
+ tickSpacing: 60,
38768
+ hooks: dynamicFee.address
38769
+ };
38770
+ await initialize(poolManager, poolKey, sqrtPriceX96);
38771
+ const MyLiquidityProvider = await depolyContract("MyLiquidityProvider", poolManagerAddress);
38772
+ const wei = ethers_exports.utils.parseUnits("21000000", 18).toBigInt();
38773
+ await approveERC202(token0, MyLiquidityProvider.address, wei);
38774
+ await approveERC202(token1, MyLiquidityProvider.address, wei);
38775
+ let modifyPositionParams = {
38776
+ tickLower: 45e3,
38777
+ // lower price 90
38778
+ tickUpper: 46980,
38779
+ // upper price 110
38780
+ //liquidityDelta: 194868329805051412324060
38781
+ liquidityDelta: BigInt("10000000000000000000000")
38782
+ // 10000token0 10000token1
38783
+ };
38784
+ await getERC20Balance2(token0, wallet.address);
38785
+ await getERC20Balance2(token1, wallet.address);
38786
+ await modifyPosition2(MyLiquidityProvider, poolKey, modifyPositionParams);
38787
+ console.log("Liquidity added successfully");
38788
+ await getERC20Balance2(token0, wallet.address);
38789
+ await getERC20Balance2(token1, wallet.address);
38790
+ let sqrtpricelimit = ethers_exports.BigNumber.from("7922816251426433759354395033600").toBigInt();
38791
+ let amountswap = ethers_exports.BigNumber.from("1083456789101112134000").toBigInt();
38792
+ console.log("amountswap:", amountswap.toString());
38793
+ let swapParams = {
38794
+ zeroForOne: false,
38795
+ amountSpecified: amountswap,
38796
+ sqrtPriceLimitX96: sqrtpricelimit
38797
+ };
38798
+ let token0beforswap = await getERC20Balance2(token0, wallet.address);
38799
+ let token1beforswap = await getERC20Balance2(token1, wallet.address);
38800
+ await executeSwap2(MyLiquidityProvider, poolKey, swapParams);
38801
+ console.log("swap successfully");
38802
+ let token0afterswap = await getERC20Balance2(token0, wallet.address);
38803
+ let token1afterswap = await getERC20Balance2(token1, wallet.address);
38804
+ console.log("token0 change:", token0afterswap.sub(token0beforswap).toString());
38805
+ console.log("token1 change:", token1afterswap.sub(token1beforswap).toString());
38806
+ console.log("price:", token1afterswap.sub(token1beforswap).toString() / token0afterswap.sub(token0beforswap).toString());
38807
+ token0beforswap = await getERC20Balance2(token0, wallet.address);
38808
+ token1beforswap = await getERC20Balance2(token1, wallet.address);
38809
+ await executeSwap2(MyLiquidityProvider, poolKey, swapParams);
38810
+ console.log("swap successfully");
38811
+ token0afterswap = await getERC20Balance2(token0, wallet.address);
38812
+ token1afterswap = await getERC20Balance2(token1, wallet.address);
38813
+ console.log("token0 change:", token0afterswap.sub(token0beforswap).toString());
38814
+ console.log("token1 change:", token1afterswap.sub(token1beforswap).toString());
38815
+ console.log("price:", token1afterswap.sub(token1beforswap).toString() / token0afterswap.sub(token0beforswap).toString());
38816
+ });
38817
+ });
38818
+
38092
38819
  // src/index.ts
38093
38820
  __reExport(index_exports, __toESM(require_place()));
38094
38821
  init_contract();
@@ -38301,8 +39028,8 @@ async function createVoucher(contractAddress, signer, name, conversionRate) {
38301
39028
  const contract = getVoucherContract(contractAddress, signer);
38302
39029
  return contract.createVoucher(name, conversionRate);
38303
39030
  }
38304
- async function getVoucherInfo(contractAddress, provider, name) {
38305
- const contract = getVoucherContract(contractAddress, provider);
39031
+ async function getVoucherInfo(contractAddress, provider2, name) {
39032
+ const contract = getVoucherContract(contractAddress, provider2);
38306
39033
  return contract.getVoucherInfo(name);
38307
39034
  }
38308
39035
  async function buyVoucher(contractAddress, signer, name, valueWei) {
@@ -38317,12 +39044,12 @@ async function useVoucher(contractAddress, signer, name, amount) {
38317
39044
  const contract = getVoucherContract(contractAddress, signer);
38318
39045
  return contract.use(name, amount);
38319
39046
  }
38320
- async function balanceOf(contractAddress, provider, name, user) {
38321
- const contract = getVoucherContract(contractAddress, provider);
39047
+ async function balanceOf(contractAddress, provider2, name, user) {
39048
+ const contract = getVoucherContract(contractAddress, provider2);
38322
39049
  return contract.balanceOf(name, user);
38323
39050
  }
38324
- async function getAllVouchers(contractAddress, provider) {
38325
- const contract = getVoucherContract(contractAddress, provider);
39051
+ async function getAllVouchers(contractAddress, provider2) {
39052
+ const contract = getVoucherContract(contractAddress, provider2);
38326
39053
  return contract.getAllVouchers();
38327
39054
  }
38328
39055
  function buildUseVoucherPrefix(voucherNameBytes32) {
@@ -38378,6 +39105,7 @@ export {
38378
39105
  getPoolSqrtPrice,
38379
39106
  getProvider,
38380
39107
  getSqrtPriceAtTick,
39108
+ getUserPositions,
38381
39109
  getVoucherContract,
38382
39110
  getVoucherInfo,
38383
39111
  liquidity0,