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