@imtbl/sdk 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import globalAxios$1 from 'axios';
1
+ import globalAxios$1, { HttpStatusCode as HttpStatusCode$2 } from 'axios';
2
2
  import { ImmutableX, Config, IMXError, createStarkSigner, generateLegacyStarkPrivateKey, TransfersApi, OrdersApi as OrdersApi$1, UsersApi, Contracts, TradesApi, ExchangesApi, WithdrawalsApi, MintsApi, DepositsApi, EncodingApi, TokensApi as TokensApi$1 } from '@imtbl/core-sdk';
3
3
  import { UserManager } from 'oidc-client-ts';
4
4
  import jwt_decode from 'jwt-decode';
@@ -17,7 +17,7 @@ import { Seaport as Seaport$1 } from '@opensea/seaport-js';
17
17
  import { parseUnits } from '@ethersproject/units';
18
18
  import { BigNumber as BigNumber$2 } from '@ethersproject/bignumber';
19
19
  import detectEthereumProvider from '@metamask/detect-provider';
20
- import { TradeType, Token, Percent, CurrencyAmount } from '@uniswap/sdk-core';
20
+ import { TradeType, Token, CurrencyAmount, Percent } from '@uniswap/sdk-core';
21
21
  import assert from 'assert';
22
22
  import { FeeAmount, Route, SwapQuoter, Pool, Trade, toHex as toHex$1, encodeRouteToPath } from '@uniswap/v3-sdk';
23
23
  import { keccak256 as keccak256$1 } from '@ethersproject/solidity';
@@ -718,6 +718,47 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
718
718
  options: localVarRequestOptions,
719
719
  };
720
720
  },
721
+ /**
722
+ * List collections by NFT owner account address
723
+ * @summary List collections by NFT owner
724
+ * @param {string} accountAddress Account address
725
+ * @param {string} chainName The name of chain
726
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
727
+ * @param {number} [pageSize] Maximum number of items to return
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ */
731
+ listCollectionsByNFTOwner: async (accountAddress, chainName, pageCursor, pageSize, options = {}) => {
732
+ // verify required parameter 'accountAddress' is not null or undefined
733
+ assertParamExists$1('listCollectionsByNFTOwner', 'accountAddress', accountAddress);
734
+ // verify required parameter 'chainName' is not null or undefined
735
+ assertParamExists$1('listCollectionsByNFTOwner', 'chainName', chainName);
736
+ const localVarPath = `/v1/chains/{chain_name}/accounts/{account_address}/collections`
737
+ .replace(`{${"account_address"}}`, encodeURIComponent(String(accountAddress)))
738
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
739
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
740
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
741
+ let baseOptions;
742
+ if (configuration) {
743
+ baseOptions = configuration.baseOptions;
744
+ }
745
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
746
+ const localVarHeaderParameter = {};
747
+ const localVarQueryParameter = {};
748
+ if (pageCursor !== undefined) {
749
+ localVarQueryParameter['page_cursor'] = pageCursor;
750
+ }
751
+ if (pageSize !== undefined) {
752
+ localVarQueryParameter['page_size'] = pageSize;
753
+ }
754
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
755
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
756
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
757
+ return {
758
+ url: toPathString$1(localVarUrlObj),
759
+ options: localVarRequestOptions,
760
+ };
761
+ },
721
762
  };
722
763
  };
723
764
  /**
@@ -752,6 +793,20 @@ const CollectionsApiFp = function (configuration) {
752
793
  const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, pageCursor, pageSize, options);
753
794
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
754
795
  },
796
+ /**
797
+ * List collections by NFT owner account address
798
+ * @summary List collections by NFT owner
799
+ * @param {string} accountAddress Account address
800
+ * @param {string} chainName The name of chain
801
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
802
+ * @param {number} [pageSize] Maximum number of items to return
803
+ * @param {*} [options] Override http request option.
804
+ * @throws {RequiredError}
805
+ */
806
+ async listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
807
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options);
808
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
809
+ },
755
810
  };
756
811
  };
757
812
  /**
@@ -784,6 +839,19 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
784
839
  listCollections(chainName, pageCursor, pageSize, options) {
785
840
  return localVarFp.listCollections(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
786
841
  },
842
+ /**
843
+ * List collections by NFT owner account address
844
+ * @summary List collections by NFT owner
845
+ * @param {string} accountAddress Account address
846
+ * @param {string} chainName The name of chain
847
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
848
+ * @param {number} [pageSize] Maximum number of items to return
849
+ * @param {*} [options] Override http request option.
850
+ * @throws {RequiredError}
851
+ */
852
+ listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
853
+ return localVarFp.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
854
+ },
787
855
  };
788
856
  };
789
857
  /**
@@ -815,6 +883,17 @@ class CollectionsApi extends BaseAPI$1 {
815
883
  listCollections(requestParameters, options) {
816
884
  return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
817
885
  }
886
+ /**
887
+ * List collections by NFT owner account address
888
+ * @summary List collections by NFT owner
889
+ * @param {CollectionsApiListCollectionsByNFTOwnerRequest} requestParameters Request parameters.
890
+ * @param {*} [options] Override http request option.
891
+ * @throws {RequiredError}
892
+ * @memberof CollectionsApi
893
+ */
894
+ listCollectionsByNFTOwner(requestParameters, options) {
895
+ return CollectionsApiFp(this.configuration).listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
896
+ }
818
897
  }
819
898
 
820
899
  /* tslint:disable */
@@ -1292,16 +1371,16 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1292
1371
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1293
1372
  * @summary Retrieve fulfillment data for orders
1294
1373
  * @param {string} chainName
1295
- * @param {Array<FulfillmentDataRequestInner>} fulfillmentDataRequestInner
1374
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1296
1375
  * @param {*} [options] Override http request option.
1297
1376
  * @throws {RequiredError}
1298
1377
  */
1299
- fulfillmentData: async (chainName, fulfillmentDataRequestInner, options = {}) => {
1378
+ fulfillmentData: async (chainName, fulfillmentDataRequest, options = {}) => {
1300
1379
  // verify required parameter 'chainName' is not null or undefined
1301
1380
  assertParamExists$1('fulfillmentData', 'chainName', chainName);
1302
- // verify required parameter 'fulfillmentDataRequestInner' is not null or undefined
1303
- assertParamExists$1('fulfillmentData', 'fulfillmentDataRequestInner', fulfillmentDataRequestInner);
1304
- const localVarPath = `/v1/chains/{chain_name}/orders/fulfillment_data`
1381
+ // verify required parameter 'fulfillmentDataRequest' is not null or undefined
1382
+ assertParamExists$1('fulfillmentData', 'fulfillmentDataRequest', fulfillmentDataRequest);
1383
+ const localVarPath = `/v1/chains/{chain_name}/orders/fulfillment-data`
1305
1384
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1306
1385
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1307
1386
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
@@ -1316,7 +1395,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1316
1395
  setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1317
1396
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1318
1397
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1319
- localVarRequestOptions.data = serializeDataIfNeeded$1(fulfillmentDataRequestInner, localVarRequestOptions, configuration);
1398
+ localVarRequestOptions.data = serializeDataIfNeeded$1(fulfillmentDataRequest, localVarRequestOptions, configuration);
1320
1399
  return {
1321
1400
  url: toPathString$1(localVarUrlObj),
1322
1401
  options: localVarRequestOptions,
@@ -1355,6 +1434,39 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1355
1434
  options: localVarRequestOptions,
1356
1435
  };
1357
1436
  },
1437
+ /**
1438
+ * Get a single trade by ID
1439
+ * @summary Get a single trade by ID
1440
+ * @param {string} chainName
1441
+ * @param {string} tradeId Global Trade identifier
1442
+ * @param {*} [options] Override http request option.
1443
+ * @throws {RequiredError}
1444
+ */
1445
+ getTrade: async (chainName, tradeId, options = {}) => {
1446
+ // verify required parameter 'chainName' is not null or undefined
1447
+ assertParamExists$1('getTrade', 'chainName', chainName);
1448
+ // verify required parameter 'tradeId' is not null or undefined
1449
+ assertParamExists$1('getTrade', 'tradeId', tradeId);
1450
+ const localVarPath = `/v1/chains/{chain_name}/trades/{trade_id}`
1451
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
1452
+ .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId)));
1453
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1454
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1455
+ let baseOptions;
1456
+ if (configuration) {
1457
+ baseOptions = configuration.baseOptions;
1458
+ }
1459
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1460
+ const localVarHeaderParameter = {};
1461
+ const localVarQueryParameter = {};
1462
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1463
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1464
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1465
+ return {
1466
+ url: toPathString$1(localVarUrlObj),
1467
+ options: localVarRequestOptions,
1468
+ };
1469
+ },
1358
1470
  /**
1359
1471
  * List all listings
1360
1472
  * @summary List all listings
@@ -1416,6 +1528,55 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1416
1528
  options: localVarRequestOptions,
1417
1529
  };
1418
1530
  },
1531
+ /**
1532
+ * List all trades
1533
+ * @summary List all trades
1534
+ * @param {string} chainName
1535
+ * @param {string} [accountAddress]
1536
+ * @param {number} [pageSize] Maximum number of trades to return per page
1537
+ * @param {'created_at'} [sortBy] Trade field to sort by
1538
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
1539
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
1540
+ * @param {*} [options] Override http request option.
1541
+ * @throws {RequiredError}
1542
+ */
1543
+ listTrades: async (chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1544
+ // verify required parameter 'chainName' is not null or undefined
1545
+ assertParamExists$1('listTrades', 'chainName', chainName);
1546
+ const localVarPath = `/v1/chains/{chain_name}/trades`
1547
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1548
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1549
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1550
+ let baseOptions;
1551
+ if (configuration) {
1552
+ baseOptions = configuration.baseOptions;
1553
+ }
1554
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1555
+ const localVarHeaderParameter = {};
1556
+ const localVarQueryParameter = {};
1557
+ if (accountAddress !== undefined) {
1558
+ localVarQueryParameter['account_address'] = accountAddress;
1559
+ }
1560
+ if (pageSize !== undefined) {
1561
+ localVarQueryParameter['page_size'] = pageSize;
1562
+ }
1563
+ if (sortBy !== undefined) {
1564
+ localVarQueryParameter['sort_by'] = sortBy;
1565
+ }
1566
+ if (sortDirection !== undefined) {
1567
+ localVarQueryParameter['sort_direction'] = sortDirection;
1568
+ }
1569
+ if (pageCursor !== undefined) {
1570
+ localVarQueryParameter['page_cursor'] = pageCursor;
1571
+ }
1572
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1573
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1574
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1575
+ return {
1576
+ url: toPathString$1(localVarUrlObj),
1577
+ options: localVarRequestOptions,
1578
+ };
1579
+ },
1419
1580
  };
1420
1581
  };
1421
1582
  /**
@@ -1441,12 +1602,12 @@ const OrdersApiFp = function (configuration) {
1441
1602
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1442
1603
  * @summary Retrieve fulfillment data for orders
1443
1604
  * @param {string} chainName
1444
- * @param {Array<FulfillmentDataRequestInner>} fulfillmentDataRequestInner
1605
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1445
1606
  * @param {*} [options] Override http request option.
1446
1607
  * @throws {RequiredError}
1447
1608
  */
1448
- async fulfillmentData(chainName, fulfillmentDataRequestInner, options) {
1449
- const localVarAxiosArgs = await localVarAxiosParamCreator.fulfillmentData(chainName, fulfillmentDataRequestInner, options);
1609
+ async fulfillmentData(chainName, fulfillmentDataRequest, options) {
1610
+ const localVarAxiosArgs = await localVarAxiosParamCreator.fulfillmentData(chainName, fulfillmentDataRequest, options);
1450
1611
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1451
1612
  },
1452
1613
  /**
@@ -1461,6 +1622,18 @@ const OrdersApiFp = function (configuration) {
1461
1622
  const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
1462
1623
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1463
1624
  },
1625
+ /**
1626
+ * Get a single trade by ID
1627
+ * @summary Get a single trade by ID
1628
+ * @param {string} chainName
1629
+ * @param {string} tradeId Global Trade identifier
1630
+ * @param {*} [options] Override http request option.
1631
+ * @throws {RequiredError}
1632
+ */
1633
+ async getTrade(chainName, tradeId, options) {
1634
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTrade(chainName, tradeId, options);
1635
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1636
+ },
1464
1637
  /**
1465
1638
  * List all listings
1466
1639
  * @summary List all listings
@@ -1480,6 +1653,22 @@ const OrdersApiFp = function (configuration) {
1480
1653
  const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
1481
1654
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1482
1655
  },
1656
+ /**
1657
+ * List all trades
1658
+ * @summary List all trades
1659
+ * @param {string} chainName
1660
+ * @param {string} [accountAddress]
1661
+ * @param {number} [pageSize] Maximum number of trades to return per page
1662
+ * @param {'created_at'} [sortBy] Trade field to sort by
1663
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
1664
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
1665
+ * @param {*} [options] Override http request option.
1666
+ * @throws {RequiredError}
1667
+ */
1668
+ async listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
1669
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options);
1670
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1671
+ },
1483
1672
  };
1484
1673
  };
1485
1674
  /**
@@ -1504,12 +1693,12 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1504
1693
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1505
1694
  * @summary Retrieve fulfillment data for orders
1506
1695
  * @param {string} chainName
1507
- * @param {Array<FulfillmentDataRequestInner>} fulfillmentDataRequestInner
1696
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1508
1697
  * @param {*} [options] Override http request option.
1509
1698
  * @throws {RequiredError}
1510
1699
  */
1511
- fulfillmentData(chainName, fulfillmentDataRequestInner, options) {
1512
- return localVarFp.fulfillmentData(chainName, fulfillmentDataRequestInner, options).then((request) => request(axios, basePath));
1700
+ fulfillmentData(chainName, fulfillmentDataRequest, options) {
1701
+ return localVarFp.fulfillmentData(chainName, fulfillmentDataRequest, options).then((request) => request(axios, basePath));
1513
1702
  },
1514
1703
  /**
1515
1704
  * Get a single listing by ID
@@ -1522,6 +1711,17 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1522
1711
  getListing(chainName, listingId, options) {
1523
1712
  return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
1524
1713
  },
1714
+ /**
1715
+ * Get a single trade by ID
1716
+ * @summary Get a single trade by ID
1717
+ * @param {string} chainName
1718
+ * @param {string} tradeId Global Trade identifier
1719
+ * @param {*} [options] Override http request option.
1720
+ * @throws {RequiredError}
1721
+ */
1722
+ getTrade(chainName, tradeId, options) {
1723
+ return localVarFp.getTrade(chainName, tradeId, options).then((request) => request(axios, basePath));
1724
+ },
1525
1725
  /**
1526
1726
  * List all listings
1527
1727
  * @summary List all listings
@@ -1540,6 +1740,21 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1540
1740
  listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1541
1741
  return localVarFp.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1542
1742
  },
1743
+ /**
1744
+ * List all trades
1745
+ * @summary List all trades
1746
+ * @param {string} chainName
1747
+ * @param {string} [accountAddress]
1748
+ * @param {number} [pageSize] Maximum number of trades to return per page
1749
+ * @param {'created_at'} [sortBy] Trade field to sort by
1750
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
1751
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
1752
+ * @param {*} [options] Override http request option.
1753
+ * @throws {RequiredError}
1754
+ */
1755
+ listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
1756
+ return localVarFp.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1757
+ },
1543
1758
  };
1544
1759
  };
1545
1760
  /**
@@ -1569,7 +1784,7 @@ class OrdersApi extends BaseAPI$1 {
1569
1784
  * @memberof OrdersApi
1570
1785
  */
1571
1786
  fulfillmentData(requestParameters, options) {
1572
- return OrdersApiFp(this.configuration).fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequestInner, options).then((request) => request(this.axios, this.basePath));
1787
+ return OrdersApiFp(this.configuration).fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequest, options).then((request) => request(this.axios, this.basePath));
1573
1788
  }
1574
1789
  /**
1575
1790
  * Get a single listing by ID
@@ -1582,6 +1797,17 @@ class OrdersApi extends BaseAPI$1 {
1582
1797
  getListing(requestParameters, options) {
1583
1798
  return OrdersApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
1584
1799
  }
1800
+ /**
1801
+ * Get a single trade by ID
1802
+ * @summary Get a single trade by ID
1803
+ * @param {OrdersApiGetTradeRequest} requestParameters Request parameters.
1804
+ * @param {*} [options] Override http request option.
1805
+ * @throws {RequiredError}
1806
+ * @memberof OrdersApi
1807
+ */
1808
+ getTrade(requestParameters, options) {
1809
+ return OrdersApiFp(this.configuration).getTrade(requestParameters.chainName, requestParameters.tradeId, options).then((request) => request(this.axios, this.basePath));
1810
+ }
1585
1811
  /**
1586
1812
  * List all listings
1587
1813
  * @summary List all listings
@@ -1593,6 +1819,17 @@ class OrdersApi extends BaseAPI$1 {
1593
1819
  listListings(requestParameters, options) {
1594
1820
  return OrdersApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.buyItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1595
1821
  }
1822
+ /**
1823
+ * List all trades
1824
+ * @summary List all trades
1825
+ * @param {OrdersApiListTradesRequest} requestParameters Request parameters.
1826
+ * @param {*} [options] Override http request option.
1827
+ * @throws {RequiredError}
1828
+ * @memberof OrdersApi
1829
+ */
1830
+ listTrades(requestParameters, options) {
1831
+ return OrdersApiFp(this.configuration).listTrades(requestParameters.chainName, requestParameters.accountAddress, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
1832
+ }
1596
1833
  }
1597
1834
 
1598
1835
  /* tslint:disable */
@@ -1647,6 +1884,38 @@ const PassportApiAxiosParamCreator = function (configuration) {
1647
1884
  options: localVarRequestOptions,
1648
1885
  };
1649
1886
  },
1887
+ /**
1888
+ * Get all the Ethereum linked addresses for a user based on its userId
1889
+ * @summary Get Ethereum linked addresses for a user
1890
+ * @param {string} userId The user\&#39;s userId
1891
+ * @param {*} [options] Override http request option.
1892
+ * @throws {RequiredError}
1893
+ */
1894
+ getLinkedAddresses: async (userId, options = {}) => {
1895
+ // verify required parameter 'userId' is not null or undefined
1896
+ assertParamExists$1('getLinkedAddresses', 'userId', userId);
1897
+ const localVarPath = `/passport-mr/v1/users/{userId}/linked-addresses`
1898
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
1899
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1900
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1901
+ let baseOptions;
1902
+ if (configuration) {
1903
+ baseOptions = configuration.baseOptions;
1904
+ }
1905
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1906
+ const localVarHeaderParameter = {};
1907
+ const localVarQueryParameter = {};
1908
+ // authentication BearerAuth required
1909
+ // http bearer authentication required
1910
+ await setBearerAuthToObject$1(localVarHeaderParameter, configuration);
1911
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1912
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1913
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1914
+ return {
1915
+ url: toPathString$1(localVarUrlObj),
1916
+ options: localVarRequestOptions,
1917
+ };
1918
+ },
1650
1919
  };
1651
1920
  };
1652
1921
  /**
@@ -1667,6 +1936,17 @@ const PassportApiFp = function (configuration) {
1667
1936
  const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddress(createCounterfactualAddressRequest, options);
1668
1937
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1669
1938
  },
1939
+ /**
1940
+ * Get all the Ethereum linked addresses for a user based on its userId
1941
+ * @summary Get Ethereum linked addresses for a user
1942
+ * @param {string} userId The user\&#39;s userId
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ */
1946
+ async getLinkedAddresses(userId, options) {
1947
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedAddresses(userId, options);
1948
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1949
+ },
1670
1950
  };
1671
1951
  };
1672
1952
  /**
@@ -1686,6 +1966,16 @@ const PassportApiFactory = function (configuration, basePath, axios) {
1686
1966
  createCounterfactualAddress(createCounterfactualAddressRequest, options) {
1687
1967
  return localVarFp.createCounterfactualAddress(createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
1688
1968
  },
1969
+ /**
1970
+ * Get all the Ethereum linked addresses for a user based on its userId
1971
+ * @summary Get Ethereum linked addresses for a user
1972
+ * @param {string} userId The user\&#39;s userId
1973
+ * @param {*} [options] Override http request option.
1974
+ * @throws {RequiredError}
1975
+ */
1976
+ getLinkedAddresses(userId, options) {
1977
+ return localVarFp.getLinkedAddresses(userId, options).then((request) => request(axios, basePath));
1978
+ },
1689
1979
  };
1690
1980
  };
1691
1981
  /**
@@ -1706,6 +1996,17 @@ class PassportApi extends BaseAPI$1 {
1706
1996
  createCounterfactualAddress(requestParameters, options) {
1707
1997
  return PassportApiFp(this.configuration).createCounterfactualAddress(requestParameters.createCounterfactualAddressRequest, options).then((request) => request(this.axios, this.basePath));
1708
1998
  }
1999
+ /**
2000
+ * Get all the Ethereum linked addresses for a user based on its userId
2001
+ * @summary Get Ethereum linked addresses for a user
2002
+ * @param {PassportApiGetLinkedAddressesRequest} requestParameters Request parameters.
2003
+ * @param {*} [options] Override http request option.
2004
+ * @throws {RequiredError}
2005
+ * @memberof PassportApi
2006
+ */
2007
+ getLinkedAddresses(requestParameters, options) {
2008
+ return PassportApiFp(this.configuration).getLinkedAddresses(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
2009
+ }
1709
2010
  }
1710
2011
 
1711
2012
  /* tslint:disable */
@@ -2135,23 +2436,6 @@ const CollectionContractType = {
2135
2436
  Erc721: 'ERC721'
2136
2437
  };
2137
2438
 
2138
- /* tslint:disable */
2139
- /* eslint-disable */
2140
- /**
2141
- * Immutable zkEVM API
2142
- * Immutable Multi Rollup API
2143
- *
2144
- * The version of the OpenAPI document: 1.0.0
2145
- * Contact: support@immutable.com
2146
- *
2147
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2148
- * https://openapi-generator.tech
2149
- * Do not edit the class manually.
2150
- */
2151
- const CreateOrderProtocolDataOrderTypeEnum = {
2152
- FullRestricted: 'FULL_RESTRICTED'
2153
- };
2154
-
2155
2439
  /* tslint:disable */
2156
2440
  /* eslint-disable */
2157
2441
  /**
@@ -2200,7 +2484,10 @@ const ERC721ItemItemTypeEnum = {
2200
2484
  * Do not edit the class manually.
2201
2485
  */
2202
2486
  const FeeFeeTypeEnum = {
2203
- Royalty: 'ROYALTY'
2487
+ Royalty: 'ROYALTY',
2488
+ MakerMarketplace: 'MAKER_MARKETPLACE',
2489
+ TakerMarketplace: 'TAKER_MARKETPLACE',
2490
+ Protocol: 'PROTOCOL'
2204
2491
  };
2205
2492
 
2206
2493
  /* tslint:disable */
@@ -2269,6 +2556,23 @@ const OrderStatus$1 = {
2269
2556
  Expired: 'EXPIRED'
2270
2557
  };
2271
2558
 
2559
+ /* tslint:disable */
2560
+ /* eslint-disable */
2561
+ /**
2562
+ * Immutable zkEVM API
2563
+ * Immutable Multi Rollup API
2564
+ *
2565
+ * The version of the OpenAPI document: 1.0.0
2566
+ * Contact: support@immutable.com
2567
+ *
2568
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2569
+ * https://openapi-generator.tech
2570
+ * Do not edit the class manually.
2571
+ */
2572
+ const ProtocolDataOrderTypeEnum = {
2573
+ FullRestricted: 'FULL_RESTRICTED'
2574
+ };
2575
+
2272
2576
  /* tslint:disable */
2273
2577
  /* eslint-disable */
2274
2578
  /**
@@ -2345,7 +2649,6 @@ var index = /*#__PURE__*/Object.freeze({
2345
2649
  CollectionsApiFactory: CollectionsApiFactory,
2346
2650
  CollectionsApiFp: CollectionsApiFp,
2347
2651
  Configuration: Configuration$2,
2348
- CreateOrderProtocolDataOrderTypeEnum: CreateOrderProtocolDataOrderTypeEnum,
2349
2652
  ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
2350
2653
  ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
2351
2654
  FeeFeeTypeEnum: FeeFeeTypeEnum,
@@ -2368,6 +2671,7 @@ var index = /*#__PURE__*/Object.freeze({
2368
2671
  PassportApiAxiosParamCreator: PassportApiAxiosParamCreator,
2369
2672
  PassportApiFactory: PassportApiFactory,
2370
2673
  PassportApiFp: PassportApiFp,
2674
+ ProtocolDataOrderTypeEnum: ProtocolDataOrderTypeEnum,
2371
2675
  SaleFeeTypeEnum: SaleFeeTypeEnum,
2372
2676
  TokenContractType: TokenContractType,
2373
2677
  TokensApi: TokensApi,
@@ -2398,7 +2702,7 @@ class MultiRollupApiClients {
2398
2702
  }
2399
2703
 
2400
2704
  // eslint-disable-next-line @typescript-eslint/naming-convention
2401
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.0.0' };
2705
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.17.1' };
2402
2706
  const createConfig = ({ basePath, headers, }) => {
2403
2707
  if (!basePath.trim()) {
2404
2708
  throw Error('basePath can not be empty');
@@ -2458,7 +2762,7 @@ class APIError extends Error {
2458
2762
 
2459
2763
  /* eslint-disable implicit-arrow-linebreak */
2460
2764
  const defaultHeaders = {
2461
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.0.0',
2765
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.17.1',
2462
2766
  };
2463
2767
  /**
2464
2768
  * createAPIConfiguration to create a custom Configuration
@@ -2615,6 +2919,20 @@ class BlockchainData {
2615
2919
  throw formatError(err);
2616
2920
  });
2617
2921
  }
2922
+ /**
2923
+ * List collections by NFT owner
2924
+ * @param request - the request object containing the parameters to be provided in the API request
2925
+ * @returns a promise that resolves with a list of collections
2926
+ * @throws {@link index.APIError}
2927
+ */
2928
+ async listCollectionsByNFTOwner(request) {
2929
+ return await this.collections
2930
+ .listCollectionsByNFTOwner(request)
2931
+ .then((res) => res.data)
2932
+ .catch((err) => {
2933
+ throw formatError(err);
2934
+ });
2935
+ }
2618
2936
  /**
2619
2937
  * Get collection by contract address
2620
2938
  * @param request - the request object containing the parameters to be provided in the API request
@@ -2730,7 +3048,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2730
3048
  chainID,
2731
3049
  coreContractAddress,
2732
3050
  registrationContractAddress,
2733
- sdkVersion: 'ts-immutable-sdk-0.0.0',
3051
+ sdkVersion: 'ts-immutable-sdk-0.17.1',
2734
3052
  });
2735
3053
  /**
2736
3054
  * Sets `sdkVersion` at the time of build
@@ -8946,6 +9264,17 @@ class Passport {
8946
9264
  const user = await this.authManager.getUser();
8947
9265
  return user?.accessToken;
8948
9266
  }
9267
+ async getLinkedAddresses() {
9268
+ const user = await this.authManager.getUser();
9269
+ if (!user?.profile.sub) {
9270
+ return [];
9271
+ }
9272
+ const headers = { Authorization: `Bearer ${user.accessToken}` };
9273
+ const linkedAddressesResult = await this.multiRollupApiClients.passportApi.getLinkedAddresses({
9274
+ userId: user?.profile.sub,
9275
+ }, { headers });
9276
+ return linkedAddressesResult.data.linkedAddresses;
9277
+ }
8949
9278
  }
8950
9279
 
8951
9280
  var passport = /*#__PURE__*/Object.freeze({
@@ -9443,6 +9772,54 @@ class OrdersService {
9443
9772
  },
9444
9773
  });
9445
9774
  }
9775
+ /**
9776
+ * List all trades
9777
+ * List all trades
9778
+ * @returns ListTradeResult OK response.
9779
+ * @throws ApiError
9780
+ */
9781
+ listTrades({ chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, }) {
9782
+ return this.httpRequest.request({
9783
+ method: 'GET',
9784
+ url: '/v1/chains/{chain_name}/trades',
9785
+ path: {
9786
+ 'chain_name': chainName,
9787
+ },
9788
+ query: {
9789
+ 'account_address': accountAddress,
9790
+ 'page_size': pageSize,
9791
+ 'sort_by': sortBy,
9792
+ 'sort_direction': sortDirection,
9793
+ 'page_cursor': pageCursor,
9794
+ },
9795
+ errors: {
9796
+ 400: `Bad Request (400)`,
9797
+ 404: `The specified resource was not found (404)`,
9798
+ 500: `Internal Server Error (500)`,
9799
+ },
9800
+ });
9801
+ }
9802
+ /**
9803
+ * Get a single trade by ID
9804
+ * Get a single trade by ID
9805
+ * @returns TradeResult OK response.
9806
+ * @throws ApiError
9807
+ */
9808
+ getTrade({ chainName, tradeId, }) {
9809
+ return this.httpRequest.request({
9810
+ method: 'GET',
9811
+ url: '/v1/chains/{chain_name}/trades/{trade_id}',
9812
+ path: {
9813
+ 'chain_name': chainName,
9814
+ 'trade_id': tradeId,
9815
+ },
9816
+ errors: {
9817
+ 400: `Bad Request (400)`,
9818
+ 404: `The specified resource was not found (404)`,
9819
+ 500: `Internal Server Error (500)`,
9820
+ },
9821
+ });
9822
+ }
9446
9823
  }
9447
9824
 
9448
9825
  class OrderBookClient {
@@ -9579,6 +9956,57 @@ function mapFromOpenApiOrder(order) {
9579
9956
  updateTime: order.update_time,
9580
9957
  };
9581
9958
  }
9959
+ function mapFromOpenApiTrade(trade) {
9960
+ const buyItems = trade.buy.map((item) => {
9961
+ if (item.item_type === 'ERC20') {
9962
+ return {
9963
+ type: 'ERC20',
9964
+ contractAddress: item.contract_address,
9965
+ amount: item.start_amount,
9966
+ };
9967
+ }
9968
+ if (item.item_type === 'NATIVE') {
9969
+ return {
9970
+ type: 'NATIVE',
9971
+ amount: item.start_amount,
9972
+ };
9973
+ }
9974
+ throw new Error('Buy items must be either ERC20 or NATIVE');
9975
+ });
9976
+ const sellItems = trade.sell.map((item) => {
9977
+ if (item.item_type === 'ERC721') {
9978
+ return {
9979
+ type: 'ERC721',
9980
+ contractAddress: item.contract_address,
9981
+ tokenId: item.token_id,
9982
+ };
9983
+ }
9984
+ throw new Error('Sell items must ERC721');
9985
+ });
9986
+ return {
9987
+ id: trade.id,
9988
+ orderId: trade.order_id,
9989
+ buy: buyItems,
9990
+ sell: sellItems,
9991
+ buyerFees: trade.buyer_fees.map((fee) => ({
9992
+ amount: fee.amount,
9993
+ recipient: fee.recipient,
9994
+ type: fee.fee_type,
9995
+ })),
9996
+ chain: trade.chain,
9997
+ indexedAt: trade.indexed_at,
9998
+ blockchainMetadata: {
9999
+ blockNumber: trade.blockchain_metadata.block_number,
10000
+ logIndex: trade.blockchain_metadata.log_index,
10001
+ transactionHash: trade.blockchain_metadata.transaction_hash,
10002
+ transactionIndex: trade.blockchain_metadata.transaction_index,
10003
+ },
10004
+ buyerAddress: trade.buyer_address,
10005
+ makerAddress: trade.maker_address,
10006
+ sellerAddress: trade.seller_address,
10007
+ takerAddress: trade.taker_address,
10008
+ };
10009
+ }
9582
10010
  function mapFromOpenApiPage(page) {
9583
10011
  return {
9584
10012
  nextCursor: page.next_cursor,
@@ -9908,12 +10336,24 @@ class ImmutableApiClient {
9908
10336
  listingId,
9909
10337
  });
9910
10338
  }
10339
+ async getTrade(tradeId) {
10340
+ return this.orderbookService.getTrade({
10341
+ chainName: this.chainName,
10342
+ tradeId,
10343
+ });
10344
+ }
9911
10345
  async listListings(listOrderParams) {
9912
10346
  return this.orderbookService.listListings({
9913
10347
  chainName: this.chainName,
9914
10348
  ...listOrderParams,
9915
10349
  });
9916
10350
  }
10351
+ async listTrades(listTradesParams) {
10352
+ return this.orderbookService.listTrades({
10353
+ chainName: this.chainName,
10354
+ ...listTradesParams,
10355
+ });
10356
+ }
9917
10357
  async createListing({ orderHash, orderComponents, orderSignature, makerFee, }) {
9918
10358
  if (orderComponents.offer.length !== 1) {
9919
10359
  throw new Error('Only one item can be listed at a time');
@@ -10079,6 +10519,17 @@ class Orderbook {
10079
10519
  result: mapFromOpenApiOrder(apiListing.result),
10080
10520
  };
10081
10521
  }
10522
+ /**
10523
+ * Get a trade by ID
10524
+ * @param {string} tradeId - The tradeId to find.
10525
+ * @return {TradeResult} The returned order result.
10526
+ */
10527
+ async getTrade(tradeId) {
10528
+ const apiListing = await this.apiClient.getTrade(tradeId);
10529
+ return {
10530
+ result: mapFromOpenApiTrade(apiListing.result),
10531
+ };
10532
+ }
10082
10533
  /**
10083
10534
  * List orders. This method is used to get a list of orders filtered by conditions specified
10084
10535
  * in the params object.
@@ -10092,6 +10543,19 @@ class Orderbook {
10092
10543
  result: apiListings.result.map(mapFromOpenApiOrder),
10093
10544
  };
10094
10545
  }
10546
+ /**
10547
+ * List trades. This method is used to get a list of trades filtered by conditions specified
10548
+ * in the params object
10549
+ * @param {ListTradesParams} listTradesParams - Filtering, ordering and page parameters.
10550
+ * @return {ListTradesResult} The paged trades.
10551
+ */
10552
+ async listTrades(listTradesParams) {
10553
+ const apiListings = await this.apiClient.listTrades(listTradesParams);
10554
+ return {
10555
+ page: mapFromOpenApiPage(apiListings.page),
10556
+ result: apiListings.result.map(mapFromOpenApiTrade),
10557
+ };
10558
+ }
10095
10559
  /**
10096
10560
  * Get required transactions and messages for signing prior to creating a listing
10097
10561
  * through the createListing method
@@ -23729,38 +24193,6 @@ class AlreadyApprovedError extends ExchangeError {
23729
24193
  }
23730
24194
  }
23731
24195
 
23732
- /**
23733
- * Determines whether or not the chain supports EIP-1559 by checking for the existence
23734
- * of {@link FeeData.maxFeePerGas} and {@link FeeData.maxPriorityFeePerGas}
23735
- *
23736
- * @param {FeeData} fee - The fee data for the chain
23737
- */
23738
- const doesChainSupportEIP1559 = (fee) => {
23739
- const supportsEIP1559 = !!fee.maxFeePerGas && !!fee.maxPriorityFeePerGas;
23740
- return supportsEIP1559;
23741
- };
23742
- /**
23743
- * Fetch the current gas price estimate. Supports both EIP-1559 and non-EIP1559 chains
23744
- * @param {JsonRpcProvider} provider - The JSON RPC provider used to fetch fee data
23745
- * @returns {BigNumber | null} - The gas price in the smallest denomination of the chain's currency,
23746
- * or null if no gas price is available
23747
- */
23748
- const fetchGasPrice = async (provider) => {
23749
- const feeData = await provider.getFeeData().catch(() => null);
23750
- if (!feeData) {
23751
- return null;
23752
- }
23753
- return doesChainSupportEIP1559(feeData) ? feeData.maxFeePerGas.add(feeData.maxPriorityFeePerGas) : feeData.gasPrice;
23754
- };
23755
- /**
23756
- * Calculate the gas fee from the gas price and gas units used for the transaction
23757
- *
23758
- * @param {BigNumber} gasPriceInWei - The price of gas in wei
23759
- * @param {BigNumber} gasUsed - The total gas units that will be used for the transaction
23760
- * @returns - The cost of the transaction in the gas token's smallest denomination (e.g. WEI)
23761
- */
23762
- const calculateGasFee = (gasPriceInWei, gasUsed) => gasUsed.mul(gasPriceInWei);
23763
-
23764
24196
  /* Autogenerated file. Do not edit manually. */
23765
24197
  /* tslint:disable */
23766
24198
  /* eslint-disable */
@@ -23996,179 +24428,6 @@ let ERC20__factory$1 = class ERC20__factory {
23996
24428
  }
23997
24429
  };
23998
24430
 
23999
- /**
24000
- * Get the amount of an ERC20 token that needs to be approved by
24001
- * checking the existing allowance for the spender
24002
- *
24003
- * @param provider - The provider to use for the call
24004
- * @param ownerAddress - The address of the owner of the token
24005
- * @param tokenAmount - The amount of the token to approve
24006
- * @param spenderAddress - The address of the spender
24007
- * @returns - The amount of the token that needs to be approved
24008
- */
24009
- const getERC20AmountToApprove = async (provider, ownerAddress, tokenAddress, tokenAmount, spenderAddress) => {
24010
- // create an instance of the ERC20 token contract
24011
- const erc20Contract = ERC20__factory$1.connect(tokenAddress, provider);
24012
- // get the allowance for the token spender
24013
- // minimum is 0 - no allowance
24014
- let allowance;
24015
- try {
24016
- allowance = await erc20Contract.allowance(ownerAddress, spenderAddress);
24017
- }
24018
- catch (e) {
24019
- const message = e instanceof Error ? e.message : 'Unknown Error';
24020
- throw new ApproveError(`failed to get allowance: ${message}`);
24021
- }
24022
- // get the amount that needs to be approved
24023
- const requiredAmount = BigNumber$2.from(tokenAmount).sub(allowance);
24024
- if (requiredAmount.isNegative() || requiredAmount.isZero()) {
24025
- throw new AlreadyApprovedError(tokenAmount.toString(), tokenAddress, spenderAddress);
24026
- }
24027
- return requiredAmount;
24028
- };
24029
- /**
24030
- * Get an unsigned ERC20 approve transaction
24031
- *
24032
- * @param ownerAddress - The address of the owner of the token
24033
- * @param tokenAmount - The amount of the token to approve
24034
- * @param spenderAddress - The address of the spender
24035
- * @returns - The unsigned ERC20 approve transaction
24036
- */
24037
- const getUnsignedERC20ApproveTransaction = (ownerAddress, tokenAddress, tokenAmount, spenderAddress) => {
24038
- if (ownerAddress === spenderAddress) {
24039
- throw new ApproveError('owner and spender addresses are the same');
24040
- }
24041
- const erc20Contract = ERC20__factory$1.createInterface();
24042
- const callData = erc20Contract.encodeFunctionData('approve', [spenderAddress, tokenAmount]);
24043
- return {
24044
- data: callData,
24045
- to: tokenAddress,
24046
- value: 0,
24047
- from: ownerAddress,
24048
- };
24049
- };
24050
- const prepareApproval = (tradeType, amountSpecified, amountWithSlippage, routingContracts, secondaryFees) => {
24051
- const amount = tradeType === TradeType.EXACT_INPUT ? amountSpecified : amountWithSlippage;
24052
- const spender = secondaryFees.length === 0
24053
- ? routingContracts.peripheryRouterAddress
24054
- : routingContracts.secondaryFeeAddress;
24055
- return { spender, amount };
24056
- };
24057
- /**
24058
- * Get an unsigned approval transaction if needed
24059
- *
24060
- * @param provider The provider to use for the call
24061
- * @param ownerAddress The address of the owner of the token
24062
- * @param tokenAddress The address of the token to approve
24063
- * @param tokenAmount The amount of the token to approve
24064
- * @param spenderAddress The address of the spender
24065
- * @returns The unsigned ERC20 approve transaction, or null if no approval is needed
24066
- */
24067
- const getApproveTransaction = async (provider, ownerAddress, tokenAddress, tokenAmount, spenderAddress) => {
24068
- let amountToApprove;
24069
- try {
24070
- amountToApprove = await getERC20AmountToApprove(provider, ownerAddress, tokenAddress, BigNumber$2.from(tokenAmount), spenderAddress);
24071
- }
24072
- catch (e) {
24073
- if (e instanceof AlreadyApprovedError) {
24074
- // already approved for the required amount, nothing to do
24075
- return null;
24076
- }
24077
- throw e;
24078
- }
24079
- return getUnsignedERC20ApproveTransaction(ownerAddress, tokenAddress, amountToApprove, spenderAddress);
24080
- };
24081
- async function getApproveGasEstimate(provider, ownerAddress, spenderAddress, tokenAddress) {
24082
- const erc20Contract = ERC20__factory$1.connect(tokenAddress, provider);
24083
- return await erc20Contract.estimateGas.approve(spenderAddress, ethers.constants.MaxUint256, {
24084
- from: ownerAddress,
24085
- });
24086
- }
24087
- const getApproval = async (nativeToken, provider, ownerAddress, tokenAddress, preparedApproval, gasPrice) => {
24088
- const approveTransaction = await getApproveTransaction(provider, ownerAddress, tokenAddress, preparedApproval.amount, preparedApproval.spender);
24089
- if (!approveTransaction) {
24090
- return null;
24091
- }
24092
- const gasEstimate = await getApproveGasEstimate(provider, ownerAddress, preparedApproval.spender, tokenAddress);
24093
- const gasFeeEstimate = gasPrice ? {
24094
- token: nativeToken,
24095
- value: calculateGasFee(gasPrice, gasEstimate),
24096
- } : null;
24097
- return {
24098
- transaction: approveTransaction,
24099
- gasFeeEstimate,
24100
- };
24101
- };
24102
-
24103
- // slippageToPercent takes the slippage as a percentage (e.g. 0.1) and
24104
- // converts it to the Uniswap equivalent type
24105
- const slippageToFraction = (slippage) => {
24106
- // If we receive a whole number, we can return slippage/100
24107
- const noDecimals = slippage.toString().split('.').length === 1;
24108
- if (noDecimals) {
24109
- return new Percent(slippage, 100);
24110
- }
24111
- // Divide the slippage number by 100 to get the decimal
24112
- const slippageDecimal = slippage / 100;
24113
- // Split into two parts by the decimal place
24114
- const parts = slippageDecimal.toString().split('.');
24115
- // Get the numerator by adding the two parts together
24116
- const numerator = parts[0] + parts[1];
24117
- // Get the denominator by multiplying decimals^10
24118
- const denominator = 10 ** parts[1].length;
24119
- return new Percent(numerator, denominator);
24120
- };
24121
-
24122
- function getQuoteAmountFromTradeType(tradeInfo) {
24123
- if (tradeInfo.tradeType === TradeType.EXACT_INPUT) {
24124
- return tradeInfo.amountOut;
24125
- }
24126
- return tradeInfo.amountIn;
24127
- }
24128
- function applySlippage(tradeType, amount, slippage) {
24129
- const slippageTolerance = slippageToFraction(slippage);
24130
- const slippagePlusOne = slippageTolerance.add(1);
24131
- const maybeInverted = tradeType === TradeType.EXACT_INPUT ? slippagePlusOne.invert() : slippagePlusOne;
24132
- const amountWithSlippage = maybeInverted.multiply(amount.toString()).quotient;
24133
- return ethers.BigNumber.from(amountWithSlippage.toString());
24134
- }
24135
- function prepareUserQuote(otherToken, tradeInfo, slippage, fees) {
24136
- const quote = getQuoteAmountFromTradeType(tradeInfo);
24137
- const amountWithSlippage = applySlippage(tradeInfo.tradeType, quote.value, slippage);
24138
- return {
24139
- amount: quote,
24140
- amountWithMaxSlippage: {
24141
- token: otherToken,
24142
- value: amountWithSlippage,
24143
- },
24144
- slippage,
24145
- fees: fees.withAmounts(),
24146
- };
24147
- }
24148
- function getOurQuoteReqAmount(amount, fees, tradeType) {
24149
- if (tradeType === TradeType.EXACT_OUTPUT) {
24150
- // For an exact output swap, we do not need to subtract fees from the given amount
24151
- return amount;
24152
- }
24153
- fees.addAmount(amount);
24154
- return fees.amountLessFees();
24155
- }
24156
-
24157
- // 0.1% default slippage
24158
- const DEFAULT_SLIPPAGE = 0.1;
24159
- // 15 minutes from the current Unix time
24160
- const DEFAULT_DEADLINE = Math.floor(Date.now() / 1000) + 60 * 15;
24161
- // most swaps will be able to resolve with 2 hops
24162
- const DEFAULT_MAX_HOPS = 2;
24163
- // after 10 hops, it is very unlikely a route will be available
24164
- const MAX_MAX_HOPS = 10;
24165
- // a max hop of 1 will require a direct swap with no intermediary pools
24166
- const MIN_MAX_HOPS = 1;
24167
- // precision used to calculate percentage from basis points
24168
- const BASIS_POINT_PRECISION = 10000;
24169
- // 10% maximum secondary fee
24170
- const MAX_SECONDARY_FEE_BASIS_POINTS = 10000;
24171
-
24172
24431
  /* Autogenerated file. Do not edit manually. */
24173
24432
  /* tslint:disable */
24174
24433
  /* eslint-disable */
@@ -26461,6 +26720,212 @@ startTokenIn = tokenIn) => {
26461
26720
  return routes;
26462
26721
  };
26463
26722
 
26723
+ /**
26724
+ * Determines whether or not the chain supports EIP-1559 by checking for the existence
26725
+ * of {@link FeeData.maxFeePerGas} and {@link FeeData.maxPriorityFeePerGas}
26726
+ *
26727
+ * @param {FeeData} fee - The fee data for the chain
26728
+ */
26729
+ const doesChainSupportEIP1559 = (fee) => {
26730
+ const supportsEIP1559 = !!fee.maxFeePerGas && !!fee.maxPriorityFeePerGas;
26731
+ return supportsEIP1559;
26732
+ };
26733
+ /**
26734
+ * Fetch the current gas price estimate. Supports both EIP-1559 and non-EIP1559 chains
26735
+ * @param {JsonRpcProvider} provider - The JSON RPC provider used to fetch fee data
26736
+ * @returns {Amount | null} - The gas price in the smallest denomination of the chain's currency,
26737
+ * or null if no gas price is available
26738
+ */
26739
+ const fetchGasPrice = async (provider, nativeToken) => {
26740
+ const feeData = await provider.getFeeData().catch(() => null);
26741
+ if (!feeData)
26742
+ return null;
26743
+ if (doesChainSupportEIP1559(feeData)) {
26744
+ return newAmount(feeData.maxFeePerGas.add(feeData.maxPriorityFeePerGas), nativeToken);
26745
+ }
26746
+ return feeData.gasPrice ? newAmount(feeData.gasPrice, nativeToken) : null;
26747
+ };
26748
+ /**
26749
+ * Calculate the gas fee from the gas price and gas units used for the transaction
26750
+ *
26751
+ * @param {Amount} gasPriceInWei - The price of gas
26752
+ * @param {BigNumber} gasUsed - The total gas units that will be used for the transaction
26753
+ * @returns - The cost of the transaction in the gas token's smallest denomination (e.g. WEI)
26754
+ */
26755
+ const calculateGasFee = (gasPrice, gasEstimate) =>
26756
+ // eslint-disable-next-line implicit-arrow-linebreak
26757
+ newAmount(gasEstimate.mul(gasPrice.value), gasPrice.token);
26758
+
26759
+ /**
26760
+ * Get the amount of an ERC20 token that needs to be approved by
26761
+ * checking the existing allowance for the spender
26762
+ *
26763
+ * @param provider - The provider to use for the call
26764
+ * @param ownerAddress - The address of the owner of the token
26765
+ * @param tokenAmount - The amount of the token to approve
26766
+ * @param spenderAddress - The address of the spender
26767
+ * @returns - The amount of the token that needs to be approved
26768
+ */
26769
+ const getERC20AmountToApprove = async (provider, ownerAddress, tokenAmount, spenderAddress) => {
26770
+ // create an instance of the ERC20 token contract
26771
+ const erc20Contract = ERC20__factory$1.connect(tokenAmount.token.address, provider);
26772
+ // get the allowance for the token spender
26773
+ // minimum is 0 - no allowance
26774
+ let allowance;
26775
+ try {
26776
+ allowance = await erc20Contract.allowance(ownerAddress, spenderAddress);
26777
+ }
26778
+ catch (e) {
26779
+ const message = e instanceof Error ? e.message : 'Unknown Error';
26780
+ throw new ApproveError(`failed to get allowance: ${message}`);
26781
+ }
26782
+ // get the amount that needs to be approved
26783
+ const requiredAmount = tokenAmount.value.sub(allowance);
26784
+ if (requiredAmount.isNegative() || requiredAmount.isZero()) {
26785
+ throw new AlreadyApprovedError(tokenAmount.toString(), tokenAmount.token.address, spenderAddress);
26786
+ }
26787
+ return newAmount(requiredAmount, tokenAmount.token);
26788
+ };
26789
+ /**
26790
+ * Get an unsigned ERC20 approve transaction
26791
+ *
26792
+ * @param ownerAddress - The address of the owner of the token
26793
+ * @param tokenAmount - The amount of the token to approve
26794
+ * @param spenderAddress - The address of the spender
26795
+ * @returns - The unsigned ERC20 approve transaction
26796
+ */
26797
+ const getUnsignedERC20ApproveTransaction = (ownerAddress, tokenAmount, spenderAddress) => {
26798
+ if (ownerAddress === spenderAddress) {
26799
+ throw new ApproveError('owner and spender addresses are the same');
26800
+ }
26801
+ const erc20Contract = ERC20__factory$1.createInterface();
26802
+ const callData = erc20Contract.encodeFunctionData('approve', [spenderAddress, tokenAmount.value]);
26803
+ return {
26804
+ data: callData,
26805
+ to: tokenAmount.token.address,
26806
+ value: 0,
26807
+ from: ownerAddress,
26808
+ };
26809
+ };
26810
+ const prepareApproval = (tradeType, amountSpecified, amountWithSlippage, routingContracts, secondaryFees) => {
26811
+ const amountOfTokenIn = tradeType === TradeType.EXACT_INPUT ? amountSpecified : amountWithSlippage;
26812
+ const spender = secondaryFees.length === 0
26813
+ ? routingContracts.peripheryRouterAddress
26814
+ : routingContracts.secondaryFeeAddress;
26815
+ return { spender, amount: amountOfTokenIn };
26816
+ };
26817
+ /**
26818
+ * Get an unsigned approval transaction if needed
26819
+ *
26820
+ * @param provider The provider to use for the call
26821
+ * @param ownerAddress The address of the owner of the token
26822
+ * @param tokenAddress The address of the token to approve
26823
+ * @param tokenAmount The amount of the token to approve
26824
+ * @param spenderAddress The address of the spender
26825
+ * @returns The unsigned ERC20 approve transaction, or null if no approval is needed
26826
+ */
26827
+ const getApproveTransaction = async (provider, ownerAddress, tokenAmount, spenderAddress) => {
26828
+ let amountToApprove;
26829
+ try {
26830
+ amountToApprove = await getERC20AmountToApprove(provider, ownerAddress, tokenAmount, spenderAddress);
26831
+ }
26832
+ catch (e) {
26833
+ if (e instanceof AlreadyApprovedError) {
26834
+ // already approved for the required amount, nothing to do
26835
+ return null;
26836
+ }
26837
+ throw e;
26838
+ }
26839
+ return getUnsignedERC20ApproveTransaction(ownerAddress, amountToApprove, spenderAddress);
26840
+ };
26841
+ async function getApproveGasEstimate(provider, ownerAddress, spenderAddress, tokenAddress) {
26842
+ const erc20Contract = ERC20__factory$1.connect(tokenAddress, provider);
26843
+ return await erc20Contract.estimateGas.approve(spenderAddress, ethers.constants.MaxUint256, {
26844
+ from: ownerAddress,
26845
+ });
26846
+ }
26847
+ const getApproval = async (provider, ownerAddress, preparedApproval, gasPrice) => {
26848
+ const approveTransaction = await getApproveTransaction(provider, ownerAddress, preparedApproval.amount, preparedApproval.spender);
26849
+ if (!approveTransaction) {
26850
+ return null;
26851
+ }
26852
+ const gasEstimate = await getApproveGasEstimate(provider, ownerAddress, preparedApproval.spender, preparedApproval.amount.token.address);
26853
+ const gasFeeEstimate = gasPrice ? calculateGasFee(gasPrice, gasEstimate) : null;
26854
+ return {
26855
+ transaction: approveTransaction,
26856
+ gasFeeEstimate,
26857
+ };
26858
+ };
26859
+
26860
+ // slippageToPercent takes the slippage as a percentage (e.g. 0.1) and
26861
+ // converts it to the Uniswap equivalent type
26862
+ const slippageToFraction = (slippage) => {
26863
+ // If we receive a whole number, we can return slippage/100
26864
+ const noDecimals = slippage.toString().split('.').length === 1;
26865
+ if (noDecimals) {
26866
+ return new Percent(slippage, 100);
26867
+ }
26868
+ // Divide the slippage number by 100 to get the decimal
26869
+ const slippageDecimal = slippage / 100;
26870
+ // Split into two parts by the decimal place
26871
+ const parts = slippageDecimal.toString().split('.');
26872
+ // Get the numerator by adding the two parts together
26873
+ const numerator = parts[0] + parts[1];
26874
+ // Get the denominator by multiplying decimals^10
26875
+ const denominator = 10 ** parts[1].length;
26876
+ return new Percent(numerator, denominator);
26877
+ };
26878
+
26879
+ function getQuoteAmountFromTradeType(tradeInfo) {
26880
+ if (tradeInfo.tradeType === TradeType.EXACT_INPUT) {
26881
+ return tradeInfo.amountOut;
26882
+ }
26883
+ return tradeInfo.amountIn;
26884
+ }
26885
+ function applySlippage(tradeType, amount, slippage) {
26886
+ const slippageTolerance = slippageToFraction(slippage);
26887
+ const slippagePlusOne = slippageTolerance.add(1);
26888
+ const maybeInverted = tradeType === TradeType.EXACT_INPUT ? slippagePlusOne.invert() : slippagePlusOne;
26889
+ const amountWithSlippage = maybeInverted.multiply(amount.toString()).quotient;
26890
+ return ethers.BigNumber.from(amountWithSlippage.toString());
26891
+ }
26892
+ function prepareUserQuote(otherToken, tradeInfo, slippage, fees) {
26893
+ const quote = getQuoteAmountFromTradeType(tradeInfo);
26894
+ const amountWithSlippage = applySlippage(tradeInfo.tradeType, quote.value, slippage);
26895
+ return {
26896
+ amount: quote,
26897
+ amountWithMaxSlippage: {
26898
+ token: otherToken,
26899
+ value: amountWithSlippage,
26900
+ },
26901
+ slippage,
26902
+ fees: fees.withAmounts(),
26903
+ };
26904
+ }
26905
+ function getOurQuoteReqAmount(amount, fees, tradeType) {
26906
+ if (tradeType === TradeType.EXACT_OUTPUT) {
26907
+ // For an exact output swap, we do not need to subtract fees from the given amount
26908
+ return amount;
26909
+ }
26910
+ fees.addAmount(amount);
26911
+ return fees.amountLessFees();
26912
+ }
26913
+
26914
+ // 0.1% default slippage
26915
+ const DEFAULT_SLIPPAGE = 0.1;
26916
+ // 15 minutes from the current Unix time
26917
+ const DEFAULT_DEADLINE = Math.floor(Date.now() / 1000) + 60 * 15;
26918
+ // most swaps will be able to resolve with 2 hops
26919
+ const DEFAULT_MAX_HOPS = 2;
26920
+ // after 10 hops, it is very unlikely a route will be available
26921
+ const MAX_MAX_HOPS = 10;
26922
+ // a max hop of 1 will require a direct swap with no intermediary pools
26923
+ const MIN_MAX_HOPS = 1;
26924
+ // precision used to calculate percentage from basis points
26925
+ const BASIS_POINT_PRECISION = 10000;
26926
+ // 10% maximum secondary fee
26927
+ const MAX_SECONDARY_FEE_BASIS_POINTS = 10000;
26928
+
26464
26929
  class Fees {
26465
26930
  secondaryFees;
26466
26931
  amount;
@@ -26608,13 +27073,10 @@ function createSwapParameters(adjustedQuote, fromAddress, slippage, deadline, se
26608
27073
  }
26609
27074
  return createSwapCallParametersWithFees(uncheckedTrade, fromAddress, options, secondaryFees);
26610
27075
  }
26611
- function getSwap(nativeToken, adjustedQuote, fromAddress, slippage, deadline, peripheryRouterAddress, secondaryFeesAddress, gasPrice, secondaryFees) {
27076
+ function getSwap(adjustedQuote, fromAddress, slippage, deadline, peripheryRouterAddress, secondaryFeesAddress, gasPrice, secondaryFees) {
26612
27077
  const calldata = createSwapParameters(adjustedQuote, fromAddress, slippage, deadline, secondaryFees);
26613
27078
  // TODO: Add additional gas fee estimates for secondary fees
26614
- const gasFeeEstimate = gasPrice ? {
26615
- token: nativeToken,
26616
- value: calculateGasFee(gasPrice, adjustedQuote.gasEstimate),
26617
- } : null;
27079
+ const gasFeeEstimate = gasPrice ? calculateGasFee(gasPrice, adjustedQuote.gasEstimate) : null;
26618
27080
  return {
26619
27081
  transaction: {
26620
27082
  data: calldata,
@@ -26798,14 +27260,14 @@ class Exchange {
26798
27260
  // get quote and gas details
26799
27261
  const [ourQuote, gasPrice] = await Promise.all([
26800
27262
  this.router.findOptimalRoute(ourQuoteReqAmount, otherToken, tradeType, maxHops),
26801
- fetchGasPrice(this.provider),
27263
+ fetchGasPrice(this.provider, this.nativeToken),
26802
27264
  ]);
26803
27265
  const adjustedQuote = prepareSwap(ourQuote, amountSpecified, fees);
26804
- const swap = getSwap(this.nativeToken, adjustedQuote, fromAddress, slippagePercent, deadline, this.router.routingContracts.peripheryRouterAddress, this.router.routingContracts.secondaryFeeAddress, gasPrice, secondaryFees);
27266
+ const swap = getSwap(adjustedQuote, fromAddress, slippagePercent, deadline, this.router.routingContracts.peripheryRouterAddress, this.router.routingContracts.secondaryFeeAddress, gasPrice, secondaryFees);
26805
27267
  const userQuote = prepareUserQuote(otherToken, adjustedQuote, slippagePercent, fees);
26806
- const preparedApproval = prepareApproval(tradeType, amount, userQuote.amountWithMaxSlippage.value, this.router.routingContracts, secondaryFees);
26807
- // we always use the tokenIn address because we are always selling the tokenIn
26808
- const approval = await getApproval(this.nativeToken, this.provider, fromAddress, tokenInAddress, preparedApproval, gasPrice);
27268
+ const preparedApproval = prepareApproval(tradeType, amountSpecified, userQuote.amountWithMaxSlippage, this.router.routingContracts, secondaryFees);
27269
+ // preparedApproval always uses the tokenIn address because we are always selling the tokenIn
27270
+ const approval = await getApproval(this.provider, fromAddress, preparedApproval, gasPrice);
26809
27271
  return {
26810
27272
  approval,
26811
27273
  swap,
@@ -26850,6 +27312,18 @@ class Exchange {
26850
27312
 
26851
27313
 
26852
27314
 
27315
+ var $aa144554f9ef124b$export$226b052ecb8ca80;
27316
+ (function(BuyStatusType) {
27317
+ BuyStatusType["SUCCESS"] = "SUCCESS";
27318
+ BuyStatusType["FAILED"] = "FAILED";
27319
+ })($aa144554f9ef124b$export$226b052ecb8ca80 || ($aa144554f9ef124b$export$226b052ecb8ca80 = {}));
27320
+
27321
+
27322
+ var $1e6b81bbd98b3a91$export$c0189a8c30039654;
27323
+ (function(CancelStatusType) {
27324
+ CancelStatusType["SUCCESS"] = "SUCCESS";
27325
+ CancelStatusType["FAILED"] = "FAILED";
27326
+ })($1e6b81bbd98b3a91$export$c0189a8c30039654 || ($1e6b81bbd98b3a91$export$c0189a8c30039654 = {}));
26853
27327
 
26854
27328
 
26855
27329
  /**
@@ -26897,6 +27371,13 @@ var $a47e48dd2c04791b$export$1f05a55fe0680cc7;
26897
27371
 
26898
27372
 
26899
27373
 
27374
+ var $c2874b006e92b115$export$a9780122aaa0801a;
27375
+ (function(SellStatusType) {
27376
+ SellStatusType["SUCCESS"] = "SUCCESS";
27377
+ SellStatusType["FAILED"] = "FAILED";
27378
+ })($c2874b006e92b115$export$a9780122aaa0801a || ($c2874b006e92b115$export$a9780122aaa0801a = {}));
27379
+
27380
+
26900
27381
  var $08d5ddc39acd6833$export$fd9b17d87f4121d2;
26901
27382
  (function(TokenFilterTypes) {
26902
27383
  TokenFilterTypes["ALL"] = "all";
@@ -26947,14 +27428,26 @@ const $e768639828688ca3$export$44dde05038008549 = {
26947
27428
  const $d85ad1457a3f1a83$export$7d3a9eeba384fa59 = "development";
26948
27429
  const $d85ad1457a3f1a83$export$b80040cb173ba6e9 = "0x0000000000000000000000000000000000001010";
26949
27430
  const $d85ad1457a3f1a83$export$903389470ba9433c = 18;
27431
+ const $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN = {
27432
+ name: "IMX",
27433
+ symbol: "IMX",
27434
+ decimals: $d85ad1457a3f1a83$export$903389470ba9433c,
27435
+ address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27436
+ };
26950
27437
  const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
26951
27438
  [$d85ad1457a3f1a83$export$7d3a9eeba384fa59]: "https://checkout-api.dev.immutable.com",
26952
27439
  [(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
26953
27440
  [(Environment$1).PRODUCTION]: "https://checkout-api.immutable.com"
26954
27441
  };
26955
- ({
26956
- [($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET]: "https://explorer.testnet.immutable.com"
26957
- });
27442
+ const $d85ad1457a3f1a83$export$72176e2233d7d5d = true;
27443
+ const $d85ad1457a3f1a83$export$566b5975cc83d6b4 = true;
27444
+ const $d85ad1457a3f1a83$export$261cde2078dba35b = true;
27445
+ const $d85ad1457a3f1a83$export$fc55ed5a42b458ba = {
27446
+ [($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET]: {
27447
+ url: "https://explorer.testnet.immutable.com",
27448
+ nativeToken: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27449
+ }
27450
+ };
26958
27451
  const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
26959
27452
  [
26960
27453
  ($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM,
@@ -26982,12 +27475,7 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
26982
27475
  rpcUrls: [
26983
27476
  "https://rpc.immutable.com"
26984
27477
  ],
26985
- nativeCurrency: {
26986
- name: "IMX",
26987
- symbol: "IMX",
26988
- decimals: 18,
26989
- address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
26990
- }
27478
+ nativeCurrency: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
26991
27479
  }
26992
27480
  ]
26993
27481
  ]);
@@ -27018,12 +27506,7 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
27018
27506
  rpcUrls: [
27019
27507
  "https://rpc.testnet.immutable.com"
27020
27508
  ],
27021
- nativeCurrency: {
27022
- name: "IMX",
27023
- symbol: "IMX",
27024
- decimals: 18,
27025
- address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27026
- }
27509
+ nativeCurrency: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27027
27510
  }
27028
27511
  ]
27029
27512
  ]);
@@ -27054,12 +27537,7 @@ const $d85ad1457a3f1a83$export$3a9ebede6a150274 = new Map([
27054
27537
  rpcUrls: [
27055
27538
  "https://rpc.dev.immutable.com"
27056
27539
  ],
27057
- nativeCurrency: {
27058
- name: "IMX",
27059
- symbol: "IMX",
27060
- decimals: 18,
27061
- address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27062
- }
27540
+ nativeCurrency: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27063
27541
  }
27064
27542
  ]
27065
27543
  ]);
@@ -27287,6 +27765,7 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
27287
27765
  CheckoutErrorType["DEFAULT_PROVIDER_ERROR"] = "DEFAULT_PROVIDER_ERROR";
27288
27766
  CheckoutErrorType["CONNECT_PROVIDER_ERROR"] = "CONNECT_PROVIDER_ERROR";
27289
27767
  CheckoutErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
27768
+ CheckoutErrorType["GET_INDEXER_BALANCE_ERROR"] = "GET_INDEXER_BALANCE_ERROR";
27290
27769
  CheckoutErrorType["GET_ERC20_BALANCE_ERROR"] = "GET_ERC20_BALANCE_ERROR";
27291
27770
  CheckoutErrorType["GET_ERC721_BALANCE_ERROR"] = "GET_ERC721_BALANCE_ERROR";
27292
27771
  CheckoutErrorType["GET_NETWORK_INFO_ERROR"] = "GET_NETWORK_INFO_ERROR";
@@ -27302,9 +27781,15 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
27302
27781
  CheckoutErrorType["UNSUPPORTED_TOKEN_TYPE_ERROR"] = "UNSUPPORTED_TOKEN_TYPE_ERROR";
27303
27782
  CheckoutErrorType["UNSUPPORTED_BALANCE_REQUIREMENT_ERROR"] = "UNSUPPORTED_BALANCE_REQUIREMENT_ERROR";
27304
27783
  CheckoutErrorType["GET_ORDER_LISTING_ERROR"] = "GET_ORDER_LISTING_ERROR";
27784
+ CheckoutErrorType["CANCEL_ORDER_LISTING_ERROR"] = "CANCEL_ORDER_LISTING_ERROR";
27785
+ CheckoutErrorType["PREPARE_ORDER_LISTING_ERROR"] = "PREPARE_ORDER_LISTING_ERROR";
27786
+ CheckoutErrorType["CREATE_ORDER_LISTING_ERROR"] = "CREATE_ORDER_LISTING_ERROR";
27305
27787
  CheckoutErrorType["SWITCH_NETWORK_UNSUPPORTED"] = "SWITCH_NETWORK_UNSUPPORTED";
27306
27788
  CheckoutErrorType["GET_ERC20_ALLOWANCE_ERROR"] = "GET_ERC20_ALLOWANCE_ERROR";
27307
27789
  CheckoutErrorType["GET_ERC721_ALLOWANCE_ERROR"] = "GET_ERC721_ALLOWANCE_ERROR";
27790
+ CheckoutErrorType["EXECUTE_APPROVAL_TRANSACTION_ERROR"] = "EXECUTE_APPROVAL_TRANSACTION_ERROR";
27791
+ CheckoutErrorType["EXECUTE_FULFILMENT_TRANSACTION_ERROR"] = "EXECUTE_FULFILMENT_TRANSACTION_ERROR";
27792
+ CheckoutErrorType["SIGN_MESSAGE_ERROR"] = "SIGN_MESSAGE_ERROR";
27308
27793
  })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
27309
27794
  class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
27310
27795
  message;
@@ -27492,7 +27977,7 @@ const $efe60cea83bfc4e8$export$473cec51305fdae8 = async (config, { type: type =
27492
27977
  case ($08d5ddc39acd6833$export$fd9b17d87f4121d2).BRIDGE:
27493
27978
  case ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL:
27494
27979
  default:
27495
- tokens = await config.remote.getTokens(chainId);
27980
+ tokens = (await config.remote.getTokensConfig(chainId)).allowed;
27496
27981
  }
27497
27982
  if (!exclude || exclude?.length === 0) return {
27498
27983
  tokens: tokens
@@ -27505,6 +27990,141 @@ const $efe60cea83bfc4e8$export$473cec51305fdae8 = async (config, { type: type =
27505
27990
 
27506
27991
 
27507
27992
 
27993
+
27994
+
27995
+ const $fd8a8472dcc3ec2b$var$CACHE_DATA_TTL = 60; // seconds
27996
+ class $fd8a8472dcc3ec2b$export$ef140a6b05dfc786 {
27997
+ url;
27998
+ nativeToken;
27999
+ ttl;
28000
+ chainId;
28001
+ cacheMap;
28002
+ static async makeHttpRequest(url) {
28003
+ return (globalAxios$1).get(url);
28004
+ }
28005
+ setCache(key, data) {
28006
+ this.cacheMap[key] = {
28007
+ data: data,
28008
+ ttl: new Date().getTime() + this.ttl * 1000
28009
+ };
28010
+ }
28011
+ getCache(key) {
28012
+ const d = this.cacheMap[key];
28013
+ if (!d || d.ttl <= new Date().getTime()) return null;
28014
+ return d.data;
28015
+ }
28016
+ /**
28017
+ * Blockscout constructor
28018
+ * @param chainId target chain
28019
+ * @param ttl cache TTL
28020
+ */ constructor(params){
28021
+ this.chainId = params.chainId;
28022
+ this.url = ($d85ad1457a3f1a83$export$fc55ed5a42b458ba)[this.chainId].url;
28023
+ const native = ($d85ad1457a3f1a83$export$fc55ed5a42b458ba)[this.chainId].nativeToken;
28024
+ this.nativeToken = {
28025
+ address: native.address ?? "",
28026
+ decimals: native.decimals.toString(),
28027
+ name: native.name,
28028
+ symbol: native.symbol
28029
+ };
28030
+ this.cacheMap = {};
28031
+ this.ttl = params.ttl !== undefined ? params.ttl : $fd8a8472dcc3ec2b$var$CACHE_DATA_TTL;
28032
+ }
28033
+ /**
28034
+ * isChainSupported verifies if the chain is supported by Blockscout
28035
+ * @param chainId
28036
+ */ static isChainSupported = (chainId)=>Boolean(($d85ad1457a3f1a83$export$fc55ed5a42b458ba)[chainId]);
28037
+ /**
28038
+ * isBlockscoutError verifies if the error is a Blockscout client error
28039
+ * @param err error to evaluate
28040
+ */ static isBlockscoutError = (err)=>"code" in err;
28041
+ /**
28042
+ * getTokensByWalletAddress fetches the list of tokens (by type) owned by the wallet address.
28043
+ * @param walletAddress wallet address
28044
+ * @param tokenType token type
28045
+ * @param nextPage parameters for the next page, to be provided alongside walletAddress and tokenType
28046
+ * @returns list of tokens given the wallet address and the token types
28047
+ */ async getTokensByWalletAddress(params) {
28048
+ try {
28049
+ let url = `${this.url}/api/v2/addresses/${params.walletAddress}/tokens?type=${params.tokenType}`;
28050
+ if (params.nextPage) url += `&${new URLSearchParams(params.nextPage)}`;
28051
+ // Cache response data to prevent unnecessary requests
28052
+ const cached = this.getCache(url);
28053
+ if (cached && cached.status < 400) return Promise.resolve(cached.data);
28054
+ const response = await $fd8a8472dcc3ec2b$export$ef140a6b05dfc786.makeHttpRequest(url);
28055
+ if (response.status >= 400) return Promise.reject({
28056
+ code: response.status,
28057
+ message: response.statusText
28058
+ });
28059
+ // To get around an issue with native tokens being an ERC-20, there is the need
28060
+ // to remove IMX from `resp` and add it back in using getNativeTokenByWalletAddress.
28061
+ // This has affected some of the early wallets, and it might not be an issue in mainnet
28062
+ // however, let's enforce it.
28063
+ const data = {
28064
+ items: response.data?.items?.filter((token)=>token.token.address && token.token.address !== this.nativeToken.address),
28065
+ // eslint-disable-next-line @typescript-eslint/naming-convention
28066
+ next_page_params: response.data?.next_page_params
28067
+ };
28068
+ this.setCache(url, data);
28069
+ return Promise.resolve(data);
28070
+ } catch (err) {
28071
+ let code = (HttpStatusCode$2).InternalServerError;
28072
+ let message = "InternalServerError";
28073
+ if ((globalAxios$1).isAxiosError(err)) {
28074
+ code = err.response?.status || code;
28075
+ message = err.message;
28076
+ }
28077
+ return Promise.reject({
28078
+ code: code,
28079
+ message: message
28080
+ });
28081
+ }
28082
+ }
28083
+ /**
28084
+ * getNativeTokenByWalletAddress fetches the native token owned by the wallet address.
28085
+ * @param walletAddress wallet address
28086
+ * @returns list of tokens given the wallet address and the token types
28087
+ */ async getNativeTokenByWalletAddress(params) {
28088
+ try {
28089
+ const url = `${this.url}/api/v2/addresses/${params.walletAddress}`;
28090
+ // Cache response data to prevent unnecessary requests
28091
+ const cached = this.getCache(url);
28092
+ if (cached && cached.status < 400) return Promise.resolve(cached.data);
28093
+ const response = await $fd8a8472dcc3ec2b$export$ef140a6b05dfc786.makeHttpRequest(url);
28094
+ if (response.status >= 400) return Promise.reject({
28095
+ code: response.status,
28096
+ message: response.statusText
28097
+ });
28098
+ const data = {
28099
+ token: this.nativeToken,
28100
+ value: response.data.coin_balance
28101
+ };
28102
+ this.setCache(url, data);
28103
+ return Promise.resolve(data);
28104
+ } catch (err) {
28105
+ let code = (HttpStatusCode$2).InternalServerError;
28106
+ let message = "InternalServerError";
28107
+ if ((globalAxios$1).isAxiosError(err)) {
28108
+ code = err.response?.status || code;
28109
+ message = err.message;
28110
+ }
28111
+ return Promise.reject({
28112
+ code: code,
28113
+ message: message
28114
+ });
28115
+ }
28116
+ }
28117
+ }
28118
+
28119
+
28120
+ /* eslint @typescript-eslint/naming-convention: off */ var $887a00f8f72d61f0$export$5bd1ea2b3d18210;
28121
+ (function(BlockscoutTokenType) {
28122
+ BlockscoutTokenType["ERC20"] = "ERC-20";
28123
+ })($887a00f8f72d61f0$export$5bd1ea2b3d18210 || ($887a00f8f72d61f0$export$5bd1ea2b3d18210 = {}));
28124
+
28125
+
28126
+
28127
+
27508
28128
  const $1564e43dde50bb61$export$df96cd8d56be0ab1 = async (config, web3Provider, walletAddress)=>await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
27509
28129
  const networkInfo = await ($de192de6ef100f9f$export$79f13b4cfaaf0d09)(config, web3Provider);
27510
28130
  if (!networkInfo.isSupported) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${networkInfo.chainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR, {
@@ -27544,6 +28164,65 @@ async function $1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, walletAdd
27544
28164
  type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC20_BALANCE_ERROR
27545
28165
  });
27546
28166
  }
28167
+ // Blockscout client singleton
28168
+ let $1564e43dde50bb61$var$blockscoutClient;
28169
+ const $1564e43dde50bb61$export$8c978679845804d4 = async (walletAddress, chainId, rename)=>{
28170
+ // Shuffle the mapping of the tokens configuration so it is a hashmap
28171
+ // for faster access to tokens config objects.
28172
+ const mapRename = Object.assign({}, ...rename.map((t)=>({
28173
+ [t.address || ""]: t
28174
+ })));
28175
+ // Ensure singleton is present and match the selected chain
28176
+ if (!$1564e43dde50bb61$var$blockscoutClient || $1564e43dde50bb61$var$blockscoutClient.chainId !== chainId) $1564e43dde50bb61$var$blockscoutClient = new ($fd8a8472dcc3ec2b$export$ef140a6b05dfc786)({
28177
+ chainId: chainId
28178
+ });
28179
+ // Hold the items in an array for post-fetching processing
28180
+ const items = [];
28181
+ const tokenType = ($887a00f8f72d61f0$export$5bd1ea2b3d18210).ERC20;
28182
+ // Given that the widgets aren't yet designed to support pagination,
28183
+ // fetch all the possible tokens associated to a given wallet address.
28184
+ let resp;
28185
+ try {
28186
+ do {
28187
+ // eslint-disable-next-line no-await-in-loop
28188
+ resp = await $1564e43dde50bb61$var$blockscoutClient.getTokensByWalletAddress({
28189
+ walletAddress: walletAddress,
28190
+ tokenType: tokenType,
28191
+ nextPage: resp?.next_page_params
28192
+ });
28193
+ items.push(...resp.items);
28194
+ }while (resp.next_page_params);
28195
+ } catch (err) {
28196
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message || "InternalServerError | getTokensByWalletAddress", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_INDEXER_BALANCE_ERROR, err);
28197
+ }
28198
+ try {
28199
+ const respNative = await $1564e43dde50bb61$var$blockscoutClient.getNativeTokenByWalletAddress({
28200
+ walletAddress: walletAddress
28201
+ });
28202
+ items.push(respNative);
28203
+ } catch (err) {
28204
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message || "InternalServerError | getNativeTokenByWalletAddress", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_INDEXER_BALANCE_ERROR, err);
28205
+ }
28206
+ return {
28207
+ balances: items.map((item)=>{
28208
+ const tokenData = item.token || {};
28209
+ const balance = (BigNumber$1).from(item.value);
28210
+ const renamed = mapRename[tokenData.address] || {};
28211
+ const token = {
28212
+ ...tokenData,
28213
+ name: renamed.name ?? tokenData.name,
28214
+ symbol: renamed.symbol ?? tokenData.symbol,
28215
+ decimals: parseInt(tokenData.decimals, 10)
28216
+ };
28217
+ const formattedBalance = (utils$1).formatUnits(item.value, token.decimals);
28218
+ return {
28219
+ balance: balance,
28220
+ formattedBalance: formattedBalance,
28221
+ token: token
28222
+ };
28223
+ })
28224
+ };
28225
+ };
27547
28226
  const $1564e43dde50bb61$export$a3238cee431627c6 = async (config, web3Provider, walletAddress, tokens)=>{
27548
28227
  const allBalancePromises = [];
27549
28228
  tokens.forEach((token)=>{
@@ -27552,7 +28231,7 @@ const $1564e43dde50bb61$export$a3238cee431627c6 = async (config, web3Provider, w
27552
28231
  else allBalancePromises.push($1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, walletAddress, token.address));
27553
28232
  });
27554
28233
  const balanceResults = await Promise.allSettled(allBalancePromises);
27555
- const balances = balanceResults.filter((result)=>result.status === "fulfilled").map((fulfilledResult)=>fulfilledResult.value);
28234
+ const balances = balanceResults.filter((result)=>result.status === "fulfilled").map((result)=>result.value);
27556
28235
  return {
27557
28236
  balances: balances
27558
28237
  };
@@ -27562,6 +28241,20 @@ const $1564e43dde50bb61$export$fee49741664a4d7e = async (config, web3Provider, w
27562
28241
  type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
27563
28242
  chainId: chainId
27564
28243
  });
28244
+ // In order to prevent unnecessary RPC calls
28245
+ // let's use the Indexer if available for the
28246
+ // given chain.
28247
+ let flag = false;
28248
+ try {
28249
+ flag = (await config.remote.getTokensConfig(chainId)).blockscout || flag;
28250
+ } catch (err) {
28251
+ // eslint-disable-next-line no-console
28252
+ console.error(err);
28253
+ }
28254
+ if (flag && ($fd8a8472dcc3ec2b$export$ef140a6b05dfc786).isChainSupported(chainId)) return await $1564e43dde50bb61$export$8c978679845804d4(walletAddress, chainId, tokens);
28255
+ // This fallback to use ERC20s calls which is a best effort solution
28256
+ // Fails in fetching data from the RCP calls might result in some
28257
+ // missing data.
27565
28258
  return await $1564e43dde50bb61$export$a3238cee431627c6(config, web3Provider, walletAddress, tokens);
27566
28259
  };
27567
28260
 
@@ -27860,10 +28553,10 @@ class $a492ee374ae7b613$export$d902b56530cd5f87 {
27860
28553
  if (!key) return config;
27861
28554
  return config[key];
27862
28555
  }
27863
- async getTokens(chainId) {
28556
+ async getTokensConfig(chainId) {
27864
28557
  const config = await this.loadConfigTokens();
27865
- if (!config) return [];
27866
- return config[chainId]?.allowed ?? [];
28558
+ if (!config || !config[chainId]) return {};
28559
+ return config[chainId] ?? [];
27867
28560
  }
27868
28561
  }
27869
28562
 
@@ -27897,6 +28590,9 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
27897
28590
  // Environment.DEVELOPMENT
27898
28591
  isDevelopment = false;
27899
28592
  isProduction;
28593
+ isOnRampEnabled;
28594
+ isSwapEnabled;
28595
+ isBridgeEnabled;
27900
28596
  remote;
27901
28597
  environment;
27902
28598
  networkMap;
@@ -27905,6 +28601,9 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
27905
28601
  this.environment = config.baseConfig.environment;
27906
28602
  // Developer mode will super set any environment configuration
27907
28603
  this.isProduction = !this.isDevelopment && this.environment === (Environment$1).PRODUCTION;
28604
+ this.isOnRampEnabled = config.isOnRampEnabled ?? ($d85ad1457a3f1a83$export$72176e2233d7d5d);
28605
+ this.isSwapEnabled = config.isSwapEnabled ?? ($d85ad1457a3f1a83$export$566b5975cc83d6b4);
28606
+ this.isBridgeEnabled = config.isBridgeEnabled ?? ($d85ad1457a3f1a83$export$261cde2078dba35b);
27908
28607
  this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment);
27909
28608
  this.remote = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
27910
28609
  isDevelopment: this.isDevelopment,
@@ -28016,6 +28715,7 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
28016
28715
 
28017
28716
 
28018
28717
 
28718
+
28019
28719
  const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
28020
28720
  const aggregatedAllowances = [];
28021
28721
  if (!erc20allowances.sufficient) {
@@ -28186,7 +28886,9 @@ const $35c3fc7013888ba5$export$90366d6b714c6f69 = async (provider, ownerAddress,
28186
28886
  return await contract.isApprovedForAll(ownerAddress, spenderAddress);
28187
28887
  } catch (err) {
28188
28888
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to check approval for all ERC721s of collection", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
28189
- contractAddress: contractAddress
28889
+ ownerAddress: ownerAddress,
28890
+ contractAddress: contractAddress,
28891
+ spenderAddress: spenderAddress
28190
28892
  });
28191
28893
  }
28192
28894
  };
@@ -28198,7 +28900,10 @@ const $35c3fc7013888ba5$export$ebb2a35f2b4cf5f6 = async (provider, ownerAddress,
28198
28900
  return transaction;
28199
28901
  } catch (err) {
28200
28902
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to get the approval transaction for ERC721", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
28201
- contractAddress: contractAddress
28903
+ id: id.toString(),
28904
+ contractAddress: contractAddress,
28905
+ spenderAddress: spenderAddress,
28906
+ ownerAddress: ownerAddress
28202
28907
  });
28203
28908
  }
28204
28909
  };
@@ -28208,6 +28913,7 @@ const $35c3fc7013888ba5$export$c4605a8dd415eeea = async (provider, contractAddre
28208
28913
  return await contract.getApproved(id);
28209
28914
  } catch (err) {
28210
28915
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to get approved address for ERC721", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
28916
+ id: id.toString(),
28211
28917
  contractAddress: contractAddress
28212
28918
  });
28213
28919
  }
@@ -28657,6 +29363,164 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
28657
29363
 
28658
29364
 
28659
29365
 
29366
+ const $1fda5c40669a566d$export$1fac8e857d728583 = async ()=>true;
29367
+ const $1fda5c40669a566d$export$2e83e9eeaf217e20 = async ()=>true;
29368
+
29369
+
29370
+ const $7f2e17f026d4fc8d$var$isPassportProvider = (provider)=>(provider.provider?.isPassport === true) ?? false;
29371
+ const $7f2e17f026d4fc8d$export$f1ca3744c025ab81 = async (config, provider)=>{
29372
+ const availableRoutingOptions = {
29373
+ onRamp: config.isOnRampEnabled,
29374
+ swap: config.isSwapEnabled,
29375
+ bridge: config.isBridgeEnabled
29376
+ };
29377
+ // Geo-blocking checks
29378
+ const geoBlockingChecks = [];
29379
+ if (availableRoutingOptions.onRamp) geoBlockingChecks.push({
29380
+ id: "onRamp",
29381
+ promise: ($1fda5c40669a566d$export$1fac8e857d728583)()
29382
+ });
29383
+ if (availableRoutingOptions.swap) geoBlockingChecks.push({
29384
+ id: "swap",
29385
+ promise: ($1fda5c40669a566d$export$2e83e9eeaf217e20)()
29386
+ });
29387
+ if (geoBlockingChecks.length > 0) {
29388
+ const promises = geoBlockingChecks.map((geoBlockingCheck)=>geoBlockingCheck.promise);
29389
+ const geoBlockingStatus = await Promise.allSettled(promises);
29390
+ geoBlockingStatus.forEach((result, index)=>{
29391
+ const statusId = geoBlockingChecks[index].id;
29392
+ availableRoutingOptions[statusId] = availableRoutingOptions[statusId] && result.status === "fulfilled" && !result.value;
29393
+ });
29394
+ }
29395
+ // Bridge not available if passport provider
29396
+ availableRoutingOptions.bridge = availableRoutingOptions.bridge && !$7f2e17f026d4fc8d$var$isPassportProvider(provider);
29397
+ return availableRoutingOptions;
29398
+ };
29399
+
29400
+
29401
+
29402
+
29403
+
29404
+
29405
+
29406
+
29407
+
29408
+ async function $0e0060cb42e136d2$export$339cb2be73677b30(config, existingReadOnlyProviders) {
29409
+ if (config.isProduction && existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM)) return existingReadOnlyProviders;
29410
+ if (existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).SEPOLIA)) return existingReadOnlyProviders;
29411
+ const readOnlyProviders = new Map();
29412
+ const allowedNetworks = await $de192de6ef100f9f$export$3043f6442a9ef563(config, {
29413
+ type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
29414
+ });
29415
+ allowedNetworks.networks.forEach((networkInfo)=>{
29416
+ const rpcUrl = config.networkMap.get(networkInfo.chainId)?.rpcUrls[0];
29417
+ const provider = new (JsonRpcProvider)(rpcUrl);
29418
+ readOnlyProviders.set(networkInfo.chainId, provider);
29419
+ });
29420
+ return readOnlyProviders;
29421
+ }
29422
+
29423
+
29424
+
29425
+
29426
+ const $33acec7b4a26c053$export$23ddeb2642d2f9d = async (config, ownerAddress, availableRoutingOptions)=>{
29427
+ const chainBalances = new Map();
29428
+ const chainBalancePromises = new Map();
29429
+ let readOnlyProviders = new Map();
29430
+ let providerError;
29431
+ try {
29432
+ readOnlyProviders = await (0, $0e0060cb42e136d2$export$339cb2be73677b30)(config);
29433
+ } catch (error) {
29434
+ providerError = error;
29435
+ }
29436
+ if (readOnlyProviders.size === 0) {
29437
+ const noProviderResult = {
29438
+ success: false,
29439
+ error: providerError || new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Provider failed", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_ERROR),
29440
+ balances: []
29441
+ };
29442
+ chainBalances.set(($4013c5c91bb535f6$export$9b794d067cdd1af6)(config), noProviderResult);
29443
+ chainBalances.set(($4013c5c91bb535f6$export$c9af4e4b001c6476)(config), noProviderResult);
29444
+ return chainBalances;
29445
+ }
29446
+ // Only get L1 Balances if we can bridge
29447
+ if (availableRoutingOptions.bridge) {
29448
+ const chainId = ($4013c5c91bb535f6$export$9b794d067cdd1af6)(config);
29449
+ if (readOnlyProviders.has(chainId)) chainBalancePromises.set(chainId, ($1564e43dde50bb61$export$fee49741664a4d7e)(config, readOnlyProviders.get(chainId), ownerAddress, chainId));
29450
+ else chainBalances.set(($4013c5c91bb535f6$export$9b794d067cdd1af6)(config), {
29451
+ success: false,
29452
+ error: new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`No L1 provider available for ${chainId}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_ERROR),
29453
+ balances: []
29454
+ });
29455
+ }
29456
+ const chainId = ($4013c5c91bb535f6$export$c9af4e4b001c6476)(config);
29457
+ if (readOnlyProviders.has(chainId)) chainBalancePromises.set(chainId, ($1564e43dde50bb61$export$fee49741664a4d7e)(config, readOnlyProviders.get(chainId), ownerAddress, chainId));
29458
+ else chainBalances.set(($4013c5c91bb535f6$export$c9af4e4b001c6476)(config), {
29459
+ success: false,
29460
+ error: new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`No L2 provider available for ${chainId}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_ERROR),
29461
+ balances: []
29462
+ });
29463
+ if (chainBalancePromises.size > 0) {
29464
+ const chainIds = Array.from(chainBalancePromises.keys());
29465
+ const balanceSettledResults = await Promise.allSettled(chainBalancePromises.values());
29466
+ balanceSettledResults.forEach((balanceSettledResult, index)=>{
29467
+ const balanceChainId = chainIds[index];
29468
+ if (balanceSettledResult.status === "fulfilled") chainBalances.set(balanceChainId, {
29469
+ success: true,
29470
+ balances: balanceSettledResult.value.balances
29471
+ });
29472
+ else chainBalances.set(balanceChainId, {
29473
+ success: false,
29474
+ error: new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error getting ${chainId} balances`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_BALANCE_ERROR),
29475
+ balances: []
29476
+ });
29477
+ });
29478
+ }
29479
+ return chainBalances;
29480
+ };
29481
+
29482
+
29483
+ const $c16168a9c28ae4fd$export$92606e71d0a264ff = async (config, ownerAddress, balanceRequirements, availableRoutingOptions)=>{
29484
+ // eslint-disable-next-line no-console
29485
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29486
+ await ($33acec7b4a26c053$export$23ddeb2642d2f9d)(config, ownerAddress, availableRoutingOptions);
29487
+ // Get allowed tokens?
29488
+ // Check bridging routes
29489
+ // Check on-ramp routes
29490
+ // Check swap routes
29491
+ // > Could bridge first
29492
+ // > Could on-ramp first
29493
+ // > Could double swap
29494
+ return {
29495
+ availableOptions: [],
29496
+ response: {
29497
+ type: "ROUTES_FOUND",
29498
+ message: "Routes found"
29499
+ },
29500
+ fundingRoutes: [
29501
+ {
29502
+ priority: 1,
29503
+ steps: [
29504
+ {
29505
+ type: "bridge",
29506
+ chainId: 1,
29507
+ asset: {
29508
+ balance: (BigNumber$1).from(0),
29509
+ formattedBalance: "0",
29510
+ token: {
29511
+ name: "ETH",
29512
+ symbol: "ETH",
29513
+ decimals: 18
29514
+ }
29515
+ }
29516
+ }
29517
+ ]
29518
+ }
29519
+ ]
29520
+ };
29521
+ };
29522
+
29523
+
28660
29524
  const $0e7419077c373b24$export$4a2a19d99fef3b1b = (balanceCheckResult)=>{
28661
29525
  let sufficient = true;
28662
29526
  const transactionRequirements = [];
@@ -28687,12 +29551,123 @@ const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemR
28687
29551
  aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
28688
29552
  }
28689
29553
  const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
29554
+ // Determine which services are available
29555
+ const availableRoutingOptions = await ($7f2e17f026d4fc8d$export$f1ca3744c025ab81)(config, provider);
29556
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29557
+ await ($c16168a9c28ae4fd$export$92606e71d0a264ff)(config, ownerAddress, balanceRequirements, availableRoutingOptions);
28690
29558
  return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
28691
29559
  };
28692
29560
 
28693
29561
 
28694
29562
 
28695
29563
 
29564
+
29565
+ var $d855a5ba32004345$export$f51b97f3aaf2d5a8;
29566
+ (function(SignTransactionStatusType) {
29567
+ SignTransactionStatusType["SUCCESS"] = "SUCCESS";
29568
+ SignTransactionStatusType["FAILED"] = "FAILED";
29569
+ })($d855a5ba32004345$export$f51b97f3aaf2d5a8 || ($d855a5ba32004345$export$f51b97f3aaf2d5a8 = {}));
29570
+
29571
+
29572
+ const $25ac589234c10b67$export$19693ca396db083e = async (provider, approvalTransactions)=>{
29573
+ let receipts = [];
29574
+ try {
29575
+ const response = await Promise.all(approvalTransactions.map((transaction)=>provider.getSigner().sendTransaction(transaction)));
29576
+ receipts = await Promise.all(response.map((transaction)=>transaction.wait()));
29577
+ } catch (err) {
29578
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while executing the approval transaction", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).EXECUTE_APPROVAL_TRANSACTION_ERROR, {
29579
+ message: err.message
29580
+ });
29581
+ }
29582
+ for (const receipt of receipts){
29583
+ if (receipt.status === 0) return {
29584
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED,
29585
+ transactionHash: receipt.transactionHash,
29586
+ reason: "Approval transaction failed and was reverted"
29587
+ };
29588
+ }
29589
+ return {
29590
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).SUCCESS
29591
+ };
29592
+ };
29593
+ const $25ac589234c10b67$export$2161274619257102 = async (provider, fulfilmentTransactions)=>{
29594
+ let receipts = [];
29595
+ try {
29596
+ const response = await Promise.all(fulfilmentTransactions.map((transaction)=>provider.getSigner().sendTransaction(transaction)));
29597
+ receipts = await Promise.all(response.map((transaction)=>transaction.wait()));
29598
+ } catch (err) {
29599
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while executing the fulfilment transaction", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).EXECUTE_FULFILMENT_TRANSACTION_ERROR, {
29600
+ message: err.message
29601
+ });
29602
+ }
29603
+ for (const receipt of receipts){
29604
+ if (receipt.status === 0) return {
29605
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED,
29606
+ transactionHash: receipt.transactionHash,
29607
+ reason: "Fulfilment transaction failed and was reverted"
29608
+ };
29609
+ }
29610
+ return {
29611
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).SUCCESS
29612
+ };
29613
+ };
29614
+ const $25ac589234c10b67$export$1d9a7a8a40780de = async (provider, unsignedMessage)=>{
29615
+ try {
29616
+ // eslint-disable-next-line no-underscore-dangle
29617
+ const signedMessage = await provider.getSigner()._signTypedData(unsignedMessage.unsignedMessage.domain, unsignedMessage.unsignedMessage.types, unsignedMessage.unsignedMessage.value);
29618
+ return {
29619
+ orderComponents: unsignedMessage.orderComponents,
29620
+ orderHash: unsignedMessage.orderHash,
29621
+ signedMessage: signedMessage
29622
+ };
29623
+ } catch (err) {
29624
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while signing the message", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).SIGN_MESSAGE_ERROR, {
29625
+ message: err.message
29626
+ });
29627
+ }
29628
+ };
29629
+
29630
+
29631
+
29632
+ const $a7367d01c6e76b1c$export$b087719c36e0f2dc = async (actions)=>{
29633
+ let approvalTransactions = [];
29634
+ let fulfilmentTransactions = [];
29635
+ const approvalPromises = [];
29636
+ const fulfilmentPromises = [];
29637
+ for (const action of actions){
29638
+ if (action.type !== (ActionType).TRANSACTION) continue;
29639
+ if (action.purpose === (TransactionPurpose).APPROVAL) approvalPromises.push(action.buildTransaction());
29640
+ if (action.purpose === (TransactionPurpose).FULFILL_ORDER) fulfilmentPromises.push(action.buildTransaction());
29641
+ }
29642
+ approvalTransactions = await Promise.all(approvalPromises);
29643
+ fulfilmentTransactions = await Promise.all(fulfilmentPromises);
29644
+ return {
29645
+ approvalTransactions: approvalTransactions,
29646
+ fulfilmentTransactions: fulfilmentTransactions
29647
+ };
29648
+ };
29649
+ const $a7367d01c6e76b1c$export$d62081fac18000c2 = (orderHash, orderComponents, actions)=>{
29650
+ let unsignedMessage;
29651
+ for (const action of actions){
29652
+ if (action.type !== (ActionType).SIGNABLE) continue;
29653
+ if (action.purpose === (SignablePurpose).CREATE_LISTING) unsignedMessage = {
29654
+ domain: action.message.domain,
29655
+ types: action.message.types,
29656
+ value: action.message.value
29657
+ };
29658
+ }
29659
+ if (!unsignedMessage) return undefined;
29660
+ return {
29661
+ orderHash: orderHash,
29662
+ orderComponents: orderComponents,
29663
+ unsignedMessage: unsignedMessage
29664
+ };
29665
+ };
29666
+
29667
+
29668
+
29669
+
29670
+
28696
29671
  const $64863c39386de592$export$4249179755829904 = (type, contractAddress, amount, spenderAddress)=>{
28697
29672
  switch(type){
28698
29673
  case ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20:
@@ -28710,17 +29685,10 @@ const $64863c39386de592$export$4249179755829904 = (type, contractAddress, amount
28710
29685
  };
28711
29686
  }
28712
29687
  };
28713
- const $64863c39386de592$export$e0cb3ec5326d496b = async (actions)=>{
28714
- for (const action of actions){
28715
- if (action.type === (ActionType).TRANSACTION && action.purpose === (TransactionPurpose).FULFILL_ORDER) // eslint-disable-next-line no-await-in-loop
28716
- return await action.buildTransaction();
28717
- }
28718
- return undefined;
28719
- };
28720
- const $64863c39386de592$export$8f2ff92ab8657f0b = (gasLimit, transaction)=>{
28721
- if (transaction) return {
29688
+ const $64863c39386de592$export$8f2ff92ab8657f0b = (gasLimit, unsignedTransactions)=>{
29689
+ if (unsignedTransactions.fulfilmentTransactions.length > 0) return {
28722
29690
  type: ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION,
28723
- transaction: transaction
29691
+ transaction: unsignedTransactions.fulfilmentTransactions[0]
28724
29692
  };
28725
29693
  return {
28726
29694
  type: ($4b58188d47aafe8d$export$65c64e46348ee3c1).GAS,
@@ -28746,12 +29714,18 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
28746
29714
  message: err.message
28747
29715
  });
28748
29716
  }
28749
- let unsignedTransaction;
29717
+ let unsignedTransactions = {
29718
+ approvalTransactions: [],
29719
+ fulfilmentTransactions: []
29720
+ };
28750
29721
  try {
28751
29722
  const fulfillerAddress = await provider.getSigner().getAddress();
28752
29723
  const { actions: actions } = await orderbook.fulfillOrder(orderId, fulfillerAddress);
28753
- unsignedTransaction = await $64863c39386de592$export$e0cb3ec5326d496b(actions);
28754
- } catch {}
29724
+ unsignedTransactions = await (0, $a7367d01c6e76b1c$export$b087719c36e0f2dc)(actions);
29725
+ } catch {
29726
+ // Silently ignore error as this is usually thrown if user does not have enough balance
29727
+ // todo: if balance error - can we determine if its the balance error otherwise throw?
29728
+ }
28755
29729
  let amount = (BigNumber$1).from("0");
28756
29730
  let type = ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE;
28757
29731
  let contractAddress = "";
@@ -28779,12 +29753,78 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
28779
29753
  const itemRequirements = [
28780
29754
  $64863c39386de592$export$4249179755829904(type, contractAddress, amount, spenderAddress)
28781
29755
  ];
28782
- await ($0e7419077c373b24$export$9e073f9ada8c81e6)(config, provider, itemRequirements, $64863c39386de592$export$8f2ff92ab8657f0b(gasLimit, unsignedTransaction));
29756
+ const smartCheckoutResult = await ($0e7419077c373b24$export$9e073f9ada8c81e6)(config, provider, itemRequirements, $64863c39386de592$export$8f2ff92ab8657f0b(gasLimit, unsignedTransactions));
29757
+ if (smartCheckoutResult.sufficient) {
29758
+ const approvalResult = await ($25ac589234c10b67$export$19693ca396db083e)(provider, unsignedTransactions.approvalTransactions);
29759
+ if (approvalResult.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29760
+ smartCheckoutResult: smartCheckoutResult,
29761
+ orderId: orderId,
29762
+ status: {
29763
+ type: ($aa144554f9ef124b$export$226b052ecb8ca80).FAILED,
29764
+ transactionHash: approvalResult.transactionHash,
29765
+ reason: approvalResult.reason
29766
+ }
29767
+ };
29768
+ const fulfilmentResult = await ($25ac589234c10b67$export$2161274619257102)(provider, unsignedTransactions.fulfilmentTransactions);
29769
+ if (fulfilmentResult.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29770
+ smartCheckoutResult: smartCheckoutResult,
29771
+ orderId: orderId,
29772
+ status: {
29773
+ type: ($aa144554f9ef124b$export$226b052ecb8ca80).FAILED,
29774
+ transactionHash: fulfilmentResult.transactionHash,
29775
+ reason: fulfilmentResult.reason
29776
+ }
29777
+ };
29778
+ return {
29779
+ smartCheckoutResult: smartCheckoutResult,
29780
+ orderId: orderId,
29781
+ status: {
29782
+ type: ($aa144554f9ef124b$export$226b052ecb8ca80).SUCCESS
29783
+ }
29784
+ };
29785
+ }
28783
29786
  return {
28784
- itemRequirements: itemRequirements,
28785
- gasToken: {
28786
- type: ($4b58188d47aafe8d$export$537fa3efd10ed435).NATIVE,
28787
- limit: (BigNumber$1).from(gasLimit)
29787
+ smartCheckoutResult: smartCheckoutResult,
29788
+ orderId: orderId
29789
+ };
29790
+ };
29791
+
29792
+
29793
+
29794
+
29795
+
29796
+
29797
+
29798
+
29799
+
29800
+ const $9c3db1bb9c8b69d3$export$70b61ad426ddbe54 = async (config, provider, orderId)=>{
29801
+ let unsignedCancelOrderTransaction;
29802
+ try {
29803
+ const offererAddress = await provider.getSigner().getAddress();
29804
+ const orderbook = await $67fc622a2b913d5f$export$c60ce6c6a92bc2ff(config);
29805
+ const cancelOrderResponse = await orderbook.cancelOrder(orderId, offererAddress);
29806
+ unsignedCancelOrderTransaction = cancelOrderResponse.unsignedCancelOrderTransaction;
29807
+ } catch (err) {
29808
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while cancelling the order listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CANCEL_ORDER_LISTING_ERROR, {
29809
+ orderId: orderId,
29810
+ message: err.message
29811
+ });
29812
+ }
29813
+ const result = await ($25ac589234c10b67$export$2161274619257102)(provider, [
29814
+ unsignedCancelOrderTransaction
29815
+ ]);
29816
+ if (result.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29817
+ orderId: orderId,
29818
+ status: {
29819
+ type: ($1e6b81bbd98b3a91$export$c0189a8c30039654).FAILED,
29820
+ transactionHash: result.transactionHash,
29821
+ reason: result.reason
29822
+ }
29823
+ };
29824
+ return {
29825
+ orderId: orderId,
29826
+ status: {
29827
+ type: ($1e6b81bbd98b3a91$export$c0189a8c30039654).SUCCESS
28788
29828
  }
28789
29829
  };
28790
29830
  };
@@ -28797,20 +29837,119 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
28797
29837
 
28798
29838
 
28799
29839
 
28800
- async function $0e0060cb42e136d2$export$339cb2be73677b30(config, existingReadOnlyProviders) {
28801
- if (config.isProduction && existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM)) return existingReadOnlyProviders;
28802
- if (existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).SEPOLIA)) return existingReadOnlyProviders;
28803
- const readOnlyProviders = new Map();
28804
- const allowedNetworks = await $de192de6ef100f9f$export$3043f6442a9ef563(config, {
28805
- type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
29840
+
29841
+
29842
+
29843
+
29844
+ const $9085b221b72ac69e$export$af768ccdf17d5c04 = (id, contractAddress, spenderAddress)=>({
29845
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
29846
+ id: id,
29847
+ contractAddress: contractAddress,
29848
+ spenderAddress: spenderAddress
28806
29849
  });
28807
- allowedNetworks.networks.forEach((networkInfo)=>{
28808
- const rpcUrl = config.networkMap.get(networkInfo.chainId)?.rpcUrls[0];
28809
- const provider = new (JsonRpcProvider)(rpcUrl);
28810
- readOnlyProviders.set(networkInfo.chainId, provider);
29850
+ const $9085b221b72ac69e$export$586d02673c66d423 = (buyToken)=>{
29851
+ if (buyToken.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
29852
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
29853
+ amount: buyToken.amount.toString()
29854
+ };
29855
+ return {
29856
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20,
29857
+ amount: buyToken.amount.toString(),
29858
+ contractAddress: buyToken.contractAddress
29859
+ };
29860
+ };
29861
+ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, id, contractAddress, buyToken)=>{
29862
+ let orderbook;
29863
+ let listing;
29864
+ let spenderAddress = "";
29865
+ try {
29866
+ const walletAddress = await provider.getSigner().getAddress();
29867
+ orderbook = await $67fc622a2b913d5f$export$c60ce6c6a92bc2ff(config);
29868
+ const { seaportContractAddress: seaportContractAddress } = orderbook.config();
29869
+ spenderAddress = seaportContractAddress;
29870
+ listing = await orderbook.prepareListing({
29871
+ makerAddress: walletAddress,
29872
+ buy: $9085b221b72ac69e$export$586d02673c66d423(buyToken),
29873
+ sell: {
29874
+ type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
29875
+ contractAddress: contractAddress,
29876
+ tokenId: id
29877
+ }
29878
+ });
29879
+ } catch (err) {
29880
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while preparing the listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PREPARE_ORDER_LISTING_ERROR, {
29881
+ message: err.message,
29882
+ id: id,
29883
+ collectionAddress: contractAddress
29884
+ });
29885
+ }
29886
+ const itemRequirements = [
29887
+ $9085b221b72ac69e$export$af768ccdf17d5c04(id, contractAddress, spenderAddress)
29888
+ ];
29889
+ const smartCheckoutResult = await ($0e7419077c373b24$export$9e073f9ada8c81e6)(config, provider, itemRequirements, {
29890
+ type: ($4b58188d47aafe8d$export$65c64e46348ee3c1).GAS,
29891
+ gasToken: {
29892
+ type: ($4b58188d47aafe8d$export$537fa3efd10ed435).NATIVE,
29893
+ limit: (BigNumber$1).from((constants).estimatedFulfillmentGasGwei)
29894
+ }
28811
29895
  });
28812
- return readOnlyProviders;
28813
- }
29896
+ if (smartCheckoutResult.sufficient) {
29897
+ const unsignedMessage = ($a7367d01c6e76b1c$export$d62081fac18000c2)(listing.orderHash, listing.orderComponents, listing.actions);
29898
+ if (!unsignedMessage) // For sell it is expected the orderbook will always return an unsigned message
29899
+ // If for some reason it is missing then we cannot proceed with the create listing
29900
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("The unsigned message is missing after preparing the listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).SIGN_MESSAGE_ERROR, {
29901
+ id: id,
29902
+ collectionAddress: contractAddress
29903
+ });
29904
+ const signedMessage = await ($25ac589234c10b67$export$1d9a7a8a40780de)(provider, unsignedMessage);
29905
+ const unsignedTransactions = await ($a7367d01c6e76b1c$export$b087719c36e0f2dc)(listing.actions);
29906
+ const approvalResult = await ($25ac589234c10b67$export$19693ca396db083e)(provider, unsignedTransactions.approvalTransactions);
29907
+ if (approvalResult.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29908
+ id: id,
29909
+ collectionAddress: contractAddress,
29910
+ smartCheckoutResult: smartCheckoutResult,
29911
+ status: {
29912
+ type: ($c2874b006e92b115$export$a9780122aaa0801a).FAILED,
29913
+ transactionHash: approvalResult.transactionHash,
29914
+ reason: approvalResult.reason
29915
+ }
29916
+ };
29917
+ let orderId = "";
29918
+ try {
29919
+ const order = await orderbook.createListing({
29920
+ orderComponents: signedMessage.orderComponents,
29921
+ orderHash: signedMessage.orderHash,
29922
+ orderSignature: signedMessage.signedMessage
29923
+ });
29924
+ orderId = order.result.id;
29925
+ } catch (err) {
29926
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while creating the listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CREATE_ORDER_LISTING_ERROR, {
29927
+ message: err.message,
29928
+ id: id,
29929
+ collectionAddress: contractAddress
29930
+ });
29931
+ }
29932
+ return {
29933
+ id: id,
29934
+ collectionAddress: contractAddress,
29935
+ smartCheckoutResult: smartCheckoutResult,
29936
+ status: {
29937
+ type: ($c2874b006e92b115$export$a9780122aaa0801a).SUCCESS,
29938
+ orderId: orderId
29939
+ }
29940
+ };
29941
+ }
29942
+ return {
29943
+ id: id,
29944
+ collectionAddress: contractAddress,
29945
+ smartCheckoutResult: smartCheckoutResult
29946
+ };
29947
+ };
29948
+
29949
+
29950
+
29951
+
29952
+
28814
29953
 
28815
29954
 
28816
29955
  const $a8cb37a3fc8eb863$var$SANDBOX_CONFIGURATION = {
@@ -28941,6 +30080,26 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
28941
30080
  await $64863c39386de592$export$7f8e2b98eca5a7f0(this.config, web3Provider, params.orderId);
28942
30081
  }
28943
30082
  /**
30083
+ * Determines the requirements for performing a sell.
30084
+ * @param {SellParams} params - The parameters for the sell.
30085
+ */ async sell(params) {
30086
+ if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
30087
+ // eslint-disable-next-line no-console
30088
+ console.warn("This endpoint is currently under construction.");
30089
+ const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
30090
+ await $9085b221b72ac69e$export$e761f9e0703de895(this.config, web3Provider, params.id, params.collectionAddress, params.buyToken);
30091
+ }
30092
+ /**
30093
+ * Cancels a sell.
30094
+ * @param {CancelParams} params - The parameters for the cancel.
30095
+ */ async cancel(params) {
30096
+ if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
30097
+ // eslint-disable-next-line no-console
30098
+ console.warn("This endpoint is currently under construction.");
30099
+ const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
30100
+ await $9c3db1bb9c8b69d3$export$70b61ad426ddbe54(this.config, web3Provider, params.orderId);
30101
+ }
30102
+ /**
28944
30103
  * Determines the transaction requirements to complete a purchase.
28945
30104
  * @params {SmartCheckoutParams} params - The parameters for smart checkout.
28946
30105
  */ async smartCheckout(params) {
@@ -28948,6 +30107,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
28948
30107
  // eslint-disable-next-line no-console
28949
30108
  console.warn("This endpoint is currently under construction.");
28950
30109
  const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
30110
+ // console.log('Smart Checkout Params ::', params);
28951
30111
  await $0e7419077c373b24$export$9e073f9ada8c81e6(this.config, web3Provider, params.itemRequirements, params.transactionOrGasAmount);
28952
30112
  }
28953
30113
  /**
@@ -28987,7 +30147,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
28987
30147
  function $parcel$export(e, n, v, s) {
28988
30148
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
28989
30149
  }
28990
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.0.0";
30150
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.17.1";
28991
30151
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
28992
30152
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
28993
30153
 
@@ -29794,6 +30954,37 @@ const _abi$2 = [
29794
30954
  name: "IImmutableERC721TokenAlreadyBurned",
29795
30955
  type: "error",
29796
30956
  },
30957
+ {
30958
+ inputs: [],
30959
+ name: "InvalidShortString",
30960
+ type: "error",
30961
+ },
30962
+ {
30963
+ inputs: [],
30964
+ name: "InvalidSignature",
30965
+ type: "error",
30966
+ },
30967
+ {
30968
+ inputs: [],
30969
+ name: "PermitExpired",
30970
+ type: "error",
30971
+ },
30972
+ {
30973
+ inputs: [],
30974
+ name: "SignerCannotBeZerothAddress",
30975
+ type: "error",
30976
+ },
30977
+ {
30978
+ inputs: [
30979
+ {
30980
+ internalType: "string",
30981
+ name: "str",
30982
+ type: "string",
30983
+ },
30984
+ ],
30985
+ name: "StringTooLong",
30986
+ type: "error",
30987
+ },
29797
30988
  {
29798
30989
  inputs: [
29799
30990
  {
@@ -29866,6 +31057,12 @@ const _abi$2 = [
29866
31057
  name: "ApprovalForAll",
29867
31058
  type: "event",
29868
31059
  },
31060
+ {
31061
+ anonymous: false,
31062
+ inputs: [],
31063
+ name: "EIP712DomainChanged",
31064
+ type: "event",
31065
+ },
29869
31066
  {
29870
31067
  anonymous: false,
29871
31068
  inputs: [
@@ -29998,6 +31195,19 @@ const _abi$2 = [
29998
31195
  stateMutability: "view",
29999
31196
  type: "function",
30000
31197
  },
31198
+ {
31199
+ inputs: [],
31200
+ name: "DOMAIN_SEPARATOR",
31201
+ outputs: [
31202
+ {
31203
+ internalType: "bytes32",
31204
+ name: "",
31205
+ type: "bytes32",
31206
+ },
31207
+ ],
31208
+ stateMutability: "view",
31209
+ type: "function",
31210
+ },
30001
31211
  {
30002
31212
  inputs: [],
30003
31213
  name: "MINTER_ROLE",
@@ -30113,6 +31323,49 @@ const _abi$2 = [
30113
31323
  stateMutability: "view",
30114
31324
  type: "function",
30115
31325
  },
31326
+ {
31327
+ inputs: [],
31328
+ name: "eip712Domain",
31329
+ outputs: [
31330
+ {
31331
+ internalType: "bytes1",
31332
+ name: "fields",
31333
+ type: "bytes1",
31334
+ },
31335
+ {
31336
+ internalType: "string",
31337
+ name: "name",
31338
+ type: "string",
31339
+ },
31340
+ {
31341
+ internalType: "string",
31342
+ name: "version",
31343
+ type: "string",
31344
+ },
31345
+ {
31346
+ internalType: "uint256",
31347
+ name: "chainId",
31348
+ type: "uint256",
31349
+ },
31350
+ {
31351
+ internalType: "address",
31352
+ name: "verifyingContract",
31353
+ type: "address",
31354
+ },
31355
+ {
31356
+ internalType: "bytes32",
31357
+ name: "salt",
31358
+ type: "bytes32",
31359
+ },
31360
+ {
31361
+ internalType: "uint256[]",
31362
+ name: "extensions",
31363
+ type: "uint256[]",
31364
+ },
31365
+ ],
31366
+ stateMutability: "view",
31367
+ type: "function",
31368
+ },
30116
31369
  {
30117
31370
  inputs: [
30118
31371
  {
@@ -30404,6 +31657,25 @@ const _abi$2 = [
30404
31657
  stateMutability: "view",
30405
31658
  type: "function",
30406
31659
  },
31660
+ {
31661
+ inputs: [
31662
+ {
31663
+ internalType: "uint256",
31664
+ name: "tokenId",
31665
+ type: "uint256",
31666
+ },
31667
+ ],
31668
+ name: "nonces",
31669
+ outputs: [
31670
+ {
31671
+ internalType: "uint256",
31672
+ name: "",
31673
+ type: "uint256",
31674
+ },
31675
+ ],
31676
+ stateMutability: "view",
31677
+ type: "function",
31678
+ },
30407
31679
  {
30408
31680
  inputs: [],
30409
31681
  name: "operatorAllowlist",
@@ -30436,6 +31708,34 @@ const _abi$2 = [
30436
31708
  stateMutability: "view",
30437
31709
  type: "function",
30438
31710
  },
31711
+ {
31712
+ inputs: [
31713
+ {
31714
+ internalType: "address",
31715
+ name: "spender",
31716
+ type: "address",
31717
+ },
31718
+ {
31719
+ internalType: "uint256",
31720
+ name: "tokenId",
31721
+ type: "uint256",
31722
+ },
31723
+ {
31724
+ internalType: "uint256",
31725
+ name: "deadline",
31726
+ type: "uint256",
31727
+ },
31728
+ {
31729
+ internalType: "bytes",
31730
+ name: "sig",
31731
+ type: "bytes",
31732
+ },
31733
+ ],
31734
+ name: "permit",
31735
+ outputs: [],
31736
+ stateMutability: "nonpayable",
31737
+ type: "function",
31738
+ },
30439
31739
  {
30440
31740
  inputs: [
30441
31741
  {
@@ -30933,7 +32233,7 @@ const _abi$2 = [
30933
32233
  type: "function",
30934
32234
  },
30935
32235
  ];
30936
- const _bytecode$2 = "0x608060405260006013553480156200001657600080fd5b50604051620052f1380380620052f18339810160408190526200003991620007cd565b8787878787878787868681818181600662000055838262000960565b50600762000064828262000960565b50506801000000000000000060095550600d62000082838262000960565b50600e62000091828262000960565b50620000a69350600092508b915050620000f1565b620000b2828262000134565b620000bd8362000239565b6016620000cb868262000960565b506015620000da858262000960565b505050505050505050505050505050505062000b74565b6200010882826200025560201b620011e11760201c565b60008281526001602090815260409091206200012f91839062001265620002f5821b17901c565b505050565b6127106001600160601b0382161115620001a85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002005760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200019f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000620002468162000315565b620002518262000324565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000251576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002b13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200030c836001600160a01b0384166200041d565b90505b92915050565b6200032181336200046f565b50565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801562000370573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000396919062000a2c565b620003b45760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260018301602052604081205462000466575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200030f565b5060006200030f565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200025157620004ae81620004ff60201b6200127a1760201c565b620004c48360206200128c62000512821b17811c565b604051602001620004d792919062000a50565b60408051601f198184030181529082905262461bcd60e51b82526200019f9160040162000ac9565b60606200030f6001600160a01b03831660145b606060006200052383600262000b14565b6200053090600262000b2e565b6001600160401b038111156200054a576200054a620006e8565b6040519080825280601f01601f19166020018201604052801562000575576020820181803683370190505b509050600360fc1b8160008151811062000593576200059362000b44565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620005c557620005c562000b44565b60200101906001600160f81b031916908160001a9053506000620005eb84600262000b14565b620005f890600162000b2e565b90505b60018111156200067a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000630576200063062000b44565b1a60f81b82828151811062000649576200064962000b44565b60200101906001600160f81b031916908160001a90535060049490941c93620006728162000b5a565b9050620005fb565b5083156200030c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200019f565b80516001600160a01b0381168114620006e357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200071b57818101518382015260200162000701565b50506000910152565b600082601f8301126200073657600080fd5b81516001600160401b0380821115620007535762000753620006e8565b604051601f8301601f19908116603f011681019082821181831017156200077e576200077e620006e8565b816040528381528660208588010111156200079857600080fd5b620007ab846020830160208901620006fe565b9695505050505050565b80516001600160601b0381168114620006e357600080fd5b600080600080600080600080610100898b031215620007eb57600080fd5b620007f689620006cb565b60208a01519098506001600160401b03808211156200081457600080fd5b620008228c838d0162000724565b985060408b01519150808211156200083957600080fd5b620008478c838d0162000724565b975060608b01519150808211156200085e57600080fd5b6200086c8c838d0162000724565b965060808b01519150808211156200088357600080fd5b50620008928b828c0162000724565b945050620008a360a08a01620006cb565b9250620008b360c08a01620006cb565b9150620008c360e08a01620007b5565b90509295985092959890939650565b600181811c90821680620008e757607f821691505b6020821081036200090857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200012f57600081815260208120601f850160051c81016020861015620009375750805b601f850160051c820191505b81811015620009585782815560010162000943565b505050505050565b81516001600160401b038111156200097c576200097c620006e8565b62000994816200098d8454620008d2565b846200090e565b602080601f831160018114620009cc5760008415620009b35750858301515b600019600386901b1c1916600185901b17855562000958565b600085815260208120601f198616915b82811015620009fd57888601518255948401946001909101908401620009dc565b508582101562000a1c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121562000a3f57600080fd5b815180151581146200030c57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000a8a816017850160208801620006fe565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162000abd816028840160208801620006fe565b01602801949350505050565b602081526000825180602084015262000aea816040850160208701620006fe565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176200030f576200030f62000afe565b808201808211156200030f576200030f62000afe565b634e487b7160e01b600052603260045260246000fd5b60008162000b6c5762000b6c62000afe565b506000190190565b61476d8062000b846000396000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c806369e2f0fb1161019d578063a22cb465116100e9578063d547741f116100a2578063e4e18f6d1161007c578063e4e18f6d146106af578063e8a3d485146106c2578063e985e9c5146106ca578063eea98768146106dd57600080fd5b8063d547741f14610676578063e192785914610689578063e4623c1b1461069c57600080fd5b8063a22cb46514610602578063a701281614610615578063b88d4fde14610628578063c87b56dd1461063b578063ca15c8731461064e578063d53913931461066157600080fd5b806391d14854116101565780639e2641a3116101305780639e2641a3146105c15780639f15d700146105d4578063a1448194146105e7578063a217fddf146105fa57600080fd5b806391d1485414610593578063938e3d7b146105a657806395d89b41146105b957600080fd5b806369e2f0fb1461052c5780636c0360eb1461053f57806370a082311461054757806374f16a811461055a578063885e7a081461056d5780639010d07c1461058057600080fd5b80632d2c5a8b1161025c57806342842e0e116102155780634f558e79116101ef5780634f558e79146104e057806355f804b3146104f3578063567e4075146105065780636352211e1461051957600080fd5b806342842e0e146104a757806342966c68146104ba578063439aed34146104cd57600080fd5b80632d2c5a8b146104335780632f2ff15d1461044657806331ae450b1461045957806336568abe1461046e5780633dd1eb611461048157806340c10f191461049457600080fd5b80631f8ebbd1116102ae5780631f8ebbd11461039b578063234af046146103a557806323b872dd146103b8578063248a9ca3146103cb57806329326f29146103ee5780632a55205a1461040157600080fd5b80628ad946146102f557806301ffc9a71461030a57806306fdde0314610332578063081812fc14610347578063095ea7b31461037257806318160ddd14610385575b600080fd5b61030861030336600461391b565b6106f0565b005b61031d61031836600461396b565b6107c6565b60405190151581526020015b60405180910390f35b61033a6107d7565b60405161032991906139d8565b61035a6103553660046139eb565b6107e6565b6040516001600160a01b039091168152602001610329565b610308610380366004613a1b565b610806565b61038d610961565b604051908152602001610329565b600160401b61038d565b6103086103b3366004613be7565b610978565b6103086103c6366004613c2f565b610999565b61038d6103d93660046139eb565b60009081526020819052604090206001015490565b60025461035a906001600160a01b031681565b61041461040f366004613c6b565b6109bb565b604080516001600160a01b039093168352602083019190915201610329565b610308610441366004613c8d565b610a69565b610308610454366004613d49565b610a8a565b610461610aaf565b6040516103299190613d75565b61030861047c366004613d49565b610b5d565b61030861048f366004613dc2565b610bd7565b6103086104a2366004613a1b565b610bfa565b6103086104b5366004613c2f565b610c1c565b6103086104c83660046139eb565b610c37565b6103086104db366004613df4565b610c6e565b61031d6104ee3660046139eb565b610c97565b610308610501366004613e87565b610ca2565b610308610514366004613a1b565b610cb9565b61035a6105273660046139eb565b610cdb565b61030861053a366004613dc2565b610cfb565b61033a610d1e565b61038d610555366004613dc2565b610dac565b610308610568366004613be7565b610dca565b61030861057b366004613ecf565b610dd3565b61035a61058e366004613c6b565b610de8565b61031d6105a1366004613d49565b610e07565b6103086105b4366004613e87565b610e30565b61033a610e47565b6103086105cf366004613be7565b610e51565b6103086105e2366004613a1b565b610e72565b6103086105f5366004613a1b565b610ecc565b61038d600081565b610308610610366004613f07565b610eee565b610308610623366004613f82565b61103f565b610308610636366004613fe6565b61109f565b61033a6106493660046139eb565b6110c8565b61038d61065c3660046139eb565b6110d3565b61038d6a4d494e5445525f524f4c4560a81b81565b610308610684366004613d49565b6110ea565b610308610697366004613c8d565b61110f565b6103086106aa366004614061565b611130565b6103086106bd366004613dc2565b61116e565b61033a611182565b61031d6106d83660046140a2565b61118f565b6103086106eb366004613a1b565b6111bf565b6106fd60208201826140cc565b905061070c60408301836140cc565b90501461072c5760405163359a1bc360e01b815260040160405180910390fd5b60005b61073c60408301836140cc565b90508110156107c2576107b06107556020840184613dc2565b61076260208501856140cc565b8481811061077257610772614115565b90506020020160208101906107879190613dc2565b61079460408601866140cc565b858181106107a4576107a4614115565b90506020020135610c1c565b806107ba81614141565b91505061072f565b5050565b60006107d182611427565b92915050565b60606107e1611432565b905090565b6000600160401b8210156107fd576107d1826114c4565b6107d1826114eb565b81333b1580159061088057506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e919061415a565b155b156108a55760405163f6fa4cbd60e01b81523360048201526024015b60405180910390fd5b6001600160a01b0381163b1580159061092957506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610927919061415a565b155b15610952576040516341b8d58160e11b81526001600160a01b038216600482015260240161089c565b61095c8383611576565b505050565b600060135461096e611596565b6107e19190614177565b6a4d494e5445525f524f4c4560a81b610990816115b2565b6107c2826115bc565b600160401b8110156109b05761095c83838361160b565b61095c83838361163b565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a305750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a4f906001600160601b03168761418a565b610a5991906141a1565b91519350909150505b9250929050565b6a4d494e5445525f524f4c4560a81b610a81816115b2565b6107c282611660565b600082815260208190526040902060010154610aa5816115b2565b61095c83836116af565b60606000610abc816110d3565b90506000816001600160401b03811115610ad857610ad8613a45565b604051908082528060200260200182016040528015610b01578160200160208202803683370190505b50905060005b82811015610b5657610b1a600082610de8565b828281518110610b2c57610b2c614115565b6001600160a01b039092166020928302919091019091015280610b4e81614141565b915050610b07565b5092915050565b6001600160a01b0381163314610bcd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161089c565b6107c282826116d1565b6000610be2816115b2565b6107c26a4d494e5445525f524f4c4560a81b83610a8a565b6a4d494e5445525f524f4c4560a81b610c12816115b2565b61095c83836116f3565b61095c8383836040518060200160405280600081525061109f565b610c42335b8261177a565b610c6257604051630247e3a960e01b81526004810182905260240161089c565b610c6b816117a3565b50565b6a4d494e5445525f524f4c4560a81b610c86816115b2565b610c918484846117f6565b50505050565b60006107d1826118c1565b6000610cad816115b2565b601661095c8382614243565b6a4d494e5445525f524f4c4560a81b610cd1816115b2565b61095c838361191e565b6000600160401b821015610cf2576107d182611928565b6107d182611988565b6000610d06816115b2565b6107c26a4d494e5445525f524f4c4560a81b836110ea565b60168054610d2b906141c3565b80601f0160208091040260200160405190810160405280929190818152602001828054610d57906141c3565b8015610da45780601f10610d7957610100808354040283529160200191610da4565b820191906000526020600020905b815481529060010190602001808311610d8757829003601f168201915b505050505081565b6000610db78261199c565b610dc083611a67565b6107d19190614177565b610c6b81611aed565b6000610dde816115b2565b61095c8383611b79565b6000828152600160205260408120610e009083611c33565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610e3b816115b2565b601561095c8382614243565b60606107e1611c3f565b6a4d494e5445525f524f4c4560a81b610e69816115b2565b6107c282611c4e565b6000610e7d82610cdb565b9050826001600160a01b0316816001600160a01b031614610ec357604051634fefd56160e01b8152600481018390526001600160a01b038216602482015260440161089c565b61095c82610c37565b6a4d494e5445525f524f4c4560a81b610ee4816115b2565b61095c8383611c9d565b81333b15801590610f6857506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015610f42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f66919061415a565b155b15610f885760405163f6fa4cbd60e01b815233600482015260240161089c565b6001600160a01b0381163b1580159061100c57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015610fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100a919061415a565b155b15611035576040516341b8d58160e11b81526001600160a01b038216600482015260240161089c565b61095c8383611d0b565b6a4d494e5445525f524f4c4560a81b611057816115b2565b60005b848110156110975761108586868381811061107757611077614115565b9050602002013585856117f6565b8061108f81614141565b91505061105a565b505050505050565b600160401b8210156110bc576110b784848484611d15565b610c91565b610c9184848484611d48565b60606107d182611d6d565b60008181526001602052604081206107d190611dd3565b600082815260208190526040902060010154611105816115b2565b61095c83836116d1565b6a4d494e5445525f524f4c4560a81b611127816115b2565b6107c282611ddd565b60005b8181101561095c5761115c83838381811061115057611150614115565b90506020020135610c37565b8061116681614141565b915050611133565b6000611179816115b2565b6107c282611e2c565b60158054610d2b906141c3565b6001600160a01b03808316600090815260126020908152604080832093851683529290529081205460ff16610e00565b6a4d494e5445525f524f4c4560a81b6111d7816115b2565b61095c8383611f21565b6111eb8282610e07565b6107c2576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556112213390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610e00836001600160a01b038416611f2b565b60606107d16001600160a01b03831660145b6060600061129b83600261418a565b6112a6906002614177565b6001600160401b038111156112bd576112bd613a45565b6040519080825280601f01601f1916602001820160405280156112e7576020820181803683370190505b509050600360fc1b8160008151811061130257611302614115565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061133157611331614115565b60200101906001600160f81b031916908160001a905350600061135584600261418a565b611360906001614177565b90505b60018111156113d8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061139457611394614115565b1a60f81b8282815181106113aa576113aa614115565b60200101906001600160f81b031916908160001a90535060049490941c936113d181614302565b9050611363565b508315610e005760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161089c565b60006107d182611f7a565b6060600d8054611441906141c3565b80601f016020809104026020016040519081016040528092919081815260200182805461146d906141c3565b80156114ba5780601f1061148f576101008083540402835291602001916114ba565b820191906000526020600020905b81548152906001019060200180831161149d57829003601f168201915b5050505050905090565b60006114cf82611fba565b506000908152601160205260409020546001600160a01b031690565b60006114f6826118c1565b61155a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161089c565b506000908152600a60205260409020546001600160a01b031690565b600160401b81101561158c576107c2828261200a565b6107c2828261211a565b60006115a0612222565b6115a861228c565b6107e19190614319565b610c6b81336122a0565b60005b81518110156107c25760008282815181106115dc576115dc614115565b602002602001015190506115f8816000015182602001516122f9565b508061160381614141565b9150506115bf565b61161433610c3c565b6116305760405162461bcd60e51b815260040161089c9061432c565b61095c83838361233a565b61164433610c3c565b6116305760405162461bcd60e51b815260040161089c90614379565b60005b81518110156107c257600082828151811061168057611680614115565b6020026020010151905061169c8160000151826020015161191e565b50806116a781614141565b915050611663565b6116b982826111e1565b600082815260016020526040902061095c9082611265565b6116db8282612541565b600082815260016020526040902061095c90826125a6565b600160401b811061171a5760405163b73c99f560e01b81526004810182905260240161089c565b600881901c600090815260146020526040902054600160ff83161b1615611757576040516305dcda1160e51b81526004810182905260240161089c565b61176182826125bb565b6013805490600061177183614141565b91905055505050565b6000600160401b821015611799576117928383612716565b90506107d1565b610e008383612775565b600160401b8110156117ed576117b88161283a565b600881901c60009081526014602052604081208054600160ff85161b17905560138054916117e583614302565b919050555050565b610c6b816128bd565b6127106001600160601b03821611156118215760405162461bcd60e51b815260040161089c906143cd565b6001600160a01b0382166118775760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d65746572730000000000604482015260640161089c565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6000600160401b821015611915576000828152600f60205260409020546001600160a01b0316158015906107d15750600882901c600090815260146020526040902054600160ff84161b1615151592915050565b6107d1826128ff565b6107c28282612934565b6000818152600f60205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161089c565b6000806119948361294e565b509392505050565b60006001600160a01b038216611a0a5760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b606482015260840161089c565b6000600160401b5b600954811015610b5657611a25816118c1565b15611a5757611a3381610cdb565b6001600160a01b0316846001600160a01b031603611a5757611a5482614141565b91505b611a6081614141565b9050611a12565b60006001600160a01b038216611ad15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161089c565b506001600160a01b031660009081526010602052604090205490565b60005b81518110156107c2576000828281518110611b0d57611b0d614115565b6020026020010151905060005b816020015151811015611b6457611b52826000015183602001518381518110611b4557611b45614115565b6020026020010151610e72565b80611b5c81614141565b915050611b1a565b50508080611b7190614141565b915050611af0565b6127106001600160601b0382161115611ba45760405162461bcd60e51b815260040161089c906143cd565b6001600160a01b038216611bfa5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640161089c565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000610e0083836129e5565b6060600e8054611441906141c3565b60005b81518110156107c2576000828281518110611c6e57611c6e614115565b60200260200101519050611c8a81600001518260200151612a0f565b5080611c9581614141565b915050611c51565b600160401b8110611cc45760405163b73c99f560e01b81526004810182905260240161089c565b600881901c600090815260146020526040902054600160ff83161b1615611d01576040516305dcda1160e51b81526004810182905260240161089c565b6117618282612a50565b6107c28282612a6a565b611d20335b8361177a565b611d3c5760405162461bcd60e51b815260040161089c9061432c565b610c9184848484612a75565b611d5133611d1a565b611d3c5760405162461bcd60e51b815260040161089c90614379565b6060611d7882611fba565b6000611d82612a99565b90506000815111611da25760405180602001604052806000815250610e00565b80611dac84612aa8565b604051602001611dbd929190614417565b6040516020818303038152906040529392505050565b60006107d1825490565b60005b81518110156107c2576000828281518110611dfd57611dfd614115565b60200260200101519050611e1981600001518260200151611f21565b5080611e2481614141565b915050611de0565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9b919061415a565b611eb85760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6107c28282612b3a565b6000818152600183016020526040812054611f72575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b60006001600160e01b031982166380ac58cd60e01b1480611fab57506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612cb3565b611fc3816118c1565b610c6b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161089c565b600061201582611928565b9050806001600160a01b0316836001600160a01b0316036120825760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161089c565b336001600160a01b038216148061209e575061209e813361118f565b6121105760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161089c565b61095c8383612cf3565b600061212582610cdb565b9050806001600160a01b0316836001600160a01b0316036121945760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b606482015260840161089c565b336001600160a01b03821614806121b057506121b0813361118f565b6121105760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c0000000000606482015260840161089c565b6009546000906701000000000000009082906122429060081c6001614177565b9050815b81811015612286576000818152600c602052604090205461226681612d13565b6122709086614177565b945050808061227e90614141565b915050612246565b50505090565b6000600160401b6009546107e19190614319565b6122aa8282610e07565b6107c2576122b78161127a565b6122c283602061128c565b6040516020016122d3929190614446565b60408051601f198184030181529082905262461bcd60e51b825261089c916004016139d8565b60005b815181101561095c576123288383838151811061231b5761231b614115565b6020026020010151611c9d565b8061233281614141565b9150506122fc565b82823332148015906123b557506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561238f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123b3919061415a565b155b156123d55760405163937db65f60e01b815233600482015260240161089c565b6001600160a01b0382163b1580159061245957506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa158015612433573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612457919061415a565b155b156124825760405163f934453160e01b81526001600160a01b038316600482015260240161089c565b6001600160a01b0381163b1580159061250657506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa1580156124e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612504919061415a565b155b1561252f57604051632a67242160e11b81526001600160a01b038216600482015260240161089c565b61253a858585612d32565b5050505050565b61254b8282610e07565b156107c2576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e00836001600160a01b038416612d54565b6001600160a01b0382166126115760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161089c565b61261a816118c1565b156126675760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161089c565b612670816118c1565b156126bd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161089c565b6001600160a01b038216600081815260106020908152604080832080546001019055848352600f90915280822080546001600160a01b031916841790555183929190600080516020614618833981519152908290a45050565b60008061272283611928565b9050806001600160a01b0316846001600160a01b031614806127495750612749818561118f565b8061276d5750836001600160a01b0316612762846107e6565b6001600160a01b0316145b949350505050565b6000612780826118c1565b6127e45760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161089c565b60006127ef83610cdb565b9050806001600160a01b0316846001600160a01b0316148061282a5750836001600160a01b031661281f846107e6565b6001600160a01b0316145b8061276d575061276d818561118f565b600061284582611928565b905061285082611928565b600083815260116020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552601084528285208054600019019055878552600f90935281842080549091169055519293508492600080516020614618833981519152908390a45050565b60006128c882610cdb565b90506128d5600c83612e47565b60405182906000906001600160a01b03841690600080516020614618833981519152908390a45050565b600881901c6000908152600c6020526040812054600160ff1b60ff84161c161561292b57506000919050565b6107d182612e73565b6107c2828260405180602001604052806000815250612e92565b60008061295a836118c1565b6129bb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161089c565b6129c483612ed3565b6000818152600860205260409020546001600160a01b031694909350915050565b60008260000182815481106129fc576129fc614115565b9060005260206000200154905092915050565b60005b815181101561095c57612a3e83838381518110612a3157612a31614115565b60200260200101516116f3565b80612a4881614141565b915050612a12565b6107c2828260405180602001604052806000815250612ee0565b6107c2338383612eeb565b600160401b821015612a8d576110b784848484612fb9565b610c9184848484612fec565b606060168054611441906141c3565b60606000612ab583613005565b60010190506000816001600160401b03811115612ad457612ad4613a45565b6040519080825280601f01601f191660200182016040528015612afe576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612b0857509392505050565b6000612b4560095490565b905060008211612ba55760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b606482015260840161089c565b6001600160a01b038316612c075760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b606482015260840161089c565b8160096000828254612c199190614177565b9091555050600081815260086020526040902080546001600160a01b0319166001600160a01b038516179055612c50600582612e47565b600080612c5d8484614177565b90506001600160a01b038516915082826000600080516020614618833981519152600080a4600183015b818114612cad5780836000600080516020614618833981519152600080a4600101612c87565b5061253a565b60006001600160e01b031982166380ac58cd60e01b1480612ce457506001600160e01b03198216635b5e139f60e01b145b806107d157506107d1826130dd565b600160401b811015612d09576107c28282613102565b6107c28282613170565b60005b8115612d2d57600019820190911690600101612d16565b919050565b600160401b811015612d495761095c8383836131a5565b61095c8383836132f7565b60008181526001830160205260408120548015612e3d576000612d78600183614319565b8554909150600090612d8c90600190614319565b9050818114612df1576000866000018281548110612dac57612dac614115565b9060005260206000200154905080876000018481548110612dcf57612dcf614115565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612e0257612e026144bb565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6000612e7e60095490565b821080156107d1575050600160401b111590565b6000612e9d60095490565b9050612ea98484612b3a565b612eb76000858386866134cf565b610c915760405162461bcd60e51b815260040161089c906144d1565b60006107d1600583613606565b61095c8383836136fe565b816001600160a01b0316836001600160a01b031603612f4c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161089c565b6001600160a01b03838116600081815260126020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612fc484848461233a565b612fd084848484613731565b610c915760405162461bcd60e51b815260040161089c90614526565b612ff784848461233a565b612eb78484846001856134cf565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106130445772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613070576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061308e57662386f26fc10000830492506010015b6305f5e10083106130a6576305f5e100830492506008015b61271083106130ba57612710830492506004015b606483106130cc576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b0319821663152a902d60e11b14806107d157506107d18261382a565b600081815260116020526040902080546001600160a01b0319166001600160a01b038416908117909155819061313782611928565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061313782610cdb565b826001600160a01b03166131b882611928565b6001600160a01b0316146131de5760405162461bcd60e51b815260040161089c90614578565b6001600160a01b0382166132405760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161089c565b826001600160a01b031661325382611928565b6001600160a01b0316146132795760405162461bcd60e51b815260040161089c90614578565b600081815260116020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260108552838620805460001901905590871680865283862080546001019055868652600f909452828520805490921684179091559051849360008051602061461883398151915291a4505050565b6000806133038361294e565b91509150846001600160a01b0316826001600160a01b03161461337d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b606482015260840161089c565b6001600160a01b0384166133e35760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b606482015260840161089c565b6133ee600084612cf3565b60006133fb846001614177565b600881901c600090815260056020526040902054909150600160ff1b60ff83161c1615801561342b575060095481105b1561346257600081815260086020526040902080546001600160a01b0319166001600160a01b038816179055613462600582612e47565b600084815260086020526040902080546001600160a01b0319166001600160a01b03871617905581841461349b5761349b600585612e47565b83856001600160a01b0316876001600160a01b031660008051602061461883398151915260405160405180910390a4611097565b60006001600160a01b0385163b156135f957506001835b6134f08486614177565b8110156135f357604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906135299033908b90869089906004016145bd565b6020604051808303816000875af1925050508015613564575060408051601f3d908101601f19168201909252613561918101906145fa565b60015b6135c1573d808015613592576040519150601f19603f3d011682016040523d82523d6000602084013e613597565b606091505b5080516000036135b95760405162461bcd60e51b815260040161089c906144d1565b805181602001fd5b8280156135de57506001600160e01b03198116630a85bd0160e11b145b925050806135eb81614141565b9150506134e6565b506135fd565b5060015b95945050505050565b600881901c60008181526020849052604081205490919060ff808516919082181c80156136485761363681613835565b60ff168203600884901b1793506136f5565b600083116136b55760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b606482015260840161089c565b5060001990910160008181526020869052604090205490919080156136f0576136dd81613835565b60ff0360ff16600884901b1793506136f5565b613648565b50505092915050565b613708838361389f565b6137156000848484613731565b61095c5760405162461bcd60e51b815260040161089c90614526565b60006001600160a01b0384163b1561381f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137759033908990889088906004016145bd565b6020604051808303816000875af19250505080156137b0575060408051601f3d908101601f191682019092526137ad918101906145fa565b60015b613805573d8080156137de576040519150601f19603f3d011682016040523d82523d6000602084013e6137e3565b606091505b5080516000036135b95760405162461bcd60e51b815260040161089c90614526565b6001600160e01b031916630a85bd0160e11b14905061276d565b506001949350505050565b60006107d1826138a9565b60006040518061012001604052806101008152602001614638610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61387e856138ce565b02901c8151811061389157613891614115565b016020015160f81c92915050565b6107c282826125bb565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d1826138e6565b60008082116138dc57600080fd5b5060008190031690565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b60006020828403121561392d57600080fd5b81356001600160401b0381111561394357600080fd5b820160608185031215610e0057600080fd5b6001600160e01b031981168114610c6b57600080fd5b60006020828403121561397d57600080fd5b8135610e0081613955565b60005b838110156139a357818101518382015260200161398b565b50506000910152565b600081518084526139c4816020860160208601613988565b601f01601f19169290920160200192915050565b602081526000610e0060208301846139ac565b6000602082840312156139fd57600080fd5b5035919050565b80356001600160a01b0381168114612d2d57600080fd5b60008060408385031215613a2e57600080fd5b613a3783613a04565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613a7d57613a7d613a45565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613aab57613aab613a45565b604052919050565b60006001600160401b03821115613acc57613acc613a45565b5060051b60200190565b6000613ae9613ae484613ab3565b613a83565b8381529050602080820190600585811b850187811115613b0857600080fd5b855b81811015613bdb5780356001600160401b0380821115613b2a5760008081fd5b908801906040828c031215613b3f5760008081fd5b613b47613a5b565b613b5083613a04565b81528683013582811115613b645760008081fd5b8084019350508b601f840112613b7c57600091508182fd5b82359150613b8c613ae483613ab3565b82815291861b8301870191878101908d841115613ba95760008081fd5b938801935b83851015613bc757843582529388019390880190613bae565b828901525087525050938301938301613b0a565b50505050509392505050565b600060208284031215613bf957600080fd5b81356001600160401b03811115613c0f57600080fd5b8201601f81018413613c2057600080fd5b61276d84823560208401613ad6565b600080600060608486031215613c4457600080fd5b613c4d84613a04565b9250613c5b60208501613a04565b9150604084013590509250925092565b60008060408385031215613c7e57600080fd5b50508035926020909101359150565b60006020808385031215613ca057600080fd5b82356001600160401b03811115613cb657600080fd5b8301601f81018513613cc757600080fd5b8035613cd5613ae482613ab3565b81815260069190911b82018301908381019087831115613cf457600080fd5b928401925b82841015613d3e5760408489031215613d125760008081fd5b613d1a613a5b565b613d2385613a04565b81528486013586820152825260409093019290840190613cf9565b979650505050505050565b60008060408385031215613d5c57600080fd5b82359150613d6c60208401613a04565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015613db65783516001600160a01b031683529284019291840191600101613d91565b50909695505050505050565b600060208284031215613dd457600080fd5b610e0082613a04565b80356001600160601b0381168114612d2d57600080fd5b600080600060608486031215613e0957600080fd5b83359250613e1960208501613a04565b9150613e2760408501613ddd565b90509250925092565b60006001600160401b03831115613e4957613e49613a45565b613e5c601f8401601f1916602001613a83565b9050828152838383011115613e7057600080fd5b828260208301376000602084830101529392505050565b600060208284031215613e9957600080fd5b81356001600160401b03811115613eaf57600080fd5b8201601f81018413613ec057600080fd5b61276d84823560208401613e30565b60008060408385031215613ee257600080fd5b613eeb83613a04565b9150613d6c60208401613ddd565b8015158114610c6b57600080fd5b60008060408385031215613f1a57600080fd5b613f2383613a04565b91506020830135613f3381613ef9565b809150509250929050565b60008083601f840112613f5057600080fd5b5081356001600160401b03811115613f6757600080fd5b6020830191508360208260051b8501011115610a6257600080fd5b60008060008060608587031215613f9857600080fd5b84356001600160401b03811115613fae57600080fd5b613fba87828801613f3e565b9095509350613fcd905060208601613a04565b9150613fdb60408601613ddd565b905092959194509250565b60008060008060808587031215613ffc57600080fd5b61400585613a04565b935061401360208601613a04565b92506040850135915060608501356001600160401b0381111561403557600080fd5b8501601f8101871361404657600080fd5b61405587823560208401613e30565b91505092959194509250565b6000806020838503121561407457600080fd5b82356001600160401b0381111561408a57600080fd5b61409685828601613f3e565b90969095509350505050565b600080604083850312156140b557600080fd5b6140be83613a04565b9150613d6c60208401613a04565b6000808335601e198436030181126140e357600080fd5b8301803591506001600160401b038211156140fd57600080fd5b6020019150600581901b3603821315610a6257600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016141535761415361412b565b5060010190565b60006020828403121561416c57600080fd5b8151610e0081613ef9565b808201808211156107d1576107d161412b565b80820281158282048414176107d1576107d161412b565b6000826141be57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806141d757607f821691505b6020821081036141f757634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561095c57600081815260208120601f850160051c810160208610156142245750805b601f850160051c820191505b8181101561109757828155600101614230565b81516001600160401b0381111561425c5761425c613a45565b6142708161426a84546141c3565b846141fd565b602080601f8311600181146142a5576000841561428d5750858301515b600019600386901b1c1916600185901b178555611097565b600085815260208120601f198616915b828110156142d4578886015182559484019460019091019084016142b5565b50858210156142f25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000816143115761431161412b565b506000190190565b818103818111156107d1576107d161412b565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60008351614429818460208801613988565b83519083019061443d818360208801613988565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161447e816017850160208801613988565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516144af816028840160208801613988565b01602801949350505050565b634e487b7160e01b600052603160045260246000fd5b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906145f0908301846139ac565b9695505050505050565b60006020828403121561460c57600080fd5b8151610e008161395556feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a264697066735822122069f1e7de30c125031cf14dee918b767ccf0b99363cb74ee4a00c68cea975db1b64736f6c63430008110033";
32236
+ const _bytecode$2 = "0x61016060405260006013553480156200001757600080fd5b5060405162005dfc38038062005dfc8339810160408190526200003a91620006cb565b8787878787878787868681604051806040016040528060018152602001603160f81b81525083838181838381600690816200007691906200085e565b5060076200008582826200085e565b50506801000000000000000060095550600d620000a383826200085e565b50600e620000b282826200085e565b5050505050620000d2601583620001e160201b620012111790919060201c565b61012052620000ef816016620001e1602090811b6200121117901c565b61014052815160208084019190912060e052815190820120610100524660a0526200017d60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0525062000196905060008962000231565b620001a2828262000274565b620001ad8362000379565b6019620001bb86826200085e565b506018620001ca85826200085e565b5050505050505050505050505050505050620009a8565b60006020835110156200020157620001f98362000472565b90506200022b565b826200021883620004b560201b620012421760201c565b906200022590826200085e565b5060ff90505b92915050565b620002488282620004b860201b620012451760201c565b60008281526001602090815260409091206200026f918390620012c962000559821b17901c565b505050565b6127106001600160601b0382161115620002e85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620003405760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002df565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015620003c5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003eb91906200092a565b620004095760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080829050601f81511115620004a0578260405163305a27a960e01b8152600401620002df91906200094e565b8051620004ad8262000983565b179392505050565b90565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000555576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620005143390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000570836001600160a01b03841662000577565b9392505050565b6000818152600183016020526040812054620005c0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200022b565b5060006200022b565b80516001600160a01b0381168114620005e157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000619578181015183820152602001620005ff565b50506000910152565b600082601f8301126200063457600080fd5b81516001600160401b0380821115620006515762000651620005e6565b604051601f8301601f19908116603f011681019082821181831017156200067c576200067c620005e6565b816040528381528660208588010111156200069657600080fd5b620006a9846020830160208901620005fc565b9695505050505050565b80516001600160601b0381168114620005e157600080fd5b600080600080600080600080610100898b031215620006e957600080fd5b620006f489620005c9565b60208a01519098506001600160401b03808211156200071257600080fd5b620007208c838d0162000622565b985060408b01519150808211156200073757600080fd5b620007458c838d0162000622565b975060608b01519150808211156200075c57600080fd5b6200076a8c838d0162000622565b965060808b01519150808211156200078157600080fd5b50620007908b828c0162000622565b945050620007a160a08a01620005c9565b9250620007b160c08a01620005c9565b9150620007c160e08a01620006b3565b90509295985092959890939650565b600181811c90821680620007e557607f821691505b6020821081036200080657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026f57600081815260208120601f850160051c81016020861015620008355750805b601f850160051c820191505b81811015620008565782815560010162000841565b505050505050565b81516001600160401b038111156200087a576200087a620005e6565b62000892816200088b8454620007d0565b846200080c565b602080601f831160018114620008ca5760008415620008b15750858301515b600019600386901b1c1916600185901b17855562000856565b600085815260208120601f198616915b82811015620008fb57888601518255948401946001909101908401620008da565b50858210156200091a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200093d57600080fd5b815180151581146200057057600080fd5b60208152600082518060208401526200096f816040850160208701620005fc565b601f01601f19169190910160400192915050565b80516020808301519190811015620008065760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516153f962000a036000396000610db301526000610d88015260006118740152600061184c015260006117a7015260006117d1015260006117fb01526153f96000f3fe608060405234801561001057600080fd5b506004361061035c5760003560e01c806369e2f0fb116101d3578063a217fddf11610104578063d547741f116100a2578063e4e18f6d1161007c578063e4e18f6d14610771578063e8a3d48514610784578063e985e9c51461078c578063eea987681461079f57600080fd5b8063d547741f14610738578063e19278591461074b578063e4623c1b1461075e57600080fd5b8063b88d4fde116100de578063b88d4fde146106ea578063c87b56dd146106fd578063ca15c87314610710578063d53913931461072357600080fd5b8063a217fddf146106bc578063a22cb465146106c4578063a7012816146106d757600080fd5b80639010d07c1161017157806395d89b411161014b57806395d89b411461067b5780639e2641a3146106835780639f15d70014610696578063a1448194146106a957600080fd5b80639010d07c1461064257806391d1485414610655578063938e3d7b1461066857600080fd5b8063745a41bc116101ad578063745a41bc146105ee57806374f16a811461060157806384b0196e14610614578063885e7a081461062f57600080fd5b806369e2f0fb146105c05780636c0360eb146105d357806370a08231146105db57600080fd5b80632d2c5a8b116102ad57806342842e0e1161024b5780634f558e79116102255780634f558e791461057457806355f804b314610587578063567e40751461059a5780636352211e146105ad57600080fd5b806342842e0e1461053b57806342966c681461054e578063439aed341461056157600080fd5b80633644e515116102875780633644e515146104fa57806336568abe146105025780633dd1eb611461051557806340c10f191461052857600080fd5b80632d2c5a8b146104bf5780632f2ff15d146104d257806331ae450b146104e557600080fd5b806318160ddd1161031a57806323b872dd116102f457806323b872dd14610444578063248a9ca31461045757806329326f291461047a5780632a55205a1461048d57600080fd5b806318160ddd1461041f5780631f8ebbd114610427578063234af0461461043157600080fd5b80628ad9461461036157806301ffc9a71461037657806306fdde031461039e578063081812fc146103b3578063095ea7b3146103de578063141a468c146103f1575b600080fd5b61037461036f36600461444e565b6107b2565b005b61038961038436600461449e565b610888565b60405190151581526020015b60405180910390f35b6103a6610899565b604051610395919061450b565b6103c66103c136600461451e565b6108a8565b6040516001600160a01b039091168152602001610395565b6103746103ec36600461454e565b6108c8565b6104116103ff36600461451e565b60009081526017602052604090205490565b604051908152602001610395565b6104116108e8565b600160401b610411565b61037461043f36600461471a565b6108ff565b610374610452366004614762565b610920565b61041161046536600461451e565b60009081526020819052604090206001015490565b6002546103c6906001600160a01b031681565b6104a061049b36600461479e565b610947565b604080516001600160a01b039093168352602083019190915201610395565b6103746104cd3660046147c0565b6109f5565b6103746104e036600461487c565b610a16565b6104ed610a3b565b60405161039591906148a8565b610411610ae9565b61037461051036600461487c565b610af3565b6103746105233660046148f5565b610b72565b61037461053636600461454e565b610b95565b610374610549366004614762565b610bb7565b61037461055c36600461451e565b610bd2565b61037461056f366004614927565b610c09565b61038961058236600461451e565b610c32565b6103746105953660046149ba565b610c3d565b6103746105a836600461454e565b610c54565b6103c66105bb36600461451e565b610c76565b6103746105ce3660046148f5565b610c96565b6103a6610cb9565b6104116105e93660046148f5565b610d47565b6103746105fc366004614a22565b610d65565b61037461060f36600461471a565b610d71565b61061c610d7a565b6040516103959796959493929190614a82565b61037461063d366004614b18565b610e03565b6103c661065036600461479e565b610e18565b61038961066336600461487c565b610e37565b6103746106763660046149ba565b610e60565b6103a6610e77565b61037461069136600461471a565b610e81565b6103746106a436600461454e565b610ea2565b6103746106b736600461454e565b610efc565b610411600081565b6103746106d2366004614b50565b610f1e565b6103746106e5366004614bcb565b61106f565b6103746106f8366004614c2f565b6110cf565b6103a661070b36600461451e565b6110f8565b61041161071e36600461451e565b611103565b6104116a4d494e5445525f524f4c4560a81b81565b61037461074636600461487c565b61111a565b6103746107593660046147c0565b61113f565b61037461076c366004614c7e565b611160565b61037461077f3660046148f5565b61119e565b6103a66111b2565b61038961079a366004614cbf565b6111bf565b6103746107ad36600461454e565b6111ef565b6107bf6020820182614ce9565b90506107ce6040830183614ce9565b9050146107ee5760405163359a1bc360e01b815260040160405180910390fd5b60005b6107fe6040830183614ce9565b90508110156108845761087261081760208401846148f5565b6108246020850185614ce9565b8481811061083457610834614d32565b905060200201602081019061084991906148f5565b6108566040860186614ce9565b8581811061086657610866614d32565b90506020020135610bb7565b8061087c81614d5e565b9150506107f1565b5050565b6000610893826112de565b92915050565b60606108a3611303565b905090565b6000600160401b8210156108bf5761089382611395565b610893826113bc565b600160401b8110156108de576108848282611447565b6108848282611557565b60006013546108f561165f565b6108a39190614d77565b6a4d494e5445525f524f4c4560a81b6109178161167b565b61088482611685565b600160401b81101561093c576109378383836116d4565b505050565b610937838383611704565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109bc5750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906109db906001600160601b031687614d8a565b6109e59190614da1565b91519350909150505b9250929050565b6a4d494e5445525f524f4c4560a81b610a0d8161167b565b61088482611729565b600082815260208190526040902060010154610a318161167b565b6109378383611778565b60606000610a4881611103565b90506000816001600160401b03811115610a6457610a64614578565b604051908082528060200260200182016040528015610a8d578160200160208202803683370190505b50905060005b82811015610ae257610aa6600082610e18565b828281518110610ab857610ab8614d32565b6001600160a01b039092166020928302919091019091015280610ada81614d5e565b915050610a93565b5092915050565b60006108a361179a565b6001600160a01b0381163314610b685760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61088482826118c5565b6000610b7d8161167b565b6108846a4d494e5445525f524f4c4560a81b83610a16565b6a4d494e5445525f524f4c4560a81b610bad8161167b565b61093783836118e7565b610937838383604051806020016040528060008152506110cf565b610bdd335b8261196e565b610bfd57604051630247e3a960e01b815260048101829052602401610b5f565b610c0681611990565b50565b6a4d494e5445525f524f4c4560a81b610c218161167b565b610c2c8484846119e3565b50505050565b600061089382611aae565b6000610c488161167b565b60196109378382614e43565b6a4d494e5445525f524f4c4560a81b610c6c8161167b565b6109378383611b0b565b6000600160401b821015610c8d5761089382611b15565b61089382611b75565b6000610ca18161167b565b6108846a4d494e5445525f524f4c4560a81b8361111a565b60198054610cc690614dc3565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf290614dc3565b8015610d3f5780601f10610d1457610100808354040283529160200191610d3f565b820191906000526020600020905b815481529060010190602001808311610d2257829003601f168201915b505050505081565b6000610d5282611b89565b610d5b83611c54565b6108939190614d77565b610c2c84848484611cda565b610c0681611dc3565b600060608082808083610dae7f00000000000000000000000000000000000000000000000000000000000000006015611e4f565b610dd97f00000000000000000000000000000000000000000000000000000000000000006016611e4f565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610e0e8161167b565b6109378383611ef3565b6000828152600160205260408120610e309083611fad565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610e6b8161167b565b60186109378382614e43565b60606108a3611fb9565b6a4d494e5445525f524f4c4560a81b610e998161167b565b61088482611fc8565b6000610ead82610c76565b9050826001600160a01b0316816001600160a01b031614610ef357604051634fefd56160e01b8152600481018390526001600160a01b0382166024820152604401610b5f565b61093782610bd2565b6a4d494e5445525f524f4c4560a81b610f148161167b565b6109378383612017565b81333b15801590610f9857506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190614f02565b155b15610fb85760405163f6fa4cbd60e01b8152336004820152602401610b5f565b6001600160a01b0381163b1580159061103c57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015611016573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103a9190614f02565b155b15611065576040516341b8d58160e11b81526001600160a01b0382166004820152602401610b5f565b6109378383612085565b6a4d494e5445525f524f4c4560a81b6110878161167b565b60005b848110156110c7576110b58686838181106110a7576110a7614d32565b9050602002013585856119e3565b806110bf81614d5e565b91505061108a565b505050505050565b600160401b8210156110ec576110e78484848461208f565b610c2c565b610c2c848484846120c2565b6060610893826120e7565b60008181526001602052604081206108939061214d565b6000828152602081905260409020600101546111358161167b565b61093783836118c5565b6a4d494e5445525f524f4c4560a81b6111578161167b565b61088482612157565b60005b818110156109375761118c83838381811061118057611180614d32565b90506020020135610bd2565b8061119681614d5e565b915050611163565b60006111a98161167b565b610884826121a6565b60188054610cc690614dc3565b6001600160a01b03808316600090815260126020908152604080832093851683529290529081205460ff16610e30565b6a4d494e5445525f524f4c4560a81b6112078161167b565b610937838361229b565b600060208351101561122d57611226836122a5565b9050610893565b816112388482614e43565b5060ff9050610893565b90565b61124f8282610e37565b610884576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556112853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610e30836001600160a01b0384166122e3565b60006001600160e01b03198216635604e22560e01b1480610893575061089382612332565b6060600d805461131290614dc3565b80601f016020809104026020016040519081016040528092919081815260200182805461133e90614dc3565b801561138b5780601f106113605761010080835404028352916020019161138b565b820191906000526020600020905b81548152906001019060200180831161136e57829003601f168201915b5050505050905090565b60006113a08261233d565b506000908152601160205260409020546001600160a01b031690565b60006113c782611aae565b61142b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b5f565b506000908152600a60205260409020546001600160a01b031690565b600061145282611b15565b9050806001600160a01b0316836001600160a01b0316036114bf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b5f565b336001600160a01b03821614806114db57506114db81336111bf565b61154d5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610b5f565b610937838361238d565b600061156282610c76565b9050806001600160a01b0316836001600160a01b0316036115d15760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610b5f565b336001600160a01b03821614806115ed57506115ed81336111bf565b61154d5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610b5f565b60006116696124de565b611671612548565b6108a39190614f1f565b610c06813361255c565b60005b81518110156108845760008282815181106116a5576116a5614d32565b602002602001015190506116c1816000015182602001516125b5565b50806116cc81614d5e565b915050611688565b6116dd33610bd7565b6116f95760405162461bcd60e51b8152600401610b5f90614f32565b6109378383836125f6565b61170d33610bd7565b6116f95760405162461bcd60e51b8152600401610b5f90614f7f565b60005b815181101561088457600082828151811061174957611749614d32565b6020026020010151905061176581600001518260200151611b0b565b508061177081614d5e565b91505061172c565b6117828282611245565b600082815260016020526040902061093790826112c9565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156117f357507f000000000000000000000000000000000000000000000000000000000000000046145b1561181d57507f000000000000000000000000000000000000000000000000000000000000000090565b6108a3604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6118cf82826127fd565b60008281526001602052604090206109379082612862565b600160401b811061190e5760405163b73c99f560e01b815260048101829052602401610b5f565b600881901c600090815260146020526040902054600160ff83161b161561194b576040516305dcda1160e51b815260048101829052602401610b5f565b6119558282612877565b6013805490600061196583614d5e565b91905055505050565b6000600160401b8210156119865761122683836129d2565b610e308383612a31565b600160401b8110156119da576119a581612af6565b600881901c60009081526014602052604081208054600160ff85161b17905560138054916119d283614fd3565b919050555050565b610c0681612b79565b6127106001600160601b0382161115611a0e5760405162461bcd60e51b8152600401610b5f90614fea565b6001600160a01b038216611a645760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610b5f565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6000600160401b821015611b02576000828152600f60205260409020546001600160a01b0316158015906108935750600882901c600090815260146020526040902054600160ff84161b1615151592915050565b61089382612bbb565b6108848282612bf0565b6000818152600f60205260408120546001600160a01b0316806108935760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b5f565b600080611b8183612c0a565b509392505050565b60006001600160a01b038216611bf75760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610b5f565b6000600160401b5b600954811015610ae257611c1281611aae565b15611c4457611c2081610c76565b6001600160a01b0316846001600160a01b031603611c4457611c4182614d5e565b91505b611c4d81614d5e565b9050611bff565b60006001600160a01b038216611cbe5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610b5f565b506001600160a01b031660009081526010602052604090205490565b42821015611cfb5760405163068568f360e21b815260040160405180910390fd5b6000611d08858585612ca1565b9050611d1d611d1685610c76565b8284612d7a565b15611d3257611d2c858561238d565b50610c2c565b60008251604003611d7957611d7282611d4e8560006020612e84565b611d5790615034565b611d648660206040612e84565b611d6d90615034565b612f91565b9050611da5565b8251604103611d8c57611d728284612fae565b604051638baa579f60e01b815260040160405180910390fd5b611daf8186612fca565b15611d8c57611dbe868661238d565b6110c7565b60005b8151811015610884576000828281518110611de357611de3614d32565b6020026020010151905060005b816020015151811015611e3a57611e28826000015183602001518381518110611e1b57611e1b614d32565b6020026020010151610ea2565b80611e3281614d5e565b915050611df0565b50508080611e4790614d5e565b915050611dc6565b606060ff8314611e625761122683612fe9565b818054611e6e90614dc3565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9a90614dc3565b8015611ee75780601f10611ebc57610100808354040283529160200191611ee7565b820191906000526020600020905b815481529060010190602001808311611eca57829003601f168201915b50505050509050610893565b6127106001600160601b0382161115611f1e5760405162461bcd60e51b8152600401610b5f90614fea565b6001600160a01b038216611f745760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b5f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000610e308383613028565b6060600e805461131290614dc3565b60005b8151811015610884576000828281518110611fe857611fe8614d32565b6020026020010151905061200481600001518260200151613052565b508061200f81614d5e565b915050611fcb565b600160401b811061203e5760405163b73c99f560e01b815260048101829052602401610b5f565b600881901c600090815260146020526040902054600160ff83161b161561207b576040516305dcda1160e51b815260048101829052602401610b5f565b6119558282613093565b61088482826130ad565b61209a335b8361196e565b6120b65760405162461bcd60e51b8152600401610b5f90614f32565b610c2c848484846130b8565b6120cb33612094565b6120b65760405162461bcd60e51b8152600401610b5f90614f7f565b60606120f28261233d565b60006120fc6130dc565b9050600081511161211c5760405180602001604052806000815250610e30565b80612126846130eb565b604051602001612137929190615058565b6040516020818303038152906040529392505050565b6000610893825490565b60005b815181101561088457600082828151811061217757612177614d32565b602002602001015190506121938160000151826020015161229b565b508061219e81614d5e565b91505061215a565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156121f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122159190614f02565b6122325760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b610884828261317d565b600080829050601f815111156122d0578260405163305a27a960e01b8152600401610b5f919061450b565b80516122db82615034565b179392505050565b600081815260018301602052604081205461232a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610893565b506000610893565b6000610893826132f6565b61234681611aae565b610c065760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b5f565b81333b1580159061240757506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124059190614f02565b155b156124275760405163f6fa4cbd60e01b8152336004820152602401610b5f565b6001600160a01b0381163b158015906124ab57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015612485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a99190614f02565b155b156124d4576040516341b8d58160e11b81526001600160a01b0382166004820152602401610b5f565b6109378383613336565b6009546000906701000000000000009082906124fe9060081c6001614d77565b9050815b81811015612542576000818152600c602052604090205461252281613356565b61252c9086614d77565b945050808061253a90614d5e565b915050612502565b50505090565b6000600160401b6009546108a39190614f1f565b6125668282610e37565b6108845761257381613375565b61257e836020613387565b60405160200161258f929190615087565b60408051601f198184030181529082905262461bcd60e51b8252610b5f9160040161450b565b60005b8151811015610937576125e4838383815181106125d7576125d7614d32565b6020026020010151612017565b806125ee81614d5e565b9150506125b8565b828233321480159061267157506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561264b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266f9190614f02565b155b156126915760405163937db65f60e01b8152336004820152602401610b5f565b6001600160a01b0382163b1580159061271557506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa1580156126ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127139190614f02565b155b1561273e5760405163f934453160e01b81526001600160a01b0383166004820152602401610b5f565b6001600160a01b0381163b158015906127c257506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa15801561279c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c09190614f02565b155b156127eb57604051632a67242160e11b81526001600160a01b0382166004820152602401610b5f565b6127f6858585613522565b5050505050565b6128078282610e37565b15610884576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e30836001600160a01b03841661354c565b6001600160a01b0382166128cd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b5f565b6128d681611aae565b156129235760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5f565b61292c81611aae565b156129795760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5f565b6001600160a01b038216600081815260106020908152604080832080546001019055848352600f90915280822080546001600160a01b0319168417905551839291906000805160206152a4833981519152908290a45050565b6000806129de83611b15565b9050806001600160a01b0316846001600160a01b03161480612a055750612a0581856111bf565b80612a295750836001600160a01b0316612a1e846108a8565b6001600160a01b0316145b949350505050565b6000612a3c82611aae565b612aa05760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b5f565b6000612aab83610c76565b9050806001600160a01b0316846001600160a01b03161480612ae65750836001600160a01b0316612adb846108a8565b6001600160a01b0316145b80612a295750612a2981856111bf565b6000612b0182611b15565b9050612b0c82611b15565b600083815260116020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552601084528285208054600019019055878552600f909352818420805490911690555192935084926000805160206152a4833981519152908390a45050565b6000612b8482610c76565b9050612b91600c8361363f565b60405182906000906001600160a01b038416906000805160206152a4833981519152908390a45050565b600881901c6000908152600c6020526040812054600160ff1b60ff84161c1615612be757506000919050565b6108938261366b565b61088482826040518060200160405280600081525061368a565b600080612c1683611aae565b612c775760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b5f565b612c80836136cb565b6000818152600860205260409020546001600160a01b031694909350915050565b6000612a29604051602001612d0f90660a0cae4dad2e8560cb1b81527f61646472657373207370656e6465722c75696e7432353620746f6b656e49642c60078201527f75696e74323536206e6f6e63652c75696e7432353620646561646c696e652900602782015260460190565b60408051808303601f19018152828252805160209182012060008881526017835283902054918401526001600160a01b0388169183019190915260608201869052608082015260a0810184905260c001604051602081830303815290604052805190602001206136d8565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401612da49291906150fc565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612de29190615115565b600060405180830381855afa9150503d8060008114612e1d576040519150601f19603f3d011682016040523d82523d6000602084013e612e22565b606091505b5091509150818015612e35575080516020145b15612e7857600081806020019051810190612e509190615131565b90506374eca2c160e11b6001600160e01b0319821601612e765760019350505050610e30565b505b50600095945050505050565b606081612e9281601f614d77565b1015612ed15760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610b5f565b612edb8284614d77565b84511015612f1f5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610b5f565b606082158015612f3e5760405191506000825260208201604052612f88565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612f77578051835260209283019201612f5f565b5050858452601f01601f1916604052505b50949350505050565b6000806000612fa1868686613705565b91509150612f888161373e565b6000806000612fbd8585613888565b91509150611b818161373e565b60006001600160a01b03831615801590610e305750610e30838361196e565b60606000612ff6836138ca565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600082600001828154811061303f5761303f614d32565b9060005260206000200154905092915050565b60005b8151811015610937576130818383838151811061307457613074614d32565b60200260200101516118e7565b8061308b81614d5e565b915050613055565b6108848282604051806020016040528060008152506138f2565b6108843383836138fd565b600160401b8210156130d0576110e7848484846139cb565b610c2c848484846139fe565b60606019805461131290614dc3565b606060006130f883613a17565b60010190506000816001600160401b0381111561311757613117614578565b6040519080825280601f01601f191660200182016040528015613141576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461314b57509392505050565b600061318860095490565b9050600082116131e85760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610b5f565b6001600160a01b03831661324a5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610b5f565b816009600082825461325c9190614d77565b9091555050600081815260086020526040902080546001600160a01b0319166001600160a01b03851617905561329360058261363f565b6000806132a08484614d77565b90506001600160a01b0385169150828260006000805160206152a4833981519152600080a4600183015b8181146132f057808360006000805160206152a4833981519152600080a46001016132ca565b506127f6565b60006001600160e01b031982166380ac58cd60e01b148061332757506001600160e01b03198216635b5e139f60e01b145b80610893575061089382613aef565b600160401b81101561334c576108848282613b2f565b6108848282613b9d565b60005b811561337057600019820190911690600101613359565b919050565b60606108936001600160a01b03831660145b60606000613396836002614d8a565b6133a1906002614d77565b6001600160401b038111156133b8576133b8614578565b6040519080825280601f01601f1916602001820160405280156133e2576020820181803683370190505b509050600360fc1b816000815181106133fd576133fd614d32565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061342c5761342c614d32565b60200101906001600160f81b031916908160001a9053506000613450846002614d8a565b61345b906001614d77565b90505b60018111156134d3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061348f5761348f614d32565b1a60f81b8282815181106134a5576134a5614d32565b60200101906001600160f81b031916908160001a90535060049490941c936134cc81614fd3565b905061345e565b508315610e305760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b5f565b600081815260176020526040812080549161353c83614d5e565b9190505550610937838383613bd2565b60008181526001830160205260408120548015613635576000613570600183614f1f565b855490915060009061358490600190614f1f565b90508181146135e95760008660000182815481106135a4576135a4614d32565b90600052602060002001549050808760000184815481106135c7576135c7614d32565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135fa576135fa61514e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610893565b6000915050610893565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600061367660095490565b82108015610893575050600160401b111590565b600061369560095490565b90506136a1848461317d565b6136af600085838686613bf4565b610c2c5760405162461bcd60e51b8152600401610b5f90615164565b6000610893600583613d2b565b60006108936136e561179a565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806001600160ff1b0383168161372260ff86901c601b614d77565b905061373087828885613e23565b935093505050935093915050565b6000816004811115613752576137526151b9565b0361375a5750565b600181600481111561376e5761376e6151b9565b036137bb5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b5f565b60028160048111156137cf576137cf6151b9565b0361381c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b5f565b6003816004811115613830576138306151b9565b03610c065760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b5f565b60008082516041036138be5760208301516040840151606085015160001a6138b287828585613e23565b945094505050506109ee565b506000905060026109ee565b600060ff8216601f81111561089357604051632cd44ac360e21b815260040160405180910390fd5b610937838383613ee7565b816001600160a01b0316836001600160a01b03160361395e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b5f565b6001600160a01b03838116600081815260126020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6139d68484846125f6565b6139e284848484613f1a565b610c2c5760405162461bcd60e51b8152600401610b5f906151cf565b613a098484846125f6565b6136af848484600185613bf4565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310613a565772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613a82576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613aa057662386f26fc10000830492506010015b6305f5e1008310613ab8576305f5e100830492506008015b6127108310613acc57612710830492506004015b60648310613ade576064830492506002015b600a83106108935760010192915050565b60006001600160e01b031982166380ac58cd60e01b1480613b2057506001600160e01b03198216635b5e139f60e01b145b80610893575061089382614013565b600081815260116020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613b6482611b15565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613b6482610c76565b600160401b811015613be957610937838383614038565b61093783838361418a565b60006001600160a01b0385163b15613d1e57506001835b613c158486614d77565b811015613d1857604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290613c4e9033908b9086908990600401615221565b6020604051808303816000875af1925050508015613c89575060408051601f3d908101601f19168201909252613c8691810190615131565b60015b613ce6573d808015613cb7576040519150601f19603f3d011682016040523d82523d6000602084013e613cbc565b606091505b508051600003613cde5760405162461bcd60e51b8152600401610b5f90615164565b805181602001fd5b828015613d0357506001600160e01b03198116630a85bd0160e11b145b92505080613d1081614d5e565b915050613c0b565b50613d22565b5060015b95945050505050565b600881901c60008181526020849052604081205490919060ff808516919082181c8015613d6d57613d5b81614362565b60ff168203600884901b179350613e1a565b60008311613dda5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610b5f565b506000199091016000818152602086905260409020549091908015613e1557613e0281614362565b60ff0360ff16600884901b179350613e1a565b613d6d565b50505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613e5a5750600090506003613ede565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613eae573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613ed757600060019250925050613ede565b9150600090505b94509492505050565b613ef183836143cc565b613efe6000848484613f1a565b6109375760405162461bcd60e51b8152600401610b5f906151cf565b60006001600160a01b0384163b1561400857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f5e903390899088908890600401615221565b6020604051808303816000875af1925050508015613f99575060408051601f3d908101601f19168201909252613f9691810190615131565b60015b613fee573d808015613fc7576040519150601f19603f3d011682016040523d82523d6000602084013e613fcc565b606091505b508051600003613cde5760405162461bcd60e51b8152600401610b5f906151cf565b6001600160e01b031916630a85bd0160e11b149050612a29565b506001949350505050565b60006001600160e01b0319821663152a902d60e11b14806108935750610893826143d6565b826001600160a01b031661404b82611b15565b6001600160a01b0316146140715760405162461bcd60e51b8152600401610b5f9061525e565b6001600160a01b0382166140d35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b5f565b826001600160a01b03166140e682611b15565b6001600160a01b03161461410c5760405162461bcd60e51b8152600401610b5f9061525e565b600081815260116020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260108552838620805460001901905590871680865283862080546001019055868652600f90945282852080549092168417909155905184936000805160206152a483398151915291a4505050565b60008061419683612c0a565b91509150846001600160a01b0316826001600160a01b0316146142105760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610b5f565b6001600160a01b0384166142765760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610b5f565b61428160008461238d565b600061428e846001614d77565b600881901c600090815260056020526040902054909150600160ff1b60ff83161c161580156142be575060095481105b156142f557600081815260086020526040902080546001600160a01b0319166001600160a01b0388161790556142f560058261363f565b600084815260086020526040902080546001600160a01b0319166001600160a01b03871617905581841461432e5761432e60058561363f565b83856001600160a01b0316876001600160a01b03166000805160206152a483398151915260405160405180910390a46110c7565b600060405180610120016040528061010081526020016152c4610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff6143ab856143e1565b02901c815181106143be576143be614d32565b016020015160f81c92915050565b6108848282612877565b6000610893826143f9565b60008082116143ef57600080fd5b5060008190031690565b60006001600160e01b03198216635a05180f60e01b148061089357506108938260006001600160e01b03198216637965db0b60e01b148061089357506301ffc9a760e01b6001600160e01b0319831614610893565b60006020828403121561446057600080fd5b81356001600160401b0381111561447657600080fd5b820160608185031215610e3057600080fd5b6001600160e01b031981168114610c0657600080fd5b6000602082840312156144b057600080fd5b8135610e3081614488565b60005b838110156144d65781810151838201526020016144be565b50506000910152565b600081518084526144f78160208601602086016144bb565b601f01601f19169290920160200192915050565b602081526000610e3060208301846144df565b60006020828403121561453057600080fd5b5035919050565b80356001600160a01b038116811461337057600080fd5b6000806040838503121561456157600080fd5b61456a83614537565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156145b0576145b0614578565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145de576145de614578565b604052919050565b60006001600160401b038211156145ff576145ff614578565b5060051b60200190565b600061461c614617846145e6565b6145b6565b8381529050602080820190600585811b85018781111561463b57600080fd5b855b8181101561470e5780356001600160401b038082111561465d5760008081fd5b908801906040828c0312156146725760008081fd5b61467a61458e565b61468383614537565b815286830135828111156146975760008081fd5b8084019350508b601f8401126146af57600091508182fd5b823591506146bf614617836145e6565b82815291861b8301870191878101908d8411156146dc5760008081fd5b938801935b838510156146fa578435825293880193908801906146e1565b82890152508752505093830193830161463d565b50505050509392505050565b60006020828403121561472c57600080fd5b81356001600160401b0381111561474257600080fd5b8201601f8101841361475357600080fd5b612a2984823560208401614609565b60008060006060848603121561477757600080fd5b61478084614537565b925061478e60208501614537565b9150604084013590509250925092565b600080604083850312156147b157600080fd5b50508035926020909101359150565b600060208083850312156147d357600080fd5b82356001600160401b038111156147e957600080fd5b8301601f810185136147fa57600080fd5b8035614808614617826145e6565b81815260069190911b8201830190838101908783111561482757600080fd5b928401925b8284101561487157604084890312156148455760008081fd5b61484d61458e565b61485685614537565b8152848601358682015282526040909301929084019061482c565b979650505050505050565b6000806040838503121561488f57600080fd5b8235915061489f60208401614537565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156148e95783516001600160a01b0316835292840192918401916001016148c4565b50909695505050505050565b60006020828403121561490757600080fd5b610e3082614537565b80356001600160601b038116811461337057600080fd5b60008060006060848603121561493c57600080fd5b8335925061494c60208501614537565b915061495a60408501614910565b90509250925092565b60006001600160401b0383111561497c5761497c614578565b61498f601f8401601f19166020016145b6565b90508281528383830111156149a357600080fd5b828260208301376000602084830101529392505050565b6000602082840312156149cc57600080fd5b81356001600160401b038111156149e257600080fd5b8201601f810184136149f357600080fd5b612a2984823560208401614963565b600082601f830112614a1357600080fd5b610e3083833560208501614963565b60008060008060808587031215614a3857600080fd5b614a4185614537565b9350602085013592506040850135915060608501356001600160401b03811115614a6a57600080fd5b614a7687828801614a02565b91505092959194509250565b60ff60f81b881681526000602060e081840152614aa260e084018a6144df565b8381036040850152614ab4818a6144df565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015614b0657835183529284019291840191600101614aea565b50909c9b505050505050505050505050565b60008060408385031215614b2b57600080fd5b614b3483614537565b915061489f60208401614910565b8015158114610c0657600080fd5b60008060408385031215614b6357600080fd5b614b6c83614537565b91506020830135614b7c81614b42565b809150509250929050565b60008083601f840112614b9957600080fd5b5081356001600160401b03811115614bb057600080fd5b6020830191508360208260051b85010111156109ee57600080fd5b60008060008060608587031215614be157600080fd5b84356001600160401b03811115614bf757600080fd5b614c0387828801614b87565b9095509350614c16905060208601614537565b9150614c2460408601614910565b905092959194509250565b60008060008060808587031215614c4557600080fd5b614c4e85614537565b9350614c5c60208601614537565b92506040850135915060608501356001600160401b03811115614a6a57600080fd5b60008060208385031215614c9157600080fd5b82356001600160401b03811115614ca757600080fd5b614cb385828601614b87565b90969095509350505050565b60008060408385031215614cd257600080fd5b614cdb83614537565b915061489f60208401614537565b6000808335601e19843603018112614d0057600080fd5b8301803591506001600160401b03821115614d1a57600080fd5b6020019150600581901b36038213156109ee57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614d7057614d70614d48565b5060010190565b8082018082111561089357610893614d48565b808202811582820484141761089357610893614d48565b600082614dbe57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680614dd757607f821691505b602082108103614df757634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561093757600081815260208120601f850160051c81016020861015614e245750805b601f850160051c820191505b818110156110c757828155600101614e30565b81516001600160401b03811115614e5c57614e5c614578565b614e7081614e6a8454614dc3565b84614dfd565b602080601f831160018114614ea55760008415614e8d5750858301515b600019600386901b1c1916600185901b1785556110c7565b600085815260208120601f198616915b82811015614ed457888601518255948401946001909101908401614eb5565b5085821015614ef25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614f1457600080fd5b8151610e3081614b42565b8181038181111561089357610893614d48565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b600081614fe257614fe2614d48565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b80516020808301519190811015614df75760001960209190910360031b1b16919050565b6000835161506a8184602088016144bb565b83519083019061507e8183602088016144bb565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516150bf8160178501602088016144bb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150f08160288401602088016144bb565b01602801949350505050565b828152604060208201526000612a2960408301846144df565b600082516151278184602087016144bb565b9190910192915050565b60006020828403121561514357600080fd5b8151610e3081614488565b634e487b7160e01b600052603160045260246000fd5b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615254908301846144df565b9695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b60608201526080019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212207c1340e2d1c7a6af058cbb35c7f1065a255bd81a470929fa89ee68ccabc5922664736f6c63430008110033";
30937
32237
  const isSuperArgs$2 = (xs) => xs.length > 1;
30938
32238
  class ImmutableERC721__factory extends ContractFactory {
30939
32239
  constructor(...args) {
@@ -31113,6 +32413,37 @@ const _abi$1 = [
31113
32413
  name: "IImmutableERC721TokenAlreadyBurned",
31114
32414
  type: "error",
31115
32415
  },
32416
+ {
32417
+ inputs: [],
32418
+ name: "InvalidShortString",
32419
+ type: "error",
32420
+ },
32421
+ {
32422
+ inputs: [],
32423
+ name: "InvalidSignature",
32424
+ type: "error",
32425
+ },
32426
+ {
32427
+ inputs: [],
32428
+ name: "PermitExpired",
32429
+ type: "error",
32430
+ },
32431
+ {
32432
+ inputs: [],
32433
+ name: "SignerCannotBeZerothAddress",
32434
+ type: "error",
32435
+ },
32436
+ {
32437
+ inputs: [
32438
+ {
32439
+ internalType: "string",
32440
+ name: "str",
32441
+ type: "string",
32442
+ },
32443
+ ],
32444
+ name: "StringTooLong",
32445
+ type: "error",
32446
+ },
31116
32447
  {
31117
32448
  inputs: [
31118
32449
  {
@@ -31185,6 +32516,12 @@ const _abi$1 = [
31185
32516
  name: "ApprovalForAll",
31186
32517
  type: "event",
31187
32518
  },
32519
+ {
32520
+ anonymous: false,
32521
+ inputs: [],
32522
+ name: "EIP712DomainChanged",
32523
+ type: "event",
32524
+ },
31188
32525
  {
31189
32526
  anonymous: false,
31190
32527
  inputs: [
@@ -31317,6 +32654,19 @@ const _abi$1 = [
31317
32654
  stateMutability: "view",
31318
32655
  type: "function",
31319
32656
  },
32657
+ {
32658
+ inputs: [],
32659
+ name: "DOMAIN_SEPARATOR",
32660
+ outputs: [
32661
+ {
32662
+ internalType: "bytes32",
32663
+ name: "",
32664
+ type: "bytes32",
32665
+ },
32666
+ ],
32667
+ stateMutability: "view",
32668
+ type: "function",
32669
+ },
31320
32670
  {
31321
32671
  inputs: [],
31322
32672
  name: "MINTER_ROLE",
@@ -31457,6 +32807,49 @@ const _abi$1 = [
31457
32807
  stateMutability: "view",
31458
32808
  type: "function",
31459
32809
  },
32810
+ {
32811
+ inputs: [],
32812
+ name: "eip712Domain",
32813
+ outputs: [
32814
+ {
32815
+ internalType: "bytes1",
32816
+ name: "fields",
32817
+ type: "bytes1",
32818
+ },
32819
+ {
32820
+ internalType: "string",
32821
+ name: "name",
32822
+ type: "string",
32823
+ },
32824
+ {
32825
+ internalType: "string",
32826
+ name: "version",
32827
+ type: "string",
32828
+ },
32829
+ {
32830
+ internalType: "uint256",
32831
+ name: "chainId",
32832
+ type: "uint256",
32833
+ },
32834
+ {
32835
+ internalType: "address",
32836
+ name: "verifyingContract",
32837
+ type: "address",
32838
+ },
32839
+ {
32840
+ internalType: "bytes32",
32841
+ name: "salt",
32842
+ type: "bytes32",
32843
+ },
32844
+ {
32845
+ internalType: "uint256[]",
32846
+ name: "extensions",
32847
+ type: "uint256[]",
32848
+ },
32849
+ ],
32850
+ stateMutability: "view",
32851
+ type: "function",
32852
+ },
31460
32853
  {
31461
32854
  inputs: [],
31462
32855
  name: "getAdmins",
@@ -31686,6 +33079,25 @@ const _abi$1 = [
31686
33079
  stateMutability: "view",
31687
33080
  type: "function",
31688
33081
  },
33082
+ {
33083
+ inputs: [
33084
+ {
33085
+ internalType: "uint256",
33086
+ name: "tokenId",
33087
+ type: "uint256",
33088
+ },
33089
+ ],
33090
+ name: "nonces",
33091
+ outputs: [
33092
+ {
33093
+ internalType: "uint256",
33094
+ name: "",
33095
+ type: "uint256",
33096
+ },
33097
+ ],
33098
+ stateMutability: "view",
33099
+ type: "function",
33100
+ },
31689
33101
  {
31690
33102
  inputs: [],
31691
33103
  name: "operatorAllowlist",
@@ -31718,6 +33130,34 @@ const _abi$1 = [
31718
33130
  stateMutability: "view",
31719
33131
  type: "function",
31720
33132
  },
33133
+ {
33134
+ inputs: [
33135
+ {
33136
+ internalType: "address",
33137
+ name: "spender",
33138
+ type: "address",
33139
+ },
33140
+ {
33141
+ internalType: "uint256",
33142
+ name: "tokenId",
33143
+ type: "uint256",
33144
+ },
33145
+ {
33146
+ internalType: "uint256",
33147
+ name: "deadline",
33148
+ type: "uint256",
33149
+ },
33150
+ {
33151
+ internalType: "bytes",
33152
+ name: "sig",
33153
+ type: "bytes",
33154
+ },
33155
+ ],
33156
+ name: "permit",
33157
+ outputs: [],
33158
+ stateMutability: "nonpayable",
33159
+ type: "function",
33160
+ },
31721
33161
  {
31722
33162
  inputs: [
31723
33163
  {
@@ -32172,7 +33612,7 @@ const _abi$1 = [
32172
33612
  type: "function",
32173
33613
  },
32174
33614
  ];
32175
- const _bytecode$1 = "0x60806040523480156200001157600080fd5b5060405162003c7338038062003c73833981016040819052620000349162000506565b8787878787878787868660036200004c838262000699565b5060046200005b828262000699565b506200006d91506000905089620000b8565b620000798282620000fb565b620000848362000200565b600c62000092868262000699565b50600b620000a1858262000699565b505050505050505050505050505050505062000790565b620000cf8282620002f960201b6200135e1760201c565b6000828152600160209081526040909120620000f6918390620013e26200039a821b17901c565b505050565b6127106001600160601b03821611156200016f5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620001c75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000166565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200024c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000272919062000765565b620002905760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000396576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620003553390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000620003b1836001600160a01b038416620003ba565b90505b92915050565b60008181526001830160205260408120546200040357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003b4565b506000620003b4565b80516001600160a01b03811681146200042457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200045157600080fd5b81516001600160401b03808211156200046e576200046e62000429565b604051601f8301601f19908116603f0116810190828211818310171562000499576200049962000429565b81604052838152602092508683858801011115620004b657600080fd5b600091505b83821015620004da5785820183015181830184015290820190620004bb565b600093810190920192909252949350505050565b80516001600160601b03811681146200042457600080fd5b600080600080600080600080610100898b0312156200052457600080fd5b6200052f896200040c565b60208a01519098506001600160401b03808211156200054d57600080fd5b6200055b8c838d016200043f565b985060408b01519150808211156200057257600080fd5b620005808c838d016200043f565b975060608b01519150808211156200059757600080fd5b620005a58c838d016200043f565b965060808b0151915080821115620005bc57600080fd5b50620005cb8b828c016200043f565b945050620005dc60a08a016200040c565b9250620005ec60c08a016200040c565b9150620005fc60e08a01620004ee565b90509295985092959890939650565b600181811c908216806200062057607f821691505b6020821081036200064157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620000f657600081815260208120601f850160051c81016020861015620006705750805b601f850160051c820191505b8181101562000691578281556001016200067c565b505050505050565b81516001600160401b03811115620006b557620006b562000429565b620006cd81620006c684546200060b565b8462000647565b602080601f831160018114620007055760008415620006ec5750858301515b600019600386901b1c1916600185901b17855562000691565b600085815260208120601f198616915b82811015620007365788860151825594840194600190910190840162000715565b5085821015620007555787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200077857600080fd5b815180151581146200078957600080fd5b9392505050565b6134d380620007a06000396000f3fe608060405234801561001057600080fd5b50600436106102945760003560e01c806369e2f0fb11610167578063a217fddf116100ce578063d539139311610087578063d5391393146105da578063d547741f146105ef578063e4623c1b14610602578063e4e18f6d14610615578063e8a3d48514610628578063e985e9c51461063057600080fd5b8063a217fddf14610573578063a22cb4651461057b578063a70128161461058e578063b88d4fde146105a1578063c87b56dd146105b4578063ca15c873146105c757600080fd5b806391d148541161012057806391d148541461050c578063938e3d7b1461051f57806395d89b41146105325780639e2641a31461053a5780639f15d7001461054d578063a14481941461056057600080fd5b806369e2f0fb146104a55780636c0360eb146104b857806370a08231146104c057806374f16a81146104d3578063885e7a08146104e65780639010d07c146104f957600080fd5b80632f2ff15d1161020b57806340c10f19116101c457806340c10f191461043357806342842e0e1461044657806342966c6814610459578063439aed341461046c57806355f804b31461047f5780636352211e1461049257600080fd5b80632f2ff15d146103c957806331ae450b146103dc57806336568abe146103f15780633dd1eb61146104045780633e769acd146104175780633eaaf86b1461042a57600080fd5b806318160ddd1161025d57806318160ddd14610329578063234af0461461033b57806323b872dd1461034e578063248a9ca31461036157806329326f29146103845780632a55205a1461039757600080fd5b80628ad9461461029957806301ffc9a7146102ae57806306fdde03146102d6578063081812fc146102eb578063095ea7b314610316575b600080fd5b6102ac6102a7366004612901565b61066c565b005b6102c16102bc366004612951565b610742565b60405190151581526020015b60405180910390f35b6102de610753565b6040516102cd91906129be565b6102fe6102f93660046129d1565b6107e5565b6040516001600160a01b0390911681526020016102cd565b6102ac610324366004612a06565b61080c565b600d545b6040519081526020016102cd565b6102ac610349366004612bd2565b610967565b6102ac61035c366004612c1a565b6109bf565b61032d61036f3660046129d1565b60009081526020819052604090206001015490565b6002546102fe906001600160a01b031681565b6103aa6103a5366004612c56565b6109f1565b604080516001600160a01b0390931683526020830191909152016102cd565b6102ac6103d7366004612c78565b610a9f565b6103e4610ac4565b6040516102cd9190612ca4565b6102ac6103ff366004612c78565b610b72565b6102ac610412366004612cf1565b610bec565b6102ac610425366004612bd2565b610c0f565b61032d600d5481565b6102ac610441366004612a06565b610c9b565b6102ac610454366004612c1a565b610cd7565b6102ac6104673660046129d1565b610cf2565b6102ac61047a366004612d23565b610d30565b6102ac61048d366004612db6565b610d59565b6102fe6104a03660046129d1565b610d70565b6102ac6104b3366004612cf1565b610dd0565b6102de610df3565b61032d6104ce366004612cf1565b610e81565b6102ac6104e1366004612bd2565b610f07565b6102ac6104f4366004612dfe565b610f13565b6102fe610507366004612c56565b610f28565b6102c161051a366004612c78565b610f47565b6102ac61052d366004612db6565b610f70565b6102de610f87565b6102ac610548366004612bd2565b610f96565b6102ac61055b366004612a06565b610fee565b6102ac61056e366004612a06565b611048565b61032d600081565b6102ac610589366004612e36565b61107a565b6102ac61059c366004612eb1565b6111cb565b6102ac6105af366004612f15565b61122b565b6102de6105c23660046129d1565b61125d565b61032d6105d53660046129d1565b6112c3565b61032d6a4d494e5445525f524f4c4560a81b81565b6102ac6105fd366004612c78565b6112da565b6102ac610610366004612f90565b6112ff565b6102ac610623366004612cf1565b61133d565b6102de611351565b6102c161063e366004612fd1565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6106796020820182612ffb565b90506106886040830183612ffb565b9050146106a85760405163359a1bc360e01b815260040160405180910390fd5b60005b6106b86040830183612ffb565b905081101561073e5761072c6106d16020840184612cf1565b6106de6020850185612ffb565b848181106106ee576106ee613044565b90506020020160208101906107039190612cf1565b6107106040860186612ffb565b8581811061072057610720613044565b90506020020135610cd7565b8061073681613070565b9150506106ab565b5050565b600061074d826113f7565b92915050565b60606003805461076290613089565b80601f016020809104026020016040519081016040528092919081815260200182805461078e90613089565b80156107db5780601f106107b0576101008083540402835291602001916107db565b820191906000526020600020905b8154815290600101906020018083116107be57829003601f168201915b5050505050905090565b60006107f08261141c565b506000908152600760205260409020546001600160a01b031690565b81333b1580159061088657506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088491906130c3565b155b156108ab5760405163f6fa4cbd60e01b81523360048201526024015b60405180910390fd5b6001600160a01b0381163b1580159061092f57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d91906130c3565b155b15610958576040516341b8d58160e11b81526001600160a01b03821660048201526024016108a2565b610962838361147b565b505050565b6a4d494e5445525f524f4c4560a81b61097f8161158b565b60005b8251811015610962576109ad8382815181106109a0576109a0613044565b6020026020010151611595565b806109b781613070565b915050610982565b6109ca335b82611624565b6109e65760405162461bcd60e51b81526004016108a2906130e0565b6109628383836116a3565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a665750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a85906001600160601b03168761312d565b610a8f9190613144565b91519350909150505b9250929050565b600082815260208190526040902060010154610aba8161158b565b61096283836118aa565b60606000610ad1816112c3565b90506000816001600160401b03811115610aed57610aed612a30565b604051908082528060200260200182016040528015610b16578160200160208202803683370190505b50905060005b82811015610b6b57610b2f600082610f28565b828281518110610b4157610b41613044565b6001600160a01b039092166020928302919091019091015280610b6381613070565b915050610b1c565b5092915050565b6001600160a01b0381163314610be25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108a2565b61073e82826118cc565b6000610bf78161158b565b61073e6a4d494e5445525f524f4c4560a81b83610a9f565b60005b815181101561073e576000828281518110610c2f57610c2f613044565b6020026020010151905060005b816020015151811015610c8657610c74826000015183602001518381518110610c6757610c67613044565b6020026020010151610fee565b80610c7e81613070565b915050610c3c565b50508080610c9390613070565b915050610c12565b6a4d494e5445525f524f4c4560a81b610cb38161158b565b610cbd83836118ee565b600d8054906000610ccd83613070565b9190505550505050565b6109628383836040518060200160405280600081525061122b565b610cfb81611935565b600881901c6000908152600e602052604081208054600160ff85161b179055600d805491610d2883613166565b919050555050565b6a4d494e5445525f524f4c4560a81b610d488161158b565b610d53848484611963565b50505050565b6000610d648161158b565b600c61096283826131c3565b6000818152600560205260408120546001600160a01b03168061074d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108a2565b6000610ddb8161158b565b61073e6a4d494e5445525f524f4c4560a81b836112da565b600c8054610e0090613089565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2c90613089565b8015610e795780601f10610e4e57610100808354040283529160200191610e79565b820191906000526020600020905b815481529060010190602001808311610e5c57829003601f168201915b505050505081565b60006001600160a01b038216610eeb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108a2565b506001600160a01b031660009081526006602052604090205490565b610f1081610c0f565b50565b6000610f1e8161158b565b6109628383611a2e565b6000828152600160205260408120610f409083611ae8565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610f7b8161158b565b600b61096283826131c3565b60606004805461076290613089565b6a4d494e5445525f524f4c4560a81b610fae8161158b565b60005b825181101561096257610fdc838281518110610fcf57610fcf613044565b6020026020010151611af4565b80610fe681613070565b915050610fb1565b6000610ff982610d70565b9050826001600160a01b0316816001600160a01b03161461103f57604051634fefd56160e01b8152600481018390526001600160a01b03821660248201526044016108a2565b61096282610cf2565b6a4d494e5445525f524f4c4560a81b6110608161158b565b610cbd838360405180602001604052806000815250611b6a565b81333b158015906110f457506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156110ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f291906130c3565b155b156111145760405163f6fa4cbd60e01b81523360048201526024016108a2565b6001600160a01b0381163b1580159061119857506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015611172573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119691906130c3565b155b156111c1576040516341b8d58160e11b81526001600160a01b03821660048201526024016108a2565b6109628383611b9d565b6a4d494e5445525f524f4c4560a81b6111e38161158b565b60005b848110156112235761121186868381811061120357611203613044565b905060200201358585611963565b8061121b81613070565b9150506111e6565b505050505050565b6112353383611624565b6112515760405162461bcd60e51b81526004016108a2906130e0565b610d5384848484611ba8565b60606112688261141c565b6000611272611bdb565b905060008151116112925760405180602001604052806000815250610f40565b8061129c84611bea565b6040516020016112ad929190613282565b6040516020818303038152906040529392505050565b600081815260016020526040812061074d90611c7c565b6000828152602081905260409020600101546112f58161158b565b61096283836118cc565b60005b818110156109625761132b83838381811061131f5761131f613044565b90506020020135610cf2565b8061133581613070565b915050611302565b60006113488161158b565b61073e82611c86565b600b8054610e0090613089565b6113688282610f47565b61073e576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561139e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f40836001600160a01b038416611d7b565b60006001600160e01b0319821663152a902d60e11b148061074d575061074d82611dca565b6000818152600560205260409020546001600160a01b0316610f105760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108a2565b600061148682610d70565b9050806001600160a01b0316836001600160a01b0316036114f35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108a2565b336001600160a01b038216148061150f575061150f813361063e565b6115815760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016108a2565b6109628383611e0a565b610f108133611e78565b80516001600160a01b03166115bd576040516331c3e52960e11b815260040160405180910390fd5b60005b81602001515181101561160a576115f88260000151836020015183815181106115eb576115eb613044565b6020026020010151611ed1565b8061160281613070565b9150506115c0565b50806020015151600d5461161e91906132b1565b600d5550565b60008061163083610d70565b9050806001600160a01b0316846001600160a01b0316148061167757506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b8061169b5750836001600160a01b0316611690846107e5565b6001600160a01b0316145b949350505050565b828233321480159061171e57506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156116f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171c91906130c3565b155b1561173e5760405163937db65f60e01b81523360048201526024016108a2565b6001600160a01b0382163b158015906117c257506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa15801561179c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c091906130c3565b155b156117eb5760405163f934453160e01b81526001600160a01b03831660048201526024016108a2565b6001600160a01b0381163b1580159061186f57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015611849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186d91906130c3565b155b1561189857604051632a67242160e11b81526001600160a01b03821660048201526024016108a2565b6118a3858585611f18565b5050505050565b6118b4828261135e565b600082815260016020526040902061096290826113e2565b6118d6828261207c565b600082815260016020526040902061096290826120e1565b600881901c6000908152600e6020526040902054600160ff83161b161561192b576040516305dcda1160e51b8152600481018290526024016108a2565b61073e82826120f6565b61193e336109c4565b61195a5760405162461bcd60e51b81526004016108a2906130e0565b610f1081612281565b6127106001600160601b038216111561198e5760405162461bcd60e51b81526004016108a2906132c4565b6001600160a01b0382166119e45760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016108a2565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600a90529190942093519051909116600160a01b029116179055565b6127106001600160601b0382161115611a595760405162461bcd60e51b81526004016108a2906132c4565b6001600160a01b038216611aaf5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108a2565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6000610f408383612316565b80516001600160a01b031615611b1d576040516331c3e52960e11b815260040160405180910390fd5b60005b81602001515181101561160a57611b58826000015183602001518381518110611b4b57611b4b613044565b60200260200101516118ee565b80611b6281613070565b915050611b20565b611b7483836118ee565b611b816000848484612340565b6109625760405162461bcd60e51b81526004016108a29061330e565b61073e338383612441565b611bb38484846116a3565b611bbf84848484612340565b610d535760405162461bcd60e51b81526004016108a29061330e565b6060600c805461076290613089565b60606000611bf78361250f565b60010190506000816001600160401b03811115611c1657611c16612a30565b6040519080825280601f01601f191660200182016040528015611c40576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611c4a57509392505050565b600061074d825490565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf591906130c3565b611d125760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600183016020526040812054611dc25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074d565b50600061074d565b60006001600160e01b031982166380ac58cd60e01b1480611dfb57506001600160e01b03198216635b5e139f60e01b145b8061074d575061074d826125e7565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e3f82610d70565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611e828282610f47565b61073e57611e8f816125f2565b611e9a836020612604565b604051602001611eab929190613360565b60408051601f198184030181529082905262461bcd60e51b82526108a2916004016129be565b600881901c6000908152600e6020526040902054600160ff83161b1615611f0e576040516305dcda1160e51b8152600481018290526024016108a2565b61073e828261279f565b826001600160a01b0316611f2b82610d70565b6001600160a01b031614611f515760405162461bcd60e51b81526004016108a2906133d5565b6001600160a01b038216611fb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108a2565b826001600160a01b0316611fc682610d70565b6001600160a01b031614611fec5760405162461bcd60e51b81526004016108a2906133d5565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6120868282610f47565b1561073e576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f40836001600160a01b0384166127b9565b6001600160a01b03821661214c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108a2565b6000818152600560205260409020546001600160a01b0316156121b15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108a2565b6000818152600560205260409020546001600160a01b0316156122165760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108a2565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061228c82610d70565b905061229782610d70565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600082600001828154811061232d5761232d613044565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561243657604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061238490339089908890889060040161341a565b6020604051808303816000875af19250505080156123bf575060408051601f3d908101601f191682019092526123bc91810190613457565b60015b61241c573d8080156123ed576040519150601f19603f3d011682016040523d82523d6000602084013e6123f2565b606091505b5080516000036124145760405162461bcd60e51b81526004016108a29061330e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061169b565b506001949350505050565b816001600160a01b0316836001600160a01b0316036124a25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108a2565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061254e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061257a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061259857662386f26fc10000830492506010015b6305f5e10083106125b0576305f5e100830492506008015b61271083106125c457612710830492506004015b606483106125d6576064830492506002015b600a831061074d5760010192915050565b600061074d826128ac565b606061074d6001600160a01b03831660145b6060600061261383600261312d565b61261e9060026132b1565b6001600160401b0381111561263557612635612a30565b6040519080825280601f01601f19166020018201604052801561265f576020820181803683370190505b509050600360fc1b8160008151811061267a5761267a613044565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106126a9576126a9613044565b60200101906001600160f81b031916908160001a90535060006126cd84600261312d565b6126d89060016132b1565b90505b6001811115612750576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061270c5761270c613044565b1a60f81b82828151811061272257612722613044565b60200101906001600160f81b031916908160001a90535060049490941c9361274981613166565b90506126db565b508315610f405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108a2565b61073e828260405180602001604052806000815250611b6a565b600081815260018301602052604081205480156128a25760006127dd600183613474565b85549091506000906127f190600190613474565b905081811461285657600086600001828154811061281157612811613044565b906000526020600020015490508087600001848154811061283457612834613044565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061286757612867613487565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074d565b600091505061074d565b60006001600160e01b03198216635a05180f60e01b148061074d575061074d8260006001600160e01b03198216637965db0b60e01b148061074d57506301ffc9a760e01b6001600160e01b031983161461074d565b60006020828403121561291357600080fd5b81356001600160401b0381111561292957600080fd5b820160608185031215610f4057600080fd5b6001600160e01b031981168114610f1057600080fd5b60006020828403121561296357600080fd5b8135610f408161293b565b60005b83811015612989578181015183820152602001612971565b50506000910152565b600081518084526129aa81602086016020860161296e565b601f01601f19169290920160200192915050565b602081526000610f406020830184612992565b6000602082840312156129e357600080fd5b5035919050565b80356001600160a01b0381168114612a0157600080fd5b919050565b60008060408385031215612a1957600080fd5b612a22836129ea565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612a6857612a68612a30565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612a9657612a96612a30565b604052919050565b60006001600160401b03821115612ab757612ab7612a30565b5060051b60200190565b6000612ad4612acf84612a9e565b612a6e565b8381529050602080820190600585811b850187811115612af357600080fd5b855b81811015612bc65780356001600160401b0380821115612b155760008081fd5b908801906040828c031215612b2a5760008081fd5b612b32612a46565b612b3b836129ea565b81528683013582811115612b4f5760008081fd5b8084019350508b601f840112612b6757600091508182fd5b82359150612b77612acf83612a9e565b82815291861b8301870191878101908d841115612b945760008081fd5b938801935b83851015612bb257843582529388019390880190612b99565b828901525087525050938301938301612af5565b50505050509392505050565b600060208284031215612be457600080fd5b81356001600160401b03811115612bfa57600080fd5b8201601f81018413612c0b57600080fd5b61169b84823560208401612ac1565b600080600060608486031215612c2f57600080fd5b612c38846129ea565b9250612c46602085016129ea565b9150604084013590509250925092565b60008060408385031215612c6957600080fd5b50508035926020909101359150565b60008060408385031215612c8b57600080fd5b82359150612c9b602084016129ea565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612ce55783516001600160a01b031683529284019291840191600101612cc0565b50909695505050505050565b600060208284031215612d0357600080fd5b610f40826129ea565b80356001600160601b0381168114612a0157600080fd5b600080600060608486031215612d3857600080fd5b83359250612d48602085016129ea565b9150612d5660408501612d0c565b90509250925092565b60006001600160401b03831115612d7857612d78612a30565b612d8b601f8401601f1916602001612a6e565b9050828152838383011115612d9f57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612dc857600080fd5b81356001600160401b03811115612dde57600080fd5b8201601f81018413612def57600080fd5b61169b84823560208401612d5f565b60008060408385031215612e1157600080fd5b612e1a836129ea565b9150612c9b60208401612d0c565b8015158114610f1057600080fd5b60008060408385031215612e4957600080fd5b612e52836129ea565b91506020830135612e6281612e28565b809150509250929050565b60008083601f840112612e7f57600080fd5b5081356001600160401b03811115612e9657600080fd5b6020830191508360208260051b8501011115610a9857600080fd5b60008060008060608587031215612ec757600080fd5b84356001600160401b03811115612edd57600080fd5b612ee987828801612e6d565b9095509350612efc9050602086016129ea565b9150612f0a60408601612d0c565b905092959194509250565b60008060008060808587031215612f2b57600080fd5b612f34856129ea565b9350612f42602086016129ea565b92506040850135915060608501356001600160401b03811115612f6457600080fd5b8501601f81018713612f7557600080fd5b612f8487823560208401612d5f565b91505092959194509250565b60008060208385031215612fa357600080fd5b82356001600160401b03811115612fb957600080fd5b612fc585828601612e6d565b90969095509350505050565b60008060408385031215612fe457600080fd5b612fed836129ea565b9150612c9b602084016129ea565b6000808335601e1984360301811261301257600080fd5b8301803591506001600160401b0382111561302c57600080fd5b6020019150600581901b3603821315610a9857600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016130825761308261305a565b5060010190565b600181811c9082168061309d57607f821691505b6020821081036130bd57634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156130d557600080fd5b8151610f4081612e28565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b808202811582820484141761074d5761074d61305a565b60008261316157634e487b7160e01b600052601260045260246000fd5b500490565b6000816131755761317561305a565b506000190190565b601f82111561096257600081815260208120601f850160051c810160208610156131a45750805b601f850160051c820191505b81811015611223578281556001016131b0565b81516001600160401b038111156131dc576131dc612a30565b6131f0816131ea8454613089565b8461317d565b602080601f831160018114613225576000841561320d5750858301515b600019600386901b1c1916600185901b178555611223565b600085815260208120601f198616915b8281101561325457888601518255948401946001909101908401613235565b50858210156132725787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000835161329481846020880161296e565b8351908301906132a881836020880161296e565b01949350505050565b8082018082111561074d5761074d61305a565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161339881601785016020880161296e565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516133c981602884016020880161296e565b01602801949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061344d90830184612992565b9695505050505050565b60006020828403121561346957600080fd5b8151610f408161293b565b8181038181111561074d5761074d61305a565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220db78f674a75be30e896244d83179c8c4f1b45519e52de44c0f337b384795efbc64736f6c63430008110033";
33615
+ const _bytecode$1 = "0x6101606040523480156200001257600080fd5b5060405162004b3738038062004b37833981016040819052620000359162000693565b8787878787878787868681604051806040016040528060018152602001603160f81b815250838381600390816200006d919062000826565b5060046200007c828262000826565b5050506200009a600983620001a960201b620014771790919060201c565b61012052620000b781600a620001a9602090811b6200147717901c565b61014052815160208084019190912060e052815190820120610100524660a0526200014560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506200015e9050600089620001f9565b6200016a82826200023c565b620001758362000341565b600f62000183868262000826565b50600e62000192858262000826565b505050505050505050505050505050505062000970565b6000602083511015620001c957620001c1836200043a565b9050620001f3565b82620001e0836200047d60201b620014a81760201c565b90620001ed908262000826565b5060ff90505b92915050565b6200021082826200048060201b620014ab1760201c565b6000828152600160209081526040909120620002379183906200152f62000521821b17901c565b505050565b6127106001600160601b0382161115620002b05760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620003085760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002a7565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600c55565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200038d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b39190620008f2565b620003d15760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080829050601f8151111562000468578260405163305a27a960e01b8152600401620002a7919062000916565b805162000475826200094b565b179392505050565b90565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200051d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620004dc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000538836001600160a01b0384166200053f565b9392505050565b60008181526001830160205260408120546200058857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001f3565b506000620001f3565b80516001600160a01b0381168114620005a957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620005e1578181015183820152602001620005c7565b50506000910152565b600082601f830112620005fc57600080fd5b81516001600160401b0380821115620006195762000619620005ae565b604051601f8301601f19908116603f01168101908282118183101715620006445762000644620005ae565b816040528381528660208588010111156200065e57600080fd5b62000671846020830160208901620005c4565b9695505050505050565b80516001600160601b0381168114620005a957600080fd5b600080600080600080600080610100898b031215620006b157600080fd5b620006bc8962000591565b60208a01519098506001600160401b0380821115620006da57600080fd5b620006e88c838d01620005ea565b985060408b0151915080821115620006ff57600080fd5b6200070d8c838d01620005ea565b975060608b01519150808211156200072457600080fd5b620007328c838d01620005ea565b965060808b01519150808211156200074957600080fd5b50620007588b828c01620005ea565b9450506200076960a08a0162000591565b92506200077960c08a0162000591565b91506200078960e08a016200067b565b90509295985092959890939650565b600181811c90821680620007ad57607f821691505b602082108103620007ce57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023757600081815260208120601f850160051c81016020861015620007fd5750805b601f850160051c820191505b818110156200081e5782815560010162000809565b505050505050565b81516001600160401b03811115620008425762000842620005ae565b6200085a8162000853845462000798565b84620007d4565b602080601f831160018114620008925760008415620008795750858301515b600019600386901b1c1916600185901b1785556200081e565b600085815260208120601f198616915b82811015620008c357888601518255948401946001909101908401620008a2565b5085821015620008e25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200090557600080fd5b815180151581146200053857600080fd5b602081526000825180602084015262000937816040850160208701620005c4565b601f01601f19169190910160400192915050565b80516020808301519190811015620007ce5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161416c620009cb6000396000610fdc01526000610fb101526000611b3401526000611b0c01526000611a6701526000611a9101526000611abb015261416c6000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c806369e2f0fb1161019d578063a1448194116100e9578063ca15c873116100a2578063e4623c1b1161007c578063e4623c1b146106b8578063e4e18f6d146106cb578063e8a3d485146106de578063e985e9c5146106e657600080fd5b8063ca15c8731461067d578063d539139314610690578063d547741f146106a557600080fd5b8063a144819414610616578063a217fddf14610629578063a22cb46514610631578063a701281614610644578063b88d4fde14610657578063c87b56dd1461066a57600080fd5b8063885e7a0811610156578063938e3d7b11610130578063938e3d7b146105d557806395d89b41146105e85780639e2641a3146105f05780639f15d7001461060357600080fd5b8063885e7a081461059c5780639010d07c146105af57806391d14854146105c257600080fd5b806369e2f0fb1461052d5780636c0360eb1461054057806370a0823114610548578063745a41bc1461055b57806374f16a811461056e57806384b0196e1461058157600080fd5b80632f2ff15d1161025c5780633eaaf86b1161021557806342966c68116101ef57806342966c68146104e1578063439aed34146104f457806355f804b3146105075780636352211e1461051a57600080fd5b80633eaaf86b146104b257806340c10f19146104bb57806342842e0e146104ce57600080fd5b80632f2ff15d1461044957806331ae450b1461045c5780633644e5151461047157806336568abe146104795780633dd1eb611461048c5780633e769acd1461049f57600080fd5b806318160ddd116102ae57806318160ddd146103b3578063234af046146103bb57806323b872dd146103ce578063248a9ca3146103e157806329326f29146104045780632a55205a1461041757600080fd5b80628ad946146102f557806301ffc9a71461030a57806306fdde0314610332578063081812fc14610347578063095ea7b314610372578063141a468c14610385575b600080fd5b610308610303366004613441565b610722565b005b61031d610318366004613491565b6107f8565b60405190151581526020015b60405180910390f35b61033a610809565b60405161032991906134fe565b61035a610355366004613511565b61089b565b6040516001600160a01b039091168152602001610329565b610308610380366004613546565b6108c2565b6103a5610393366004613511565b6000908152600b602052604090205490565b604051908152602001610329565b6010546103a5565b6103086103c9366004613712565b6109dc565b6103086103dc36600461375a565b610a34565b6103a56103ef366004613511565b60009081526020819052604090206001015490565b60025461035a906001600160a01b031681565b61042a610425366004613796565b610a66565b604080516001600160a01b039093168352602083019190915201610329565b6103086104573660046137b8565b610b14565b610464610b39565b60405161032991906137e4565b6103a5610be7565b6103086104873660046137b8565b610bf6565b61030861049a366004613831565b610c70565b6103086104ad366004613712565b610c93565b6103a560105481565b6103086104c9366004613546565b610d1f565b6103086104dc36600461375a565b610d5b565b6103086104ef366004613511565b610d76565b610308610502366004613863565b610db4565b6103086105153660046138f6565b610ddd565b61035a610528366004613511565b610df4565b61030861053b366004613831565b610e54565b61033a610e77565b6103a5610556366004613831565b610f05565b61030861056936600461395e565b610f8b565b61030861057c366004613712565b610f97565b610589610fa3565b60405161032997969594939291906139be565b6103086105aa366004613a54565b61102c565b61035a6105bd366004613796565b611041565b61031d6105d03660046137b8565b611060565b6103086105e33660046138f6565b611089565b61033a6110a0565b6103086105fe366004613712565b6110af565b610308610611366004613546565b611107565b610308610624366004613546565b611161565b6103a5600081565b61030861063f366004613a8c565b611193565b610308610652366004613b07565b6112e4565b610308610665366004613b6b565b611344565b61033a610678366004613511565b611376565b6103a561068b366004613511565b6113dc565b6103a56a4d494e5445525f524f4c4560a81b81565b6103086106b33660046137b8565b6113f3565b6103086106c6366004613bba565b611418565b6103086106d9366004613831565b611456565b61033a61146a565b61031d6106f4366004613bfb565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61072f6020820182613c25565b905061073e6040830183613c25565b90501461075e5760405163359a1bc360e01b815260040160405180910390fd5b60005b61076e6040830183613c25565b90508110156107f4576107e26107876020840184613831565b6107946020850185613c25565b848181106107a4576107a4613c6e565b90506020020160208101906107b99190613831565b6107c66040860186613c25565b858181106107d6576107d6613c6e565b90506020020135610d5b565b806107ec81613c9a565b915050610761565b5050565b600061080382611544565b92915050565b60606003805461081890613cb3565b80601f016020809104026020016040519081016040528092919081815260200182805461084490613cb3565b80156108915780601f1061086657610100808354040283529160200191610891565b820191906000526020600020905b81548152906001019060200180831161087457829003601f168201915b5050505050905090565b60006108a682611569565b506000908152600760205260409020546001600160a01b031690565b60006108cd82610df4565b9050806001600160a01b0316836001600160a01b03160361093f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061095b575061095b81336106f4565b6109cd5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610936565b6109d783836115c8565b505050565b6a4d494e5445525f524f4c4560a81b6109f481611719565b60005b82518110156109d757610a22838281518110610a1557610a15613c6e565b6020026020010151611723565b80610a2c81613c9a565b9150506109f7565b610a3f335b826117b2565b610a5b5760405162461bcd60e51b815260040161093690613ced565b6109d7838383611831565b6000828152600d602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610adb575060408051808201909152600c546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610afa906001600160601b031687613d3a565b610b049190613d51565b91519350909150505b9250929050565b600082815260208190526040902060010154610b2f81611719565b6109d78383611a38565b60606000610b46816113dc565b90506000816001600160401b03811115610b6257610b62613570565b604051908082528060200260200182016040528015610b8b578160200160208202803683370190505b50905060005b82811015610be057610ba4600082611041565b828281518110610bb657610bb6613c6e565b6001600160a01b039092166020928302919091019091015280610bd881613c9a565b915050610b91565b5092915050565b6000610bf1611a5a565b905090565b6001600160a01b0381163314610c665760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610936565b6107f48282611b85565b6000610c7b81611719565b6107f46a4d494e5445525f524f4c4560a81b83610b14565b60005b81518110156107f4576000828281518110610cb357610cb3613c6e565b6020026020010151905060005b816020015151811015610d0a57610cf8826000015183602001518381518110610ceb57610ceb613c6e565b6020026020010151611107565b80610d0281613c9a565b915050610cc0565b50508080610d1790613c9a565b915050610c96565b6a4d494e5445525f524f4c4560a81b610d3781611719565b610d418383611ba7565b60108054906000610d5183613c9a565b9190505550505050565b6109d783838360405180602001604052806000815250611344565b610d7f81611bee565b600881901c60009081526011602052604081208054600160ff85161b1790556010805491610dac83613d73565b919050555050565b6a4d494e5445525f524f4c4560a81b610dcc81611719565b610dd7848484611c1c565b50505050565b6000610de881611719565b600f6109d78382613dd0565b6000818152600560205260408120546001600160a01b0316806108035760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610936565b6000610e5f81611719565b6107f46a4d494e5445525f524f4c4560a81b836113f3565b600f8054610e8490613cb3565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb090613cb3565b8015610efd5780601f10610ed257610100808354040283529160200191610efd565b820191906000526020600020905b815481529060010190602001808311610ee057829003601f168201915b505050505081565b60006001600160a01b038216610f6f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610936565b506001600160a01b031660009081526006602052604090205490565b610dd784848484611ce7565b610fa081610c93565b50565b600060608082808083610fd77f00000000000000000000000000000000000000000000000000000000000000006009611dd0565b6110027f0000000000000000000000000000000000000000000000000000000000000000600a611dd0565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600061103781611719565b6109d78383611e74565b60008281526001602052604081206110599083611f2e565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600061109481611719565b600e6109d78382613dd0565b60606004805461081890613cb3565b6a4d494e5445525f524f4c4560a81b6110c781611719565b60005b82518110156109d7576110f58382815181106110e8576110e8613c6e565b6020026020010151611f3a565b806110ff81613c9a565b9150506110ca565b600061111282610df4565b9050826001600160a01b0316816001600160a01b03161461115857604051634fefd56160e01b8152600481018390526001600160a01b0382166024820152604401610936565b6109d782610d76565b6a4d494e5445525f524f4c4560a81b61117981611719565b610d41838360405180602001604052806000815250611fb0565b81333b1580159061120d57506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156111e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120b9190613e8f565b155b1561122d5760405163f6fa4cbd60e01b8152336004820152602401610936565b6001600160a01b0381163b158015906112b157506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af9190613e8f565b155b156112da576040516341b8d58160e11b81526001600160a01b0382166004820152602401610936565b6109d78383611fe3565b6a4d494e5445525f524f4c4560a81b6112fc81611719565b60005b8481101561133c5761132a86868381811061131c5761131c613c6e565b905060200201358585611c1c565b8061133481613c9a565b9150506112ff565b505050505050565b61134e33836117b2565b61136a5760405162461bcd60e51b815260040161093690613ced565b610dd784848484611fee565b606061138182611569565b600061138b612021565b905060008151116113ab5760405180602001604052806000815250611059565b806113b584612030565b6040516020016113c6929190613eac565b6040516020818303038152906040529392505050565b6000818152600160205260408120610803906120c2565b60008281526020819052604090206001015461140e81611719565b6109d78383611b85565b60005b818110156109d75761144483838381811061143857611438613c6e565b90506020020135610d76565b8061144e81613c9a565b91505061141b565b600061146181611719565b6107f4826120cc565b600e8054610e8490613cb3565b60006020835110156114935761148c836121c1565b9050610803565b8161149e8482613dd0565b5060ff9050610803565b90565b6114b58282611060565b6107f4576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556114eb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611059836001600160a01b0384166121ff565b60006001600160e01b0319821663152a902d60e11b148061080357506108038261224e565b6000818152600560205260409020546001600160a01b0316610fa05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610936565b81333b1580159061164257506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561161c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116409190613e8f565b155b156116625760405163f6fa4cbd60e01b8152336004820152602401610936565b6001600160a01b0381163b158015906116e657506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa1580156116c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e49190613e8f565b155b1561170f576040516341b8d58160e11b81526001600160a01b0382166004820152602401610936565b6109d78383612273565b610fa081336122e1565b80516001600160a01b031661174b576040516331c3e52960e11b815260040160405180910390fd5b60005b8160200151518110156117985761178682600001518360200151838151811061177957611779613c6e565b602002602001015161233a565b8061179081613c9a565b91505061174e565b508060200151516010546117ac9190613edb565b60105550565b6000806117be83610df4565b9050806001600160a01b0316846001600160a01b0316148061180557506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806118295750836001600160a01b031661181e8461089b565b6001600160a01b0316145b949350505050565b82823332148015906118ac57506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015611886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118aa9190613e8f565b155b156118cc5760405163937db65f60e01b8152336004820152602401610936565b6001600160a01b0382163b1580159061195057506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa15801561192a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194e9190613e8f565b155b156119795760405163f934453160e01b81526001600160a01b0383166004820152602401610936565b6001600160a01b0381163b158015906119fd57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa1580156119d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fb9190613e8f565b155b15611a2657604051632a67242160e11b81526001600160a01b0382166004820152602401610936565b611a31858585612381565b5050505050565b611a4282826114ab565b60008281526001602052604090206109d7908261152f565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611ab357507f000000000000000000000000000000000000000000000000000000000000000046145b15611add57507f000000000000000000000000000000000000000000000000000000000000000090565b610bf1604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611b8f82826123ab565b60008281526001602052604090206109d79082612410565b600881901c600090815260116020526040902054600160ff83161b1615611be4576040516305dcda1160e51b815260048101829052602401610936565b6107f48282612425565b611bf733610a39565b611c135760405162461bcd60e51b815260040161093690613ced565b610fa0816125b0565b6127106001600160601b0382161115611c475760405162461bcd60e51b815260040161093690613eee565b6001600160a01b038216611c9d5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610936565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600d90529190942093519051909116600160a01b029116179055565b42821015611d085760405163068568f360e21b815260040160405180910390fd5b6000611d15858585612645565b9050611d2a611d2385610df4565b828461271e565b15611d3f57611d3985856115c8565b50610dd7565b60008251604003611d8657611d7f82611d5b8560006020612828565b611d6490613f38565b611d718660206040612828565b611d7a90613f38565b612935565b9050611db2565b8251604103611d9957611d7f8284612952565b604051638baa579f60e01b815260040160405180910390fd5b611dbc8186612976565b15611d9957611dcb86866115c8565b61133c565b606060ff8314611de35761148c83612995565b818054611def90613cb3565b80601f0160208091040260200160405190810160405280929190818152602001828054611e1b90613cb3565b8015611e685780601f10611e3d57610100808354040283529160200191611e68565b820191906000526020600020905b815481529060010190602001808311611e4b57829003601f168201915b50505050509050610803565b6127106001600160601b0382161115611e9f5760405162461bcd60e51b815260040161093690613eee565b6001600160a01b038216611ef55760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610936565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600c55565b600061105983836129d4565b80516001600160a01b031615611f63576040516331c3e52960e11b815260040160405180910390fd5b60005b81602001515181101561179857611f9e826000015183602001518381518110611f9157611f91613c6e565b6020026020010151611ba7565b80611fa881613c9a565b915050611f66565b611fba8383611ba7565b611fc760008484846129fe565b6109d75760405162461bcd60e51b815260040161093690613f5c565b6107f4338383612aff565b611ff9848484611831565b612005848484846129fe565b610dd75760405162461bcd60e51b815260040161093690613f5c565b6060600f805461081890613cb3565b6060600061203d83612bcd565b60010190506000816001600160401b0381111561205c5761205c613570565b6040519080825280601f01601f191660200182016040528015612086576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461209057509392505050565b6000610803825490565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015612117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213b9190613e8f565b6121585760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080829050601f815111156121ec578260405163305a27a960e01b815260040161093691906134fe565b80516121f782613f38565b179392505050565b600081815260018301602052604081205461224657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610803565b506000610803565b60006001600160e01b03198216635604e22560e01b1480610803575061080382612ca5565b600081815260076020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122a882610df4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6122eb8282611060565b6107f4576122f881612ce5565b612303836020612cf7565b604051602001612314929190613fae565b60408051601f198184030181529082905262461bcd60e51b8252610936916004016134fe565b600881901c600090815260116020526040902054600160ff83161b1615612377576040516305dcda1160e51b815260048101829052602401610936565b6107f48282612e92565b6000818152600b6020526040812080549161239b83613c9a565b91905055506109d7838383612eac565b6123b58282611060565b156107f4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611059836001600160a01b038416613010565b6001600160a01b03821661247b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610936565b6000818152600560205260409020546001600160a01b0316156124e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610936565b6000818152600560205260409020546001600160a01b0316156125455760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610936565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006125bb82610df4565b90506125c682610df4565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006118296040516020016126b390660a0cae4dad2e8560cb1b81527f61646472657373207370656e6465722c75696e7432353620746f6b656e49642c60078201527f75696e74323536206e6f6e63652c75696e7432353620646561646c696e652900602782015260460190565b60408051808303601f1901815282825280516020918201206000888152600b835283902054918401526001600160a01b0388169183019190915260608201869052608082015260a0810184905260c00160405160208183030381529060405280519060200120613103565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401612748929190614023565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612786919061403c565b600060405180830381855afa9150503d80600081146127c1576040519150601f19603f3d011682016040523d82523d6000602084013e6127c6565b606091505b50915091508180156127d9575080516020145b1561281c576000818060200190518101906127f49190614058565b90506374eca2c160e11b6001600160e01b031982160161281a5760019350505050611059565b505b50600095945050505050565b60608161283681601f613edb565b10156128755760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610936565b61287f8284613edb565b845110156128c35760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610936565b6060821580156128e2576040519150600082526020820160405261292c565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561291b578051835260209283019201612903565b5050858452601f01601f1916604052505b50949350505050565b6000806000612945868686613130565b9150915061292c81613169565b600080600061296185856132b3565b9150915061296e81613169565b509392505050565b60006001600160a01b03831615801590611059575061105983836117b2565b606060006129a2836132f5565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60008260000182815481106129eb576129eb613c6e565b9060005260206000200154905092915050565b60006001600160a01b0384163b15612af457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612a42903390899088908890600401614075565b6020604051808303816000875af1925050508015612a7d575060408051601f3d908101601f19168201909252612a7a91810190614058565b60015b612ada573d808015612aab576040519150601f19603f3d011682016040523d82523d6000602084013e612ab0565b606091505b508051600003612ad25760405162461bcd60e51b815260040161093690613f5c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611829565b506001949350505050565b816001600160a01b0316836001600160a01b031603612b605760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610936565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612c0c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612c38576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612c5657662386f26fc10000830492506010015b6305f5e1008310612c6e576305f5e100830492506008015b6127108310612c8257612710830492506004015b60648310612c94576064830492506002015b600a83106108035760010192915050565b60006001600160e01b031982166380ac58cd60e01b1480612cd657506001600160e01b03198216635b5e139f60e01b145b8061080357506108038261331d565b60606108036001600160a01b03831660145b60606000612d06836002613d3a565b612d11906002613edb565b6001600160401b03811115612d2857612d28613570565b6040519080825280601f01601f191660200182016040528015612d52576020820181803683370190505b509050600360fc1b81600081518110612d6d57612d6d613c6e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d9c57612d9c613c6e565b60200101906001600160f81b031916908160001a9053506000612dc0846002613d3a565b612dcb906001613edb565b90505b6001811115612e43576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612dff57612dff613c6e565b1a60f81b828281518110612e1557612e15613c6e565b60200101906001600160f81b031916908160001a90535060049490941c93612e3c81613d73565b9050612dce565b5083156110595760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610936565b6107f4828260405180602001604052806000815250611fb0565b826001600160a01b0316612ebf82610df4565b6001600160a01b031614612ee55760405162461bcd60e51b8152600401610936906140b2565b6001600160a01b038216612f475760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610936565b826001600160a01b0316612f5a82610df4565b6001600160a01b031614612f805760405162461bcd60e51b8152600401610936906140b2565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815260018301602052604081205480156130f95760006130346001836140f7565b8554909150600090613048906001906140f7565b90508181146130ad57600086600001828154811061306857613068613c6e565b906000526020600020015490508087600001848154811061308b5761308b613c6e565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130be576130be61410a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610803565b6000915050610803565b6000610803613110611a5a565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806001600160ff1b0383168161314d60ff86901c601b613edb565b905061315b87828885613328565b935093505050935093915050565b600081600481111561317d5761317d614120565b036131855750565b600181600481111561319957613199614120565b036131e65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610936565b60028160048111156131fa576131fa614120565b036132475760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610936565b600381600481111561325b5761325b614120565b03610fa05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610936565b60008082516041036132e95760208301516040840151606085015160001a6132dd87828585613328565b94509450505050610b0d565b50600090506002610b0d565b600060ff8216601f81111561080357604051632cd44ac360e21b815260040160405180910390fd5b6000610803826133ec565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561335f57506000905060036133e3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156133b3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166133dc576000600192509250506133e3565b9150600090505b94509492505050565b60006001600160e01b03198216635a05180f60e01b148061080357506108038260006001600160e01b03198216637965db0b60e01b148061080357506301ffc9a760e01b6001600160e01b0319831614610803565b60006020828403121561345357600080fd5b81356001600160401b0381111561346957600080fd5b82016060818503121561105957600080fd5b6001600160e01b031981168114610fa057600080fd5b6000602082840312156134a357600080fd5b81356110598161347b565b60005b838110156134c95781810151838201526020016134b1565b50506000910152565b600081518084526134ea8160208601602086016134ae565b601f01601f19169290920160200192915050565b60208152600061105960208301846134d2565b60006020828403121561352357600080fd5b5035919050565b80356001600160a01b038116811461354157600080fd5b919050565b6000806040838503121561355957600080fd5b6135628361352a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156135a8576135a8613570565b60405290565b604051601f8201601f191681016001600160401b03811182821017156135d6576135d6613570565b604052919050565b60006001600160401b038211156135f7576135f7613570565b5060051b60200190565b600061361461360f846135de565b6135ae565b8381529050602080820190600585811b85018781111561363357600080fd5b855b818110156137065780356001600160401b03808211156136555760008081fd5b908801906040828c03121561366a5760008081fd5b613672613586565b61367b8361352a565b8152868301358281111561368f5760008081fd5b8084019350508b601f8401126136a757600091508182fd5b823591506136b761360f836135de565b82815291861b8301870191878101908d8411156136d45760008081fd5b938801935b838510156136f2578435825293880193908801906136d9565b828901525087525050938301938301613635565b50505050509392505050565b60006020828403121561372457600080fd5b81356001600160401b0381111561373a57600080fd5b8201601f8101841361374b57600080fd5b61182984823560208401613601565b60008060006060848603121561376f57600080fd5b6137788461352a565b92506137866020850161352a565b9150604084013590509250925092565b600080604083850312156137a957600080fd5b50508035926020909101359150565b600080604083850312156137cb57600080fd5b823591506137db6020840161352a565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156138255783516001600160a01b031683529284019291840191600101613800565b50909695505050505050565b60006020828403121561384357600080fd5b6110598261352a565b80356001600160601b038116811461354157600080fd5b60008060006060848603121561387857600080fd5b833592506138886020850161352a565b91506138966040850161384c565b90509250925092565b60006001600160401b038311156138b8576138b8613570565b6138cb601f8401601f19166020016135ae565b90508281528383830111156138df57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561390857600080fd5b81356001600160401b0381111561391e57600080fd5b8201601f8101841361392f57600080fd5b6118298482356020840161389f565b600082601f83011261394f57600080fd5b6110598383356020850161389f565b6000806000806080858703121561397457600080fd5b61397d8561352a565b9350602085013592506040850135915060608501356001600160401b038111156139a657600080fd5b6139b28782880161393e565b91505092959194509250565b60ff60f81b881681526000602060e0818401526139de60e084018a6134d2565b83810360408501526139f0818a6134d2565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015613a4257835183529284019291840191600101613a26565b50909c9b505050505050505050505050565b60008060408385031215613a6757600080fd5b613a708361352a565b91506137db6020840161384c565b8015158114610fa057600080fd5b60008060408385031215613a9f57600080fd5b613aa88361352a565b91506020830135613ab881613a7e565b809150509250929050565b60008083601f840112613ad557600080fd5b5081356001600160401b03811115613aec57600080fd5b6020830191508360208260051b8501011115610b0d57600080fd5b60008060008060608587031215613b1d57600080fd5b84356001600160401b03811115613b3357600080fd5b613b3f87828801613ac3565b9095509350613b5290506020860161352a565b9150613b606040860161384c565b905092959194509250565b60008060008060808587031215613b8157600080fd5b613b8a8561352a565b9350613b986020860161352a565b92506040850135915060608501356001600160401b038111156139a657600080fd5b60008060208385031215613bcd57600080fd5b82356001600160401b03811115613be357600080fd5b613bef85828601613ac3565b90969095509350505050565b60008060408385031215613c0e57600080fd5b613c178361352a565b91506137db6020840161352a565b6000808335601e19843603018112613c3c57600080fd5b8301803591506001600160401b03821115613c5657600080fd5b6020019150600581901b3603821315610b0d57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613cac57613cac613c84565b5060010190565b600181811c90821680613cc757607f821691505b602082108103613ce757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b808202811582820484141761080357610803613c84565b600082613d6e57634e487b7160e01b600052601260045260246000fd5b500490565b600081613d8257613d82613c84565b506000190190565b601f8211156109d757600081815260208120601f850160051c81016020861015613db15750805b601f850160051c820191505b8181101561133c57828155600101613dbd565b81516001600160401b03811115613de957613de9613570565b613dfd81613df78454613cb3565b84613d8a565b602080601f831160018114613e325760008415613e1a5750858301515b600019600386901b1c1916600185901b17855561133c565b600085815260208120601f198616915b82811015613e6157888601518255948401946001909101908401613e42565b5085821015613e7f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215613ea157600080fd5b815161105981613a7e565b60008351613ebe8184602088016134ae565b835190830190613ed28183602088016134ae565b01949350505050565b8082018082111561080357610803613c84565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b80516020808301519190811015613ce75760001960209190910360031b1b16919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613fe68160178501602088016134ae565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516140178160288401602088016134ae565b01602801949350505050565b82815260406020820152600061182960408301846134d2565b6000825161404e8184602087016134ae565b9190910192915050565b60006020828403121561406a57600080fd5b81516110598161347b565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140a8908301846134d2565b9695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b8181038181111561080357610803613c84565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c47aea78e02adda7e8a36138892c3ed2fc9b754ce58545603813e5750b053f0764736f6c63430008110033";
32176
33616
  const isSuperArgs$1 = (xs) => xs.length > 1;
32177
33617
  class ImmutableERC721MintByID__factory extends ContractFactory {
32178
33618
  constructor(...args) {
@@ -32269,6 +33709,13 @@ class ERC721 {
32269
33709
  async DEFAULT_ADMIN_ROLE(provider, overrides = {}) {
32270
33710
  return await this.contract.connect(provider).DEFAULT_ADMIN_ROLE(overrides);
32271
33711
  }
33712
+ /**
33713
+ * Returns the domain separator used in the encoding of the signature for permits, as defined by EIP-712
33714
+ * @return the bytes32 domain separator
33715
+ */
33716
+ async DOMAIN_SEPARATOR(provider, overrides) {
33717
+ return await this.contract.connect(provider).DOMAIN_SEPARATOR(overrides);
33718
+ }
32272
33719
  /**
32273
33720
  * @returns the MINTER_ROLE as a string.
32274
33721
  */
@@ -32293,6 +33740,13 @@ class ERC721 {
32293
33740
  async contractURI(provider, overrides = {}) {
32294
33741
  return await this.contract.connect(provider).contractURI(overrides);
32295
33742
  }
33743
+ /**
33744
+ * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
33745
+ * signature.
33746
+ */
33747
+ async eip712Domain(provider, overrides) {
33748
+ return await this.contract.eip712Domain(overrides);
33749
+ }
32296
33750
  /**
32297
33751
  * @returns admin addresses as an array of strings.
32298
33752
  */
@@ -32347,6 +33801,14 @@ class ERC721 {
32347
33801
  async ownerOf(provider, tokenId, overrides = {}) {
32348
33802
  return await this.contract.connect(provider).ownerOf(tokenId, overrides);
32349
33803
  }
33804
+ /**
33805
+ * Returns the current nonce of a given token ID.
33806
+ * @param tokenId The ID of the token for which to retrieve the nonce.
33807
+ * @return Current nonce of the given token.
33808
+ */
33809
+ async nonces(provider, tokenId, overrides) {
33810
+ return await this.contract.connect(provider).nonces(tokenId, overrides);
33811
+ }
32350
33812
  /**
32351
33813
  * @returns the operator allowlist as a string.
32352
33814
  */
@@ -32386,6 +33848,16 @@ class ERC721 {
32386
33848
  async populateApprove(to, tokenId, overrides = {}) {
32387
33849
  return await this.contract.populateTransaction.approve(to, tokenId, overrides);
32388
33850
  }
33851
+ /**
33852
+ * Function to approve by way of owner signature
33853
+ * @param spender the address to approve
33854
+ * @param tokenId the index of the NFT to approve the spender on
33855
+ * @param deadline a timestamp expiry for the permit
33856
+ * @param sig a traditional or EIP-2098 signature
33857
+ */
33858
+ async populatePermit(spender, tokenId, deadline, sig, overrides = {}) {
33859
+ return await this.contract.populateTransaction.permit(spender, tokenId, deadline, sig, overrides);
33860
+ }
32389
33861
  /**
32390
33862
  * @returns a populated transaction for the burn contract function
32391
33863
  */
@@ -32604,9 +34076,7 @@ class ERC721MintByID {
32604
34076
  * @returns the approved address for a token ID, or zero if no address set.
32605
34077
  */
32606
34078
  async getApproved(provider, tokenId, overrides = {}) {
32607
- return await this.contract
32608
- .connect(provider)
32609
- .getApproved(tokenId, overrides);
34079
+ return await this.contract.connect(provider).getApproved(tokenId, overrides);
32610
34080
  }
32611
34081
  /**
32612
34082
  * @returns the role admin address.
@@ -32618,33 +34088,25 @@ class ERC721MintByID {
32618
34088
  * @returns the role member address at a particular index.
32619
34089
  */
32620
34090
  async getRoleMember(provider, role, index, overrides = {}) {
32621
- return await this.contract
32622
- .connect(provider)
32623
- .getRoleMember(role, index, overrides);
34091
+ return await this.contract.connect(provider).getRoleMember(role, index, overrides);
32624
34092
  }
32625
34093
  /**
32626
34094
  * @returns the role member count as a BigNumber.
32627
34095
  */
32628
34096
  async getRoleMemberCount(provider, role, overrides = {}) {
32629
- return await this.contract
32630
- .connect(provider)
32631
- .getRoleMemberCount(role, overrides);
34097
+ return await this.contract.connect(provider).getRoleMemberCount(role, overrides);
32632
34098
  }
32633
34099
  /**
32634
34100
  * @returns a boolean for whether an account has a particular role.
32635
34101
  */
32636
34102
  async hasRole(provider, role, account, overrides = {}) {
32637
- return await this.contract
32638
- .connect(provider)
32639
- .hasRole(role, account, overrides);
34103
+ return await this.contract.connect(provider).hasRole(role, account, overrides);
32640
34104
  }
32641
34105
  /**
32642
34106
  * @returns a booolean that tells whether an operator is approved by a given owner.
32643
34107
  */
32644
34108
  async isApprovedForAll(provider, owner, operator, overrides = {}) {
32645
- return await this.contract
32646
- .connect(provider)
32647
- .isApprovedForAll(owner, operator, overrides);
34109
+ return await this.contract.connect(provider).isApprovedForAll(owner, operator, overrides);
32648
34110
  }
32649
34111
  /**
32650
34112
  * @returns the name of the contract as a string.
@@ -32658,6 +34120,14 @@ class ERC721MintByID {
32658
34120
  async ownerOf(provider, tokenId, overrides = {}) {
32659
34121
  return await this.contract.connect(provider).ownerOf(tokenId, overrides);
32660
34122
  }
34123
+ /**
34124
+ * Returns the current nonce of a given token ID.
34125
+ * @param tokenId The ID of the token for which to retrieve the nonce.
34126
+ * @return Current nonce of the given token.
34127
+ */
34128
+ async nonces(provider, tokenId, overrides) {
34129
+ return await this.contract.connect(provider).nonces(tokenId, overrides);
34130
+ }
32661
34131
  /**
32662
34132
  * @returns the operator allowlist as a string.
32663
34133
  */
@@ -32668,9 +34138,7 @@ class ERC721MintByID {
32668
34138
  * @returns the royalty information for a particular tokenId.
32669
34139
  */
32670
34140
  async royaltyInfo(provider, _tokenId, _salePrice, overrides = {}) {
32671
- return await this.contract
32672
- .connect(provider)
32673
- .royaltyInfo(_tokenId, _salePrice, overrides);
34141
+ return await this.contract.connect(provider).royaltyInfo(_tokenId, _salePrice, overrides);
32674
34142
  }
32675
34143
  /**
32676
34144
  * @returns the symbol of the contract as a string.
@@ -32699,6 +34167,16 @@ class ERC721MintByID {
32699
34167
  async populateApprove(to, tokenId, overrides = {}) {
32700
34168
  return await this.contract.populateTransaction.approve(to, tokenId, overrides);
32701
34169
  }
34170
+ /**
34171
+ * Function to approve by way of owner signature
34172
+ * @param spender the address to approve
34173
+ * @param tokenId the index of the NFT to approve the spender on
34174
+ * @param deadline a timestamp expiry for the permit
34175
+ * @param sig a traditional or EIP-2098 signature
34176
+ */
34177
+ async populatePermit(spender, tokenId, deadline, sig, overrides = {}) {
34178
+ return await this.contract.populateTransaction.permit(spender, tokenId, deadline, sig, overrides);
34179
+ }
32702
34180
  /**
32703
34181
  * @returns a populated transaction for the burn contract function
32704
34182
  */