@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.cjs CHANGED
@@ -740,6 +740,47 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
740
740
  options: localVarRequestOptions,
741
741
  };
742
742
  },
743
+ /**
744
+ * List collections by NFT owner account address
745
+ * @summary List collections by NFT owner
746
+ * @param {string} accountAddress Account address
747
+ * @param {string} chainName The name of chain
748
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
749
+ * @param {number} [pageSize] Maximum number of items to return
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ */
753
+ listCollectionsByNFTOwner: async (accountAddress, chainName, pageCursor, pageSize, options = {}) => {
754
+ // verify required parameter 'accountAddress' is not null or undefined
755
+ assertParamExists$1('listCollectionsByNFTOwner', 'accountAddress', accountAddress);
756
+ // verify required parameter 'chainName' is not null or undefined
757
+ assertParamExists$1('listCollectionsByNFTOwner', 'chainName', chainName);
758
+ const localVarPath = `/v1/chains/{chain_name}/accounts/{account_address}/collections`
759
+ .replace(`{${"account_address"}}`, encodeURIComponent(String(accountAddress)))
760
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
761
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
762
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
763
+ let baseOptions;
764
+ if (configuration) {
765
+ baseOptions = configuration.baseOptions;
766
+ }
767
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
768
+ const localVarHeaderParameter = {};
769
+ const localVarQueryParameter = {};
770
+ if (pageCursor !== undefined) {
771
+ localVarQueryParameter['page_cursor'] = pageCursor;
772
+ }
773
+ if (pageSize !== undefined) {
774
+ localVarQueryParameter['page_size'] = pageSize;
775
+ }
776
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
777
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
778
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
779
+ return {
780
+ url: toPathString$1(localVarUrlObj),
781
+ options: localVarRequestOptions,
782
+ };
783
+ },
743
784
  };
744
785
  };
745
786
  /**
@@ -774,6 +815,20 @@ const CollectionsApiFp = function (configuration) {
774
815
  const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, pageCursor, pageSize, options);
775
816
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
776
817
  },
818
+ /**
819
+ * List collections by NFT owner account address
820
+ * @summary List collections by NFT owner
821
+ * @param {string} accountAddress Account address
822
+ * @param {string} chainName The name of chain
823
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
824
+ * @param {number} [pageSize] Maximum number of items to return
825
+ * @param {*} [options] Override http request option.
826
+ * @throws {RequiredError}
827
+ */
828
+ async listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
829
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options);
830
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
831
+ },
777
832
  };
778
833
  };
779
834
  /**
@@ -806,6 +861,19 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
806
861
  listCollections(chainName, pageCursor, pageSize, options) {
807
862
  return localVarFp.listCollections(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
808
863
  },
864
+ /**
865
+ * List collections by NFT owner account address
866
+ * @summary List collections by NFT owner
867
+ * @param {string} accountAddress Account address
868
+ * @param {string} chainName The name of chain
869
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
870
+ * @param {number} [pageSize] Maximum number of items to return
871
+ * @param {*} [options] Override http request option.
872
+ * @throws {RequiredError}
873
+ */
874
+ listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
875
+ return localVarFp.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
876
+ },
809
877
  };
810
878
  };
811
879
  /**
@@ -837,6 +905,17 @@ class CollectionsApi extends BaseAPI$1 {
837
905
  listCollections(requestParameters, options) {
838
906
  return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
839
907
  }
908
+ /**
909
+ * List collections by NFT owner account address
910
+ * @summary List collections by NFT owner
911
+ * @param {CollectionsApiListCollectionsByNFTOwnerRequest} requestParameters Request parameters.
912
+ * @param {*} [options] Override http request option.
913
+ * @throws {RequiredError}
914
+ * @memberof CollectionsApi
915
+ */
916
+ listCollectionsByNFTOwner(requestParameters, options) {
917
+ return CollectionsApiFp(this.configuration).listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
918
+ }
840
919
  }
841
920
 
842
921
  /* tslint:disable */
@@ -1314,16 +1393,16 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1314
1393
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1315
1394
  * @summary Retrieve fulfillment data for orders
1316
1395
  * @param {string} chainName
1317
- * @param {Array<FulfillmentDataRequestInner>} fulfillmentDataRequestInner
1396
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1318
1397
  * @param {*} [options] Override http request option.
1319
1398
  * @throws {RequiredError}
1320
1399
  */
1321
- fulfillmentData: async (chainName, fulfillmentDataRequestInner, options = {}) => {
1400
+ fulfillmentData: async (chainName, fulfillmentDataRequest, options = {}) => {
1322
1401
  // verify required parameter 'chainName' is not null or undefined
1323
1402
  assertParamExists$1('fulfillmentData', 'chainName', chainName);
1324
- // verify required parameter 'fulfillmentDataRequestInner' is not null or undefined
1325
- assertParamExists$1('fulfillmentData', 'fulfillmentDataRequestInner', fulfillmentDataRequestInner);
1326
- const localVarPath = `/v1/chains/{chain_name}/orders/fulfillment_data`
1403
+ // verify required parameter 'fulfillmentDataRequest' is not null or undefined
1404
+ assertParamExists$1('fulfillmentData', 'fulfillmentDataRequest', fulfillmentDataRequest);
1405
+ const localVarPath = `/v1/chains/{chain_name}/orders/fulfillment-data`
1327
1406
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1328
1407
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1329
1408
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
@@ -1338,7 +1417,7 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1338
1417
  setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1339
1418
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1340
1419
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1341
- localVarRequestOptions.data = serializeDataIfNeeded$1(fulfillmentDataRequestInner, localVarRequestOptions, configuration);
1420
+ localVarRequestOptions.data = serializeDataIfNeeded$1(fulfillmentDataRequest, localVarRequestOptions, configuration);
1342
1421
  return {
1343
1422
  url: toPathString$1(localVarUrlObj),
1344
1423
  options: localVarRequestOptions,
@@ -1377,6 +1456,39 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1377
1456
  options: localVarRequestOptions,
1378
1457
  };
1379
1458
  },
1459
+ /**
1460
+ * Get a single trade by ID
1461
+ * @summary Get a single trade by ID
1462
+ * @param {string} chainName
1463
+ * @param {string} tradeId Global Trade identifier
1464
+ * @param {*} [options] Override http request option.
1465
+ * @throws {RequiredError}
1466
+ */
1467
+ getTrade: async (chainName, tradeId, options = {}) => {
1468
+ // verify required parameter 'chainName' is not null or undefined
1469
+ assertParamExists$1('getTrade', 'chainName', chainName);
1470
+ // verify required parameter 'tradeId' is not null or undefined
1471
+ assertParamExists$1('getTrade', 'tradeId', tradeId);
1472
+ const localVarPath = `/v1/chains/{chain_name}/trades/{trade_id}`
1473
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
1474
+ .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId)));
1475
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1476
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1477
+ let baseOptions;
1478
+ if (configuration) {
1479
+ baseOptions = configuration.baseOptions;
1480
+ }
1481
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1482
+ const localVarHeaderParameter = {};
1483
+ const localVarQueryParameter = {};
1484
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1485
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1486
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1487
+ return {
1488
+ url: toPathString$1(localVarUrlObj),
1489
+ options: localVarRequestOptions,
1490
+ };
1491
+ },
1380
1492
  /**
1381
1493
  * List all listings
1382
1494
  * @summary List all listings
@@ -1438,6 +1550,55 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1438
1550
  options: localVarRequestOptions,
1439
1551
  };
1440
1552
  },
1553
+ /**
1554
+ * List all trades
1555
+ * @summary List all trades
1556
+ * @param {string} chainName
1557
+ * @param {string} [accountAddress]
1558
+ * @param {number} [pageSize] Maximum number of trades to return per page
1559
+ * @param {'created_at'} [sortBy] Trade field to sort by
1560
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
1561
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
1562
+ * @param {*} [options] Override http request option.
1563
+ * @throws {RequiredError}
1564
+ */
1565
+ listTrades: async (chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
1566
+ // verify required parameter 'chainName' is not null or undefined
1567
+ assertParamExists$1('listTrades', 'chainName', chainName);
1568
+ const localVarPath = `/v1/chains/{chain_name}/trades`
1569
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1570
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1571
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1572
+ let baseOptions;
1573
+ if (configuration) {
1574
+ baseOptions = configuration.baseOptions;
1575
+ }
1576
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1577
+ const localVarHeaderParameter = {};
1578
+ const localVarQueryParameter = {};
1579
+ if (accountAddress !== undefined) {
1580
+ localVarQueryParameter['account_address'] = accountAddress;
1581
+ }
1582
+ if (pageSize !== undefined) {
1583
+ localVarQueryParameter['page_size'] = pageSize;
1584
+ }
1585
+ if (sortBy !== undefined) {
1586
+ localVarQueryParameter['sort_by'] = sortBy;
1587
+ }
1588
+ if (sortDirection !== undefined) {
1589
+ localVarQueryParameter['sort_direction'] = sortDirection;
1590
+ }
1591
+ if (pageCursor !== undefined) {
1592
+ localVarQueryParameter['page_cursor'] = pageCursor;
1593
+ }
1594
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1595
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1596
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1597
+ return {
1598
+ url: toPathString$1(localVarUrlObj),
1599
+ options: localVarRequestOptions,
1600
+ };
1601
+ },
1441
1602
  };
1442
1603
  };
1443
1604
  /**
@@ -1463,12 +1624,12 @@ const OrdersApiFp = function (configuration) {
1463
1624
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1464
1625
  * @summary Retrieve fulfillment data for orders
1465
1626
  * @param {string} chainName
1466
- * @param {Array<FulfillmentDataRequestInner>} fulfillmentDataRequestInner
1627
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1467
1628
  * @param {*} [options] Override http request option.
1468
1629
  * @throws {RequiredError}
1469
1630
  */
1470
- async fulfillmentData(chainName, fulfillmentDataRequestInner, options) {
1471
- const localVarAxiosArgs = await localVarAxiosParamCreator.fulfillmentData(chainName, fulfillmentDataRequestInner, options);
1631
+ async fulfillmentData(chainName, fulfillmentDataRequest, options) {
1632
+ const localVarAxiosArgs = await localVarAxiosParamCreator.fulfillmentData(chainName, fulfillmentDataRequest, options);
1472
1633
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1473
1634
  },
1474
1635
  /**
@@ -1483,6 +1644,18 @@ const OrdersApiFp = function (configuration) {
1483
1644
  const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
1484
1645
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1485
1646
  },
1647
+ /**
1648
+ * Get a single trade by ID
1649
+ * @summary Get a single trade by ID
1650
+ * @param {string} chainName
1651
+ * @param {string} tradeId Global Trade identifier
1652
+ * @param {*} [options] Override http request option.
1653
+ * @throws {RequiredError}
1654
+ */
1655
+ async getTrade(chainName, tradeId, options) {
1656
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTrade(chainName, tradeId, options);
1657
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1658
+ },
1486
1659
  /**
1487
1660
  * List all listings
1488
1661
  * @summary List all listings
@@ -1502,6 +1675,22 @@ const OrdersApiFp = function (configuration) {
1502
1675
  const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
1503
1676
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1504
1677
  },
1678
+ /**
1679
+ * List all trades
1680
+ * @summary List all trades
1681
+ * @param {string} chainName
1682
+ * @param {string} [accountAddress]
1683
+ * @param {number} [pageSize] Maximum number of trades to return per page
1684
+ * @param {'created_at'} [sortBy] Trade field to sort by
1685
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
1686
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
1687
+ * @param {*} [options] Override http request option.
1688
+ * @throws {RequiredError}
1689
+ */
1690
+ async listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
1691
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options);
1692
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1693
+ },
1505
1694
  };
1506
1695
  };
1507
1696
  /**
@@ -1526,12 +1715,12 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1526
1715
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1527
1716
  * @summary Retrieve fulfillment data for orders
1528
1717
  * @param {string} chainName
1529
- * @param {Array<FulfillmentDataRequestInner>} fulfillmentDataRequestInner
1718
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1530
1719
  * @param {*} [options] Override http request option.
1531
1720
  * @throws {RequiredError}
1532
1721
  */
1533
- fulfillmentData(chainName, fulfillmentDataRequestInner, options) {
1534
- return localVarFp.fulfillmentData(chainName, fulfillmentDataRequestInner, options).then((request) => request(axios, basePath));
1722
+ fulfillmentData(chainName, fulfillmentDataRequest, options) {
1723
+ return localVarFp.fulfillmentData(chainName, fulfillmentDataRequest, options).then((request) => request(axios, basePath));
1535
1724
  },
1536
1725
  /**
1537
1726
  * Get a single listing by ID
@@ -1544,6 +1733,17 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1544
1733
  getListing(chainName, listingId, options) {
1545
1734
  return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
1546
1735
  },
1736
+ /**
1737
+ * Get a single trade by ID
1738
+ * @summary Get a single trade by ID
1739
+ * @param {string} chainName
1740
+ * @param {string} tradeId Global Trade identifier
1741
+ * @param {*} [options] Override http request option.
1742
+ * @throws {RequiredError}
1743
+ */
1744
+ getTrade(chainName, tradeId, options) {
1745
+ return localVarFp.getTrade(chainName, tradeId, options).then((request) => request(axios, basePath));
1746
+ },
1547
1747
  /**
1548
1748
  * List all listings
1549
1749
  * @summary List all listings
@@ -1562,6 +1762,21 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
1562
1762
  listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
1563
1763
  return localVarFp.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1564
1764
  },
1765
+ /**
1766
+ * List all trades
1767
+ * @summary List all trades
1768
+ * @param {string} chainName
1769
+ * @param {string} [accountAddress]
1770
+ * @param {number} [pageSize] Maximum number of trades to return per page
1771
+ * @param {'created_at'} [sortBy] Trade field to sort by
1772
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
1773
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
1774
+ * @param {*} [options] Override http request option.
1775
+ * @throws {RequiredError}
1776
+ */
1777
+ listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
1778
+ return localVarFp.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
1779
+ },
1565
1780
  };
1566
1781
  };
1567
1782
  /**
@@ -1591,7 +1806,7 @@ class OrdersApi extends BaseAPI$1 {
1591
1806
  * @memberof OrdersApi
1592
1807
  */
1593
1808
  fulfillmentData(requestParameters, options) {
1594
- return OrdersApiFp(this.configuration).fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequestInner, options).then((request) => request(this.axios, this.basePath));
1809
+ return OrdersApiFp(this.configuration).fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequest, options).then((request) => request(this.axios, this.basePath));
1595
1810
  }
1596
1811
  /**
1597
1812
  * Get a single listing by ID
@@ -1604,6 +1819,17 @@ class OrdersApi extends BaseAPI$1 {
1604
1819
  getListing(requestParameters, options) {
1605
1820
  return OrdersApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
1606
1821
  }
1822
+ /**
1823
+ * Get a single trade by ID
1824
+ * @summary Get a single trade by ID
1825
+ * @param {OrdersApiGetTradeRequest} requestParameters Request parameters.
1826
+ * @param {*} [options] Override http request option.
1827
+ * @throws {RequiredError}
1828
+ * @memberof OrdersApi
1829
+ */
1830
+ getTrade(requestParameters, options) {
1831
+ return OrdersApiFp(this.configuration).getTrade(requestParameters.chainName, requestParameters.tradeId, options).then((request) => request(this.axios, this.basePath));
1832
+ }
1607
1833
  /**
1608
1834
  * List all listings
1609
1835
  * @summary List all listings
@@ -1615,6 +1841,17 @@ class OrdersApi extends BaseAPI$1 {
1615
1841
  listListings(requestParameters, options) {
1616
1842
  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));
1617
1843
  }
1844
+ /**
1845
+ * List all trades
1846
+ * @summary List all trades
1847
+ * @param {OrdersApiListTradesRequest} requestParameters Request parameters.
1848
+ * @param {*} [options] Override http request option.
1849
+ * @throws {RequiredError}
1850
+ * @memberof OrdersApi
1851
+ */
1852
+ listTrades(requestParameters, options) {
1853
+ 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));
1854
+ }
1618
1855
  }
1619
1856
 
1620
1857
  /* tslint:disable */
@@ -1669,6 +1906,38 @@ const PassportApiAxiosParamCreator = function (configuration) {
1669
1906
  options: localVarRequestOptions,
1670
1907
  };
1671
1908
  },
1909
+ /**
1910
+ * Get all the Ethereum linked addresses for a user based on its userId
1911
+ * @summary Get Ethereum linked addresses for a user
1912
+ * @param {string} userId The user\&#39;s userId
1913
+ * @param {*} [options] Override http request option.
1914
+ * @throws {RequiredError}
1915
+ */
1916
+ getLinkedAddresses: async (userId, options = {}) => {
1917
+ // verify required parameter 'userId' is not null or undefined
1918
+ assertParamExists$1('getLinkedAddresses', 'userId', userId);
1919
+ const localVarPath = `/passport-mr/v1/users/{userId}/linked-addresses`
1920
+ .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
1921
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1922
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1923
+ let baseOptions;
1924
+ if (configuration) {
1925
+ baseOptions = configuration.baseOptions;
1926
+ }
1927
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1928
+ const localVarHeaderParameter = {};
1929
+ const localVarQueryParameter = {};
1930
+ // authentication BearerAuth required
1931
+ // http bearer authentication required
1932
+ await setBearerAuthToObject$1(localVarHeaderParameter, configuration);
1933
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1934
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1935
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1936
+ return {
1937
+ url: toPathString$1(localVarUrlObj),
1938
+ options: localVarRequestOptions,
1939
+ };
1940
+ },
1672
1941
  };
1673
1942
  };
1674
1943
  /**
@@ -1689,6 +1958,17 @@ const PassportApiFp = function (configuration) {
1689
1958
  const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddress(createCounterfactualAddressRequest, options);
1690
1959
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1691
1960
  },
1961
+ /**
1962
+ * Get all the Ethereum linked addresses for a user based on its userId
1963
+ * @summary Get Ethereum linked addresses for a user
1964
+ * @param {string} userId The user\&#39;s userId
1965
+ * @param {*} [options] Override http request option.
1966
+ * @throws {RequiredError}
1967
+ */
1968
+ async getLinkedAddresses(userId, options) {
1969
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedAddresses(userId, options);
1970
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1971
+ },
1692
1972
  };
1693
1973
  };
1694
1974
  /**
@@ -1708,6 +1988,16 @@ const PassportApiFactory = function (configuration, basePath, axios) {
1708
1988
  createCounterfactualAddress(createCounterfactualAddressRequest, options) {
1709
1989
  return localVarFp.createCounterfactualAddress(createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
1710
1990
  },
1991
+ /**
1992
+ * Get all the Ethereum linked addresses for a user based on its userId
1993
+ * @summary Get Ethereum linked addresses for a user
1994
+ * @param {string} userId The user\&#39;s userId
1995
+ * @param {*} [options] Override http request option.
1996
+ * @throws {RequiredError}
1997
+ */
1998
+ getLinkedAddresses(userId, options) {
1999
+ return localVarFp.getLinkedAddresses(userId, options).then((request) => request(axios, basePath));
2000
+ },
1711
2001
  };
1712
2002
  };
1713
2003
  /**
@@ -1728,6 +2018,17 @@ class PassportApi extends BaseAPI$1 {
1728
2018
  createCounterfactualAddress(requestParameters, options) {
1729
2019
  return PassportApiFp(this.configuration).createCounterfactualAddress(requestParameters.createCounterfactualAddressRequest, options).then((request) => request(this.axios, this.basePath));
1730
2020
  }
2021
+ /**
2022
+ * Get all the Ethereum linked addresses for a user based on its userId
2023
+ * @summary Get Ethereum linked addresses for a user
2024
+ * @param {PassportApiGetLinkedAddressesRequest} requestParameters Request parameters.
2025
+ * @param {*} [options] Override http request option.
2026
+ * @throws {RequiredError}
2027
+ * @memberof PassportApi
2028
+ */
2029
+ getLinkedAddresses(requestParameters, options) {
2030
+ return PassportApiFp(this.configuration).getLinkedAddresses(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
2031
+ }
1731
2032
  }
1732
2033
 
1733
2034
  /* tslint:disable */
@@ -2157,23 +2458,6 @@ const CollectionContractType = {
2157
2458
  Erc721: 'ERC721'
2158
2459
  };
2159
2460
 
2160
- /* tslint:disable */
2161
- /* eslint-disable */
2162
- /**
2163
- * Immutable zkEVM API
2164
- * Immutable Multi Rollup API
2165
- *
2166
- * The version of the OpenAPI document: 1.0.0
2167
- * Contact: support@immutable.com
2168
- *
2169
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2170
- * https://openapi-generator.tech
2171
- * Do not edit the class manually.
2172
- */
2173
- const CreateOrderProtocolDataOrderTypeEnum = {
2174
- FullRestricted: 'FULL_RESTRICTED'
2175
- };
2176
-
2177
2461
  /* tslint:disable */
2178
2462
  /* eslint-disable */
2179
2463
  /**
@@ -2222,7 +2506,10 @@ const ERC721ItemItemTypeEnum = {
2222
2506
  * Do not edit the class manually.
2223
2507
  */
2224
2508
  const FeeFeeTypeEnum = {
2225
- Royalty: 'ROYALTY'
2509
+ Royalty: 'ROYALTY',
2510
+ MakerMarketplace: 'MAKER_MARKETPLACE',
2511
+ TakerMarketplace: 'TAKER_MARKETPLACE',
2512
+ Protocol: 'PROTOCOL'
2226
2513
  };
2227
2514
 
2228
2515
  /* tslint:disable */
@@ -2291,6 +2578,23 @@ const OrderStatus$1 = {
2291
2578
  Expired: 'EXPIRED'
2292
2579
  };
2293
2580
 
2581
+ /* tslint:disable */
2582
+ /* eslint-disable */
2583
+ /**
2584
+ * Immutable zkEVM API
2585
+ * Immutable Multi Rollup API
2586
+ *
2587
+ * The version of the OpenAPI document: 1.0.0
2588
+ * Contact: support@immutable.com
2589
+ *
2590
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2591
+ * https://openapi-generator.tech
2592
+ * Do not edit the class manually.
2593
+ */
2594
+ const ProtocolDataOrderTypeEnum = {
2595
+ FullRestricted: 'FULL_RESTRICTED'
2596
+ };
2597
+
2294
2598
  /* tslint:disable */
2295
2599
  /* eslint-disable */
2296
2600
  /**
@@ -2367,7 +2671,6 @@ var index = /*#__PURE__*/Object.freeze({
2367
2671
  CollectionsApiFactory: CollectionsApiFactory,
2368
2672
  CollectionsApiFp: CollectionsApiFp,
2369
2673
  Configuration: Configuration$2,
2370
- CreateOrderProtocolDataOrderTypeEnum: CreateOrderProtocolDataOrderTypeEnum,
2371
2674
  ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
2372
2675
  ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
2373
2676
  FeeFeeTypeEnum: FeeFeeTypeEnum,
@@ -2390,6 +2693,7 @@ var index = /*#__PURE__*/Object.freeze({
2390
2693
  PassportApiAxiosParamCreator: PassportApiAxiosParamCreator,
2391
2694
  PassportApiFactory: PassportApiFactory,
2392
2695
  PassportApiFp: PassportApiFp,
2696
+ ProtocolDataOrderTypeEnum: ProtocolDataOrderTypeEnum,
2393
2697
  SaleFeeTypeEnum: SaleFeeTypeEnum,
2394
2698
  TokenContractType: TokenContractType,
2395
2699
  TokensApi: TokensApi,
@@ -2420,7 +2724,7 @@ class MultiRollupApiClients {
2420
2724
  }
2421
2725
 
2422
2726
  // eslint-disable-next-line @typescript-eslint/naming-convention
2423
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.0.0' };
2727
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.17.1' };
2424
2728
  const createConfig = ({ basePath, headers, }) => {
2425
2729
  if (!basePath.trim()) {
2426
2730
  throw Error('basePath can not be empty');
@@ -2480,7 +2784,7 @@ class APIError extends Error {
2480
2784
 
2481
2785
  /* eslint-disable implicit-arrow-linebreak */
2482
2786
  const defaultHeaders = {
2483
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.0.0',
2787
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.17.1',
2484
2788
  };
2485
2789
  /**
2486
2790
  * createAPIConfiguration to create a custom Configuration
@@ -2637,6 +2941,20 @@ class BlockchainData {
2637
2941
  throw formatError(err);
2638
2942
  });
2639
2943
  }
2944
+ /**
2945
+ * List collections by NFT owner
2946
+ * @param request - the request object containing the parameters to be provided in the API request
2947
+ * @returns a promise that resolves with a list of collections
2948
+ * @throws {@link index.APIError}
2949
+ */
2950
+ async listCollectionsByNFTOwner(request) {
2951
+ return await this.collections
2952
+ .listCollectionsByNFTOwner(request)
2953
+ .then((res) => res.data)
2954
+ .catch((err) => {
2955
+ throw formatError(err);
2956
+ });
2957
+ }
2640
2958
  /**
2641
2959
  * Get collection by contract address
2642
2960
  * @param request - the request object containing the parameters to be provided in the API request
@@ -2752,7 +3070,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2752
3070
  chainID,
2753
3071
  coreContractAddress,
2754
3072
  registrationContractAddress,
2755
- sdkVersion: 'ts-immutable-sdk-0.0.0',
3073
+ sdkVersion: 'ts-immutable-sdk-0.17.1',
2756
3074
  });
2757
3075
  /**
2758
3076
  * Sets `sdkVersion` at the time of build
@@ -8968,10 +9286,21 @@ class Passport {
8968
9286
  const user = await this.authManager.getUser();
8969
9287
  return user?.accessToken;
8970
9288
  }
8971
- }
8972
-
8973
- var passport = /*#__PURE__*/Object.freeze({
8974
- __proto__: null,
9289
+ async getLinkedAddresses() {
9290
+ const user = await this.authManager.getUser();
9291
+ if (!user?.profile.sub) {
9292
+ return [];
9293
+ }
9294
+ const headers = { Authorization: `Bearer ${user.accessToken}` };
9295
+ const linkedAddressesResult = await this.multiRollupApiClients.passportApi.getLinkedAddresses({
9296
+ userId: user?.profile.sub,
9297
+ }, { headers });
9298
+ return linkedAddressesResult.data.linkedAddresses;
9299
+ }
9300
+ }
9301
+
9302
+ var passport = /*#__PURE__*/Object.freeze({
9303
+ __proto__: null,
8975
9304
  JsonRpcError: JsonRpcError,
8976
9305
  get Networks () { return Networks; },
8977
9306
  Passport: Passport,
@@ -9465,6 +9794,54 @@ class OrdersService {
9465
9794
  },
9466
9795
  });
9467
9796
  }
9797
+ /**
9798
+ * List all trades
9799
+ * List all trades
9800
+ * @returns ListTradeResult OK response.
9801
+ * @throws ApiError
9802
+ */
9803
+ listTrades({ chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, }) {
9804
+ return this.httpRequest.request({
9805
+ method: 'GET',
9806
+ url: '/v1/chains/{chain_name}/trades',
9807
+ path: {
9808
+ 'chain_name': chainName,
9809
+ },
9810
+ query: {
9811
+ 'account_address': accountAddress,
9812
+ 'page_size': pageSize,
9813
+ 'sort_by': sortBy,
9814
+ 'sort_direction': sortDirection,
9815
+ 'page_cursor': pageCursor,
9816
+ },
9817
+ errors: {
9818
+ 400: `Bad Request (400)`,
9819
+ 404: `The specified resource was not found (404)`,
9820
+ 500: `Internal Server Error (500)`,
9821
+ },
9822
+ });
9823
+ }
9824
+ /**
9825
+ * Get a single trade by ID
9826
+ * Get a single trade by ID
9827
+ * @returns TradeResult OK response.
9828
+ * @throws ApiError
9829
+ */
9830
+ getTrade({ chainName, tradeId, }) {
9831
+ return this.httpRequest.request({
9832
+ method: 'GET',
9833
+ url: '/v1/chains/{chain_name}/trades/{trade_id}',
9834
+ path: {
9835
+ 'chain_name': chainName,
9836
+ 'trade_id': tradeId,
9837
+ },
9838
+ errors: {
9839
+ 400: `Bad Request (400)`,
9840
+ 404: `The specified resource was not found (404)`,
9841
+ 500: `Internal Server Error (500)`,
9842
+ },
9843
+ });
9844
+ }
9468
9845
  }
9469
9846
 
9470
9847
  class OrderBookClient {
@@ -9601,6 +9978,57 @@ function mapFromOpenApiOrder(order) {
9601
9978
  updateTime: order.update_time,
9602
9979
  };
9603
9980
  }
9981
+ function mapFromOpenApiTrade(trade) {
9982
+ const buyItems = trade.buy.map((item) => {
9983
+ if (item.item_type === 'ERC20') {
9984
+ return {
9985
+ type: 'ERC20',
9986
+ contractAddress: item.contract_address,
9987
+ amount: item.start_amount,
9988
+ };
9989
+ }
9990
+ if (item.item_type === 'NATIVE') {
9991
+ return {
9992
+ type: 'NATIVE',
9993
+ amount: item.start_amount,
9994
+ };
9995
+ }
9996
+ throw new Error('Buy items must be either ERC20 or NATIVE');
9997
+ });
9998
+ const sellItems = trade.sell.map((item) => {
9999
+ if (item.item_type === 'ERC721') {
10000
+ return {
10001
+ type: 'ERC721',
10002
+ contractAddress: item.contract_address,
10003
+ tokenId: item.token_id,
10004
+ };
10005
+ }
10006
+ throw new Error('Sell items must ERC721');
10007
+ });
10008
+ return {
10009
+ id: trade.id,
10010
+ orderId: trade.order_id,
10011
+ buy: buyItems,
10012
+ sell: sellItems,
10013
+ buyerFees: trade.buyer_fees.map((fee) => ({
10014
+ amount: fee.amount,
10015
+ recipient: fee.recipient,
10016
+ type: fee.fee_type,
10017
+ })),
10018
+ chain: trade.chain,
10019
+ indexedAt: trade.indexed_at,
10020
+ blockchainMetadata: {
10021
+ blockNumber: trade.blockchain_metadata.block_number,
10022
+ logIndex: trade.blockchain_metadata.log_index,
10023
+ transactionHash: trade.blockchain_metadata.transaction_hash,
10024
+ transactionIndex: trade.blockchain_metadata.transaction_index,
10025
+ },
10026
+ buyerAddress: trade.buyer_address,
10027
+ makerAddress: trade.maker_address,
10028
+ sellerAddress: trade.seller_address,
10029
+ takerAddress: trade.taker_address,
10030
+ };
10031
+ }
9604
10032
  function mapFromOpenApiPage(page) {
9605
10033
  return {
9606
10034
  nextCursor: page.next_cursor,
@@ -9930,12 +10358,24 @@ class ImmutableApiClient {
9930
10358
  listingId,
9931
10359
  });
9932
10360
  }
10361
+ async getTrade(tradeId) {
10362
+ return this.orderbookService.getTrade({
10363
+ chainName: this.chainName,
10364
+ tradeId,
10365
+ });
10366
+ }
9933
10367
  async listListings(listOrderParams) {
9934
10368
  return this.orderbookService.listListings({
9935
10369
  chainName: this.chainName,
9936
10370
  ...listOrderParams,
9937
10371
  });
9938
10372
  }
10373
+ async listTrades(listTradesParams) {
10374
+ return this.orderbookService.listTrades({
10375
+ chainName: this.chainName,
10376
+ ...listTradesParams,
10377
+ });
10378
+ }
9939
10379
  async createListing({ orderHash, orderComponents, orderSignature, makerFee, }) {
9940
10380
  if (orderComponents.offer.length !== 1) {
9941
10381
  throw new Error('Only one item can be listed at a time');
@@ -10101,6 +10541,17 @@ class Orderbook {
10101
10541
  result: mapFromOpenApiOrder(apiListing.result),
10102
10542
  };
10103
10543
  }
10544
+ /**
10545
+ * Get a trade by ID
10546
+ * @param {string} tradeId - The tradeId to find.
10547
+ * @return {TradeResult} The returned order result.
10548
+ */
10549
+ async getTrade(tradeId) {
10550
+ const apiListing = await this.apiClient.getTrade(tradeId);
10551
+ return {
10552
+ result: mapFromOpenApiTrade(apiListing.result),
10553
+ };
10554
+ }
10104
10555
  /**
10105
10556
  * List orders. This method is used to get a list of orders filtered by conditions specified
10106
10557
  * in the params object.
@@ -10114,6 +10565,19 @@ class Orderbook {
10114
10565
  result: apiListings.result.map(mapFromOpenApiOrder),
10115
10566
  };
10116
10567
  }
10568
+ /**
10569
+ * List trades. This method is used to get a list of trades filtered by conditions specified
10570
+ * in the params object
10571
+ * @param {ListTradesParams} listTradesParams - Filtering, ordering and page parameters.
10572
+ * @return {ListTradesResult} The paged trades.
10573
+ */
10574
+ async listTrades(listTradesParams) {
10575
+ const apiListings = await this.apiClient.listTrades(listTradesParams);
10576
+ return {
10577
+ page: mapFromOpenApiPage(apiListings.page),
10578
+ result: apiListings.result.map(mapFromOpenApiTrade),
10579
+ };
10580
+ }
10117
10581
  /**
10118
10582
  * Get required transactions and messages for signing prior to creating a listing
10119
10583
  * through the createListing method
@@ -23751,38 +24215,6 @@ class AlreadyApprovedError extends ExchangeError {
23751
24215
  }
23752
24216
  }
23753
24217
 
23754
- /**
23755
- * Determines whether or not the chain supports EIP-1559 by checking for the existence
23756
- * of {@link FeeData.maxFeePerGas} and {@link FeeData.maxPriorityFeePerGas}
23757
- *
23758
- * @param {FeeData} fee - The fee data for the chain
23759
- */
23760
- const doesChainSupportEIP1559 = (fee) => {
23761
- const supportsEIP1559 = !!fee.maxFeePerGas && !!fee.maxPriorityFeePerGas;
23762
- return supportsEIP1559;
23763
- };
23764
- /**
23765
- * Fetch the current gas price estimate. Supports both EIP-1559 and non-EIP1559 chains
23766
- * @param {JsonRpcProvider} provider - The JSON RPC provider used to fetch fee data
23767
- * @returns {BigNumber | null} - The gas price in the smallest denomination of the chain's currency,
23768
- * or null if no gas price is available
23769
- */
23770
- const fetchGasPrice = async (provider) => {
23771
- const feeData = await provider.getFeeData().catch(() => null);
23772
- if (!feeData) {
23773
- return null;
23774
- }
23775
- return doesChainSupportEIP1559(feeData) ? feeData.maxFeePerGas.add(feeData.maxPriorityFeePerGas) : feeData.gasPrice;
23776
- };
23777
- /**
23778
- * Calculate the gas fee from the gas price and gas units used for the transaction
23779
- *
23780
- * @param {BigNumber} gasPriceInWei - The price of gas in wei
23781
- * @param {BigNumber} gasUsed - The total gas units that will be used for the transaction
23782
- * @returns - The cost of the transaction in the gas token's smallest denomination (e.g. WEI)
23783
- */
23784
- const calculateGasFee = (gasPriceInWei, gasUsed) => gasUsed.mul(gasPriceInWei);
23785
-
23786
24218
  /* Autogenerated file. Do not edit manually. */
23787
24219
  /* tslint:disable */
23788
24220
  /* eslint-disable */
@@ -24018,290 +24450,117 @@ let ERC20__factory$1 = class ERC20__factory {
24018
24450
  }
24019
24451
  };
24020
24452
 
24021
- /**
24022
- * Get the amount of an ERC20 token that needs to be approved by
24023
- * checking the existing allowance for the spender
24024
- *
24025
- * @param provider - The provider to use for the call
24026
- * @param ownerAddress - The address of the owner of the token
24027
- * @param tokenAmount - The amount of the token to approve
24028
- * @param spenderAddress - The address of the spender
24029
- * @returns - The amount of the token that needs to be approved
24030
- */
24031
- const getERC20AmountToApprove = async (provider, ownerAddress, tokenAddress, tokenAmount, spenderAddress) => {
24032
- // create an instance of the ERC20 token contract
24033
- const erc20Contract = ERC20__factory$1.connect(tokenAddress, provider);
24034
- // get the allowance for the token spender
24035
- // minimum is 0 - no allowance
24036
- let allowance;
24037
- try {
24038
- allowance = await erc20Contract.allowance(ownerAddress, spenderAddress);
24453
+ /* Autogenerated file. Do not edit manually. */
24454
+ /* tslint:disable */
24455
+ /* eslint-disable */
24456
+ const _abi$2$1 = [
24457
+ {
24458
+ inputs: [],
24459
+ name: "getCurrentBlockTimestamp",
24460
+ outputs: [
24461
+ {
24462
+ internalType: "uint256",
24463
+ name: "timestamp",
24464
+ type: "uint256",
24465
+ },
24466
+ ],
24467
+ stateMutability: "view",
24468
+ type: "function",
24469
+ },
24470
+ {
24471
+ inputs: [
24472
+ {
24473
+ internalType: "address",
24474
+ name: "addr",
24475
+ type: "address",
24476
+ },
24477
+ ],
24478
+ name: "getEthBalance",
24479
+ outputs: [
24480
+ {
24481
+ internalType: "uint256",
24482
+ name: "balance",
24483
+ type: "uint256",
24484
+ },
24485
+ ],
24486
+ stateMutability: "view",
24487
+ type: "function",
24488
+ },
24489
+ {
24490
+ inputs: [
24491
+ {
24492
+ components: [
24493
+ {
24494
+ internalType: "address",
24495
+ name: "target",
24496
+ type: "address",
24497
+ },
24498
+ {
24499
+ internalType: "uint256",
24500
+ name: "gasLimit",
24501
+ type: "uint256",
24502
+ },
24503
+ {
24504
+ internalType: "bytes",
24505
+ name: "callData",
24506
+ type: "bytes",
24507
+ },
24508
+ ],
24509
+ internalType: "struct UniswapInterfaceMulticall.Call[]",
24510
+ name: "calls",
24511
+ type: "tuple[]",
24512
+ },
24513
+ ],
24514
+ name: "multicall",
24515
+ outputs: [
24516
+ {
24517
+ internalType: "uint256",
24518
+ name: "blockNumber",
24519
+ type: "uint256",
24520
+ },
24521
+ {
24522
+ components: [
24523
+ {
24524
+ internalType: "bool",
24525
+ name: "success",
24526
+ type: "bool",
24527
+ },
24528
+ {
24529
+ internalType: "uint256",
24530
+ name: "gasUsed",
24531
+ type: "uint256",
24532
+ },
24533
+ {
24534
+ internalType: "bytes",
24535
+ name: "returnData",
24536
+ type: "bytes",
24537
+ },
24538
+ ],
24539
+ internalType: "struct UniswapInterfaceMulticall.Result[]",
24540
+ name: "returnData",
24541
+ type: "tuple[]",
24542
+ },
24543
+ ],
24544
+ stateMutability: "nonpayable",
24545
+ type: "function",
24546
+ },
24547
+ ];
24548
+ const _bytecode$2$1 = "0x608060405234801561001057600080fd5b50610567806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630f28c97d146100465780631749e1e3146100645780634d2301cc14610085575b600080fd5b61004e610098565b60405161005b919061041f565b60405180910390f35b6100776100723660046102a7565b61009c565b60405161005b929190610428565b61004e610093366004610286565b610220565b4290565b8051439060609067ffffffffffffffff811180156100b957600080fd5b506040519080825280602002602001820160405280156100f357816020015b6100e061023a565b8152602001906001900390816100d85790505b50905060005b835181101561021a57600080600086848151811061011357fe5b60200260200101516000015187858151811061012b57fe5b60200260200101516020015188868151811061014357fe5b60200260200101516040015192509250925060005a90506000808573ffffffffffffffffffffffffffffffffffffffff1685856040516101839190610403565b60006040518083038160008787f1925050503d80600081146101c1576040519150601f19603f3d011682016040523d82523d6000602084013e6101c6565b606091505b509150915060005a8403905060405180606001604052808415158152602001828152602001838152508989815181106101fb57fe5b60200260200101819052505050505050505080806001019150506100f9565b50915091565b73ffffffffffffffffffffffffffffffffffffffff163190565b604051806060016040528060001515815260200160008152602001606081525090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461028157600080fd5b919050565b600060208284031215610297578081fd5b6102a08261025d565b9392505050565b600060208083850312156102b9578182fd5b823567ffffffffffffffff808211156102d0578384fd5b818501915085601f8301126102e3578384fd5b8135818111156102ef57fe5b6102fc8485830201610506565b81815284810190848601875b848110156103f457813587017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0606081838f03011215610346578a8bfd5b60408051606081018181108b8211171561035c57fe5b8252610369848d0161025d565b8152818401358c82015260608401358a811115610384578d8efd5b8085019450508e603f850112610398578c8dfd5b8b8401358a8111156103a657fe5b6103b68d85601f84011601610506565b93508084528f838287010111156103cb578d8efd5b808386018e86013783018c018d9052908101919091528552509287019290870190600101610308565b50909998505050505050505050565b6000825161041581846020870161052a565b9190910192915050565b90815260200190565b600060408083018584526020828186015281865180845260609350838701915083838202880101838901875b838110156104f6578983037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa001855281518051151584528681015187850152880151888401889052805188850181905260806104b582828801858c0161052a565b96880196601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01694909401909301925090850190600101610454565b50909a9950505050505050505050565b60405181810167ffffffffffffffff8111828210171561052257fe5b604052919050565b60005b8381101561054557818101518382015260200161052d565b83811115610554576000848401525b5050505056fea164736f6c6343000706000a";
24549
+ const isSuperArgs$2$1 = (xs) => xs.length > 1;
24550
+ class Multicall__factory extends ethers.ContractFactory {
24551
+ constructor(...args) {
24552
+ if (isSuperArgs$2$1(args)) {
24553
+ super(...args);
24554
+ }
24555
+ else {
24556
+ super(_abi$2$1, _bytecode$2$1, args[0]);
24557
+ }
24039
24558
  }
24040
- catch (e) {
24041
- const message = e instanceof Error ? e.message : 'Unknown Error';
24042
- throw new ApproveError(`failed to get allowance: ${message}`);
24559
+ deploy(overrides) {
24560
+ return super.deploy(overrides || {});
24043
24561
  }
24044
- // get the amount that needs to be approved
24045
- const requiredAmount = bignumber.BigNumber.from(tokenAmount).sub(allowance);
24046
- if (requiredAmount.isNegative() || requiredAmount.isZero()) {
24047
- throw new AlreadyApprovedError(tokenAmount.toString(), tokenAddress, spenderAddress);
24048
- }
24049
- return requiredAmount;
24050
- };
24051
- /**
24052
- * Get an unsigned ERC20 approve transaction
24053
- *
24054
- * @param ownerAddress - The address of the owner of the token
24055
- * @param tokenAmount - The amount of the token to approve
24056
- * @param spenderAddress - The address of the spender
24057
- * @returns - The unsigned ERC20 approve transaction
24058
- */
24059
- const getUnsignedERC20ApproveTransaction = (ownerAddress, tokenAddress, tokenAmount, spenderAddress) => {
24060
- if (ownerAddress === spenderAddress) {
24061
- throw new ApproveError('owner and spender addresses are the same');
24062
- }
24063
- const erc20Contract = ERC20__factory$1.createInterface();
24064
- const callData = erc20Contract.encodeFunctionData('approve', [spenderAddress, tokenAmount]);
24065
- return {
24066
- data: callData,
24067
- to: tokenAddress,
24068
- value: 0,
24069
- from: ownerAddress,
24070
- };
24071
- };
24072
- const prepareApproval = (tradeType, amountSpecified, amountWithSlippage, routingContracts, secondaryFees) => {
24073
- const amount = tradeType === sdkCore.TradeType.EXACT_INPUT ? amountSpecified : amountWithSlippage;
24074
- const spender = secondaryFees.length === 0
24075
- ? routingContracts.peripheryRouterAddress
24076
- : routingContracts.secondaryFeeAddress;
24077
- return { spender, amount };
24078
- };
24079
- /**
24080
- * Get an unsigned approval transaction if needed
24081
- *
24082
- * @param provider The provider to use for the call
24083
- * @param ownerAddress The address of the owner of the token
24084
- * @param tokenAddress The address of the token to approve
24085
- * @param tokenAmount The amount of the token to approve
24086
- * @param spenderAddress The address of the spender
24087
- * @returns The unsigned ERC20 approve transaction, or null if no approval is needed
24088
- */
24089
- const getApproveTransaction = async (provider, ownerAddress, tokenAddress, tokenAmount, spenderAddress) => {
24090
- let amountToApprove;
24091
- try {
24092
- amountToApprove = await getERC20AmountToApprove(provider, ownerAddress, tokenAddress, bignumber.BigNumber.from(tokenAmount), spenderAddress);
24093
- }
24094
- catch (e) {
24095
- if (e instanceof AlreadyApprovedError) {
24096
- // already approved for the required amount, nothing to do
24097
- return null;
24098
- }
24099
- throw e;
24100
- }
24101
- return getUnsignedERC20ApproveTransaction(ownerAddress, tokenAddress, amountToApprove, spenderAddress);
24102
- };
24103
- async function getApproveGasEstimate(provider, ownerAddress, spenderAddress, tokenAddress) {
24104
- const erc20Contract = ERC20__factory$1.connect(tokenAddress, provider);
24105
- return await erc20Contract.estimateGas.approve(spenderAddress, ethers.ethers.constants.MaxUint256, {
24106
- from: ownerAddress,
24107
- });
24108
- }
24109
- const getApproval = async (nativeToken, provider, ownerAddress, tokenAddress, preparedApproval, gasPrice) => {
24110
- const approveTransaction = await getApproveTransaction(provider, ownerAddress, tokenAddress, preparedApproval.amount, preparedApproval.spender);
24111
- if (!approveTransaction) {
24112
- return null;
24113
- }
24114
- const gasEstimate = await getApproveGasEstimate(provider, ownerAddress, preparedApproval.spender, tokenAddress);
24115
- const gasFeeEstimate = gasPrice ? {
24116
- token: nativeToken,
24117
- value: calculateGasFee(gasPrice, gasEstimate),
24118
- } : null;
24119
- return {
24120
- transaction: approveTransaction,
24121
- gasFeeEstimate,
24122
- };
24123
- };
24124
-
24125
- // slippageToPercent takes the slippage as a percentage (e.g. 0.1) and
24126
- // converts it to the Uniswap equivalent type
24127
- const slippageToFraction = (slippage) => {
24128
- // If we receive a whole number, we can return slippage/100
24129
- const noDecimals = slippage.toString().split('.').length === 1;
24130
- if (noDecimals) {
24131
- return new sdkCore.Percent(slippage, 100);
24132
- }
24133
- // Divide the slippage number by 100 to get the decimal
24134
- const slippageDecimal = slippage / 100;
24135
- // Split into two parts by the decimal place
24136
- const parts = slippageDecimal.toString().split('.');
24137
- // Get the numerator by adding the two parts together
24138
- const numerator = parts[0] + parts[1];
24139
- // Get the denominator by multiplying decimals^10
24140
- const denominator = 10 ** parts[1].length;
24141
- return new sdkCore.Percent(numerator, denominator);
24142
- };
24143
-
24144
- function getQuoteAmountFromTradeType(tradeInfo) {
24145
- if (tradeInfo.tradeType === sdkCore.TradeType.EXACT_INPUT) {
24146
- return tradeInfo.amountOut;
24147
- }
24148
- return tradeInfo.amountIn;
24149
- }
24150
- function applySlippage(tradeType, amount, slippage) {
24151
- const slippageTolerance = slippageToFraction(slippage);
24152
- const slippagePlusOne = slippageTolerance.add(1);
24153
- const maybeInverted = tradeType === sdkCore.TradeType.EXACT_INPUT ? slippagePlusOne.invert() : slippagePlusOne;
24154
- const amountWithSlippage = maybeInverted.multiply(amount.toString()).quotient;
24155
- return ethers.ethers.BigNumber.from(amountWithSlippage.toString());
24156
- }
24157
- function prepareUserQuote(otherToken, tradeInfo, slippage, fees) {
24158
- const quote = getQuoteAmountFromTradeType(tradeInfo);
24159
- const amountWithSlippage = applySlippage(tradeInfo.tradeType, quote.value, slippage);
24160
- return {
24161
- amount: quote,
24162
- amountWithMaxSlippage: {
24163
- token: otherToken,
24164
- value: amountWithSlippage,
24165
- },
24166
- slippage,
24167
- fees: fees.withAmounts(),
24168
- };
24169
- }
24170
- function getOurQuoteReqAmount(amount, fees, tradeType) {
24171
- if (tradeType === sdkCore.TradeType.EXACT_OUTPUT) {
24172
- // For an exact output swap, we do not need to subtract fees from the given amount
24173
- return amount;
24174
- }
24175
- fees.addAmount(amount);
24176
- return fees.amountLessFees();
24177
- }
24178
-
24179
- // 0.1% default slippage
24180
- const DEFAULT_SLIPPAGE = 0.1;
24181
- // 15 minutes from the current Unix time
24182
- const DEFAULT_DEADLINE = Math.floor(Date.now() / 1000) + 60 * 15;
24183
- // most swaps will be able to resolve with 2 hops
24184
- const DEFAULT_MAX_HOPS = 2;
24185
- // after 10 hops, it is very unlikely a route will be available
24186
- const MAX_MAX_HOPS = 10;
24187
- // a max hop of 1 will require a direct swap with no intermediary pools
24188
- const MIN_MAX_HOPS = 1;
24189
- // precision used to calculate percentage from basis points
24190
- const BASIS_POINT_PRECISION = 10000;
24191
- // 10% maximum secondary fee
24192
- const MAX_SECONDARY_FEE_BASIS_POINTS = 10000;
24193
-
24194
- /* Autogenerated file. Do not edit manually. */
24195
- /* tslint:disable */
24196
- /* eslint-disable */
24197
- const _abi$2$1 = [
24198
- {
24199
- inputs: [],
24200
- name: "getCurrentBlockTimestamp",
24201
- outputs: [
24202
- {
24203
- internalType: "uint256",
24204
- name: "timestamp",
24205
- type: "uint256",
24206
- },
24207
- ],
24208
- stateMutability: "view",
24209
- type: "function",
24210
- },
24211
- {
24212
- inputs: [
24213
- {
24214
- internalType: "address",
24215
- name: "addr",
24216
- type: "address",
24217
- },
24218
- ],
24219
- name: "getEthBalance",
24220
- outputs: [
24221
- {
24222
- internalType: "uint256",
24223
- name: "balance",
24224
- type: "uint256",
24225
- },
24226
- ],
24227
- stateMutability: "view",
24228
- type: "function",
24229
- },
24230
- {
24231
- inputs: [
24232
- {
24233
- components: [
24234
- {
24235
- internalType: "address",
24236
- name: "target",
24237
- type: "address",
24238
- },
24239
- {
24240
- internalType: "uint256",
24241
- name: "gasLimit",
24242
- type: "uint256",
24243
- },
24244
- {
24245
- internalType: "bytes",
24246
- name: "callData",
24247
- type: "bytes",
24248
- },
24249
- ],
24250
- internalType: "struct UniswapInterfaceMulticall.Call[]",
24251
- name: "calls",
24252
- type: "tuple[]",
24253
- },
24254
- ],
24255
- name: "multicall",
24256
- outputs: [
24257
- {
24258
- internalType: "uint256",
24259
- name: "blockNumber",
24260
- type: "uint256",
24261
- },
24262
- {
24263
- components: [
24264
- {
24265
- internalType: "bool",
24266
- name: "success",
24267
- type: "bool",
24268
- },
24269
- {
24270
- internalType: "uint256",
24271
- name: "gasUsed",
24272
- type: "uint256",
24273
- },
24274
- {
24275
- internalType: "bytes",
24276
- name: "returnData",
24277
- type: "bytes",
24278
- },
24279
- ],
24280
- internalType: "struct UniswapInterfaceMulticall.Result[]",
24281
- name: "returnData",
24282
- type: "tuple[]",
24283
- },
24284
- ],
24285
- stateMutability: "nonpayable",
24286
- type: "function",
24287
- },
24288
- ];
24289
- const _bytecode$2$1 = "0x608060405234801561001057600080fd5b50610567806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630f28c97d146100465780631749e1e3146100645780634d2301cc14610085575b600080fd5b61004e610098565b60405161005b919061041f565b60405180910390f35b6100776100723660046102a7565b61009c565b60405161005b929190610428565b61004e610093366004610286565b610220565b4290565b8051439060609067ffffffffffffffff811180156100b957600080fd5b506040519080825280602002602001820160405280156100f357816020015b6100e061023a565b8152602001906001900390816100d85790505b50905060005b835181101561021a57600080600086848151811061011357fe5b60200260200101516000015187858151811061012b57fe5b60200260200101516020015188868151811061014357fe5b60200260200101516040015192509250925060005a90506000808573ffffffffffffffffffffffffffffffffffffffff1685856040516101839190610403565b60006040518083038160008787f1925050503d80600081146101c1576040519150601f19603f3d011682016040523d82523d6000602084013e6101c6565b606091505b509150915060005a8403905060405180606001604052808415158152602001828152602001838152508989815181106101fb57fe5b60200260200101819052505050505050505080806001019150506100f9565b50915091565b73ffffffffffffffffffffffffffffffffffffffff163190565b604051806060016040528060001515815260200160008152602001606081525090565b803573ffffffffffffffffffffffffffffffffffffffff8116811461028157600080fd5b919050565b600060208284031215610297578081fd5b6102a08261025d565b9392505050565b600060208083850312156102b9578182fd5b823567ffffffffffffffff808211156102d0578384fd5b818501915085601f8301126102e3578384fd5b8135818111156102ef57fe5b6102fc8485830201610506565b81815284810190848601875b848110156103f457813587017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0606081838f03011215610346578a8bfd5b60408051606081018181108b8211171561035c57fe5b8252610369848d0161025d565b8152818401358c82015260608401358a811115610384578d8efd5b8085019450508e603f850112610398578c8dfd5b8b8401358a8111156103a657fe5b6103b68d85601f84011601610506565b93508084528f838287010111156103cb578d8efd5b808386018e86013783018c018d9052908101919091528552509287019290870190600101610308565b50909998505050505050505050565b6000825161041581846020870161052a565b9190910192915050565b90815260200190565b600060408083018584526020828186015281865180845260609350838701915083838202880101838901875b838110156104f6578983037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa001855281518051151584528681015187850152880151888401889052805188850181905260806104b582828801858c0161052a565b96880196601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01694909401909301925090850190600101610454565b50909a9950505050505050505050565b60405181810167ffffffffffffffff8111828210171561052257fe5b604052919050565b60005b8381101561054557818101518382015260200161052d565b83811115610554576000848401525b5050505056fea164736f6c6343000706000a";
24290
- const isSuperArgs$2$1 = (xs) => xs.length > 1;
24291
- class Multicall__factory extends ethers.ContractFactory {
24292
- constructor(...args) {
24293
- if (isSuperArgs$2$1(args)) {
24294
- super(...args);
24295
- }
24296
- else {
24297
- super(_abi$2$1, _bytecode$2$1, args[0]);
24298
- }
24299
- }
24300
- deploy(overrides) {
24301
- return super.deploy(overrides || {});
24302
- }
24303
- getDeployTransaction(overrides) {
24304
- return super.getDeployTransaction(overrides || {});
24562
+ getDeployTransaction(overrides) {
24563
+ return super.getDeployTransaction(overrides || {});
24305
24564
  }
24306
24565
  attach(address) {
24307
24566
  return super.attach(address);
@@ -26483,23 +26742,229 @@ startTokenIn = tokenIn) => {
26483
26742
  return routes;
26484
26743
  };
26485
26744
 
26486
- class Fees {
26487
- secondaryFees;
26488
- amount;
26489
- constructor(secondaryFees, token) {
26490
- this.secondaryFees = secondaryFees;
26491
- this.amount = newAmount(ethers.BigNumber.from(0), token);
26492
- }
26493
- addAmount(amount) {
26494
- this.amount = addAmount(this.amount, amount);
26495
- }
26496
- amountWithFeesApplied() {
26497
- return addAmount(this.amount, this.total());
26498
- }
26499
- amountLessFees() {
26500
- return subtractAmount(this.amount, this.total());
26501
- }
26502
- withAmounts() {
26745
+ /**
26746
+ * Determines whether or not the chain supports EIP-1559 by checking for the existence
26747
+ * of {@link FeeData.maxFeePerGas} and {@link FeeData.maxPriorityFeePerGas}
26748
+ *
26749
+ * @param {FeeData} fee - The fee data for the chain
26750
+ */
26751
+ const doesChainSupportEIP1559 = (fee) => {
26752
+ const supportsEIP1559 = !!fee.maxFeePerGas && !!fee.maxPriorityFeePerGas;
26753
+ return supportsEIP1559;
26754
+ };
26755
+ /**
26756
+ * Fetch the current gas price estimate. Supports both EIP-1559 and non-EIP1559 chains
26757
+ * @param {JsonRpcProvider} provider - The JSON RPC provider used to fetch fee data
26758
+ * @returns {Amount | null} - The gas price in the smallest denomination of the chain's currency,
26759
+ * or null if no gas price is available
26760
+ */
26761
+ const fetchGasPrice = async (provider, nativeToken) => {
26762
+ const feeData = await provider.getFeeData().catch(() => null);
26763
+ if (!feeData)
26764
+ return null;
26765
+ if (doesChainSupportEIP1559(feeData)) {
26766
+ return newAmount(feeData.maxFeePerGas.add(feeData.maxPriorityFeePerGas), nativeToken);
26767
+ }
26768
+ return feeData.gasPrice ? newAmount(feeData.gasPrice, nativeToken) : null;
26769
+ };
26770
+ /**
26771
+ * Calculate the gas fee from the gas price and gas units used for the transaction
26772
+ *
26773
+ * @param {Amount} gasPriceInWei - The price of gas
26774
+ * @param {BigNumber} gasUsed - The total gas units that will be used for the transaction
26775
+ * @returns - The cost of the transaction in the gas token's smallest denomination (e.g. WEI)
26776
+ */
26777
+ const calculateGasFee = (gasPrice, gasEstimate) =>
26778
+ // eslint-disable-next-line implicit-arrow-linebreak
26779
+ newAmount(gasEstimate.mul(gasPrice.value), gasPrice.token);
26780
+
26781
+ /**
26782
+ * Get the amount of an ERC20 token that needs to be approved by
26783
+ * checking the existing allowance for the spender
26784
+ *
26785
+ * @param provider - The provider to use for the call
26786
+ * @param ownerAddress - The address of the owner of the token
26787
+ * @param tokenAmount - The amount of the token to approve
26788
+ * @param spenderAddress - The address of the spender
26789
+ * @returns - The amount of the token that needs to be approved
26790
+ */
26791
+ const getERC20AmountToApprove = async (provider, ownerAddress, tokenAmount, spenderAddress) => {
26792
+ // create an instance of the ERC20 token contract
26793
+ const erc20Contract = ERC20__factory$1.connect(tokenAmount.token.address, provider);
26794
+ // get the allowance for the token spender
26795
+ // minimum is 0 - no allowance
26796
+ let allowance;
26797
+ try {
26798
+ allowance = await erc20Contract.allowance(ownerAddress, spenderAddress);
26799
+ }
26800
+ catch (e) {
26801
+ const message = e instanceof Error ? e.message : 'Unknown Error';
26802
+ throw new ApproveError(`failed to get allowance: ${message}`);
26803
+ }
26804
+ // get the amount that needs to be approved
26805
+ const requiredAmount = tokenAmount.value.sub(allowance);
26806
+ if (requiredAmount.isNegative() || requiredAmount.isZero()) {
26807
+ throw new AlreadyApprovedError(tokenAmount.toString(), tokenAmount.token.address, spenderAddress);
26808
+ }
26809
+ return newAmount(requiredAmount, tokenAmount.token);
26810
+ };
26811
+ /**
26812
+ * Get an unsigned ERC20 approve transaction
26813
+ *
26814
+ * @param ownerAddress - The address of the owner of the token
26815
+ * @param tokenAmount - The amount of the token to approve
26816
+ * @param spenderAddress - The address of the spender
26817
+ * @returns - The unsigned ERC20 approve transaction
26818
+ */
26819
+ const getUnsignedERC20ApproveTransaction = (ownerAddress, tokenAmount, spenderAddress) => {
26820
+ if (ownerAddress === spenderAddress) {
26821
+ throw new ApproveError('owner and spender addresses are the same');
26822
+ }
26823
+ const erc20Contract = ERC20__factory$1.createInterface();
26824
+ const callData = erc20Contract.encodeFunctionData('approve', [spenderAddress, tokenAmount.value]);
26825
+ return {
26826
+ data: callData,
26827
+ to: tokenAmount.token.address,
26828
+ value: 0,
26829
+ from: ownerAddress,
26830
+ };
26831
+ };
26832
+ const prepareApproval = (tradeType, amountSpecified, amountWithSlippage, routingContracts, secondaryFees) => {
26833
+ const amountOfTokenIn = tradeType === sdkCore.TradeType.EXACT_INPUT ? amountSpecified : amountWithSlippage;
26834
+ const spender = secondaryFees.length === 0
26835
+ ? routingContracts.peripheryRouterAddress
26836
+ : routingContracts.secondaryFeeAddress;
26837
+ return { spender, amount: amountOfTokenIn };
26838
+ };
26839
+ /**
26840
+ * Get an unsigned approval transaction if needed
26841
+ *
26842
+ * @param provider The provider to use for the call
26843
+ * @param ownerAddress The address of the owner of the token
26844
+ * @param tokenAddress The address of the token to approve
26845
+ * @param tokenAmount The amount of the token to approve
26846
+ * @param spenderAddress The address of the spender
26847
+ * @returns The unsigned ERC20 approve transaction, or null if no approval is needed
26848
+ */
26849
+ const getApproveTransaction = async (provider, ownerAddress, tokenAmount, spenderAddress) => {
26850
+ let amountToApprove;
26851
+ try {
26852
+ amountToApprove = await getERC20AmountToApprove(provider, ownerAddress, tokenAmount, spenderAddress);
26853
+ }
26854
+ catch (e) {
26855
+ if (e instanceof AlreadyApprovedError) {
26856
+ // already approved for the required amount, nothing to do
26857
+ return null;
26858
+ }
26859
+ throw e;
26860
+ }
26861
+ return getUnsignedERC20ApproveTransaction(ownerAddress, amountToApprove, spenderAddress);
26862
+ };
26863
+ async function getApproveGasEstimate(provider, ownerAddress, spenderAddress, tokenAddress) {
26864
+ const erc20Contract = ERC20__factory$1.connect(tokenAddress, provider);
26865
+ return await erc20Contract.estimateGas.approve(spenderAddress, ethers.ethers.constants.MaxUint256, {
26866
+ from: ownerAddress,
26867
+ });
26868
+ }
26869
+ const getApproval = async (provider, ownerAddress, preparedApproval, gasPrice) => {
26870
+ const approveTransaction = await getApproveTransaction(provider, ownerAddress, preparedApproval.amount, preparedApproval.spender);
26871
+ if (!approveTransaction) {
26872
+ return null;
26873
+ }
26874
+ const gasEstimate = await getApproveGasEstimate(provider, ownerAddress, preparedApproval.spender, preparedApproval.amount.token.address);
26875
+ const gasFeeEstimate = gasPrice ? calculateGasFee(gasPrice, gasEstimate) : null;
26876
+ return {
26877
+ transaction: approveTransaction,
26878
+ gasFeeEstimate,
26879
+ };
26880
+ };
26881
+
26882
+ // slippageToPercent takes the slippage as a percentage (e.g. 0.1) and
26883
+ // converts it to the Uniswap equivalent type
26884
+ const slippageToFraction = (slippage) => {
26885
+ // If we receive a whole number, we can return slippage/100
26886
+ const noDecimals = slippage.toString().split('.').length === 1;
26887
+ if (noDecimals) {
26888
+ return new sdkCore.Percent(slippage, 100);
26889
+ }
26890
+ // Divide the slippage number by 100 to get the decimal
26891
+ const slippageDecimal = slippage / 100;
26892
+ // Split into two parts by the decimal place
26893
+ const parts = slippageDecimal.toString().split('.');
26894
+ // Get the numerator by adding the two parts together
26895
+ const numerator = parts[0] + parts[1];
26896
+ // Get the denominator by multiplying decimals^10
26897
+ const denominator = 10 ** parts[1].length;
26898
+ return new sdkCore.Percent(numerator, denominator);
26899
+ };
26900
+
26901
+ function getQuoteAmountFromTradeType(tradeInfo) {
26902
+ if (tradeInfo.tradeType === sdkCore.TradeType.EXACT_INPUT) {
26903
+ return tradeInfo.amountOut;
26904
+ }
26905
+ return tradeInfo.amountIn;
26906
+ }
26907
+ function applySlippage(tradeType, amount, slippage) {
26908
+ const slippageTolerance = slippageToFraction(slippage);
26909
+ const slippagePlusOne = slippageTolerance.add(1);
26910
+ const maybeInverted = tradeType === sdkCore.TradeType.EXACT_INPUT ? slippagePlusOne.invert() : slippagePlusOne;
26911
+ const amountWithSlippage = maybeInverted.multiply(amount.toString()).quotient;
26912
+ return ethers.ethers.BigNumber.from(amountWithSlippage.toString());
26913
+ }
26914
+ function prepareUserQuote(otherToken, tradeInfo, slippage, fees) {
26915
+ const quote = getQuoteAmountFromTradeType(tradeInfo);
26916
+ const amountWithSlippage = applySlippage(tradeInfo.tradeType, quote.value, slippage);
26917
+ return {
26918
+ amount: quote,
26919
+ amountWithMaxSlippage: {
26920
+ token: otherToken,
26921
+ value: amountWithSlippage,
26922
+ },
26923
+ slippage,
26924
+ fees: fees.withAmounts(),
26925
+ };
26926
+ }
26927
+ function getOurQuoteReqAmount(amount, fees, tradeType) {
26928
+ if (tradeType === sdkCore.TradeType.EXACT_OUTPUT) {
26929
+ // For an exact output swap, we do not need to subtract fees from the given amount
26930
+ return amount;
26931
+ }
26932
+ fees.addAmount(amount);
26933
+ return fees.amountLessFees();
26934
+ }
26935
+
26936
+ // 0.1% default slippage
26937
+ const DEFAULT_SLIPPAGE = 0.1;
26938
+ // 15 minutes from the current Unix time
26939
+ const DEFAULT_DEADLINE = Math.floor(Date.now() / 1000) + 60 * 15;
26940
+ // most swaps will be able to resolve with 2 hops
26941
+ const DEFAULT_MAX_HOPS = 2;
26942
+ // after 10 hops, it is very unlikely a route will be available
26943
+ const MAX_MAX_HOPS = 10;
26944
+ // a max hop of 1 will require a direct swap with no intermediary pools
26945
+ const MIN_MAX_HOPS = 1;
26946
+ // precision used to calculate percentage from basis points
26947
+ const BASIS_POINT_PRECISION = 10000;
26948
+ // 10% maximum secondary fee
26949
+ const MAX_SECONDARY_FEE_BASIS_POINTS = 10000;
26950
+
26951
+ class Fees {
26952
+ secondaryFees;
26953
+ amount;
26954
+ constructor(secondaryFees, token) {
26955
+ this.secondaryFees = secondaryFees;
26956
+ this.amount = newAmount(ethers.BigNumber.from(0), token);
26957
+ }
26958
+ addAmount(amount) {
26959
+ this.amount = addAmount(this.amount, amount);
26960
+ }
26961
+ amountWithFeesApplied() {
26962
+ return addAmount(this.amount, this.total());
26963
+ }
26964
+ amountLessFees() {
26965
+ return subtractAmount(this.amount, this.total());
26966
+ }
26967
+ withAmounts() {
26503
26968
  return this.secondaryFees.map((fee) => {
26504
26969
  const feeAmount = this.amount.value
26505
26970
  .mul(fee.basisPoints)
@@ -26630,13 +27095,10 @@ function createSwapParameters(adjustedQuote, fromAddress, slippage, deadline, se
26630
27095
  }
26631
27096
  return createSwapCallParametersWithFees(uncheckedTrade, fromAddress, options, secondaryFees);
26632
27097
  }
26633
- function getSwap(nativeToken, adjustedQuote, fromAddress, slippage, deadline, peripheryRouterAddress, secondaryFeesAddress, gasPrice, secondaryFees) {
27098
+ function getSwap(adjustedQuote, fromAddress, slippage, deadline, peripheryRouterAddress, secondaryFeesAddress, gasPrice, secondaryFees) {
26634
27099
  const calldata = createSwapParameters(adjustedQuote, fromAddress, slippage, deadline, secondaryFees);
26635
27100
  // TODO: Add additional gas fee estimates for secondary fees
26636
- const gasFeeEstimate = gasPrice ? {
26637
- token: nativeToken,
26638
- value: calculateGasFee(gasPrice, adjustedQuote.gasEstimate),
26639
- } : null;
27101
+ const gasFeeEstimate = gasPrice ? calculateGasFee(gasPrice, adjustedQuote.gasEstimate) : null;
26640
27102
  return {
26641
27103
  transaction: {
26642
27104
  data: calldata,
@@ -26820,14 +27282,14 @@ class Exchange {
26820
27282
  // get quote and gas details
26821
27283
  const [ourQuote, gasPrice] = await Promise.all([
26822
27284
  this.router.findOptimalRoute(ourQuoteReqAmount, otherToken, tradeType, maxHops),
26823
- fetchGasPrice(this.provider),
27285
+ fetchGasPrice(this.provider, this.nativeToken),
26824
27286
  ]);
26825
27287
  const adjustedQuote = prepareSwap(ourQuote, amountSpecified, fees);
26826
- const swap = getSwap(this.nativeToken, adjustedQuote, fromAddress, slippagePercent, deadline, this.router.routingContracts.peripheryRouterAddress, this.router.routingContracts.secondaryFeeAddress, gasPrice, secondaryFees);
27288
+ const swap = getSwap(adjustedQuote, fromAddress, slippagePercent, deadline, this.router.routingContracts.peripheryRouterAddress, this.router.routingContracts.secondaryFeeAddress, gasPrice, secondaryFees);
26827
27289
  const userQuote = prepareUserQuote(otherToken, adjustedQuote, slippagePercent, fees);
26828
- const preparedApproval = prepareApproval(tradeType, amount, userQuote.amountWithMaxSlippage.value, this.router.routingContracts, secondaryFees);
26829
- // we always use the tokenIn address because we are always selling the tokenIn
26830
- const approval = await getApproval(this.nativeToken, this.provider, fromAddress, tokenInAddress, preparedApproval, gasPrice);
27290
+ const preparedApproval = prepareApproval(tradeType, amountSpecified, userQuote.amountWithMaxSlippage, this.router.routingContracts, secondaryFees);
27291
+ // preparedApproval always uses the tokenIn address because we are always selling the tokenIn
27292
+ const approval = await getApproval(this.provider, fromAddress, preparedApproval, gasPrice);
26831
27293
  return {
26832
27294
  approval,
26833
27295
  swap,
@@ -26872,6 +27334,18 @@ class Exchange {
26872
27334
 
26873
27335
 
26874
27336
 
27337
+ var $aa144554f9ef124b$export$226b052ecb8ca80;
27338
+ (function(BuyStatusType) {
27339
+ BuyStatusType["SUCCESS"] = "SUCCESS";
27340
+ BuyStatusType["FAILED"] = "FAILED";
27341
+ })($aa144554f9ef124b$export$226b052ecb8ca80 || ($aa144554f9ef124b$export$226b052ecb8ca80 = {}));
27342
+
27343
+
27344
+ var $1e6b81bbd98b3a91$export$c0189a8c30039654;
27345
+ (function(CancelStatusType) {
27346
+ CancelStatusType["SUCCESS"] = "SUCCESS";
27347
+ CancelStatusType["FAILED"] = "FAILED";
27348
+ })($1e6b81bbd98b3a91$export$c0189a8c30039654 || ($1e6b81bbd98b3a91$export$c0189a8c30039654 = {}));
26875
27349
 
26876
27350
 
26877
27351
  /**
@@ -26919,6 +27393,13 @@ var $a47e48dd2c04791b$export$1f05a55fe0680cc7;
26919
27393
 
26920
27394
 
26921
27395
 
27396
+ var $c2874b006e92b115$export$a9780122aaa0801a;
27397
+ (function(SellStatusType) {
27398
+ SellStatusType["SUCCESS"] = "SUCCESS";
27399
+ SellStatusType["FAILED"] = "FAILED";
27400
+ })($c2874b006e92b115$export$a9780122aaa0801a || ($c2874b006e92b115$export$a9780122aaa0801a = {}));
27401
+
27402
+
26922
27403
  var $08d5ddc39acd6833$export$fd9b17d87f4121d2;
26923
27404
  (function(TokenFilterTypes) {
26924
27405
  TokenFilterTypes["ALL"] = "all";
@@ -26969,14 +27450,26 @@ const $e768639828688ca3$export$44dde05038008549 = {
26969
27450
  const $d85ad1457a3f1a83$export$7d3a9eeba384fa59 = "development";
26970
27451
  const $d85ad1457a3f1a83$export$b80040cb173ba6e9 = "0x0000000000000000000000000000000000001010";
26971
27452
  const $d85ad1457a3f1a83$export$903389470ba9433c = 18;
27453
+ const $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN = {
27454
+ name: "IMX",
27455
+ symbol: "IMX",
27456
+ decimals: $d85ad1457a3f1a83$export$903389470ba9433c,
27457
+ address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27458
+ };
26972
27459
  const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
26973
27460
  [$d85ad1457a3f1a83$export$7d3a9eeba384fa59]: "https://checkout-api.dev.immutable.com",
26974
27461
  [(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
26975
27462
  [(Environment$1).PRODUCTION]: "https://checkout-api.immutable.com"
26976
27463
  };
26977
- ({
26978
- [($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET]: "https://explorer.testnet.immutable.com"
26979
- });
27464
+ const $d85ad1457a3f1a83$export$72176e2233d7d5d = true;
27465
+ const $d85ad1457a3f1a83$export$566b5975cc83d6b4 = true;
27466
+ const $d85ad1457a3f1a83$export$261cde2078dba35b = true;
27467
+ const $d85ad1457a3f1a83$export$fc55ed5a42b458ba = {
27468
+ [($0472f23319457bfb$export$c06e1e7429de6283).IMTBL_ZKEVM_TESTNET]: {
27469
+ url: "https://explorer.testnet.immutable.com",
27470
+ nativeToken: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27471
+ }
27472
+ };
26980
27473
  const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
26981
27474
  [
26982
27475
  ($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM,
@@ -27004,12 +27497,7 @@ const $d85ad1457a3f1a83$export$6f24f3cef7d501c4 = new Map([
27004
27497
  rpcUrls: [
27005
27498
  "https://rpc.immutable.com"
27006
27499
  ],
27007
- nativeCurrency: {
27008
- name: "IMX",
27009
- symbol: "IMX",
27010
- decimals: 18,
27011
- address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27012
- }
27500
+ nativeCurrency: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27013
27501
  }
27014
27502
  ]
27015
27503
  ]);
@@ -27040,12 +27528,7 @@ const $d85ad1457a3f1a83$export$3e81fc0987227f10 = new Map([
27040
27528
  rpcUrls: [
27041
27529
  "https://rpc.testnet.immutable.com"
27042
27530
  ],
27043
- nativeCurrency: {
27044
- name: "IMX",
27045
- symbol: "IMX",
27046
- decimals: 18,
27047
- address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27048
- }
27531
+ nativeCurrency: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27049
27532
  }
27050
27533
  ]
27051
27534
  ]);
@@ -27076,12 +27559,7 @@ const $d85ad1457a3f1a83$export$3a9ebede6a150274 = new Map([
27076
27559
  rpcUrls: [
27077
27560
  "https://rpc.dev.immutable.com"
27078
27561
  ],
27079
- nativeCurrency: {
27080
- name: "IMX",
27081
- symbol: "IMX",
27082
- decimals: 18,
27083
- address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
27084
- }
27562
+ nativeCurrency: $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN
27085
27563
  }
27086
27564
  ]
27087
27565
  ]);
@@ -27309,6 +27787,7 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
27309
27787
  CheckoutErrorType["DEFAULT_PROVIDER_ERROR"] = "DEFAULT_PROVIDER_ERROR";
27310
27788
  CheckoutErrorType["CONNECT_PROVIDER_ERROR"] = "CONNECT_PROVIDER_ERROR";
27311
27789
  CheckoutErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
27790
+ CheckoutErrorType["GET_INDEXER_BALANCE_ERROR"] = "GET_INDEXER_BALANCE_ERROR";
27312
27791
  CheckoutErrorType["GET_ERC20_BALANCE_ERROR"] = "GET_ERC20_BALANCE_ERROR";
27313
27792
  CheckoutErrorType["GET_ERC721_BALANCE_ERROR"] = "GET_ERC721_BALANCE_ERROR";
27314
27793
  CheckoutErrorType["GET_NETWORK_INFO_ERROR"] = "GET_NETWORK_INFO_ERROR";
@@ -27324,9 +27803,15 @@ var $4b58188d47aafe8d$export$537fa3efd10ed435;
27324
27803
  CheckoutErrorType["UNSUPPORTED_TOKEN_TYPE_ERROR"] = "UNSUPPORTED_TOKEN_TYPE_ERROR";
27325
27804
  CheckoutErrorType["UNSUPPORTED_BALANCE_REQUIREMENT_ERROR"] = "UNSUPPORTED_BALANCE_REQUIREMENT_ERROR";
27326
27805
  CheckoutErrorType["GET_ORDER_LISTING_ERROR"] = "GET_ORDER_LISTING_ERROR";
27806
+ CheckoutErrorType["CANCEL_ORDER_LISTING_ERROR"] = "CANCEL_ORDER_LISTING_ERROR";
27807
+ CheckoutErrorType["PREPARE_ORDER_LISTING_ERROR"] = "PREPARE_ORDER_LISTING_ERROR";
27808
+ CheckoutErrorType["CREATE_ORDER_LISTING_ERROR"] = "CREATE_ORDER_LISTING_ERROR";
27327
27809
  CheckoutErrorType["SWITCH_NETWORK_UNSUPPORTED"] = "SWITCH_NETWORK_UNSUPPORTED";
27328
27810
  CheckoutErrorType["GET_ERC20_ALLOWANCE_ERROR"] = "GET_ERC20_ALLOWANCE_ERROR";
27329
27811
  CheckoutErrorType["GET_ERC721_ALLOWANCE_ERROR"] = "GET_ERC721_ALLOWANCE_ERROR";
27812
+ CheckoutErrorType["EXECUTE_APPROVAL_TRANSACTION_ERROR"] = "EXECUTE_APPROVAL_TRANSACTION_ERROR";
27813
+ CheckoutErrorType["EXECUTE_FULFILMENT_TRANSACTION_ERROR"] = "EXECUTE_FULFILMENT_TRANSACTION_ERROR";
27814
+ CheckoutErrorType["SIGN_MESSAGE_ERROR"] = "SIGN_MESSAGE_ERROR";
27330
27815
  })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
27331
27816
  class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
27332
27817
  message;
@@ -27514,7 +27999,7 @@ const $efe60cea83bfc4e8$export$473cec51305fdae8 = async (config, { type: type =
27514
27999
  case ($08d5ddc39acd6833$export$fd9b17d87f4121d2).BRIDGE:
27515
28000
  case ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL:
27516
28001
  default:
27517
- tokens = await config.remote.getTokens(chainId);
28002
+ tokens = (await config.remote.getTokensConfig(chainId)).allowed;
27518
28003
  }
27519
28004
  if (!exclude || exclude?.length === 0) return {
27520
28005
  tokens: tokens
@@ -27527,6 +28012,141 @@ const $efe60cea83bfc4e8$export$473cec51305fdae8 = async (config, { type: type =
27527
28012
 
27528
28013
 
27529
28014
 
28015
+
28016
+
28017
+ const $fd8a8472dcc3ec2b$var$CACHE_DATA_TTL = 60; // seconds
28018
+ class $fd8a8472dcc3ec2b$export$ef140a6b05dfc786 {
28019
+ url;
28020
+ nativeToken;
28021
+ ttl;
28022
+ chainId;
28023
+ cacheMap;
28024
+ static async makeHttpRequest(url) {
28025
+ return (globalAxios$1).get(url);
28026
+ }
28027
+ setCache(key, data) {
28028
+ this.cacheMap[key] = {
28029
+ data: data,
28030
+ ttl: new Date().getTime() + this.ttl * 1000
28031
+ };
28032
+ }
28033
+ getCache(key) {
28034
+ const d = this.cacheMap[key];
28035
+ if (!d || d.ttl <= new Date().getTime()) return null;
28036
+ return d.data;
28037
+ }
28038
+ /**
28039
+ * Blockscout constructor
28040
+ * @param chainId target chain
28041
+ * @param ttl cache TTL
28042
+ */ constructor(params){
28043
+ this.chainId = params.chainId;
28044
+ this.url = ($d85ad1457a3f1a83$export$fc55ed5a42b458ba)[this.chainId].url;
28045
+ const native = ($d85ad1457a3f1a83$export$fc55ed5a42b458ba)[this.chainId].nativeToken;
28046
+ this.nativeToken = {
28047
+ address: native.address ?? "",
28048
+ decimals: native.decimals.toString(),
28049
+ name: native.name,
28050
+ symbol: native.symbol
28051
+ };
28052
+ this.cacheMap = {};
28053
+ this.ttl = params.ttl !== undefined ? params.ttl : $fd8a8472dcc3ec2b$var$CACHE_DATA_TTL;
28054
+ }
28055
+ /**
28056
+ * isChainSupported verifies if the chain is supported by Blockscout
28057
+ * @param chainId
28058
+ */ static isChainSupported = (chainId)=>Boolean(($d85ad1457a3f1a83$export$fc55ed5a42b458ba)[chainId]);
28059
+ /**
28060
+ * isBlockscoutError verifies if the error is a Blockscout client error
28061
+ * @param err error to evaluate
28062
+ */ static isBlockscoutError = (err)=>"code" in err;
28063
+ /**
28064
+ * getTokensByWalletAddress fetches the list of tokens (by type) owned by the wallet address.
28065
+ * @param walletAddress wallet address
28066
+ * @param tokenType token type
28067
+ * @param nextPage parameters for the next page, to be provided alongside walletAddress and tokenType
28068
+ * @returns list of tokens given the wallet address and the token types
28069
+ */ async getTokensByWalletAddress(params) {
28070
+ try {
28071
+ let url = `${this.url}/api/v2/addresses/${params.walletAddress}/tokens?type=${params.tokenType}`;
28072
+ if (params.nextPage) url += `&${new URLSearchParams(params.nextPage)}`;
28073
+ // Cache response data to prevent unnecessary requests
28074
+ const cached = this.getCache(url);
28075
+ if (cached && cached.status < 400) return Promise.resolve(cached.data);
28076
+ const response = await $fd8a8472dcc3ec2b$export$ef140a6b05dfc786.makeHttpRequest(url);
28077
+ if (response.status >= 400) return Promise.reject({
28078
+ code: response.status,
28079
+ message: response.statusText
28080
+ });
28081
+ // To get around an issue with native tokens being an ERC-20, there is the need
28082
+ // to remove IMX from `resp` and add it back in using getNativeTokenByWalletAddress.
28083
+ // This has affected some of the early wallets, and it might not be an issue in mainnet
28084
+ // however, let's enforce it.
28085
+ const data = {
28086
+ items: response.data?.items?.filter((token)=>token.token.address && token.token.address !== this.nativeToken.address),
28087
+ // eslint-disable-next-line @typescript-eslint/naming-convention
28088
+ next_page_params: response.data?.next_page_params
28089
+ };
28090
+ this.setCache(url, data);
28091
+ return Promise.resolve(data);
28092
+ } catch (err) {
28093
+ let code = (globalAxios$1.HttpStatusCode).InternalServerError;
28094
+ let message = "InternalServerError";
28095
+ if ((globalAxios$1).isAxiosError(err)) {
28096
+ code = err.response?.status || code;
28097
+ message = err.message;
28098
+ }
28099
+ return Promise.reject({
28100
+ code: code,
28101
+ message: message
28102
+ });
28103
+ }
28104
+ }
28105
+ /**
28106
+ * getNativeTokenByWalletAddress fetches the native token owned by the wallet address.
28107
+ * @param walletAddress wallet address
28108
+ * @returns list of tokens given the wallet address and the token types
28109
+ */ async getNativeTokenByWalletAddress(params) {
28110
+ try {
28111
+ const url = `${this.url}/api/v2/addresses/${params.walletAddress}`;
28112
+ // Cache response data to prevent unnecessary requests
28113
+ const cached = this.getCache(url);
28114
+ if (cached && cached.status < 400) return Promise.resolve(cached.data);
28115
+ const response = await $fd8a8472dcc3ec2b$export$ef140a6b05dfc786.makeHttpRequest(url);
28116
+ if (response.status >= 400) return Promise.reject({
28117
+ code: response.status,
28118
+ message: response.statusText
28119
+ });
28120
+ const data = {
28121
+ token: this.nativeToken,
28122
+ value: response.data.coin_balance
28123
+ };
28124
+ this.setCache(url, data);
28125
+ return Promise.resolve(data);
28126
+ } catch (err) {
28127
+ let code = (globalAxios$1.HttpStatusCode).InternalServerError;
28128
+ let message = "InternalServerError";
28129
+ if ((globalAxios$1).isAxiosError(err)) {
28130
+ code = err.response?.status || code;
28131
+ message = err.message;
28132
+ }
28133
+ return Promise.reject({
28134
+ code: code,
28135
+ message: message
28136
+ });
28137
+ }
28138
+ }
28139
+ }
28140
+
28141
+
28142
+ /* eslint @typescript-eslint/naming-convention: off */ var $887a00f8f72d61f0$export$5bd1ea2b3d18210;
28143
+ (function(BlockscoutTokenType) {
28144
+ BlockscoutTokenType["ERC20"] = "ERC-20";
28145
+ })($887a00f8f72d61f0$export$5bd1ea2b3d18210 || ($887a00f8f72d61f0$export$5bd1ea2b3d18210 = {}));
28146
+
28147
+
28148
+
28149
+
27530
28150
  const $1564e43dde50bb61$export$df96cd8d56be0ab1 = async (config, web3Provider, walletAddress)=>await ($a8bc256d81a5e2c1$export$bacc563de539c6c3)(async ()=>{
27531
28151
  const networkInfo = await ($de192de6ef100f9f$export$79f13b4cfaaf0d09)(config, web3Provider);
27532
28152
  if (!networkInfo.isSupported) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Chain:${networkInfo.chainId} is not a supported chain`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CHAIN_NOT_SUPPORTED_ERROR, {
@@ -27566,6 +28186,65 @@ async function $1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, walletAdd
27566
28186
  type: ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC20_BALANCE_ERROR
27567
28187
  });
27568
28188
  }
28189
+ // Blockscout client singleton
28190
+ let $1564e43dde50bb61$var$blockscoutClient;
28191
+ const $1564e43dde50bb61$export$8c978679845804d4 = async (walletAddress, chainId, rename)=>{
28192
+ // Shuffle the mapping of the tokens configuration so it is a hashmap
28193
+ // for faster access to tokens config objects.
28194
+ const mapRename = Object.assign({}, ...rename.map((t)=>({
28195
+ [t.address || ""]: t
28196
+ })));
28197
+ // Ensure singleton is present and match the selected chain
28198
+ if (!$1564e43dde50bb61$var$blockscoutClient || $1564e43dde50bb61$var$blockscoutClient.chainId !== chainId) $1564e43dde50bb61$var$blockscoutClient = new ($fd8a8472dcc3ec2b$export$ef140a6b05dfc786)({
28199
+ chainId: chainId
28200
+ });
28201
+ // Hold the items in an array for post-fetching processing
28202
+ const items = [];
28203
+ const tokenType = ($887a00f8f72d61f0$export$5bd1ea2b3d18210).ERC20;
28204
+ // Given that the widgets aren't yet designed to support pagination,
28205
+ // fetch all the possible tokens associated to a given wallet address.
28206
+ let resp;
28207
+ try {
28208
+ do {
28209
+ // eslint-disable-next-line no-await-in-loop
28210
+ resp = await $1564e43dde50bb61$var$blockscoutClient.getTokensByWalletAddress({
28211
+ walletAddress: walletAddress,
28212
+ tokenType: tokenType,
28213
+ nextPage: resp?.next_page_params
28214
+ });
28215
+ items.push(...resp.items);
28216
+ }while (resp.next_page_params);
28217
+ } catch (err) {
28218
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message || "InternalServerError | getTokensByWalletAddress", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_INDEXER_BALANCE_ERROR, err);
28219
+ }
28220
+ try {
28221
+ const respNative = await $1564e43dde50bb61$var$blockscoutClient.getNativeTokenByWalletAddress({
28222
+ walletAddress: walletAddress
28223
+ });
28224
+ items.push(respNative);
28225
+ } catch (err) {
28226
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(err.message || "InternalServerError | getNativeTokenByWalletAddress", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_INDEXER_BALANCE_ERROR, err);
28227
+ }
28228
+ return {
28229
+ balances: items.map((item)=>{
28230
+ const tokenData = item.token || {};
28231
+ const balance = (ethers.BigNumber).from(item.value);
28232
+ const renamed = mapRename[tokenData.address] || {};
28233
+ const token = {
28234
+ ...tokenData,
28235
+ name: renamed.name ?? tokenData.name,
28236
+ symbol: renamed.symbol ?? tokenData.symbol,
28237
+ decimals: parseInt(tokenData.decimals, 10)
28238
+ };
28239
+ const formattedBalance = (ethers.utils).formatUnits(item.value, token.decimals);
28240
+ return {
28241
+ balance: balance,
28242
+ formattedBalance: formattedBalance,
28243
+ token: token
28244
+ };
28245
+ })
28246
+ };
28247
+ };
27569
28248
  const $1564e43dde50bb61$export$a3238cee431627c6 = async (config, web3Provider, walletAddress, tokens)=>{
27570
28249
  const allBalancePromises = [];
27571
28250
  tokens.forEach((token)=>{
@@ -27574,7 +28253,7 @@ const $1564e43dde50bb61$export$a3238cee431627c6 = async (config, web3Provider, w
27574
28253
  else allBalancePromises.push($1564e43dde50bb61$export$60e0fe116a0e6ed0(web3Provider, walletAddress, token.address));
27575
28254
  });
27576
28255
  const balanceResults = await Promise.allSettled(allBalancePromises);
27577
- const balances = balanceResults.filter((result)=>result.status === "fulfilled").map((fulfilledResult)=>fulfilledResult.value);
28256
+ const balances = balanceResults.filter((result)=>result.status === "fulfilled").map((result)=>result.value);
27578
28257
  return {
27579
28258
  balances: balances
27580
28259
  };
@@ -27584,6 +28263,20 @@ const $1564e43dde50bb61$export$fee49741664a4d7e = async (config, web3Provider, w
27584
28263
  type: ($08d5ddc39acd6833$export$fd9b17d87f4121d2).ALL,
27585
28264
  chainId: chainId
27586
28265
  });
28266
+ // In order to prevent unnecessary RPC calls
28267
+ // let's use the Indexer if available for the
28268
+ // given chain.
28269
+ let flag = false;
28270
+ try {
28271
+ flag = (await config.remote.getTokensConfig(chainId)).blockscout || flag;
28272
+ } catch (err) {
28273
+ // eslint-disable-next-line no-console
28274
+ console.error(err);
28275
+ }
28276
+ if (flag && ($fd8a8472dcc3ec2b$export$ef140a6b05dfc786).isChainSupported(chainId)) return await $1564e43dde50bb61$export$8c978679845804d4(walletAddress, chainId, tokens);
28277
+ // This fallback to use ERC20s calls which is a best effort solution
28278
+ // Fails in fetching data from the RCP calls might result in some
28279
+ // missing data.
27587
28280
  return await $1564e43dde50bb61$export$a3238cee431627c6(config, web3Provider, walletAddress, tokens);
27588
28281
  };
27589
28282
 
@@ -27882,10 +28575,10 @@ class $a492ee374ae7b613$export$d902b56530cd5f87 {
27882
28575
  if (!key) return config;
27883
28576
  return config[key];
27884
28577
  }
27885
- async getTokens(chainId) {
28578
+ async getTokensConfig(chainId) {
27886
28579
  const config = await this.loadConfigTokens();
27887
- if (!config) return [];
27888
- return config[chainId]?.allowed ?? [];
28580
+ if (!config || !config[chainId]) return {};
28581
+ return config[chainId] ?? [];
27889
28582
  }
27890
28583
  }
27891
28584
 
@@ -27919,6 +28612,9 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
27919
28612
  // Environment.DEVELOPMENT
27920
28613
  isDevelopment = false;
27921
28614
  isProduction;
28615
+ isOnRampEnabled;
28616
+ isSwapEnabled;
28617
+ isBridgeEnabled;
27922
28618
  remote;
27923
28619
  environment;
27924
28620
  networkMap;
@@ -27927,6 +28623,9 @@ class $4013c5c91bb535f6$export$4823433c4a67bbc6 {
27927
28623
  this.environment = config.baseConfig.environment;
27928
28624
  // Developer mode will super set any environment configuration
27929
28625
  this.isProduction = !this.isDevelopment && this.environment === (Environment$1).PRODUCTION;
28626
+ this.isOnRampEnabled = config.isOnRampEnabled ?? ($d85ad1457a3f1a83$export$72176e2233d7d5d);
28627
+ this.isSwapEnabled = config.isSwapEnabled ?? ($d85ad1457a3f1a83$export$566b5975cc83d6b4);
28628
+ this.isBridgeEnabled = config.isBridgeEnabled ?? ($d85ad1457a3f1a83$export$261cde2078dba35b);
27930
28629
  this.networkMap = $4013c5c91bb535f6$var$networkMap(this.isProduction, this.isDevelopment);
27931
28630
  this.remote = new ($a492ee374ae7b613$export$d902b56530cd5f87)({
27932
28631
  isDevelopment: this.isDevelopment,
@@ -28038,6 +28737,7 @@ async function $2e7bf45a7c9a9570$export$942c8de7174809fc(params, readOnlyProvide
28038
28737
 
28039
28738
 
28040
28739
 
28740
+
28041
28741
  const $ddc6bcd0896481e5$export$2fbfa41a4de56a89 = (erc20allowances, erc721allowances)=>{
28042
28742
  const aggregatedAllowances = [];
28043
28743
  if (!erc20allowances.sufficient) {
@@ -28208,7 +28908,9 @@ const $35c3fc7013888ba5$export$90366d6b714c6f69 = async (provider, ownerAddress,
28208
28908
  return await contract.isApprovedForAll(ownerAddress, spenderAddress);
28209
28909
  } catch (err) {
28210
28910
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to check approval for all ERC721s of collection", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
28211
- contractAddress: contractAddress
28911
+ ownerAddress: ownerAddress,
28912
+ contractAddress: contractAddress,
28913
+ spenderAddress: spenderAddress
28212
28914
  });
28213
28915
  }
28214
28916
  };
@@ -28220,7 +28922,10 @@ const $35c3fc7013888ba5$export$ebb2a35f2b4cf5f6 = async (provider, ownerAddress,
28220
28922
  return transaction;
28221
28923
  } catch (err) {
28222
28924
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to get the approval transaction for ERC721", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
28223
- contractAddress: contractAddress
28925
+ id: id.toString(),
28926
+ contractAddress: contractAddress,
28927
+ spenderAddress: spenderAddress,
28928
+ ownerAddress: ownerAddress
28224
28929
  });
28225
28930
  }
28226
28931
  };
@@ -28230,6 +28935,7 @@ const $35c3fc7013888ba5$export$c4605a8dd415eeea = async (provider, contractAddre
28230
28935
  return await contract.getApproved(id);
28231
28936
  } catch (err) {
28232
28937
  throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to get approved address for ERC721", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
28938
+ id: id.toString(),
28233
28939
  contractAddress: contractAddress
28234
28940
  });
28235
28941
  }
@@ -28656,27 +29362,185 @@ const $7d1bfafb81e64d74$export$3a4140bd9e983e4e = async (provider, insufficientI
28656
29362
  if (item.approvalTransaction === undefined) continue;
28657
29363
  estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, item.approvalTransaction));
28658
29364
  }
28659
- // If the transaction is a fulfilment transaction get the estimate gas promise
28660
- // Otherwise use the gas amount with the limit to estimate the gas
28661
- if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
28662
- else {
28663
- const feeData = await provider.getFeeData();
28664
- const gasPrice = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
28665
- if (gasPrice !== null) {
28666
- const gas = gasPrice?.mul(transactionOrGas.gasToken.limit);
28667
- if (gas) totalGas = totalGas.add(gas);
28668
- }
29365
+ // If the transaction is a fulfilment transaction get the estimate gas promise
29366
+ // Otherwise use the gas amount with the limit to estimate the gas
29367
+ if (transactionOrGas.type === ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION) estimateGasPromises.push($7d1bfafb81e64d74$export$e0580ae1f48db848(provider, transactionOrGas.transaction));
29368
+ else {
29369
+ const feeData = await provider.getFeeData();
29370
+ const gasPrice = ($dff2555fa96dda9a$export$aa28f3111c524ec5)(feeData);
29371
+ if (gasPrice !== null) {
29372
+ const gas = gasPrice?.mul(transactionOrGas.gasToken.limit);
29373
+ if (gas) totalGas = totalGas.add(gas);
29374
+ }
29375
+ }
29376
+ // Get the gas estimates for all the transactions and calculate the total gas
29377
+ const gasEstimatePromises = await Promise.all(estimateGasPromises);
29378
+ gasEstimatePromises.forEach((gasEstimate)=>{
29379
+ totalGas = totalGas.add(gasEstimate);
29380
+ });
29381
+ if (totalGas.eq(0)) return null;
29382
+ return $7d1bfafb81e64d74$export$c5e1b13f11e2e27f(totalGas, transactionOrGas);
29383
+ };
29384
+
29385
+
29386
+
29387
+
29388
+ const $1fda5c40669a566d$export$1fac8e857d728583 = async ()=>true;
29389
+ const $1fda5c40669a566d$export$2e83e9eeaf217e20 = async ()=>true;
29390
+
29391
+
29392
+ const $7f2e17f026d4fc8d$var$isPassportProvider = (provider)=>(provider.provider?.isPassport === true) ?? false;
29393
+ const $7f2e17f026d4fc8d$export$f1ca3744c025ab81 = async (config, provider)=>{
29394
+ const availableRoutingOptions = {
29395
+ onRamp: config.isOnRampEnabled,
29396
+ swap: config.isSwapEnabled,
29397
+ bridge: config.isBridgeEnabled
29398
+ };
29399
+ // Geo-blocking checks
29400
+ const geoBlockingChecks = [];
29401
+ if (availableRoutingOptions.onRamp) geoBlockingChecks.push({
29402
+ id: "onRamp",
29403
+ promise: ($1fda5c40669a566d$export$1fac8e857d728583)()
29404
+ });
29405
+ if (availableRoutingOptions.swap) geoBlockingChecks.push({
29406
+ id: "swap",
29407
+ promise: ($1fda5c40669a566d$export$2e83e9eeaf217e20)()
29408
+ });
29409
+ if (geoBlockingChecks.length > 0) {
29410
+ const promises = geoBlockingChecks.map((geoBlockingCheck)=>geoBlockingCheck.promise);
29411
+ const geoBlockingStatus = await Promise.allSettled(promises);
29412
+ geoBlockingStatus.forEach((result, index)=>{
29413
+ const statusId = geoBlockingChecks[index].id;
29414
+ availableRoutingOptions[statusId] = availableRoutingOptions[statusId] && result.status === "fulfilled" && !result.value;
29415
+ });
29416
+ }
29417
+ // Bridge not available if passport provider
29418
+ availableRoutingOptions.bridge = availableRoutingOptions.bridge && !$7f2e17f026d4fc8d$var$isPassportProvider(provider);
29419
+ return availableRoutingOptions;
29420
+ };
29421
+
29422
+
29423
+
29424
+
29425
+
29426
+
29427
+
29428
+
29429
+
29430
+ async function $0e0060cb42e136d2$export$339cb2be73677b30(config, existingReadOnlyProviders) {
29431
+ if (config.isProduction && existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM)) return existingReadOnlyProviders;
29432
+ if (existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).SEPOLIA)) return existingReadOnlyProviders;
29433
+ const readOnlyProviders = new Map();
29434
+ const allowedNetworks = await $de192de6ef100f9f$export$3043f6442a9ef563(config, {
29435
+ type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
29436
+ });
29437
+ allowedNetworks.networks.forEach((networkInfo)=>{
29438
+ const rpcUrl = config.networkMap.get(networkInfo.chainId)?.rpcUrls[0];
29439
+ const provider = new (providers.JsonRpcProvider)(rpcUrl);
29440
+ readOnlyProviders.set(networkInfo.chainId, provider);
29441
+ });
29442
+ return readOnlyProviders;
29443
+ }
29444
+
29445
+
29446
+
29447
+
29448
+ const $33acec7b4a26c053$export$23ddeb2642d2f9d = async (config, ownerAddress, availableRoutingOptions)=>{
29449
+ const chainBalances = new Map();
29450
+ const chainBalancePromises = new Map();
29451
+ let readOnlyProviders = new Map();
29452
+ let providerError;
29453
+ try {
29454
+ readOnlyProviders = await (0, $0e0060cb42e136d2$export$339cb2be73677b30)(config);
29455
+ } catch (error) {
29456
+ providerError = error;
29457
+ }
29458
+ if (readOnlyProviders.size === 0) {
29459
+ const noProviderResult = {
29460
+ success: false,
29461
+ error: providerError || new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Provider failed", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_ERROR),
29462
+ balances: []
29463
+ };
29464
+ chainBalances.set(($4013c5c91bb535f6$export$9b794d067cdd1af6)(config), noProviderResult);
29465
+ chainBalances.set(($4013c5c91bb535f6$export$c9af4e4b001c6476)(config), noProviderResult);
29466
+ return chainBalances;
29467
+ }
29468
+ // Only get L1 Balances if we can bridge
29469
+ if (availableRoutingOptions.bridge) {
29470
+ const chainId = ($4013c5c91bb535f6$export$9b794d067cdd1af6)(config);
29471
+ if (readOnlyProviders.has(chainId)) chainBalancePromises.set(chainId, ($1564e43dde50bb61$export$fee49741664a4d7e)(config, readOnlyProviders.get(chainId), ownerAddress, chainId));
29472
+ else chainBalances.set(($4013c5c91bb535f6$export$9b794d067cdd1af6)(config), {
29473
+ success: false,
29474
+ error: new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`No L1 provider available for ${chainId}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_ERROR),
29475
+ balances: []
29476
+ });
28669
29477
  }
28670
- // Get the gas estimates for all the transactions and calculate the total gas
28671
- const gasEstimatePromises = await Promise.all(estimateGasPromises);
28672
- gasEstimatePromises.forEach((gasEstimate)=>{
28673
- totalGas = totalGas.add(gasEstimate);
29478
+ const chainId = ($4013c5c91bb535f6$export$c9af4e4b001c6476)(config);
29479
+ if (readOnlyProviders.has(chainId)) chainBalancePromises.set(chainId, ($1564e43dde50bb61$export$fee49741664a4d7e)(config, readOnlyProviders.get(chainId), ownerAddress, chainId));
29480
+ else chainBalances.set(($4013c5c91bb535f6$export$c9af4e4b001c6476)(config), {
29481
+ success: false,
29482
+ error: new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`No L2 provider available for ${chainId}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PROVIDER_ERROR),
29483
+ balances: []
28674
29484
  });
28675
- if (totalGas.eq(0)) return null;
28676
- return $7d1bfafb81e64d74$export$c5e1b13f11e2e27f(totalGas, transactionOrGas);
29485
+ if (chainBalancePromises.size > 0) {
29486
+ const chainIds = Array.from(chainBalancePromises.keys());
29487
+ const balanceSettledResults = await Promise.allSettled(chainBalancePromises.values());
29488
+ balanceSettledResults.forEach((balanceSettledResult, index)=>{
29489
+ const balanceChainId = chainIds[index];
29490
+ if (balanceSettledResult.status === "fulfilled") chainBalances.set(balanceChainId, {
29491
+ success: true,
29492
+ balances: balanceSettledResult.value.balances
29493
+ });
29494
+ else chainBalances.set(balanceChainId, {
29495
+ success: false,
29496
+ error: new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error getting ${chainId} balances`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_BALANCE_ERROR),
29497
+ balances: []
29498
+ });
29499
+ });
29500
+ }
29501
+ return chainBalances;
28677
29502
  };
28678
29503
 
28679
29504
 
29505
+ const $c16168a9c28ae4fd$export$92606e71d0a264ff = async (config, ownerAddress, balanceRequirements, availableRoutingOptions)=>{
29506
+ // eslint-disable-next-line no-console
29507
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29508
+ await ($33acec7b4a26c053$export$23ddeb2642d2f9d)(config, ownerAddress, availableRoutingOptions);
29509
+ // Get allowed tokens?
29510
+ // Check bridging routes
29511
+ // Check on-ramp routes
29512
+ // Check swap routes
29513
+ // > Could bridge first
29514
+ // > Could on-ramp first
29515
+ // > Could double swap
29516
+ return {
29517
+ availableOptions: [],
29518
+ response: {
29519
+ type: "ROUTES_FOUND",
29520
+ message: "Routes found"
29521
+ },
29522
+ fundingRoutes: [
29523
+ {
29524
+ priority: 1,
29525
+ steps: [
29526
+ {
29527
+ type: "bridge",
29528
+ chainId: 1,
29529
+ asset: {
29530
+ balance: (ethers.BigNumber).from(0),
29531
+ formattedBalance: "0",
29532
+ token: {
29533
+ name: "ETH",
29534
+ symbol: "ETH",
29535
+ decimals: 18
29536
+ }
29537
+ }
29538
+ }
29539
+ ]
29540
+ }
29541
+ ]
29542
+ };
29543
+ };
28680
29544
 
28681
29545
 
28682
29546
  const $0e7419077c373b24$export$4a2a19d99fef3b1b = (balanceCheckResult)=>{
@@ -28709,12 +29573,123 @@ const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (config, provider, itemR
28709
29573
  aggregatedItems = ($074f75878f618031$export$c804c9ade5c28607)(aggregatedItems);
28710
29574
  }
28711
29575
  const balanceRequirements = await ($beb896e098e41faf$export$ddfc885f43c3cb6e)(config, provider, ownerAddress, aggregatedItems);
29576
+ // Determine which services are available
29577
+ const availableRoutingOptions = await ($7f2e17f026d4fc8d$export$f1ca3744c025ab81)(config, provider);
29578
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29579
+ await ($c16168a9c28ae4fd$export$92606e71d0a264ff)(config, ownerAddress, balanceRequirements, availableRoutingOptions);
28712
29580
  return $0e7419077c373b24$export$4a2a19d99fef3b1b(balanceRequirements);
28713
29581
  };
28714
29582
 
28715
29583
 
28716
29584
 
28717
29585
 
29586
+
29587
+ var $d855a5ba32004345$export$f51b97f3aaf2d5a8;
29588
+ (function(SignTransactionStatusType) {
29589
+ SignTransactionStatusType["SUCCESS"] = "SUCCESS";
29590
+ SignTransactionStatusType["FAILED"] = "FAILED";
29591
+ })($d855a5ba32004345$export$f51b97f3aaf2d5a8 || ($d855a5ba32004345$export$f51b97f3aaf2d5a8 = {}));
29592
+
29593
+
29594
+ const $25ac589234c10b67$export$19693ca396db083e = async (provider, approvalTransactions)=>{
29595
+ let receipts = [];
29596
+ try {
29597
+ const response = await Promise.all(approvalTransactions.map((transaction)=>provider.getSigner().sendTransaction(transaction)));
29598
+ receipts = await Promise.all(response.map((transaction)=>transaction.wait()));
29599
+ } catch (err) {
29600
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while executing the approval transaction", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).EXECUTE_APPROVAL_TRANSACTION_ERROR, {
29601
+ message: err.message
29602
+ });
29603
+ }
29604
+ for (const receipt of receipts){
29605
+ if (receipt.status === 0) return {
29606
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED,
29607
+ transactionHash: receipt.transactionHash,
29608
+ reason: "Approval transaction failed and was reverted"
29609
+ };
29610
+ }
29611
+ return {
29612
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).SUCCESS
29613
+ };
29614
+ };
29615
+ const $25ac589234c10b67$export$2161274619257102 = async (provider, fulfilmentTransactions)=>{
29616
+ let receipts = [];
29617
+ try {
29618
+ const response = await Promise.all(fulfilmentTransactions.map((transaction)=>provider.getSigner().sendTransaction(transaction)));
29619
+ receipts = await Promise.all(response.map((transaction)=>transaction.wait()));
29620
+ } catch (err) {
29621
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while executing the fulfilment transaction", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).EXECUTE_FULFILMENT_TRANSACTION_ERROR, {
29622
+ message: err.message
29623
+ });
29624
+ }
29625
+ for (const receipt of receipts){
29626
+ if (receipt.status === 0) return {
29627
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED,
29628
+ transactionHash: receipt.transactionHash,
29629
+ reason: "Fulfilment transaction failed and was reverted"
29630
+ };
29631
+ }
29632
+ return {
29633
+ type: ($d855a5ba32004345$export$f51b97f3aaf2d5a8).SUCCESS
29634
+ };
29635
+ };
29636
+ const $25ac589234c10b67$export$1d9a7a8a40780de = async (provider, unsignedMessage)=>{
29637
+ try {
29638
+ // eslint-disable-next-line no-underscore-dangle
29639
+ const signedMessage = await provider.getSigner()._signTypedData(unsignedMessage.unsignedMessage.domain, unsignedMessage.unsignedMessage.types, unsignedMessage.unsignedMessage.value);
29640
+ return {
29641
+ orderComponents: unsignedMessage.orderComponents,
29642
+ orderHash: unsignedMessage.orderHash,
29643
+ signedMessage: signedMessage
29644
+ };
29645
+ } catch (err) {
29646
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while signing the message", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).SIGN_MESSAGE_ERROR, {
29647
+ message: err.message
29648
+ });
29649
+ }
29650
+ };
29651
+
29652
+
29653
+
29654
+ const $a7367d01c6e76b1c$export$b087719c36e0f2dc = async (actions)=>{
29655
+ let approvalTransactions = [];
29656
+ let fulfilmentTransactions = [];
29657
+ const approvalPromises = [];
29658
+ const fulfilmentPromises = [];
29659
+ for (const action of actions){
29660
+ if (action.type !== (ActionType).TRANSACTION) continue;
29661
+ if (action.purpose === (TransactionPurpose).APPROVAL) approvalPromises.push(action.buildTransaction());
29662
+ if (action.purpose === (TransactionPurpose).FULFILL_ORDER) fulfilmentPromises.push(action.buildTransaction());
29663
+ }
29664
+ approvalTransactions = await Promise.all(approvalPromises);
29665
+ fulfilmentTransactions = await Promise.all(fulfilmentPromises);
29666
+ return {
29667
+ approvalTransactions: approvalTransactions,
29668
+ fulfilmentTransactions: fulfilmentTransactions
29669
+ };
29670
+ };
29671
+ const $a7367d01c6e76b1c$export$d62081fac18000c2 = (orderHash, orderComponents, actions)=>{
29672
+ let unsignedMessage;
29673
+ for (const action of actions){
29674
+ if (action.type !== (ActionType).SIGNABLE) continue;
29675
+ if (action.purpose === (SignablePurpose).CREATE_LISTING) unsignedMessage = {
29676
+ domain: action.message.domain,
29677
+ types: action.message.types,
29678
+ value: action.message.value
29679
+ };
29680
+ }
29681
+ if (!unsignedMessage) return undefined;
29682
+ return {
29683
+ orderHash: orderHash,
29684
+ orderComponents: orderComponents,
29685
+ unsignedMessage: unsignedMessage
29686
+ };
29687
+ };
29688
+
29689
+
29690
+
29691
+
29692
+
28718
29693
  const $64863c39386de592$export$4249179755829904 = (type, contractAddress, amount, spenderAddress)=>{
28719
29694
  switch(type){
28720
29695
  case ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20:
@@ -28732,17 +29707,10 @@ const $64863c39386de592$export$4249179755829904 = (type, contractAddress, amount
28732
29707
  };
28733
29708
  }
28734
29709
  };
28735
- const $64863c39386de592$export$e0cb3ec5326d496b = async (actions)=>{
28736
- for (const action of actions){
28737
- if (action.type === (ActionType).TRANSACTION && action.purpose === (TransactionPurpose).FULFILL_ORDER) // eslint-disable-next-line no-await-in-loop
28738
- return await action.buildTransaction();
28739
- }
28740
- return undefined;
28741
- };
28742
- const $64863c39386de592$export$8f2ff92ab8657f0b = (gasLimit, transaction)=>{
28743
- if (transaction) return {
29710
+ const $64863c39386de592$export$8f2ff92ab8657f0b = (gasLimit, unsignedTransactions)=>{
29711
+ if (unsignedTransactions.fulfilmentTransactions.length > 0) return {
28744
29712
  type: ($4b58188d47aafe8d$export$65c64e46348ee3c1).TRANSACTION,
28745
- transaction: transaction
29713
+ transaction: unsignedTransactions.fulfilmentTransactions[0]
28746
29714
  };
28747
29715
  return {
28748
29716
  type: ($4b58188d47aafe8d$export$65c64e46348ee3c1).GAS,
@@ -28768,12 +29736,18 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
28768
29736
  message: err.message
28769
29737
  });
28770
29738
  }
28771
- let unsignedTransaction;
29739
+ let unsignedTransactions = {
29740
+ approvalTransactions: [],
29741
+ fulfilmentTransactions: []
29742
+ };
28772
29743
  try {
28773
29744
  const fulfillerAddress = await provider.getSigner().getAddress();
28774
29745
  const { actions: actions } = await orderbook.fulfillOrder(orderId, fulfillerAddress);
28775
- unsignedTransaction = await $64863c39386de592$export$e0cb3ec5326d496b(actions);
28776
- } catch {}
29746
+ unsignedTransactions = await (0, $a7367d01c6e76b1c$export$b087719c36e0f2dc)(actions);
29747
+ } catch {
29748
+ // Silently ignore error as this is usually thrown if user does not have enough balance
29749
+ // todo: if balance error - can we determine if its the balance error otherwise throw?
29750
+ }
28777
29751
  let amount = (ethers.BigNumber).from("0");
28778
29752
  let type = ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE;
28779
29753
  let contractAddress = "";
@@ -28801,12 +29775,78 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
28801
29775
  const itemRequirements = [
28802
29776
  $64863c39386de592$export$4249179755829904(type, contractAddress, amount, spenderAddress)
28803
29777
  ];
28804
- await ($0e7419077c373b24$export$9e073f9ada8c81e6)(config, provider, itemRequirements, $64863c39386de592$export$8f2ff92ab8657f0b(gasLimit, unsignedTransaction));
29778
+ const smartCheckoutResult = await ($0e7419077c373b24$export$9e073f9ada8c81e6)(config, provider, itemRequirements, $64863c39386de592$export$8f2ff92ab8657f0b(gasLimit, unsignedTransactions));
29779
+ if (smartCheckoutResult.sufficient) {
29780
+ const approvalResult = await ($25ac589234c10b67$export$19693ca396db083e)(provider, unsignedTransactions.approvalTransactions);
29781
+ if (approvalResult.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29782
+ smartCheckoutResult: smartCheckoutResult,
29783
+ orderId: orderId,
29784
+ status: {
29785
+ type: ($aa144554f9ef124b$export$226b052ecb8ca80).FAILED,
29786
+ transactionHash: approvalResult.transactionHash,
29787
+ reason: approvalResult.reason
29788
+ }
29789
+ };
29790
+ const fulfilmentResult = await ($25ac589234c10b67$export$2161274619257102)(provider, unsignedTransactions.fulfilmentTransactions);
29791
+ if (fulfilmentResult.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29792
+ smartCheckoutResult: smartCheckoutResult,
29793
+ orderId: orderId,
29794
+ status: {
29795
+ type: ($aa144554f9ef124b$export$226b052ecb8ca80).FAILED,
29796
+ transactionHash: fulfilmentResult.transactionHash,
29797
+ reason: fulfilmentResult.reason
29798
+ }
29799
+ };
29800
+ return {
29801
+ smartCheckoutResult: smartCheckoutResult,
29802
+ orderId: orderId,
29803
+ status: {
29804
+ type: ($aa144554f9ef124b$export$226b052ecb8ca80).SUCCESS
29805
+ }
29806
+ };
29807
+ }
28805
29808
  return {
28806
- itemRequirements: itemRequirements,
28807
- gasToken: {
28808
- type: ($4b58188d47aafe8d$export$537fa3efd10ed435).NATIVE,
28809
- limit: (ethers.BigNumber).from(gasLimit)
29809
+ smartCheckoutResult: smartCheckoutResult,
29810
+ orderId: orderId
29811
+ };
29812
+ };
29813
+
29814
+
29815
+
29816
+
29817
+
29818
+
29819
+
29820
+
29821
+
29822
+ const $9c3db1bb9c8b69d3$export$70b61ad426ddbe54 = async (config, provider, orderId)=>{
29823
+ let unsignedCancelOrderTransaction;
29824
+ try {
29825
+ const offererAddress = await provider.getSigner().getAddress();
29826
+ const orderbook = await $67fc622a2b913d5f$export$c60ce6c6a92bc2ff(config);
29827
+ const cancelOrderResponse = await orderbook.cancelOrder(orderId, offererAddress);
29828
+ unsignedCancelOrderTransaction = cancelOrderResponse.unsignedCancelOrderTransaction;
29829
+ } catch (err) {
29830
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while cancelling the order listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CANCEL_ORDER_LISTING_ERROR, {
29831
+ orderId: orderId,
29832
+ message: err.message
29833
+ });
29834
+ }
29835
+ const result = await ($25ac589234c10b67$export$2161274619257102)(provider, [
29836
+ unsignedCancelOrderTransaction
29837
+ ]);
29838
+ if (result.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29839
+ orderId: orderId,
29840
+ status: {
29841
+ type: ($1e6b81bbd98b3a91$export$c0189a8c30039654).FAILED,
29842
+ transactionHash: result.transactionHash,
29843
+ reason: result.reason
29844
+ }
29845
+ };
29846
+ return {
29847
+ orderId: orderId,
29848
+ status: {
29849
+ type: ($1e6b81bbd98b3a91$export$c0189a8c30039654).SUCCESS
28810
29850
  }
28811
29851
  };
28812
29852
  };
@@ -28819,20 +29859,119 @@ const $64863c39386de592$export$7f8e2b98eca5a7f0 = async (config, provider, order
28819
29859
 
28820
29860
 
28821
29861
 
28822
- async function $0e0060cb42e136d2$export$339cb2be73677b30(config, existingReadOnlyProviders) {
28823
- if (config.isProduction && existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).ETHEREUM)) return existingReadOnlyProviders;
28824
- if (existingReadOnlyProviders?.has(($0472f23319457bfb$export$c06e1e7429de6283).SEPOLIA)) return existingReadOnlyProviders;
28825
- const readOnlyProviders = new Map();
28826
- const allowedNetworks = await $de192de6ef100f9f$export$3043f6442a9ef563(config, {
28827
- type: ($a47e48dd2c04791b$export$1f05a55fe0680cc7).ALL
29862
+
29863
+
29864
+
29865
+
29866
+ const $9085b221b72ac69e$export$af768ccdf17d5c04 = (id, contractAddress, spenderAddress)=>({
29867
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
29868
+ id: id,
29869
+ contractAddress: contractAddress,
29870
+ spenderAddress: spenderAddress
28828
29871
  });
28829
- allowedNetworks.networks.forEach((networkInfo)=>{
28830
- const rpcUrl = config.networkMap.get(networkInfo.chainId)?.rpcUrls[0];
28831
- const provider = new (providers.JsonRpcProvider)(rpcUrl);
28832
- readOnlyProviders.set(networkInfo.chainId, provider);
29872
+ const $9085b221b72ac69e$export$586d02673c66d423 = (buyToken)=>{
29873
+ if (buyToken.type === ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE) return {
29874
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).NATIVE,
29875
+ amount: buyToken.amount.toString()
29876
+ };
29877
+ return {
29878
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20,
29879
+ amount: buyToken.amount.toString(),
29880
+ contractAddress: buyToken.contractAddress
29881
+ };
29882
+ };
29883
+ const $9085b221b72ac69e$export$e761f9e0703de895 = async (config, provider, id, contractAddress, buyToken)=>{
29884
+ let orderbook;
29885
+ let listing;
29886
+ let spenderAddress = "";
29887
+ try {
29888
+ const walletAddress = await provider.getSigner().getAddress();
29889
+ orderbook = await $67fc622a2b913d5f$export$c60ce6c6a92bc2ff(config);
29890
+ const { seaportContractAddress: seaportContractAddress } = orderbook.config();
29891
+ spenderAddress = seaportContractAddress;
29892
+ listing = await orderbook.prepareListing({
29893
+ makerAddress: walletAddress,
29894
+ buy: $9085b221b72ac69e$export$586d02673c66d423(buyToken),
29895
+ sell: {
29896
+ type: (0, $4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
29897
+ contractAddress: contractAddress,
29898
+ tokenId: id
29899
+ }
29900
+ });
29901
+ } catch (err) {
29902
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while preparing the listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).PREPARE_ORDER_LISTING_ERROR, {
29903
+ message: err.message,
29904
+ id: id,
29905
+ collectionAddress: contractAddress
29906
+ });
29907
+ }
29908
+ const itemRequirements = [
29909
+ $9085b221b72ac69e$export$af768ccdf17d5c04(id, contractAddress, spenderAddress)
29910
+ ];
29911
+ const smartCheckoutResult = await ($0e7419077c373b24$export$9e073f9ada8c81e6)(config, provider, itemRequirements, {
29912
+ type: ($4b58188d47aafe8d$export$65c64e46348ee3c1).GAS,
29913
+ gasToken: {
29914
+ type: ($4b58188d47aafe8d$export$537fa3efd10ed435).NATIVE,
29915
+ limit: (ethers.BigNumber).from((constants).estimatedFulfillmentGasGwei)
29916
+ }
28833
29917
  });
28834
- return readOnlyProviders;
28835
- }
29918
+ if (smartCheckoutResult.sufficient) {
29919
+ const unsignedMessage = ($a7367d01c6e76b1c$export$d62081fac18000c2)(listing.orderHash, listing.orderComponents, listing.actions);
29920
+ if (!unsignedMessage) // For sell it is expected the orderbook will always return an unsigned message
29921
+ // If for some reason it is missing then we cannot proceed with the create listing
29922
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("The unsigned message is missing after preparing the listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).SIGN_MESSAGE_ERROR, {
29923
+ id: id,
29924
+ collectionAddress: contractAddress
29925
+ });
29926
+ const signedMessage = await ($25ac589234c10b67$export$1d9a7a8a40780de)(provider, unsignedMessage);
29927
+ const unsignedTransactions = await ($a7367d01c6e76b1c$export$b087719c36e0f2dc)(listing.actions);
29928
+ const approvalResult = await ($25ac589234c10b67$export$19693ca396db083e)(provider, unsignedTransactions.approvalTransactions);
29929
+ if (approvalResult.type === ($d855a5ba32004345$export$f51b97f3aaf2d5a8).FAILED) return {
29930
+ id: id,
29931
+ collectionAddress: contractAddress,
29932
+ smartCheckoutResult: smartCheckoutResult,
29933
+ status: {
29934
+ type: ($c2874b006e92b115$export$a9780122aaa0801a).FAILED,
29935
+ transactionHash: approvalResult.transactionHash,
29936
+ reason: approvalResult.reason
29937
+ }
29938
+ };
29939
+ let orderId = "";
29940
+ try {
29941
+ const order = await orderbook.createListing({
29942
+ orderComponents: signedMessage.orderComponents,
29943
+ orderHash: signedMessage.orderHash,
29944
+ orderSignature: signedMessage.signedMessage
29945
+ });
29946
+ orderId = order.result.id;
29947
+ } catch (err) {
29948
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("An error occurred while creating the listing", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).CREATE_ORDER_LISTING_ERROR, {
29949
+ message: err.message,
29950
+ id: id,
29951
+ collectionAddress: contractAddress
29952
+ });
29953
+ }
29954
+ return {
29955
+ id: id,
29956
+ collectionAddress: contractAddress,
29957
+ smartCheckoutResult: smartCheckoutResult,
29958
+ status: {
29959
+ type: ($c2874b006e92b115$export$a9780122aaa0801a).SUCCESS,
29960
+ orderId: orderId
29961
+ }
29962
+ };
29963
+ }
29964
+ return {
29965
+ id: id,
29966
+ collectionAddress: contractAddress,
29967
+ smartCheckoutResult: smartCheckoutResult
29968
+ };
29969
+ };
29970
+
29971
+
29972
+
29973
+
29974
+
28836
29975
 
28837
29976
 
28838
29977
  const $a8cb37a3fc8eb863$var$SANDBOX_CONFIGURATION = {
@@ -28963,6 +30102,26 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
28963
30102
  await $64863c39386de592$export$7f8e2b98eca5a7f0(this.config, web3Provider, params.orderId);
28964
30103
  }
28965
30104
  /**
30105
+ * Determines the requirements for performing a sell.
30106
+ * @param {SellParams} params - The parameters for the sell.
30107
+ */ async sell(params) {
30108
+ if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
30109
+ // eslint-disable-next-line no-console
30110
+ console.warn("This endpoint is currently under construction.");
30111
+ const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
30112
+ await $9085b221b72ac69e$export$e761f9e0703de895(this.config, web3Provider, params.id, params.collectionAddress, params.buyToken);
30113
+ }
30114
+ /**
30115
+ * Cancels a sell.
30116
+ * @param {CancelParams} params - The parameters for the cancel.
30117
+ */ async cancel(params) {
30118
+ if (this.config.isProduction) throw new Error("This endpoint is not currently available.");
30119
+ // eslint-disable-next-line no-console
30120
+ console.warn("This endpoint is currently under construction.");
30121
+ const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
30122
+ await $9c3db1bb9c8b69d3$export$70b61ad426ddbe54(this.config, web3Provider, params.orderId);
30123
+ }
30124
+ /**
28966
30125
  * Determines the transaction requirements to complete a purchase.
28967
30126
  * @params {SmartCheckoutParams} params - The parameters for smart checkout.
28968
30127
  */ async smartCheckout(params) {
@@ -28970,6 +30129,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
28970
30129
  // eslint-disable-next-line no-console
28971
30130
  console.warn("This endpoint is currently under construction.");
28972
30131
  const web3Provider = await $bb88265fe45a0393$export$9e1fd9cc88c637a0(this.config, params.provider);
30132
+ // console.log('Smart Checkout Params ::', params);
28973
30133
  await $0e7419077c373b24$export$9e073f9ada8c81e6(this.config, web3Provider, params.itemRequirements, params.transactionOrGasAmount);
28974
30134
  }
28975
30135
  /**
@@ -29009,7 +30169,7 @@ var checkout_sdk = /*#__PURE__*/Object.freeze({
29009
30169
  function $parcel$export(e, n, v, s) {
29010
30170
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
29011
30171
  }
29012
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.0.0";
30172
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.17.1";
29013
30173
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
29014
30174
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
29015
30175
 
@@ -29786,34 +30946,65 @@ const _abi$2 = [
29786
30946
  },
29787
30947
  {
29788
30948
  inputs: [],
29789
- name: "IImmutableERC721MismatchedTransferLengths",
30949
+ name: "IImmutableERC721MismatchedTransferLengths",
30950
+ type: "error",
30951
+ },
30952
+ {
30953
+ inputs: [
30954
+ {
30955
+ internalType: "uint256",
30956
+ name: "tokenId",
30957
+ type: "uint256",
30958
+ },
30959
+ ],
30960
+ name: "IImmutableERC721NotOwnerOrOperator",
30961
+ type: "error",
30962
+ },
30963
+ {
30964
+ inputs: [],
30965
+ name: "IImmutableERC721SendingToZerothAddress",
30966
+ type: "error",
30967
+ },
30968
+ {
30969
+ inputs: [
30970
+ {
30971
+ internalType: "uint256",
30972
+ name: "tokenId",
30973
+ type: "uint256",
30974
+ },
30975
+ ],
30976
+ name: "IImmutableERC721TokenAlreadyBurned",
30977
+ type: "error",
30978
+ },
30979
+ {
30980
+ inputs: [],
30981
+ name: "InvalidShortString",
30982
+ type: "error",
30983
+ },
30984
+ {
30985
+ inputs: [],
30986
+ name: "InvalidSignature",
29790
30987
  type: "error",
29791
30988
  },
29792
30989
  {
29793
- inputs: [
29794
- {
29795
- internalType: "uint256",
29796
- name: "tokenId",
29797
- type: "uint256",
29798
- },
29799
- ],
29800
- name: "IImmutableERC721NotOwnerOrOperator",
30990
+ inputs: [],
30991
+ name: "PermitExpired",
29801
30992
  type: "error",
29802
30993
  },
29803
30994
  {
29804
30995
  inputs: [],
29805
- name: "IImmutableERC721SendingToZerothAddress",
30996
+ name: "SignerCannotBeZerothAddress",
29806
30997
  type: "error",
29807
30998
  },
29808
30999
  {
29809
31000
  inputs: [
29810
31001
  {
29811
- internalType: "uint256",
29812
- name: "tokenId",
29813
- type: "uint256",
31002
+ internalType: "string",
31003
+ name: "str",
31004
+ type: "string",
29814
31005
  },
29815
31006
  ],
29816
- name: "IImmutableERC721TokenAlreadyBurned",
31007
+ name: "StringTooLong",
29817
31008
  type: "error",
29818
31009
  },
29819
31010
  {
@@ -29888,6 +31079,12 @@ const _abi$2 = [
29888
31079
  name: "ApprovalForAll",
29889
31080
  type: "event",
29890
31081
  },
31082
+ {
31083
+ anonymous: false,
31084
+ inputs: [],
31085
+ name: "EIP712DomainChanged",
31086
+ type: "event",
31087
+ },
29891
31088
  {
29892
31089
  anonymous: false,
29893
31090
  inputs: [
@@ -30020,6 +31217,19 @@ const _abi$2 = [
30020
31217
  stateMutability: "view",
30021
31218
  type: "function",
30022
31219
  },
31220
+ {
31221
+ inputs: [],
31222
+ name: "DOMAIN_SEPARATOR",
31223
+ outputs: [
31224
+ {
31225
+ internalType: "bytes32",
31226
+ name: "",
31227
+ type: "bytes32",
31228
+ },
31229
+ ],
31230
+ stateMutability: "view",
31231
+ type: "function",
31232
+ },
30023
31233
  {
30024
31234
  inputs: [],
30025
31235
  name: "MINTER_ROLE",
@@ -30135,6 +31345,49 @@ const _abi$2 = [
30135
31345
  stateMutability: "view",
30136
31346
  type: "function",
30137
31347
  },
31348
+ {
31349
+ inputs: [],
31350
+ name: "eip712Domain",
31351
+ outputs: [
31352
+ {
31353
+ internalType: "bytes1",
31354
+ name: "fields",
31355
+ type: "bytes1",
31356
+ },
31357
+ {
31358
+ internalType: "string",
31359
+ name: "name",
31360
+ type: "string",
31361
+ },
31362
+ {
31363
+ internalType: "string",
31364
+ name: "version",
31365
+ type: "string",
31366
+ },
31367
+ {
31368
+ internalType: "uint256",
31369
+ name: "chainId",
31370
+ type: "uint256",
31371
+ },
31372
+ {
31373
+ internalType: "address",
31374
+ name: "verifyingContract",
31375
+ type: "address",
31376
+ },
31377
+ {
31378
+ internalType: "bytes32",
31379
+ name: "salt",
31380
+ type: "bytes32",
31381
+ },
31382
+ {
31383
+ internalType: "uint256[]",
31384
+ name: "extensions",
31385
+ type: "uint256[]",
31386
+ },
31387
+ ],
31388
+ stateMutability: "view",
31389
+ type: "function",
31390
+ },
30138
31391
  {
30139
31392
  inputs: [
30140
31393
  {
@@ -30426,6 +31679,25 @@ const _abi$2 = [
30426
31679
  stateMutability: "view",
30427
31680
  type: "function",
30428
31681
  },
31682
+ {
31683
+ inputs: [
31684
+ {
31685
+ internalType: "uint256",
31686
+ name: "tokenId",
31687
+ type: "uint256",
31688
+ },
31689
+ ],
31690
+ name: "nonces",
31691
+ outputs: [
31692
+ {
31693
+ internalType: "uint256",
31694
+ name: "",
31695
+ type: "uint256",
31696
+ },
31697
+ ],
31698
+ stateMutability: "view",
31699
+ type: "function",
31700
+ },
30429
31701
  {
30430
31702
  inputs: [],
30431
31703
  name: "operatorAllowlist",
@@ -30458,6 +31730,34 @@ const _abi$2 = [
30458
31730
  stateMutability: "view",
30459
31731
  type: "function",
30460
31732
  },
31733
+ {
31734
+ inputs: [
31735
+ {
31736
+ internalType: "address",
31737
+ name: "spender",
31738
+ type: "address",
31739
+ },
31740
+ {
31741
+ internalType: "uint256",
31742
+ name: "tokenId",
31743
+ type: "uint256",
31744
+ },
31745
+ {
31746
+ internalType: "uint256",
31747
+ name: "deadline",
31748
+ type: "uint256",
31749
+ },
31750
+ {
31751
+ internalType: "bytes",
31752
+ name: "sig",
31753
+ type: "bytes",
31754
+ },
31755
+ ],
31756
+ name: "permit",
31757
+ outputs: [],
31758
+ stateMutability: "nonpayable",
31759
+ type: "function",
31760
+ },
30461
31761
  {
30462
31762
  inputs: [
30463
31763
  {
@@ -30955,7 +32255,7 @@ const _abi$2 = [
30955
32255
  type: "function",
30956
32256
  },
30957
32257
  ];
30958
- const _bytecode$2 = "0x608060405260006013553480156200001657600080fd5b50604051620052f1380380620052f18339810160408190526200003991620007cd565b8787878787878787868681818181600662000055838262000960565b50600762000064828262000960565b50506801000000000000000060095550600d62000082838262000960565b50600e62000091828262000960565b50620000a69350600092508b915050620000f1565b620000b2828262000134565b620000bd8362000239565b6016620000cb868262000960565b506015620000da858262000960565b505050505050505050505050505050505062000b74565b6200010882826200025560201b620011e11760201c565b60008281526001602090815260409091206200012f91839062001265620002f5821b17901c565b505050565b6127106001600160601b0382161115620001a85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002005760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016200019f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000620002468162000315565b620002518262000324565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000251576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002b13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200030c836001600160a01b0384166200041d565b90505b92915050565b6200032181336200046f565b50565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa15801562000370573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000396919062000a2c565b620003b45760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600081815260018301602052604081205462000466575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200030f565b5060006200030f565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200025157620004ae81620004ff60201b6200127a1760201c565b620004c48360206200128c62000512821b17811c565b604051602001620004d792919062000a50565b60408051601f198184030181529082905262461bcd60e51b82526200019f9160040162000ac9565b60606200030f6001600160a01b03831660145b606060006200052383600262000b14565b6200053090600262000b2e565b6001600160401b038111156200054a576200054a620006e8565b6040519080825280601f01601f19166020018201604052801562000575576020820181803683370190505b509050600360fc1b8160008151811062000593576200059362000b44565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620005c557620005c562000b44565b60200101906001600160f81b031916908160001a9053506000620005eb84600262000b14565b620005f890600162000b2e565b90505b60018111156200067a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000630576200063062000b44565b1a60f81b82828151811062000649576200064962000b44565b60200101906001600160f81b031916908160001a90535060049490941c93620006728162000b5a565b9050620005fb565b5083156200030c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200019f565b80516001600160a01b0381168114620006e357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200071b57818101518382015260200162000701565b50506000910152565b600082601f8301126200073657600080fd5b81516001600160401b0380821115620007535762000753620006e8565b604051601f8301601f19908116603f011681019082821181831017156200077e576200077e620006e8565b816040528381528660208588010111156200079857600080fd5b620007ab846020830160208901620006fe565b9695505050505050565b80516001600160601b0381168114620006e357600080fd5b600080600080600080600080610100898b031215620007eb57600080fd5b620007f689620006cb565b60208a01519098506001600160401b03808211156200081457600080fd5b620008228c838d0162000724565b985060408b01519150808211156200083957600080fd5b620008478c838d0162000724565b975060608b01519150808211156200085e57600080fd5b6200086c8c838d0162000724565b965060808b01519150808211156200088357600080fd5b50620008928b828c0162000724565b945050620008a360a08a01620006cb565b9250620008b360c08a01620006cb565b9150620008c360e08a01620007b5565b90509295985092959890939650565b600181811c90821680620008e757607f821691505b6020821081036200090857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200012f57600081815260208120601f850160051c81016020861015620009375750805b601f850160051c820191505b81811015620009585782815560010162000943565b505050505050565b81516001600160401b038111156200097c576200097c620006e8565b62000994816200098d8454620008d2565b846200090e565b602080601f831160018114620009cc5760008415620009b35750858301515b600019600386901b1c1916600185901b17855562000958565b600085815260208120601f198616915b82811015620009fd57888601518255948401946001909101908401620009dc565b508582101562000a1c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121562000a3f57600080fd5b815180151581146200030c57600080fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000a8a816017850160208801620006fe565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162000abd816028840160208801620006fe565b01602801949350505050565b602081526000825180602084015262000aea816040850160208701620006fe565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176200030f576200030f62000afe565b808201808211156200030f576200030f62000afe565b634e487b7160e01b600052603260045260246000fd5b60008162000b6c5762000b6c62000afe565b506000190190565b61476d8062000b846000396000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c806369e2f0fb1161019d578063a22cb465116100e9578063d547741f116100a2578063e4e18f6d1161007c578063e4e18f6d146106af578063e8a3d485146106c2578063e985e9c5146106ca578063eea98768146106dd57600080fd5b8063d547741f14610676578063e192785914610689578063e4623c1b1461069c57600080fd5b8063a22cb46514610602578063a701281614610615578063b88d4fde14610628578063c87b56dd1461063b578063ca15c8731461064e578063d53913931461066157600080fd5b806391d14854116101565780639e2641a3116101305780639e2641a3146105c15780639f15d700146105d4578063a1448194146105e7578063a217fddf146105fa57600080fd5b806391d1485414610593578063938e3d7b146105a657806395d89b41146105b957600080fd5b806369e2f0fb1461052c5780636c0360eb1461053f57806370a082311461054757806374f16a811461055a578063885e7a081461056d5780639010d07c1461058057600080fd5b80632d2c5a8b1161025c57806342842e0e116102155780634f558e79116101ef5780634f558e79146104e057806355f804b3146104f3578063567e4075146105065780636352211e1461051957600080fd5b806342842e0e146104a757806342966c68146104ba578063439aed34146104cd57600080fd5b80632d2c5a8b146104335780632f2ff15d1461044657806331ae450b1461045957806336568abe1461046e5780633dd1eb611461048157806340c10f191461049457600080fd5b80631f8ebbd1116102ae5780631f8ebbd11461039b578063234af046146103a557806323b872dd146103b8578063248a9ca3146103cb57806329326f29146103ee5780632a55205a1461040157600080fd5b80628ad946146102f557806301ffc9a71461030a57806306fdde0314610332578063081812fc14610347578063095ea7b31461037257806318160ddd14610385575b600080fd5b61030861030336600461391b565b6106f0565b005b61031d61031836600461396b565b6107c6565b60405190151581526020015b60405180910390f35b61033a6107d7565b60405161032991906139d8565b61035a6103553660046139eb565b6107e6565b6040516001600160a01b039091168152602001610329565b610308610380366004613a1b565b610806565b61038d610961565b604051908152602001610329565b600160401b61038d565b6103086103b3366004613be7565b610978565b6103086103c6366004613c2f565b610999565b61038d6103d93660046139eb565b60009081526020819052604090206001015490565b60025461035a906001600160a01b031681565b61041461040f366004613c6b565b6109bb565b604080516001600160a01b039093168352602083019190915201610329565b610308610441366004613c8d565b610a69565b610308610454366004613d49565b610a8a565b610461610aaf565b6040516103299190613d75565b61030861047c366004613d49565b610b5d565b61030861048f366004613dc2565b610bd7565b6103086104a2366004613a1b565b610bfa565b6103086104b5366004613c2f565b610c1c565b6103086104c83660046139eb565b610c37565b6103086104db366004613df4565b610c6e565b61031d6104ee3660046139eb565b610c97565b610308610501366004613e87565b610ca2565b610308610514366004613a1b565b610cb9565b61035a6105273660046139eb565b610cdb565b61030861053a366004613dc2565b610cfb565b61033a610d1e565b61038d610555366004613dc2565b610dac565b610308610568366004613be7565b610dca565b61030861057b366004613ecf565b610dd3565b61035a61058e366004613c6b565b610de8565b61031d6105a1366004613d49565b610e07565b6103086105b4366004613e87565b610e30565b61033a610e47565b6103086105cf366004613be7565b610e51565b6103086105e2366004613a1b565b610e72565b6103086105f5366004613a1b565b610ecc565b61038d600081565b610308610610366004613f07565b610eee565b610308610623366004613f82565b61103f565b610308610636366004613fe6565b61109f565b61033a6106493660046139eb565b6110c8565b61038d61065c3660046139eb565b6110d3565b61038d6a4d494e5445525f524f4c4560a81b81565b610308610684366004613d49565b6110ea565b610308610697366004613c8d565b61110f565b6103086106aa366004614061565b611130565b6103086106bd366004613dc2565b61116e565b61033a611182565b61031d6106d83660046140a2565b61118f565b6103086106eb366004613a1b565b6111bf565b6106fd60208201826140cc565b905061070c60408301836140cc565b90501461072c5760405163359a1bc360e01b815260040160405180910390fd5b60005b61073c60408301836140cc565b90508110156107c2576107b06107556020840184613dc2565b61076260208501856140cc565b8481811061077257610772614115565b90506020020160208101906107879190613dc2565b61079460408601866140cc565b858181106107a4576107a4614115565b90506020020135610c1c565b806107ba81614141565b91505061072f565b5050565b60006107d182611427565b92915050565b60606107e1611432565b905090565b6000600160401b8210156107fd576107d1826114c4565b6107d1826114eb565b81333b1580159061088057506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561085a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087e919061415a565b155b156108a55760405163f6fa4cbd60e01b81523360048201526024015b60405180910390fd5b6001600160a01b0381163b1580159061092957506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015610903573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610927919061415a565b155b15610952576040516341b8d58160e11b81526001600160a01b038216600482015260240161089c565b61095c8383611576565b505050565b600060135461096e611596565b6107e19190614177565b6a4d494e5445525f524f4c4560a81b610990816115b2565b6107c2826115bc565b600160401b8110156109b05761095c83838361160b565b61095c83838361163b565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a305750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a4f906001600160601b03168761418a565b610a5991906141a1565b91519350909150505b9250929050565b6a4d494e5445525f524f4c4560a81b610a81816115b2565b6107c282611660565b600082815260208190526040902060010154610aa5816115b2565b61095c83836116af565b60606000610abc816110d3565b90506000816001600160401b03811115610ad857610ad8613a45565b604051908082528060200260200182016040528015610b01578160200160208202803683370190505b50905060005b82811015610b5657610b1a600082610de8565b828281518110610b2c57610b2c614115565b6001600160a01b039092166020928302919091019091015280610b4e81614141565b915050610b07565b5092915050565b6001600160a01b0381163314610bcd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161089c565b6107c282826116d1565b6000610be2816115b2565b6107c26a4d494e5445525f524f4c4560a81b83610a8a565b6a4d494e5445525f524f4c4560a81b610c12816115b2565b61095c83836116f3565b61095c8383836040518060200160405280600081525061109f565b610c42335b8261177a565b610c6257604051630247e3a960e01b81526004810182905260240161089c565b610c6b816117a3565b50565b6a4d494e5445525f524f4c4560a81b610c86816115b2565b610c918484846117f6565b50505050565b60006107d1826118c1565b6000610cad816115b2565b601661095c8382614243565b6a4d494e5445525f524f4c4560a81b610cd1816115b2565b61095c838361191e565b6000600160401b821015610cf2576107d182611928565b6107d182611988565b6000610d06816115b2565b6107c26a4d494e5445525f524f4c4560a81b836110ea565b60168054610d2b906141c3565b80601f0160208091040260200160405190810160405280929190818152602001828054610d57906141c3565b8015610da45780601f10610d7957610100808354040283529160200191610da4565b820191906000526020600020905b815481529060010190602001808311610d8757829003601f168201915b505050505081565b6000610db78261199c565b610dc083611a67565b6107d19190614177565b610c6b81611aed565b6000610dde816115b2565b61095c8383611b79565b6000828152600160205260408120610e009083611c33565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610e3b816115b2565b601561095c8382614243565b60606107e1611c3f565b6a4d494e5445525f524f4c4560a81b610e69816115b2565b6107c282611c4e565b6000610e7d82610cdb565b9050826001600160a01b0316816001600160a01b031614610ec357604051634fefd56160e01b8152600481018390526001600160a01b038216602482015260440161089c565b61095c82610c37565b6a4d494e5445525f524f4c4560a81b610ee4816115b2565b61095c8383611c9d565b81333b15801590610f6857506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015610f42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f66919061415a565b155b15610f885760405163f6fa4cbd60e01b815233600482015260240161089c565b6001600160a01b0381163b1580159061100c57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015610fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100a919061415a565b155b15611035576040516341b8d58160e11b81526001600160a01b038216600482015260240161089c565b61095c8383611d0b565b6a4d494e5445525f524f4c4560a81b611057816115b2565b60005b848110156110975761108586868381811061107757611077614115565b9050602002013585856117f6565b8061108f81614141565b91505061105a565b505050505050565b600160401b8210156110bc576110b784848484611d15565b610c91565b610c9184848484611d48565b60606107d182611d6d565b60008181526001602052604081206107d190611dd3565b600082815260208190526040902060010154611105816115b2565b61095c83836116d1565b6a4d494e5445525f524f4c4560a81b611127816115b2565b6107c282611ddd565b60005b8181101561095c5761115c83838381811061115057611150614115565b90506020020135610c37565b8061116681614141565b915050611133565b6000611179816115b2565b6107c282611e2c565b60158054610d2b906141c3565b6001600160a01b03808316600090815260126020908152604080832093851683529290529081205460ff16610e00565b6a4d494e5445525f524f4c4560a81b6111d7816115b2565b61095c8383611f21565b6111eb8282610e07565b6107c2576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556112213390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610e00836001600160a01b038416611f2b565b60606107d16001600160a01b03831660145b6060600061129b83600261418a565b6112a6906002614177565b6001600160401b038111156112bd576112bd613a45565b6040519080825280601f01601f1916602001820160405280156112e7576020820181803683370190505b509050600360fc1b8160008151811061130257611302614115565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061133157611331614115565b60200101906001600160f81b031916908160001a905350600061135584600261418a565b611360906001614177565b90505b60018111156113d8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061139457611394614115565b1a60f81b8282815181106113aa576113aa614115565b60200101906001600160f81b031916908160001a90535060049490941c936113d181614302565b9050611363565b508315610e005760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161089c565b60006107d182611f7a565b6060600d8054611441906141c3565b80601f016020809104026020016040519081016040528092919081815260200182805461146d906141c3565b80156114ba5780601f1061148f576101008083540402835291602001916114ba565b820191906000526020600020905b81548152906001019060200180831161149d57829003601f168201915b5050505050905090565b60006114cf82611fba565b506000908152601160205260409020546001600160a01b031690565b60006114f6826118c1565b61155a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161089c565b506000908152600a60205260409020546001600160a01b031690565b600160401b81101561158c576107c2828261200a565b6107c2828261211a565b60006115a0612222565b6115a861228c565b6107e19190614319565b610c6b81336122a0565b60005b81518110156107c25760008282815181106115dc576115dc614115565b602002602001015190506115f8816000015182602001516122f9565b508061160381614141565b9150506115bf565b61161433610c3c565b6116305760405162461bcd60e51b815260040161089c9061432c565b61095c83838361233a565b61164433610c3c565b6116305760405162461bcd60e51b815260040161089c90614379565b60005b81518110156107c257600082828151811061168057611680614115565b6020026020010151905061169c8160000151826020015161191e565b50806116a781614141565b915050611663565b6116b982826111e1565b600082815260016020526040902061095c9082611265565b6116db8282612541565b600082815260016020526040902061095c90826125a6565b600160401b811061171a5760405163b73c99f560e01b81526004810182905260240161089c565b600881901c600090815260146020526040902054600160ff83161b1615611757576040516305dcda1160e51b81526004810182905260240161089c565b61176182826125bb565b6013805490600061177183614141565b91905055505050565b6000600160401b821015611799576117928383612716565b90506107d1565b610e008383612775565b600160401b8110156117ed576117b88161283a565b600881901c60009081526014602052604081208054600160ff85161b17905560138054916117e583614302565b919050555050565b610c6b816128bd565b6127106001600160601b03821611156118215760405162461bcd60e51b815260040161089c906143cd565b6001600160a01b0382166118775760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d65746572730000000000604482015260640161089c565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6000600160401b821015611915576000828152600f60205260409020546001600160a01b0316158015906107d15750600882901c600090815260146020526040902054600160ff84161b1615151592915050565b6107d1826128ff565b6107c28282612934565b6000818152600f60205260408120546001600160a01b0316806107d15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161089c565b6000806119948361294e565b509392505050565b60006001600160a01b038216611a0a5760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b606482015260840161089c565b6000600160401b5b600954811015610b5657611a25816118c1565b15611a5757611a3381610cdb565b6001600160a01b0316846001600160a01b031603611a5757611a5482614141565b91505b611a6081614141565b9050611a12565b60006001600160a01b038216611ad15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161089c565b506001600160a01b031660009081526010602052604090205490565b60005b81518110156107c2576000828281518110611b0d57611b0d614115565b6020026020010151905060005b816020015151811015611b6457611b52826000015183602001518381518110611b4557611b45614115565b6020026020010151610e72565b80611b5c81614141565b915050611b1a565b50508080611b7190614141565b915050611af0565b6127106001600160601b0382161115611ba45760405162461bcd60e51b815260040161089c906143cd565b6001600160a01b038216611bfa5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640161089c565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000610e0083836129e5565b6060600e8054611441906141c3565b60005b81518110156107c2576000828281518110611c6e57611c6e614115565b60200260200101519050611c8a81600001518260200151612a0f565b5080611c9581614141565b915050611c51565b600160401b8110611cc45760405163b73c99f560e01b81526004810182905260240161089c565b600881901c600090815260146020526040902054600160ff83161b1615611d01576040516305dcda1160e51b81526004810182905260240161089c565b6117618282612a50565b6107c28282612a6a565b611d20335b8361177a565b611d3c5760405162461bcd60e51b815260040161089c9061432c565b610c9184848484612a75565b611d5133611d1a565b611d3c5760405162461bcd60e51b815260040161089c90614379565b6060611d7882611fba565b6000611d82612a99565b90506000815111611da25760405180602001604052806000815250610e00565b80611dac84612aa8565b604051602001611dbd929190614417565b6040516020818303038152906040529392505050565b60006107d1825490565b60005b81518110156107c2576000828281518110611dfd57611dfd614115565b60200260200101519050611e1981600001518260200151611f21565b5080611e2481614141565b915050611de0565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9b919061415a565b611eb85760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6107c28282612b3a565b6000818152600183016020526040812054611f72575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107d1565b5060006107d1565b60006001600160e01b031982166380ac58cd60e01b1480611fab57506001600160e01b03198216635b5e139f60e01b145b806107d157506107d182612cb3565b611fc3816118c1565b610c6b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161089c565b600061201582611928565b9050806001600160a01b0316836001600160a01b0316036120825760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161089c565b336001600160a01b038216148061209e575061209e813361118f565b6121105760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161089c565b61095c8383612cf3565b600061212582610cdb565b9050806001600160a01b0316836001600160a01b0316036121945760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b606482015260840161089c565b336001600160a01b03821614806121b057506121b0813361118f565b6121105760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c0000000000606482015260840161089c565b6009546000906701000000000000009082906122429060081c6001614177565b9050815b81811015612286576000818152600c602052604090205461226681612d13565b6122709086614177565b945050808061227e90614141565b915050612246565b50505090565b6000600160401b6009546107e19190614319565b6122aa8282610e07565b6107c2576122b78161127a565b6122c283602061128c565b6040516020016122d3929190614446565b60408051601f198184030181529082905262461bcd60e51b825261089c916004016139d8565b60005b815181101561095c576123288383838151811061231b5761231b614115565b6020026020010151611c9d565b8061233281614141565b9150506122fc565b82823332148015906123b557506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561238f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123b3919061415a565b155b156123d55760405163937db65f60e01b815233600482015260240161089c565b6001600160a01b0382163b1580159061245957506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa158015612433573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612457919061415a565b155b156124825760405163f934453160e01b81526001600160a01b038316600482015260240161089c565b6001600160a01b0381163b1580159061250657506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa1580156124e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612504919061415a565b155b1561252f57604051632a67242160e11b81526001600160a01b038216600482015260240161089c565b61253a858585612d32565b5050505050565b61254b8282610e07565b156107c2576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e00836001600160a01b038416612d54565b6001600160a01b0382166126115760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161089c565b61261a816118c1565b156126675760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161089c565b612670816118c1565b156126bd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161089c565b6001600160a01b038216600081815260106020908152604080832080546001019055848352600f90915280822080546001600160a01b031916841790555183929190600080516020614618833981519152908290a45050565b60008061272283611928565b9050806001600160a01b0316846001600160a01b031614806127495750612749818561118f565b8061276d5750836001600160a01b0316612762846107e6565b6001600160a01b0316145b949350505050565b6000612780826118c1565b6127e45760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161089c565b60006127ef83610cdb565b9050806001600160a01b0316846001600160a01b0316148061282a5750836001600160a01b031661281f846107e6565b6001600160a01b0316145b8061276d575061276d818561118f565b600061284582611928565b905061285082611928565b600083815260116020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552601084528285208054600019019055878552600f90935281842080549091169055519293508492600080516020614618833981519152908390a45050565b60006128c882610cdb565b90506128d5600c83612e47565b60405182906000906001600160a01b03841690600080516020614618833981519152908390a45050565b600881901c6000908152600c6020526040812054600160ff1b60ff84161c161561292b57506000919050565b6107d182612e73565b6107c2828260405180602001604052806000815250612e92565b60008061295a836118c1565b6129bb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161089c565b6129c483612ed3565b6000818152600860205260409020546001600160a01b031694909350915050565b60008260000182815481106129fc576129fc614115565b9060005260206000200154905092915050565b60005b815181101561095c57612a3e83838381518110612a3157612a31614115565b60200260200101516116f3565b80612a4881614141565b915050612a12565b6107c2828260405180602001604052806000815250612ee0565b6107c2338383612eeb565b600160401b821015612a8d576110b784848484612fb9565b610c9184848484612fec565b606060168054611441906141c3565b60606000612ab583613005565b60010190506000816001600160401b03811115612ad457612ad4613a45565b6040519080825280601f01601f191660200182016040528015612afe576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612b0857509392505050565b6000612b4560095490565b905060008211612ba55760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b606482015260840161089c565b6001600160a01b038316612c075760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b606482015260840161089c565b8160096000828254612c199190614177565b9091555050600081815260086020526040902080546001600160a01b0319166001600160a01b038516179055612c50600582612e47565b600080612c5d8484614177565b90506001600160a01b038516915082826000600080516020614618833981519152600080a4600183015b818114612cad5780836000600080516020614618833981519152600080a4600101612c87565b5061253a565b60006001600160e01b031982166380ac58cd60e01b1480612ce457506001600160e01b03198216635b5e139f60e01b145b806107d157506107d1826130dd565b600160401b811015612d09576107c28282613102565b6107c28282613170565b60005b8115612d2d57600019820190911690600101612d16565b919050565b600160401b811015612d495761095c8383836131a5565b61095c8383836132f7565b60008181526001830160205260408120548015612e3d576000612d78600183614319565b8554909150600090612d8c90600190614319565b9050818114612df1576000866000018281548110612dac57612dac614115565b9060005260206000200154905080876000018481548110612dcf57612dcf614115565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612e0257612e026144bb565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107d1565b60009150506107d1565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b6000612e7e60095490565b821080156107d1575050600160401b111590565b6000612e9d60095490565b9050612ea98484612b3a565b612eb76000858386866134cf565b610c915760405162461bcd60e51b815260040161089c906144d1565b60006107d1600583613606565b61095c8383836136fe565b816001600160a01b0316836001600160a01b031603612f4c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161089c565b6001600160a01b03838116600081815260126020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612fc484848461233a565b612fd084848484613731565b610c915760405162461bcd60e51b815260040161089c90614526565b612ff784848461233a565b612eb78484846001856134cf565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106130445772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613070576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061308e57662386f26fc10000830492506010015b6305f5e10083106130a6576305f5e100830492506008015b61271083106130ba57612710830492506004015b606483106130cc576064830492506002015b600a83106107d15760010192915050565b60006001600160e01b0319821663152a902d60e11b14806107d157506107d18261382a565b600081815260116020526040902080546001600160a01b0319166001600160a01b038416908117909155819061313782611928565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061313782610cdb565b826001600160a01b03166131b882611928565b6001600160a01b0316146131de5760405162461bcd60e51b815260040161089c90614578565b6001600160a01b0382166132405760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161089c565b826001600160a01b031661325382611928565b6001600160a01b0316146132795760405162461bcd60e51b815260040161089c90614578565b600081815260116020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260108552838620805460001901905590871680865283862080546001019055868652600f909452828520805490921684179091559051849360008051602061461883398151915291a4505050565b6000806133038361294e565b91509150846001600160a01b0316826001600160a01b03161461337d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b606482015260840161089c565b6001600160a01b0384166133e35760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b606482015260840161089c565b6133ee600084612cf3565b60006133fb846001614177565b600881901c600090815260056020526040902054909150600160ff1b60ff83161c1615801561342b575060095481105b1561346257600081815260086020526040902080546001600160a01b0319166001600160a01b038816179055613462600582612e47565b600084815260086020526040902080546001600160a01b0319166001600160a01b03871617905581841461349b5761349b600585612e47565b83856001600160a01b0316876001600160a01b031660008051602061461883398151915260405160405180910390a4611097565b60006001600160a01b0385163b156135f957506001835b6134f08486614177565b8110156135f357604051630a85bd0160e11b81526001600160a01b0387169063150b7a02906135299033908b90869089906004016145bd565b6020604051808303816000875af1925050508015613564575060408051601f3d908101601f19168201909252613561918101906145fa565b60015b6135c1573d808015613592576040519150601f19603f3d011682016040523d82523d6000602084013e613597565b606091505b5080516000036135b95760405162461bcd60e51b815260040161089c906144d1565b805181602001fd5b8280156135de57506001600160e01b03198116630a85bd0160e11b145b925050806135eb81614141565b9150506134e6565b506135fd565b5060015b95945050505050565b600881901c60008181526020849052604081205490919060ff808516919082181c80156136485761363681613835565b60ff168203600884901b1793506136f5565b600083116136b55760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b606482015260840161089c565b5060001990910160008181526020869052604090205490919080156136f0576136dd81613835565b60ff0360ff16600884901b1793506136f5565b613648565b50505092915050565b613708838361389f565b6137156000848484613731565b61095c5760405162461bcd60e51b815260040161089c90614526565b60006001600160a01b0384163b1561381f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906137759033908990889088906004016145bd565b6020604051808303816000875af19250505080156137b0575060408051601f3d908101601f191682019092526137ad918101906145fa565b60015b613805573d8080156137de576040519150601f19603f3d011682016040523d82523d6000602084013e6137e3565b606091505b5080516000036135b95760405162461bcd60e51b815260040161089c90614526565b6001600160e01b031916630a85bd0160e11b14905061276d565b506001949350505050565b60006107d1826138a9565b60006040518061012001604052806101008152602001614638610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff61387e856138ce565b02901c8151811061389157613891614115565b016020015160f81c92915050565b6107c282826125bb565b60006001600160e01b03198216635a05180f60e01b14806107d157506107d1826138e6565b60008082116138dc57600080fd5b5060008190031690565b60006001600160e01b03198216637965db0b60e01b14806107d157506301ffc9a760e01b6001600160e01b03198316146107d1565b60006020828403121561392d57600080fd5b81356001600160401b0381111561394357600080fd5b820160608185031215610e0057600080fd5b6001600160e01b031981168114610c6b57600080fd5b60006020828403121561397d57600080fd5b8135610e0081613955565b60005b838110156139a357818101518382015260200161398b565b50506000910152565b600081518084526139c4816020860160208601613988565b601f01601f19169290920160200192915050565b602081526000610e0060208301846139ac565b6000602082840312156139fd57600080fd5b5035919050565b80356001600160a01b0381168114612d2d57600080fd5b60008060408385031215613a2e57600080fd5b613a3783613a04565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613a7d57613a7d613a45565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613aab57613aab613a45565b604052919050565b60006001600160401b03821115613acc57613acc613a45565b5060051b60200190565b6000613ae9613ae484613ab3565b613a83565b8381529050602080820190600585811b850187811115613b0857600080fd5b855b81811015613bdb5780356001600160401b0380821115613b2a5760008081fd5b908801906040828c031215613b3f5760008081fd5b613b47613a5b565b613b5083613a04565b81528683013582811115613b645760008081fd5b8084019350508b601f840112613b7c57600091508182fd5b82359150613b8c613ae483613ab3565b82815291861b8301870191878101908d841115613ba95760008081fd5b938801935b83851015613bc757843582529388019390880190613bae565b828901525087525050938301938301613b0a565b50505050509392505050565b600060208284031215613bf957600080fd5b81356001600160401b03811115613c0f57600080fd5b8201601f81018413613c2057600080fd5b61276d84823560208401613ad6565b600080600060608486031215613c4457600080fd5b613c4d84613a04565b9250613c5b60208501613a04565b9150604084013590509250925092565b60008060408385031215613c7e57600080fd5b50508035926020909101359150565b60006020808385031215613ca057600080fd5b82356001600160401b03811115613cb657600080fd5b8301601f81018513613cc757600080fd5b8035613cd5613ae482613ab3565b81815260069190911b82018301908381019087831115613cf457600080fd5b928401925b82841015613d3e5760408489031215613d125760008081fd5b613d1a613a5b565b613d2385613a04565b81528486013586820152825260409093019290840190613cf9565b979650505050505050565b60008060408385031215613d5c57600080fd5b82359150613d6c60208401613a04565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015613db65783516001600160a01b031683529284019291840191600101613d91565b50909695505050505050565b600060208284031215613dd457600080fd5b610e0082613a04565b80356001600160601b0381168114612d2d57600080fd5b600080600060608486031215613e0957600080fd5b83359250613e1960208501613a04565b9150613e2760408501613ddd565b90509250925092565b60006001600160401b03831115613e4957613e49613a45565b613e5c601f8401601f1916602001613a83565b9050828152838383011115613e7057600080fd5b828260208301376000602084830101529392505050565b600060208284031215613e9957600080fd5b81356001600160401b03811115613eaf57600080fd5b8201601f81018413613ec057600080fd5b61276d84823560208401613e30565b60008060408385031215613ee257600080fd5b613eeb83613a04565b9150613d6c60208401613ddd565b8015158114610c6b57600080fd5b60008060408385031215613f1a57600080fd5b613f2383613a04565b91506020830135613f3381613ef9565b809150509250929050565b60008083601f840112613f5057600080fd5b5081356001600160401b03811115613f6757600080fd5b6020830191508360208260051b8501011115610a6257600080fd5b60008060008060608587031215613f9857600080fd5b84356001600160401b03811115613fae57600080fd5b613fba87828801613f3e565b9095509350613fcd905060208601613a04565b9150613fdb60408601613ddd565b905092959194509250565b60008060008060808587031215613ffc57600080fd5b61400585613a04565b935061401360208601613a04565b92506040850135915060608501356001600160401b0381111561403557600080fd5b8501601f8101871361404657600080fd5b61405587823560208401613e30565b91505092959194509250565b6000806020838503121561407457600080fd5b82356001600160401b0381111561408a57600080fd5b61409685828601613f3e565b90969095509350505050565b600080604083850312156140b557600080fd5b6140be83613a04565b9150613d6c60208401613a04565b6000808335601e198436030181126140e357600080fd5b8301803591506001600160401b038211156140fd57600080fd5b6020019150600581901b3603821315610a6257600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016141535761415361412b565b5060010190565b60006020828403121561416c57600080fd5b8151610e0081613ef9565b808201808211156107d1576107d161412b565b80820281158282048414176107d1576107d161412b565b6000826141be57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806141d757607f821691505b6020821081036141f757634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561095c57600081815260208120601f850160051c810160208610156142245750805b601f850160051c820191505b8181101561109757828155600101614230565b81516001600160401b0381111561425c5761425c613a45565b6142708161426a84546141c3565b846141fd565b602080601f8311600181146142a5576000841561428d5750858301515b600019600386901b1c1916600185901b178555611097565b600085815260208120601f198616915b828110156142d4578886015182559484019460019091019084016142b5565b50858210156142f25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000816143115761431161412b565b506000190190565b818103818111156107d1576107d161412b565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60008351614429818460208801613988565b83519083019061443d818360208801613988565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161447e816017850160208801613988565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516144af816028840160208801613988565b01602801949350505050565b634e487b7160e01b600052603160045260246000fd5b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906145f0908301846139ac565b9695505050505050565b60006020828403121561460c57600080fd5b8151610e008161395556feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a264697066735822122069f1e7de30c125031cf14dee918b767ccf0b99363cb74ee4a00c68cea975db1b64736f6c63430008110033";
32258
+ const _bytecode$2 = "0x61016060405260006013553480156200001757600080fd5b5060405162005dfc38038062005dfc8339810160408190526200003a91620006cb565b8787878787878787868681604051806040016040528060018152602001603160f81b81525083838181838381600690816200007691906200085e565b5060076200008582826200085e565b50506801000000000000000060095550600d620000a383826200085e565b50600e620000b282826200085e565b5050505050620000d2601583620001e160201b620012111790919060201c565b61012052620000ef816016620001e1602090811b6200121117901c565b61014052815160208084019190912060e052815190820120610100524660a0526200017d60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0525062000196905060008962000231565b620001a2828262000274565b620001ad8362000379565b6019620001bb86826200085e565b506018620001ca85826200085e565b5050505050505050505050505050505050620009a8565b60006020835110156200020157620001f98362000472565b90506200022b565b826200021883620004b560201b620012421760201c565b906200022590826200085e565b5060ff90505b92915050565b620002488282620004b860201b620012451760201c565b60008281526001602090815260409091206200026f918390620012c962000559821b17901c565b505050565b6127106001600160601b0382161115620002e85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620003405760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002df565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015620003c5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003eb91906200092a565b620004095760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080829050601f81511115620004a0578260405163305a27a960e01b8152600401620002df91906200094e565b8051620004ad8262000983565b179392505050565b90565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000555576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620005143390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000570836001600160a01b03841662000577565b9392505050565b6000818152600183016020526040812054620005c0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200022b565b5060006200022b565b80516001600160a01b0381168114620005e157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000619578181015183820152602001620005ff565b50506000910152565b600082601f8301126200063457600080fd5b81516001600160401b0380821115620006515762000651620005e6565b604051601f8301601f19908116603f011681019082821181831017156200067c576200067c620005e6565b816040528381528660208588010111156200069657600080fd5b620006a9846020830160208901620005fc565b9695505050505050565b80516001600160601b0381168114620005e157600080fd5b600080600080600080600080610100898b031215620006e957600080fd5b620006f489620005c9565b60208a01519098506001600160401b03808211156200071257600080fd5b620007208c838d0162000622565b985060408b01519150808211156200073757600080fd5b620007458c838d0162000622565b975060608b01519150808211156200075c57600080fd5b6200076a8c838d0162000622565b965060808b01519150808211156200078157600080fd5b50620007908b828c0162000622565b945050620007a160a08a01620005c9565b9250620007b160c08a01620005c9565b9150620007c160e08a01620006b3565b90509295985092959890939650565b600181811c90821680620007e557607f821691505b6020821081036200080657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026f57600081815260208120601f850160051c81016020861015620008355750805b601f850160051c820191505b81811015620008565782815560010162000841565b505050505050565b81516001600160401b038111156200087a576200087a620005e6565b62000892816200088b8454620007d0565b846200080c565b602080601f831160018114620008ca5760008415620008b15750858301515b600019600386901b1c1916600185901b17855562000856565b600085815260208120601f198616915b82811015620008fb57888601518255948401946001909101908401620008da565b50858210156200091a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200093d57600080fd5b815180151581146200057057600080fd5b60208152600082518060208401526200096f816040850160208701620005fc565b601f01601f19169190910160400192915050565b80516020808301519190811015620008065760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516153f962000a036000396000610db301526000610d88015260006118740152600061184c015260006117a7015260006117d1015260006117fb01526153f96000f3fe608060405234801561001057600080fd5b506004361061035c5760003560e01c806369e2f0fb116101d3578063a217fddf11610104578063d547741f116100a2578063e4e18f6d1161007c578063e4e18f6d14610771578063e8a3d48514610784578063e985e9c51461078c578063eea987681461079f57600080fd5b8063d547741f14610738578063e19278591461074b578063e4623c1b1461075e57600080fd5b8063b88d4fde116100de578063b88d4fde146106ea578063c87b56dd146106fd578063ca15c87314610710578063d53913931461072357600080fd5b8063a217fddf146106bc578063a22cb465146106c4578063a7012816146106d757600080fd5b80639010d07c1161017157806395d89b411161014b57806395d89b411461067b5780639e2641a3146106835780639f15d70014610696578063a1448194146106a957600080fd5b80639010d07c1461064257806391d1485414610655578063938e3d7b1461066857600080fd5b8063745a41bc116101ad578063745a41bc146105ee57806374f16a811461060157806384b0196e14610614578063885e7a081461062f57600080fd5b806369e2f0fb146105c05780636c0360eb146105d357806370a08231146105db57600080fd5b80632d2c5a8b116102ad57806342842e0e1161024b5780634f558e79116102255780634f558e791461057457806355f804b314610587578063567e40751461059a5780636352211e146105ad57600080fd5b806342842e0e1461053b57806342966c681461054e578063439aed341461056157600080fd5b80633644e515116102875780633644e515146104fa57806336568abe146105025780633dd1eb611461051557806340c10f191461052857600080fd5b80632d2c5a8b146104bf5780632f2ff15d146104d257806331ae450b146104e557600080fd5b806318160ddd1161031a57806323b872dd116102f457806323b872dd14610444578063248a9ca31461045757806329326f291461047a5780632a55205a1461048d57600080fd5b806318160ddd1461041f5780631f8ebbd114610427578063234af0461461043157600080fd5b80628ad9461461036157806301ffc9a71461037657806306fdde031461039e578063081812fc146103b3578063095ea7b3146103de578063141a468c146103f1575b600080fd5b61037461036f36600461444e565b6107b2565b005b61038961038436600461449e565b610888565b60405190151581526020015b60405180910390f35b6103a6610899565b604051610395919061450b565b6103c66103c136600461451e565b6108a8565b6040516001600160a01b039091168152602001610395565b6103746103ec36600461454e565b6108c8565b6104116103ff36600461451e565b60009081526017602052604090205490565b604051908152602001610395565b6104116108e8565b600160401b610411565b61037461043f36600461471a565b6108ff565b610374610452366004614762565b610920565b61041161046536600461451e565b60009081526020819052604090206001015490565b6002546103c6906001600160a01b031681565b6104a061049b36600461479e565b610947565b604080516001600160a01b039093168352602083019190915201610395565b6103746104cd3660046147c0565b6109f5565b6103746104e036600461487c565b610a16565b6104ed610a3b565b60405161039591906148a8565b610411610ae9565b61037461051036600461487c565b610af3565b6103746105233660046148f5565b610b72565b61037461053636600461454e565b610b95565b610374610549366004614762565b610bb7565b61037461055c36600461451e565b610bd2565b61037461056f366004614927565b610c09565b61038961058236600461451e565b610c32565b6103746105953660046149ba565b610c3d565b6103746105a836600461454e565b610c54565b6103c66105bb36600461451e565b610c76565b6103746105ce3660046148f5565b610c96565b6103a6610cb9565b6104116105e93660046148f5565b610d47565b6103746105fc366004614a22565b610d65565b61037461060f36600461471a565b610d71565b61061c610d7a565b6040516103959796959493929190614a82565b61037461063d366004614b18565b610e03565b6103c661065036600461479e565b610e18565b61038961066336600461487c565b610e37565b6103746106763660046149ba565b610e60565b6103a6610e77565b61037461069136600461471a565b610e81565b6103746106a436600461454e565b610ea2565b6103746106b736600461454e565b610efc565b610411600081565b6103746106d2366004614b50565b610f1e565b6103746106e5366004614bcb565b61106f565b6103746106f8366004614c2f565b6110cf565b6103a661070b36600461451e565b6110f8565b61041161071e36600461451e565b611103565b6104116a4d494e5445525f524f4c4560a81b81565b61037461074636600461487c565b61111a565b6103746107593660046147c0565b61113f565b61037461076c366004614c7e565b611160565b61037461077f3660046148f5565b61119e565b6103a66111b2565b61038961079a366004614cbf565b6111bf565b6103746107ad36600461454e565b6111ef565b6107bf6020820182614ce9565b90506107ce6040830183614ce9565b9050146107ee5760405163359a1bc360e01b815260040160405180910390fd5b60005b6107fe6040830183614ce9565b90508110156108845761087261081760208401846148f5565b6108246020850185614ce9565b8481811061083457610834614d32565b905060200201602081019061084991906148f5565b6108566040860186614ce9565b8581811061086657610866614d32565b90506020020135610bb7565b8061087c81614d5e565b9150506107f1565b5050565b6000610893826112de565b92915050565b60606108a3611303565b905090565b6000600160401b8210156108bf5761089382611395565b610893826113bc565b600160401b8110156108de576108848282611447565b6108848282611557565b60006013546108f561165f565b6108a39190614d77565b6a4d494e5445525f524f4c4560a81b6109178161167b565b61088482611685565b600160401b81101561093c576109378383836116d4565b505050565b610937838383611704565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109bc5750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906109db906001600160601b031687614d8a565b6109e59190614da1565b91519350909150505b9250929050565b6a4d494e5445525f524f4c4560a81b610a0d8161167b565b61088482611729565b600082815260208190526040902060010154610a318161167b565b6109378383611778565b60606000610a4881611103565b90506000816001600160401b03811115610a6457610a64614578565b604051908082528060200260200182016040528015610a8d578160200160208202803683370190505b50905060005b82811015610ae257610aa6600082610e18565b828281518110610ab857610ab8614d32565b6001600160a01b039092166020928302919091019091015280610ada81614d5e565b915050610a93565b5092915050565b60006108a361179a565b6001600160a01b0381163314610b685760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b61088482826118c5565b6000610b7d8161167b565b6108846a4d494e5445525f524f4c4560a81b83610a16565b6a4d494e5445525f524f4c4560a81b610bad8161167b565b61093783836118e7565b610937838383604051806020016040528060008152506110cf565b610bdd335b8261196e565b610bfd57604051630247e3a960e01b815260048101829052602401610b5f565b610c0681611990565b50565b6a4d494e5445525f524f4c4560a81b610c218161167b565b610c2c8484846119e3565b50505050565b600061089382611aae565b6000610c488161167b565b60196109378382614e43565b6a4d494e5445525f524f4c4560a81b610c6c8161167b565b6109378383611b0b565b6000600160401b821015610c8d5761089382611b15565b61089382611b75565b6000610ca18161167b565b6108846a4d494e5445525f524f4c4560a81b8361111a565b60198054610cc690614dc3565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf290614dc3565b8015610d3f5780601f10610d1457610100808354040283529160200191610d3f565b820191906000526020600020905b815481529060010190602001808311610d2257829003601f168201915b505050505081565b6000610d5282611b89565b610d5b83611c54565b6108939190614d77565b610c2c84848484611cda565b610c0681611dc3565b600060608082808083610dae7f00000000000000000000000000000000000000000000000000000000000000006015611e4f565b610dd97f00000000000000000000000000000000000000000000000000000000000000006016611e4f565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6000610e0e8161167b565b6109378383611ef3565b6000828152600160205260408120610e309083611fad565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610e6b8161167b565b60186109378382614e43565b60606108a3611fb9565b6a4d494e5445525f524f4c4560a81b610e998161167b565b61088482611fc8565b6000610ead82610c76565b9050826001600160a01b0316816001600160a01b031614610ef357604051634fefd56160e01b8152600481018390526001600160a01b0382166024820152604401610b5f565b61093782610bd2565b6a4d494e5445525f524f4c4560a81b610f148161167b565b6109378383612017565b81333b15801590610f9857506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190614f02565b155b15610fb85760405163f6fa4cbd60e01b8152336004820152602401610b5f565b6001600160a01b0381163b1580159061103c57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015611016573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061103a9190614f02565b155b15611065576040516341b8d58160e11b81526001600160a01b0382166004820152602401610b5f565b6109378383612085565b6a4d494e5445525f524f4c4560a81b6110878161167b565b60005b848110156110c7576110b58686838181106110a7576110a7614d32565b9050602002013585856119e3565b806110bf81614d5e565b91505061108a565b505050505050565b600160401b8210156110ec576110e78484848461208f565b610c2c565b610c2c848484846120c2565b6060610893826120e7565b60008181526001602052604081206108939061214d565b6000828152602081905260409020600101546111358161167b565b61093783836118c5565b6a4d494e5445525f524f4c4560a81b6111578161167b565b61088482612157565b60005b818110156109375761118c83838381811061118057611180614d32565b90506020020135610bd2565b8061119681614d5e565b915050611163565b60006111a98161167b565b610884826121a6565b60188054610cc690614dc3565b6001600160a01b03808316600090815260126020908152604080832093851683529290529081205460ff16610e30565b6a4d494e5445525f524f4c4560a81b6112078161167b565b610937838361229b565b600060208351101561122d57611226836122a5565b9050610893565b816112388482614e43565b5060ff9050610893565b90565b61124f8282610e37565b610884576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556112853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610e30836001600160a01b0384166122e3565b60006001600160e01b03198216635604e22560e01b1480610893575061089382612332565b6060600d805461131290614dc3565b80601f016020809104026020016040519081016040528092919081815260200182805461133e90614dc3565b801561138b5780601f106113605761010080835404028352916020019161138b565b820191906000526020600020905b81548152906001019060200180831161136e57829003601f168201915b5050505050905090565b60006113a08261233d565b506000908152601160205260409020546001600160a01b031690565b60006113c782611aae565b61142b5760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a20617070726f76656420717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b5f565b506000908152600a60205260409020546001600160a01b031690565b600061145282611b15565b9050806001600160a01b0316836001600160a01b0316036114bf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b5f565b336001600160a01b03821614806114db57506114db81336111bf565b61154d5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610b5f565b610937838361238d565b600061156282610c76565b9050806001600160a01b0316836001600160a01b0316036115d15760405162461bcd60e51b8152602060048201526024808201527f4552433732315073693a20617070726f76616c20746f2063757272656e74206f6044820152633bb732b960e11b6064820152608401610b5f565b336001600160a01b03821614806115ed57506115ed81336111bf565b61154d5760405162461bcd60e51b815260206004820152603b60248201527f4552433732315073693a20617070726f76652063616c6c6572206973206e6f7460448201527f206f776e6572206e6f7220617070726f76656420666f7220616c6c00000000006064820152608401610b5f565b60006116696124de565b611671612548565b6108a39190614f1f565b610c06813361255c565b60005b81518110156108845760008282815181106116a5576116a5614d32565b602002602001015190506116c1816000015182602001516125b5565b50806116cc81614d5e565b915050611688565b6116dd33610bd7565b6116f95760405162461bcd60e51b8152600401610b5f90614f32565b6109378383836125f6565b61170d33610bd7565b6116f95760405162461bcd60e51b8152600401610b5f90614f7f565b60005b815181101561088457600082828151811061174957611749614d32565b6020026020010151905061176581600001518260200151611b0b565b508061177081614d5e565b91505061172c565b6117828282611245565b600082815260016020526040902061093790826112c9565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156117f357507f000000000000000000000000000000000000000000000000000000000000000046145b1561181d57507f000000000000000000000000000000000000000000000000000000000000000090565b6108a3604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b6118cf82826127fd565b60008281526001602052604090206109379082612862565b600160401b811061190e5760405163b73c99f560e01b815260048101829052602401610b5f565b600881901c600090815260146020526040902054600160ff83161b161561194b576040516305dcda1160e51b815260048101829052602401610b5f565b6119558282612877565b6013805490600061196583614d5e565b91905055505050565b6000600160401b8210156119865761122683836129d2565b610e308383612a31565b600160401b8110156119da576119a581612af6565b600881901c60009081526014602052604081208054600160ff85161b17905560138054916119d283614fd3565b919050555050565b610c0681612b79565b6127106001600160601b0382161115611a0e5760405162461bcd60e51b8152600401610b5f90614fea565b6001600160a01b038216611a645760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610b5f565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b6000600160401b821015611b02576000828152600f60205260409020546001600160a01b0316158015906108935750600882901c600090815260146020526040902054600160ff84161b1615151592915050565b61089382612bbb565b6108848282612bf0565b6000818152600f60205260408120546001600160a01b0316806108935760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b5f565b600080611b8183612c0a565b509392505050565b60006001600160a01b038216611bf75760405162461bcd60e51b815260206004820152602d60248201527f4552433732315073693a2062616c616e636520717565727920666f722074686560448201526c207a65726f206164647265737360981b6064820152608401610b5f565b6000600160401b5b600954811015610ae257611c1281611aae565b15611c4457611c2081610c76565b6001600160a01b0316846001600160a01b031603611c4457611c4182614d5e565b91505b611c4d81614d5e565b9050611bff565b60006001600160a01b038216611cbe5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610b5f565b506001600160a01b031660009081526010602052604090205490565b42821015611cfb5760405163068568f360e21b815260040160405180910390fd5b6000611d08858585612ca1565b9050611d1d611d1685610c76565b8284612d7a565b15611d3257611d2c858561238d565b50610c2c565b60008251604003611d7957611d7282611d4e8560006020612e84565b611d5790615034565b611d648660206040612e84565b611d6d90615034565b612f91565b9050611da5565b8251604103611d8c57611d728284612fae565b604051638baa579f60e01b815260040160405180910390fd5b611daf8186612fca565b15611d8c57611dbe868661238d565b6110c7565b60005b8151811015610884576000828281518110611de357611de3614d32565b6020026020010151905060005b816020015151811015611e3a57611e28826000015183602001518381518110611e1b57611e1b614d32565b6020026020010151610ea2565b80611e3281614d5e565b915050611df0565b50508080611e4790614d5e565b915050611dc6565b606060ff8314611e625761122683612fe9565b818054611e6e90614dc3565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9a90614dc3565b8015611ee75780601f10611ebc57610100808354040283529160200191611ee7565b820191906000526020600020905b815481529060010190602001808311611eca57829003601f168201915b50505050509050610893565b6127106001600160601b0382161115611f1e5760405162461bcd60e51b8152600401610b5f90614fea565b6001600160a01b038216611f745760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610b5f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b6000610e308383613028565b6060600e805461131290614dc3565b60005b8151811015610884576000828281518110611fe857611fe8614d32565b6020026020010151905061200481600001518260200151613052565b508061200f81614d5e565b915050611fcb565b600160401b811061203e5760405163b73c99f560e01b815260048101829052602401610b5f565b600881901c600090815260146020526040902054600160ff83161b161561207b576040516305dcda1160e51b815260048101829052602401610b5f565b6119558282613093565b61088482826130ad565b61209a335b8361196e565b6120b65760405162461bcd60e51b8152600401610b5f90614f32565b610c2c848484846130b8565b6120cb33612094565b6120b65760405162461bcd60e51b8152600401610b5f90614f7f565b60606120f28261233d565b60006120fc6130dc565b9050600081511161211c5760405180602001604052806000815250610e30565b80612126846130eb565b604051602001612137929190615058565b6040516020818303038152906040529392505050565b6000610893825490565b60005b815181101561088457600082828151811061217757612177614d32565b602002602001015190506121938160000151826020015161229b565b508061219e81614d5e565b91505061215a565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156121f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122159190614f02565b6122325760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b610884828261317d565b600080829050601f815111156122d0578260405163305a27a960e01b8152600401610b5f919061450b565b80516122db82615034565b179392505050565b600081815260018301602052604081205461232a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610893565b506000610893565b6000610893826132f6565b61234681611aae565b610c065760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b5f565b81333b1580159061240757506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156123e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124059190614f02565b155b156124275760405163f6fa4cbd60e01b8152336004820152602401610b5f565b6001600160a01b0381163b158015906124ab57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015612485573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a99190614f02565b155b156124d4576040516341b8d58160e11b81526001600160a01b0382166004820152602401610b5f565b6109378383613336565b6009546000906701000000000000009082906124fe9060081c6001614d77565b9050815b81811015612542576000818152600c602052604090205461252281613356565b61252c9086614d77565b945050808061253a90614d5e565b915050612502565b50505090565b6000600160401b6009546108a39190614f1f565b6125668282610e37565b6108845761257381613375565b61257e836020613387565b60405160200161258f929190615087565b60408051601f198184030181529082905262461bcd60e51b8252610b5f9160040161450b565b60005b8151811015610937576125e4838383815181106125d7576125d7614d32565b6020026020010151612017565b806125ee81614d5e565b9150506125b8565b828233321480159061267157506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561264b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061266f9190614f02565b155b156126915760405163937db65f60e01b8152336004820152602401610b5f565b6001600160a01b0382163b1580159061271557506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa1580156126ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127139190614f02565b155b1561273e5760405163f934453160e01b81526001600160a01b0383166004820152602401610b5f565b6001600160a01b0381163b158015906127c257506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa15801561279c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c09190614f02565b155b156127eb57604051632a67242160e11b81526001600160a01b0382166004820152602401610b5f565b6127f6858585613522565b5050505050565b6128078282610e37565b15610884576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610e30836001600160a01b03841661354c565b6001600160a01b0382166128cd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b5f565b6128d681611aae565b156129235760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5f565b61292c81611aae565b156129795760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5f565b6001600160a01b038216600081815260106020908152604080832080546001019055848352600f90915280822080546001600160a01b0319168417905551839291906000805160206152a4833981519152908290a45050565b6000806129de83611b15565b9050806001600160a01b0316846001600160a01b03161480612a055750612a0581856111bf565b80612a295750836001600160a01b0316612a1e846108a8565b6001600160a01b0316145b949350505050565b6000612a3c82611aae565b612aa05760405162461bcd60e51b815260206004820152602f60248201527f4552433732315073693a206f70657261746f7220717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b5f565b6000612aab83610c76565b9050806001600160a01b0316846001600160a01b03161480612ae65750836001600160a01b0316612adb846108a8565b6001600160a01b0316145b80612a295750612a2981856111bf565b6000612b0182611b15565b9050612b0c82611b15565b600083815260116020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552601084528285208054600019019055878552600f909352818420805490911690555192935084926000805160206152a4833981519152908390a45050565b6000612b8482610c76565b9050612b91600c8361363f565b60405182906000906001600160a01b038416906000805160206152a4833981519152908390a45050565b600881901c6000908152600c6020526040812054600160ff1b60ff84161c1615612be757506000919050565b6108938261366b565b61088482826040518060200160405280600081525061368a565b600080612c1683611aae565b612c775760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a206f776e657220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b5f565b612c80836136cb565b6000818152600860205260409020546001600160a01b031694909350915050565b6000612a29604051602001612d0f90660a0cae4dad2e8560cb1b81527f61646472657373207370656e6465722c75696e7432353620746f6b656e49642c60078201527f75696e74323536206e6f6e63652c75696e7432353620646561646c696e652900602782015260460190565b60408051808303601f19018152828252805160209182012060008881526017835283902054918401526001600160a01b0388169183019190915260608201869052608082015260a0810184905260c001604051602081830303815290604052805190602001206136d8565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401612da49291906150fc565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612de29190615115565b600060405180830381855afa9150503d8060008114612e1d576040519150601f19603f3d011682016040523d82523d6000602084013e612e22565b606091505b5091509150818015612e35575080516020145b15612e7857600081806020019051810190612e509190615131565b90506374eca2c160e11b6001600160e01b0319821601612e765760019350505050610e30565b505b50600095945050505050565b606081612e9281601f614d77565b1015612ed15760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610b5f565b612edb8284614d77565b84511015612f1f5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610b5f565b606082158015612f3e5760405191506000825260208201604052612f88565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612f77578051835260209283019201612f5f565b5050858452601f01601f1916604052505b50949350505050565b6000806000612fa1868686613705565b91509150612f888161373e565b6000806000612fbd8585613888565b91509150611b818161373e565b60006001600160a01b03831615801590610e305750610e30838361196e565b60606000612ff6836138ca565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600082600001828154811061303f5761303f614d32565b9060005260206000200154905092915050565b60005b8151811015610937576130818383838151811061307457613074614d32565b60200260200101516118e7565b8061308b81614d5e565b915050613055565b6108848282604051806020016040528060008152506138f2565b6108843383836138fd565b600160401b8210156130d0576110e7848484846139cb565b610c2c848484846139fe565b60606019805461131290614dc3565b606060006130f883613a17565b60010190506000816001600160401b0381111561311757613117614578565b6040519080825280601f01601f191660200182016040528015613141576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461314b57509392505050565b600061318860095490565b9050600082116131e85760405162461bcd60e51b815260206004820152602560248201527f4552433732315073693a207175616e74697479206d7573742062652067726561604482015264074657220360dc1b6064820152608401610b5f565b6001600160a01b03831661324a5760405162461bcd60e51b815260206004820152602360248201527f4552433732315073693a206d696e7420746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610b5f565b816009600082825461325c9190614d77565b9091555050600081815260086020526040902080546001600160a01b0319166001600160a01b03851617905561329360058261363f565b6000806132a08484614d77565b90506001600160a01b0385169150828260006000805160206152a4833981519152600080a4600183015b8181146132f057808360006000805160206152a4833981519152600080a46001016132ca565b506127f6565b60006001600160e01b031982166380ac58cd60e01b148061332757506001600160e01b03198216635b5e139f60e01b145b80610893575061089382613aef565b600160401b81101561334c576108848282613b2f565b6108848282613b9d565b60005b811561337057600019820190911690600101613359565b919050565b60606108936001600160a01b03831660145b60606000613396836002614d8a565b6133a1906002614d77565b6001600160401b038111156133b8576133b8614578565b6040519080825280601f01601f1916602001820160405280156133e2576020820181803683370190505b509050600360fc1b816000815181106133fd576133fd614d32565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061342c5761342c614d32565b60200101906001600160f81b031916908160001a9053506000613450846002614d8a565b61345b906001614d77565b90505b60018111156134d3576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061348f5761348f614d32565b1a60f81b8282815181106134a5576134a5614d32565b60200101906001600160f81b031916908160001a90535060049490941c936134cc81614fd3565b905061345e565b508315610e305760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b5f565b600081815260176020526040812080549161353c83614d5e565b9190505550610937838383613bd2565b60008181526001830160205260408120548015613635576000613570600183614f1f565b855490915060009061358490600190614f1f565b90508181146135e95760008660000182815481106135a4576135a4614d32565b90600052602060002001549050808760000184815481106135c7576135c7614d32565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806135fa576135fa61514e565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610893565b6000915050610893565b600881901c600090815260209290925260409091208054600160ff1b60ff9093169290921c9091179055565b600061367660095490565b82108015610893575050600160401b111590565b600061369560095490565b90506136a1848461317d565b6136af600085838686613bf4565b610c2c5760405162461bcd60e51b8152600401610b5f90615164565b6000610893600583613d2b565b60006108936136e561179a565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806001600160ff1b0383168161372260ff86901c601b614d77565b905061373087828885613e23565b935093505050935093915050565b6000816004811115613752576137526151b9565b0361375a5750565b600181600481111561376e5761376e6151b9565b036137bb5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b5f565b60028160048111156137cf576137cf6151b9565b0361381c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b5f565b6003816004811115613830576138306151b9565b03610c065760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b5f565b60008082516041036138be5760208301516040840151606085015160001a6138b287828585613e23565b945094505050506109ee565b506000905060026109ee565b600060ff8216601f81111561089357604051632cd44ac360e21b815260040160405180910390fd5b610937838383613ee7565b816001600160a01b0316836001600160a01b03160361395e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b5f565b6001600160a01b03838116600081815260126020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6139d68484846125f6565b6139e284848484613f1a565b610c2c5760405162461bcd60e51b8152600401610b5f906151cf565b613a098484846125f6565b6136af848484600185613bf4565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310613a565772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613a82576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613aa057662386f26fc10000830492506010015b6305f5e1008310613ab8576305f5e100830492506008015b6127108310613acc57612710830492506004015b60648310613ade576064830492506002015b600a83106108935760010192915050565b60006001600160e01b031982166380ac58cd60e01b1480613b2057506001600160e01b03198216635b5e139f60e01b145b80610893575061089382614013565b600081815260116020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613b6482611b15565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613b6482610c76565b600160401b811015613be957610937838383614038565b61093783838361418a565b60006001600160a01b0385163b15613d1e57506001835b613c158486614d77565b811015613d1857604051630a85bd0160e11b81526001600160a01b0387169063150b7a0290613c4e9033908b9086908990600401615221565b6020604051808303816000875af1925050508015613c89575060408051601f3d908101601f19168201909252613c8691810190615131565b60015b613ce6573d808015613cb7576040519150601f19603f3d011682016040523d82523d6000602084013e613cbc565b606091505b508051600003613cde5760405162461bcd60e51b8152600401610b5f90615164565b805181602001fd5b828015613d0357506001600160e01b03198116630a85bd0160e11b145b92505080613d1081614d5e565b915050613c0b565b50613d22565b5060015b95945050505050565b600881901c60008181526020849052604081205490919060ff808516919082181c8015613d6d57613d5b81614362565b60ff168203600884901b179350613e1a565b60008311613dda5760405162461bcd60e51b815260206004820152603460248201527f4269744d6170733a205468652073657420626974206265666f7265207468652060448201527334b73232bc103237b2b9b713ba1032bc34b9ba1760611b6064820152608401610b5f565b506000199091016000818152602086905260409020549091908015613e1557613e0281614362565b60ff0360ff16600884901b179350613e1a565b613d6d565b50505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613e5a5750600090506003613ede565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613eae573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613ed757600060019250925050613ede565b9150600090505b94509492505050565b613ef183836143cc565b613efe6000848484613f1a565b6109375760405162461bcd60e51b8152600401610b5f906151cf565b60006001600160a01b0384163b1561400857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f5e903390899088908890600401615221565b6020604051808303816000875af1925050508015613f99575060408051601f3d908101601f19168201909252613f9691810190615131565b60015b613fee573d808015613fc7576040519150601f19603f3d011682016040523d82523d6000602084013e613fcc565b606091505b508051600003613cde5760405162461bcd60e51b8152600401610b5f906151cf565b6001600160e01b031916630a85bd0160e11b149050612a29565b506001949350505050565b60006001600160e01b0319821663152a902d60e11b14806108935750610893826143d6565b826001600160a01b031661404b82611b15565b6001600160a01b0316146140715760405162461bcd60e51b8152600401610b5f9061525e565b6001600160a01b0382166140d35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b5f565b826001600160a01b03166140e682611b15565b6001600160a01b03161461410c5760405162461bcd60e51b8152600401610b5f9061525e565b600081815260116020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260108552838620805460001901905590871680865283862080546001019055868652600f90945282852080549092168417909155905184936000805160206152a483398151915291a4505050565b60008061419683612c0a565b91509150846001600160a01b0316826001600160a01b0316146142105760405162461bcd60e51b815260206004820152602c60248201527f4552433732315073693a207472616e73666572206f6620746f6b656e2074686160448201526b3a1034b9903737ba1037bbb760a11b6064820152608401610b5f565b6001600160a01b0384166142765760405162461bcd60e51b815260206004820152602760248201527f4552433732315073693a207472616e7366657220746f20746865207a65726f206044820152666164647265737360c81b6064820152608401610b5f565b61428160008461238d565b600061428e846001614d77565b600881901c600090815260056020526040902054909150600160ff1b60ff83161c161580156142be575060095481105b156142f557600081815260086020526040902080546001600160a01b0319166001600160a01b0388161790556142f560058261363f565b600084815260086020526040902080546001600160a01b0319166001600160a01b03871617905581841461432e5761432e60058561363f565b83856001600160a01b0316876001600160a01b03166000805160206152a483398151915260405160405180910390a46110c7565b600060405180610120016040528061010081526020016152c4610100913960f87e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff6143ab856143e1565b02901c815181106143be576143be614d32565b016020015160f81c92915050565b6108848282612877565b6000610893826143f9565b60008082116143ef57600080fd5b5060008190031690565b60006001600160e01b03198216635a05180f60e01b148061089357506108938260006001600160e01b03198216637965db0b60e01b148061089357506301ffc9a760e01b6001600160e01b0319831614610893565b60006020828403121561446057600080fd5b81356001600160401b0381111561447657600080fd5b820160608185031215610e3057600080fd5b6001600160e01b031981168114610c0657600080fd5b6000602082840312156144b057600080fd5b8135610e3081614488565b60005b838110156144d65781810151838201526020016144be565b50506000910152565b600081518084526144f78160208601602086016144bb565b601f01601f19169290920160200192915050565b602081526000610e3060208301846144df565b60006020828403121561453057600080fd5b5035919050565b80356001600160a01b038116811461337057600080fd5b6000806040838503121561456157600080fd5b61456a83614537565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156145b0576145b0614578565b60405290565b604051601f8201601f191681016001600160401b03811182821017156145de576145de614578565b604052919050565b60006001600160401b038211156145ff576145ff614578565b5060051b60200190565b600061461c614617846145e6565b6145b6565b8381529050602080820190600585811b85018781111561463b57600080fd5b855b8181101561470e5780356001600160401b038082111561465d5760008081fd5b908801906040828c0312156146725760008081fd5b61467a61458e565b61468383614537565b815286830135828111156146975760008081fd5b8084019350508b601f8401126146af57600091508182fd5b823591506146bf614617836145e6565b82815291861b8301870191878101908d8411156146dc5760008081fd5b938801935b838510156146fa578435825293880193908801906146e1565b82890152508752505093830193830161463d565b50505050509392505050565b60006020828403121561472c57600080fd5b81356001600160401b0381111561474257600080fd5b8201601f8101841361475357600080fd5b612a2984823560208401614609565b60008060006060848603121561477757600080fd5b61478084614537565b925061478e60208501614537565b9150604084013590509250925092565b600080604083850312156147b157600080fd5b50508035926020909101359150565b600060208083850312156147d357600080fd5b82356001600160401b038111156147e957600080fd5b8301601f810185136147fa57600080fd5b8035614808614617826145e6565b81815260069190911b8201830190838101908783111561482757600080fd5b928401925b8284101561487157604084890312156148455760008081fd5b61484d61458e565b61485685614537565b8152848601358682015282526040909301929084019061482c565b979650505050505050565b6000806040838503121561488f57600080fd5b8235915061489f60208401614537565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156148e95783516001600160a01b0316835292840192918401916001016148c4565b50909695505050505050565b60006020828403121561490757600080fd5b610e3082614537565b80356001600160601b038116811461337057600080fd5b60008060006060848603121561493c57600080fd5b8335925061494c60208501614537565b915061495a60408501614910565b90509250925092565b60006001600160401b0383111561497c5761497c614578565b61498f601f8401601f19166020016145b6565b90508281528383830111156149a357600080fd5b828260208301376000602084830101529392505050565b6000602082840312156149cc57600080fd5b81356001600160401b038111156149e257600080fd5b8201601f810184136149f357600080fd5b612a2984823560208401614963565b600082601f830112614a1357600080fd5b610e3083833560208501614963565b60008060008060808587031215614a3857600080fd5b614a4185614537565b9350602085013592506040850135915060608501356001600160401b03811115614a6a57600080fd5b614a7687828801614a02565b91505092959194509250565b60ff60f81b881681526000602060e081840152614aa260e084018a6144df565b8381036040850152614ab4818a6144df565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015614b0657835183529284019291840191600101614aea565b50909c9b505050505050505050505050565b60008060408385031215614b2b57600080fd5b614b3483614537565b915061489f60208401614910565b8015158114610c0657600080fd5b60008060408385031215614b6357600080fd5b614b6c83614537565b91506020830135614b7c81614b42565b809150509250929050565b60008083601f840112614b9957600080fd5b5081356001600160401b03811115614bb057600080fd5b6020830191508360208260051b85010111156109ee57600080fd5b60008060008060608587031215614be157600080fd5b84356001600160401b03811115614bf757600080fd5b614c0387828801614b87565b9095509350614c16905060208601614537565b9150614c2460408601614910565b905092959194509250565b60008060008060808587031215614c4557600080fd5b614c4e85614537565b9350614c5c60208601614537565b92506040850135915060608501356001600160401b03811115614a6a57600080fd5b60008060208385031215614c9157600080fd5b82356001600160401b03811115614ca757600080fd5b614cb385828601614b87565b90969095509350505050565b60008060408385031215614cd257600080fd5b614cdb83614537565b915061489f60208401614537565b6000808335601e19843603018112614d0057600080fd5b8301803591506001600160401b03821115614d1a57600080fd5b6020019150600581901b36038213156109ee57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614d7057614d70614d48565b5060010190565b8082018082111561089357610893614d48565b808202811582820484141761089357610893614d48565b600082614dbe57634e487b7160e01b600052601260045260246000fd5b500490565b600181811c90821680614dd757607f821691505b602082108103614df757634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561093757600081815260208120601f850160051c81016020861015614e245750805b601f850160051c820191505b818110156110c757828155600101614e30565b81516001600160401b03811115614e5c57614e5c614578565b614e7081614e6a8454614dc3565b84614dfd565b602080601f831160018114614ea55760008415614e8d5750858301515b600019600386901b1c1916600185901b1785556110c7565b600085815260208120601f198616915b82811015614ed457888601518255948401946001909101908401614eb5565b5085821015614ef25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215614f1457600080fd5b8151610e3081614b42565b8181038181111561089357610893614d48565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526034908201527f4552433732315073693a207472616e736665722063616c6c6572206973206e6f6040820152731d081bdddb995c881b9bdc88185c1c1c9bdd995960621b606082015260800190565b600081614fe257614fe2614d48565b506000190190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b80516020808301519190811015614df75760001960209190910360031b1b16919050565b6000835161506a8184602088016144bb565b83519083019061507e8183602088016144bb565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516150bf8160178501602088016144bb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516150f08160288401602088016144bb565b01602801949350505050565b828152604060208201526000612a2960408301846144df565b600082516151278184602087016144bb565b9190910192915050565b60006020828403121561514357600080fd5b8151610e3081614488565b634e487b7160e01b600052603160045260246000fd5b60208082526035908201527f4552433732315073693a207472616e7366657220746f206e6f6e20455243373260408201527418a932b1b2b4bb32b91034b6b83632b6b2b73a32b960591b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615254908301846144df565b9695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b60608201526080019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0001020903110a19042112290b311a3905412245134d2a550c5d32651b6d3a7506264262237d468514804e8d2b95569d0d495ea533a966b11c886eb93bc176c9071727374353637324837e9b47af86c7155181ad4fd18ed32c9096db57d59ee30e2e4a6a5f92a6be3498aae067ddb2eb1d5989b56fd7baf33ca0c2ee77e5caf7ff0810182028303840444c545c646c7425617c847f8c949c48a4a8b087b8c0c816365272829aaec650acd0d28fdad4e22d6991bd97dfdcea58b4d6f29fede4f6fe0f1f2f3f4b5b6b607b8b93a3a7b7bf357199c5abcfd9e168bcdee9b3f1ecf5fd1e3e5a7a8aa2b670c4ced8bbe8f0f4fc3d79a1c3cde7effb78cce6facbf9f8a26469706673582212207c1340e2d1c7a6af058cbb35c7f1065a255bd81a470929fa89ee68ccabc5922664736f6c63430008110033";
30959
32259
  const isSuperArgs$2 = (xs) => xs.length > 1;
30960
32260
  class ImmutableERC721__factory extends ethers.ContractFactory {
30961
32261
  constructor(...args) {
@@ -31135,6 +32435,37 @@ const _abi$1 = [
31135
32435
  name: "IImmutableERC721TokenAlreadyBurned",
31136
32436
  type: "error",
31137
32437
  },
32438
+ {
32439
+ inputs: [],
32440
+ name: "InvalidShortString",
32441
+ type: "error",
32442
+ },
32443
+ {
32444
+ inputs: [],
32445
+ name: "InvalidSignature",
32446
+ type: "error",
32447
+ },
32448
+ {
32449
+ inputs: [],
32450
+ name: "PermitExpired",
32451
+ type: "error",
32452
+ },
32453
+ {
32454
+ inputs: [],
32455
+ name: "SignerCannotBeZerothAddress",
32456
+ type: "error",
32457
+ },
32458
+ {
32459
+ inputs: [
32460
+ {
32461
+ internalType: "string",
32462
+ name: "str",
32463
+ type: "string",
32464
+ },
32465
+ ],
32466
+ name: "StringTooLong",
32467
+ type: "error",
32468
+ },
31138
32469
  {
31139
32470
  inputs: [
31140
32471
  {
@@ -31207,6 +32538,12 @@ const _abi$1 = [
31207
32538
  name: "ApprovalForAll",
31208
32539
  type: "event",
31209
32540
  },
32541
+ {
32542
+ anonymous: false,
32543
+ inputs: [],
32544
+ name: "EIP712DomainChanged",
32545
+ type: "event",
32546
+ },
31210
32547
  {
31211
32548
  anonymous: false,
31212
32549
  inputs: [
@@ -31339,6 +32676,19 @@ const _abi$1 = [
31339
32676
  stateMutability: "view",
31340
32677
  type: "function",
31341
32678
  },
32679
+ {
32680
+ inputs: [],
32681
+ name: "DOMAIN_SEPARATOR",
32682
+ outputs: [
32683
+ {
32684
+ internalType: "bytes32",
32685
+ name: "",
32686
+ type: "bytes32",
32687
+ },
32688
+ ],
32689
+ stateMutability: "view",
32690
+ type: "function",
32691
+ },
31342
32692
  {
31343
32693
  inputs: [],
31344
32694
  name: "MINTER_ROLE",
@@ -31479,6 +32829,49 @@ const _abi$1 = [
31479
32829
  stateMutability: "view",
31480
32830
  type: "function",
31481
32831
  },
32832
+ {
32833
+ inputs: [],
32834
+ name: "eip712Domain",
32835
+ outputs: [
32836
+ {
32837
+ internalType: "bytes1",
32838
+ name: "fields",
32839
+ type: "bytes1",
32840
+ },
32841
+ {
32842
+ internalType: "string",
32843
+ name: "name",
32844
+ type: "string",
32845
+ },
32846
+ {
32847
+ internalType: "string",
32848
+ name: "version",
32849
+ type: "string",
32850
+ },
32851
+ {
32852
+ internalType: "uint256",
32853
+ name: "chainId",
32854
+ type: "uint256",
32855
+ },
32856
+ {
32857
+ internalType: "address",
32858
+ name: "verifyingContract",
32859
+ type: "address",
32860
+ },
32861
+ {
32862
+ internalType: "bytes32",
32863
+ name: "salt",
32864
+ type: "bytes32",
32865
+ },
32866
+ {
32867
+ internalType: "uint256[]",
32868
+ name: "extensions",
32869
+ type: "uint256[]",
32870
+ },
32871
+ ],
32872
+ stateMutability: "view",
32873
+ type: "function",
32874
+ },
31482
32875
  {
31483
32876
  inputs: [],
31484
32877
  name: "getAdmins",
@@ -31708,6 +33101,25 @@ const _abi$1 = [
31708
33101
  stateMutability: "view",
31709
33102
  type: "function",
31710
33103
  },
33104
+ {
33105
+ inputs: [
33106
+ {
33107
+ internalType: "uint256",
33108
+ name: "tokenId",
33109
+ type: "uint256",
33110
+ },
33111
+ ],
33112
+ name: "nonces",
33113
+ outputs: [
33114
+ {
33115
+ internalType: "uint256",
33116
+ name: "",
33117
+ type: "uint256",
33118
+ },
33119
+ ],
33120
+ stateMutability: "view",
33121
+ type: "function",
33122
+ },
31711
33123
  {
31712
33124
  inputs: [],
31713
33125
  name: "operatorAllowlist",
@@ -31740,6 +33152,34 @@ const _abi$1 = [
31740
33152
  stateMutability: "view",
31741
33153
  type: "function",
31742
33154
  },
33155
+ {
33156
+ inputs: [
33157
+ {
33158
+ internalType: "address",
33159
+ name: "spender",
33160
+ type: "address",
33161
+ },
33162
+ {
33163
+ internalType: "uint256",
33164
+ name: "tokenId",
33165
+ type: "uint256",
33166
+ },
33167
+ {
33168
+ internalType: "uint256",
33169
+ name: "deadline",
33170
+ type: "uint256",
33171
+ },
33172
+ {
33173
+ internalType: "bytes",
33174
+ name: "sig",
33175
+ type: "bytes",
33176
+ },
33177
+ ],
33178
+ name: "permit",
33179
+ outputs: [],
33180
+ stateMutability: "nonpayable",
33181
+ type: "function",
33182
+ },
31743
33183
  {
31744
33184
  inputs: [
31745
33185
  {
@@ -32194,7 +33634,7 @@ const _abi$1 = [
32194
33634
  type: "function",
32195
33635
  },
32196
33636
  ];
32197
- const _bytecode$1 = "0x60806040523480156200001157600080fd5b5060405162003c7338038062003c73833981016040819052620000349162000506565b8787878787878787868660036200004c838262000699565b5060046200005b828262000699565b506200006d91506000905089620000b8565b620000798282620000fb565b620000848362000200565b600c62000092868262000699565b50600b620000a1858262000699565b505050505050505050505050505050505062000790565b620000cf8282620002f960201b6200135e1760201c565b6000828152600160209081526040909120620000f6918390620013e26200039a821b17901c565b505050565b6127106001600160601b03821611156200016f5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620001c75760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000166565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200024c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000272919062000765565b620002905760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000396576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620003553390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000620003b1836001600160a01b038416620003ba565b90505b92915050565b60008181526001830160205260408120546200040357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003b4565b506000620003b4565b80516001600160a01b03811681146200042457600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200045157600080fd5b81516001600160401b03808211156200046e576200046e62000429565b604051601f8301601f19908116603f0116810190828211818310171562000499576200049962000429565b81604052838152602092508683858801011115620004b657600080fd5b600091505b83821015620004da5785820183015181830184015290820190620004bb565b600093810190920192909252949350505050565b80516001600160601b03811681146200042457600080fd5b600080600080600080600080610100898b0312156200052457600080fd5b6200052f896200040c565b60208a01519098506001600160401b03808211156200054d57600080fd5b6200055b8c838d016200043f565b985060408b01519150808211156200057257600080fd5b620005808c838d016200043f565b975060608b01519150808211156200059757600080fd5b620005a58c838d016200043f565b965060808b0151915080821115620005bc57600080fd5b50620005cb8b828c016200043f565b945050620005dc60a08a016200040c565b9250620005ec60c08a016200040c565b9150620005fc60e08a01620004ee565b90509295985092959890939650565b600181811c908216806200062057607f821691505b6020821081036200064157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620000f657600081815260208120601f850160051c81016020861015620006705750805b601f850160051c820191505b8181101562000691578281556001016200067c565b505050505050565b81516001600160401b03811115620006b557620006b562000429565b620006cd81620006c684546200060b565b8462000647565b602080601f831160018114620007055760008415620006ec5750858301515b600019600386901b1c1916600185901b17855562000691565b600085815260208120601f198616915b82811015620007365788860151825594840194600190910190840162000715565b5085821015620007555787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200077857600080fd5b815180151581146200078957600080fd5b9392505050565b6134d380620007a06000396000f3fe608060405234801561001057600080fd5b50600436106102945760003560e01c806369e2f0fb11610167578063a217fddf116100ce578063d539139311610087578063d5391393146105da578063d547741f146105ef578063e4623c1b14610602578063e4e18f6d14610615578063e8a3d48514610628578063e985e9c51461063057600080fd5b8063a217fddf14610573578063a22cb4651461057b578063a70128161461058e578063b88d4fde146105a1578063c87b56dd146105b4578063ca15c873146105c757600080fd5b806391d148541161012057806391d148541461050c578063938e3d7b1461051f57806395d89b41146105325780639e2641a31461053a5780639f15d7001461054d578063a14481941461056057600080fd5b806369e2f0fb146104a55780636c0360eb146104b857806370a08231146104c057806374f16a81146104d3578063885e7a08146104e65780639010d07c146104f957600080fd5b80632f2ff15d1161020b57806340c10f19116101c457806340c10f191461043357806342842e0e1461044657806342966c6814610459578063439aed341461046c57806355f804b31461047f5780636352211e1461049257600080fd5b80632f2ff15d146103c957806331ae450b146103dc57806336568abe146103f15780633dd1eb61146104045780633e769acd146104175780633eaaf86b1461042a57600080fd5b806318160ddd1161025d57806318160ddd14610329578063234af0461461033b57806323b872dd1461034e578063248a9ca31461036157806329326f29146103845780632a55205a1461039757600080fd5b80628ad9461461029957806301ffc9a7146102ae57806306fdde03146102d6578063081812fc146102eb578063095ea7b314610316575b600080fd5b6102ac6102a7366004612901565b61066c565b005b6102c16102bc366004612951565b610742565b60405190151581526020015b60405180910390f35b6102de610753565b6040516102cd91906129be565b6102fe6102f93660046129d1565b6107e5565b6040516001600160a01b0390911681526020016102cd565b6102ac610324366004612a06565b61080c565b600d545b6040519081526020016102cd565b6102ac610349366004612bd2565b610967565b6102ac61035c366004612c1a565b6109bf565b61032d61036f3660046129d1565b60009081526020819052604090206001015490565b6002546102fe906001600160a01b031681565b6103aa6103a5366004612c56565b6109f1565b604080516001600160a01b0390931683526020830191909152016102cd565b6102ac6103d7366004612c78565b610a9f565b6103e4610ac4565b6040516102cd9190612ca4565b6102ac6103ff366004612c78565b610b72565b6102ac610412366004612cf1565b610bec565b6102ac610425366004612bd2565b610c0f565b61032d600d5481565b6102ac610441366004612a06565b610c9b565b6102ac610454366004612c1a565b610cd7565b6102ac6104673660046129d1565b610cf2565b6102ac61047a366004612d23565b610d30565b6102ac61048d366004612db6565b610d59565b6102fe6104a03660046129d1565b610d70565b6102ac6104b3366004612cf1565b610dd0565b6102de610df3565b61032d6104ce366004612cf1565b610e81565b6102ac6104e1366004612bd2565b610f07565b6102ac6104f4366004612dfe565b610f13565b6102fe610507366004612c56565b610f28565b6102c161051a366004612c78565b610f47565b6102ac61052d366004612db6565b610f70565b6102de610f87565b6102ac610548366004612bd2565b610f96565b6102ac61055b366004612a06565b610fee565b6102ac61056e366004612a06565b611048565b61032d600081565b6102ac610589366004612e36565b61107a565b6102ac61059c366004612eb1565b6111cb565b6102ac6105af366004612f15565b61122b565b6102de6105c23660046129d1565b61125d565b61032d6105d53660046129d1565b6112c3565b61032d6a4d494e5445525f524f4c4560a81b81565b6102ac6105fd366004612c78565b6112da565b6102ac610610366004612f90565b6112ff565b6102ac610623366004612cf1565b61133d565b6102de611351565b6102c161063e366004612fd1565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6106796020820182612ffb565b90506106886040830183612ffb565b9050146106a85760405163359a1bc360e01b815260040160405180910390fd5b60005b6106b86040830183612ffb565b905081101561073e5761072c6106d16020840184612cf1565b6106de6020850185612ffb565b848181106106ee576106ee613044565b90506020020160208101906107039190612cf1565b6107106040860186612ffb565b8581811061072057610720613044565b90506020020135610cd7565b8061073681613070565b9150506106ab565b5050565b600061074d826113f7565b92915050565b60606003805461076290613089565b80601f016020809104026020016040519081016040528092919081815260200182805461078e90613089565b80156107db5780601f106107b0576101008083540402835291602001916107db565b820191906000526020600020905b8154815290600101906020018083116107be57829003601f168201915b5050505050905090565b60006107f08261141c565b506000908152600760205260409020546001600160a01b031690565b81333b1580159061088657506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088491906130c3565b155b156108ab5760405163f6fa4cbd60e01b81523360048201526024015b60405180910390fd5b6001600160a01b0381163b1580159061092f57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d91906130c3565b155b15610958576040516341b8d58160e11b81526001600160a01b03821660048201526024016108a2565b610962838361147b565b505050565b6a4d494e5445525f524f4c4560a81b61097f8161158b565b60005b8251811015610962576109ad8382815181106109a0576109a0613044565b6020026020010151611595565b806109b781613070565b915050610982565b6109ca335b82611624565b6109e65760405162461bcd60e51b81526004016108a2906130e0565b6109628383836116a3565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610a665750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610a85906001600160601b03168761312d565b610a8f9190613144565b91519350909150505b9250929050565b600082815260208190526040902060010154610aba8161158b565b61096283836118aa565b60606000610ad1816112c3565b90506000816001600160401b03811115610aed57610aed612a30565b604051908082528060200260200182016040528015610b16578160200160208202803683370190505b50905060005b82811015610b6b57610b2f600082610f28565b828281518110610b4157610b41613044565b6001600160a01b039092166020928302919091019091015280610b6381613070565b915050610b1c565b5092915050565b6001600160a01b0381163314610be25760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108a2565b61073e82826118cc565b6000610bf78161158b565b61073e6a4d494e5445525f524f4c4560a81b83610a9f565b60005b815181101561073e576000828281518110610c2f57610c2f613044565b6020026020010151905060005b816020015151811015610c8657610c74826000015183602001518381518110610c6757610c67613044565b6020026020010151610fee565b80610c7e81613070565b915050610c3c565b50508080610c9390613070565b915050610c12565b6a4d494e5445525f524f4c4560a81b610cb38161158b565b610cbd83836118ee565b600d8054906000610ccd83613070565b9190505550505050565b6109628383836040518060200160405280600081525061122b565b610cfb81611935565b600881901c6000908152600e602052604081208054600160ff85161b179055600d805491610d2883613166565b919050555050565b6a4d494e5445525f524f4c4560a81b610d488161158b565b610d53848484611963565b50505050565b6000610d648161158b565b600c61096283826131c3565b6000818152600560205260408120546001600160a01b03168061074d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108a2565b6000610ddb8161158b565b61073e6a4d494e5445525f524f4c4560a81b836112da565b600c8054610e0090613089565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2c90613089565b8015610e795780601f10610e4e57610100808354040283529160200191610e79565b820191906000526020600020905b815481529060010190602001808311610e5c57829003601f168201915b505050505081565b60006001600160a01b038216610eeb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108a2565b506001600160a01b031660009081526006602052604090205490565b610f1081610c0f565b50565b6000610f1e8161158b565b6109628383611a2e565b6000828152600160205260408120610f409083611ae8565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610f7b8161158b565b600b61096283826131c3565b60606004805461076290613089565b6a4d494e5445525f524f4c4560a81b610fae8161158b565b60005b825181101561096257610fdc838281518110610fcf57610fcf613044565b6020026020010151611af4565b80610fe681613070565b915050610fb1565b6000610ff982610d70565b9050826001600160a01b0316816001600160a01b03161461103f57604051634fefd56160e01b8152600481018390526001600160a01b03821660248201526044016108a2565b61096282610cf2565b6a4d494e5445525f524f4c4560a81b6110608161158b565b610cbd838360405180602001604052806000815250611b6a565b81333b158015906110f457506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156110ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f291906130c3565b155b156111145760405163f6fa4cbd60e01b81523360048201526024016108a2565b6001600160a01b0381163b1580159061119857506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015611172573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119691906130c3565b155b156111c1576040516341b8d58160e11b81526001600160a01b03821660048201526024016108a2565b6109628383611b9d565b6a4d494e5445525f524f4c4560a81b6111e38161158b565b60005b848110156112235761121186868381811061120357611203613044565b905060200201358585611963565b8061121b81613070565b9150506111e6565b505050505050565b6112353383611624565b6112515760405162461bcd60e51b81526004016108a2906130e0565b610d5384848484611ba8565b60606112688261141c565b6000611272611bdb565b905060008151116112925760405180602001604052806000815250610f40565b8061129c84611bea565b6040516020016112ad929190613282565b6040516020818303038152906040529392505050565b600081815260016020526040812061074d90611c7c565b6000828152602081905260409020600101546112f58161158b565b61096283836118cc565b60005b818110156109625761132b83838381811061131f5761131f613044565b90506020020135610cf2565b8061133581613070565b915050611302565b60006113488161158b565b61073e82611c86565b600b8054610e0090613089565b6113688282610f47565b61073e576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561139e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610f40836001600160a01b038416611d7b565b60006001600160e01b0319821663152a902d60e11b148061074d575061074d82611dca565b6000818152600560205260409020546001600160a01b0316610f105760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108a2565b600061148682610d70565b9050806001600160a01b0316836001600160a01b0316036114f35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108a2565b336001600160a01b038216148061150f575061150f813361063e565b6115815760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016108a2565b6109628383611e0a565b610f108133611e78565b80516001600160a01b03166115bd576040516331c3e52960e11b815260040160405180910390fd5b60005b81602001515181101561160a576115f88260000151836020015183815181106115eb576115eb613044565b6020026020010151611ed1565b8061160281613070565b9150506115c0565b50806020015151600d5461161e91906132b1565b600d5550565b60008061163083610d70565b9050806001600160a01b0316846001600160a01b0316148061167757506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b8061169b5750836001600160a01b0316611690846107e5565b6001600160a01b0316145b949350505050565b828233321480159061171e57506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156116f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171c91906130c3565b155b1561173e5760405163937db65f60e01b81523360048201526024016108a2565b6001600160a01b0382163b158015906117c257506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa15801561179c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c091906130c3565b155b156117eb5760405163f934453160e01b81526001600160a01b03831660048201526024016108a2565b6001600160a01b0381163b1580159061186f57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa158015611849573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186d91906130c3565b155b1561189857604051632a67242160e11b81526001600160a01b03821660048201526024016108a2565b6118a3858585611f18565b5050505050565b6118b4828261135e565b600082815260016020526040902061096290826113e2565b6118d6828261207c565b600082815260016020526040902061096290826120e1565b600881901c6000908152600e6020526040902054600160ff83161b161561192b576040516305dcda1160e51b8152600481018290526024016108a2565b61073e82826120f6565b61193e336109c4565b61195a5760405162461bcd60e51b81526004016108a2906130e0565b610f1081612281565b6127106001600160601b038216111561198e5760405162461bcd60e51b81526004016108a2906132c4565b6001600160a01b0382166119e45760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016108a2565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600a90529190942093519051909116600160a01b029116179055565b6127106001600160601b0382161115611a595760405162461bcd60e51b81526004016108a2906132c4565b6001600160a01b038216611aaf5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108a2565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6000610f408383612316565b80516001600160a01b031615611b1d576040516331c3e52960e11b815260040160405180910390fd5b60005b81602001515181101561160a57611b58826000015183602001518381518110611b4b57611b4b613044565b60200260200101516118ee565b80611b6281613070565b915050611b20565b611b7483836118ee565b611b816000848484612340565b6109625760405162461bcd60e51b81526004016108a29061330e565b61073e338383612441565b611bb38484846116a3565b611bbf84848484612340565b610d535760405162461bcd60e51b81526004016108a29061330e565b6060600c805461076290613089565b60606000611bf78361250f565b60010190506000816001600160401b03811115611c1657611c16612a30565b6040519080825280601f01601f191660200182016040528015611c40576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611c4a57509392505050565b600061074d825490565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015611cd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf591906130c3565b611d125760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600183016020526040812054611dc25750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561074d565b50600061074d565b60006001600160e01b031982166380ac58cd60e01b1480611dfb57506001600160e01b03198216635b5e139f60e01b145b8061074d575061074d826125e7565b600081815260076020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e3f82610d70565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611e828282610f47565b61073e57611e8f816125f2565b611e9a836020612604565b604051602001611eab929190613360565b60408051601f198184030181529082905262461bcd60e51b82526108a2916004016129be565b600881901c6000908152600e6020526040902054600160ff83161b1615611f0e576040516305dcda1160e51b8152600481018290526024016108a2565b61073e828261279f565b826001600160a01b0316611f2b82610d70565b6001600160a01b031614611f515760405162461bcd60e51b81526004016108a2906133d5565b6001600160a01b038216611fb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108a2565b826001600160a01b0316611fc682610d70565b6001600160a01b031614611fec5760405162461bcd60e51b81526004016108a2906133d5565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6120868282610f47565b1561073e576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610f40836001600160a01b0384166127b9565b6001600160a01b03821661214c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108a2565b6000818152600560205260409020546001600160a01b0316156121b15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108a2565b6000818152600560205260409020546001600160a01b0316156122165760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108a2565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061228c82610d70565b905061229782610d70565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600082600001828154811061232d5761232d613044565b9060005260206000200154905092915050565b60006001600160a01b0384163b1561243657604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061238490339089908890889060040161341a565b6020604051808303816000875af19250505080156123bf575060408051601f3d908101601f191682019092526123bc91810190613457565b60015b61241c573d8080156123ed576040519150601f19603f3d011682016040523d82523d6000602084013e6123f2565b606091505b5080516000036124145760405162461bcd60e51b81526004016108a29061330e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061169b565b506001949350505050565b816001600160a01b0316836001600160a01b0316036124a25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108a2565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061254e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061257a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061259857662386f26fc10000830492506010015b6305f5e10083106125b0576305f5e100830492506008015b61271083106125c457612710830492506004015b606483106125d6576064830492506002015b600a831061074d5760010192915050565b600061074d826128ac565b606061074d6001600160a01b03831660145b6060600061261383600261312d565b61261e9060026132b1565b6001600160401b0381111561263557612635612a30565b6040519080825280601f01601f19166020018201604052801561265f576020820181803683370190505b509050600360fc1b8160008151811061267a5761267a613044565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106126a9576126a9613044565b60200101906001600160f81b031916908160001a90535060006126cd84600261312d565b6126d89060016132b1565b90505b6001811115612750576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061270c5761270c613044565b1a60f81b82828151811061272257612722613044565b60200101906001600160f81b031916908160001a90535060049490941c9361274981613166565b90506126db565b508315610f405760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108a2565b61073e828260405180602001604052806000815250611b6a565b600081815260018301602052604081205480156128a25760006127dd600183613474565b85549091506000906127f190600190613474565b905081811461285657600086600001828154811061281157612811613044565b906000526020600020015490508087600001848154811061283457612834613044565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061286757612867613487565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061074d565b600091505061074d565b60006001600160e01b03198216635a05180f60e01b148061074d575061074d8260006001600160e01b03198216637965db0b60e01b148061074d57506301ffc9a760e01b6001600160e01b031983161461074d565b60006020828403121561291357600080fd5b81356001600160401b0381111561292957600080fd5b820160608185031215610f4057600080fd5b6001600160e01b031981168114610f1057600080fd5b60006020828403121561296357600080fd5b8135610f408161293b565b60005b83811015612989578181015183820152602001612971565b50506000910152565b600081518084526129aa81602086016020860161296e565b601f01601f19169290920160200192915050565b602081526000610f406020830184612992565b6000602082840312156129e357600080fd5b5035919050565b80356001600160a01b0381168114612a0157600080fd5b919050565b60008060408385031215612a1957600080fd5b612a22836129ea565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612a6857612a68612a30565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612a9657612a96612a30565b604052919050565b60006001600160401b03821115612ab757612ab7612a30565b5060051b60200190565b6000612ad4612acf84612a9e565b612a6e565b8381529050602080820190600585811b850187811115612af357600080fd5b855b81811015612bc65780356001600160401b0380821115612b155760008081fd5b908801906040828c031215612b2a5760008081fd5b612b32612a46565b612b3b836129ea565b81528683013582811115612b4f5760008081fd5b8084019350508b601f840112612b6757600091508182fd5b82359150612b77612acf83612a9e565b82815291861b8301870191878101908d841115612b945760008081fd5b938801935b83851015612bb257843582529388019390880190612b99565b828901525087525050938301938301612af5565b50505050509392505050565b600060208284031215612be457600080fd5b81356001600160401b03811115612bfa57600080fd5b8201601f81018413612c0b57600080fd5b61169b84823560208401612ac1565b600080600060608486031215612c2f57600080fd5b612c38846129ea565b9250612c46602085016129ea565b9150604084013590509250925092565b60008060408385031215612c6957600080fd5b50508035926020909101359150565b60008060408385031215612c8b57600080fd5b82359150612c9b602084016129ea565b90509250929050565b6020808252825182820181905260009190848201906040850190845b81811015612ce55783516001600160a01b031683529284019291840191600101612cc0565b50909695505050505050565b600060208284031215612d0357600080fd5b610f40826129ea565b80356001600160601b0381168114612a0157600080fd5b600080600060608486031215612d3857600080fd5b83359250612d48602085016129ea565b9150612d5660408501612d0c565b90509250925092565b60006001600160401b03831115612d7857612d78612a30565b612d8b601f8401601f1916602001612a6e565b9050828152838383011115612d9f57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612dc857600080fd5b81356001600160401b03811115612dde57600080fd5b8201601f81018413612def57600080fd5b61169b84823560208401612d5f565b60008060408385031215612e1157600080fd5b612e1a836129ea565b9150612c9b60208401612d0c565b8015158114610f1057600080fd5b60008060408385031215612e4957600080fd5b612e52836129ea565b91506020830135612e6281612e28565b809150509250929050565b60008083601f840112612e7f57600080fd5b5081356001600160401b03811115612e9657600080fd5b6020830191508360208260051b8501011115610a9857600080fd5b60008060008060608587031215612ec757600080fd5b84356001600160401b03811115612edd57600080fd5b612ee987828801612e6d565b9095509350612efc9050602086016129ea565b9150612f0a60408601612d0c565b905092959194509250565b60008060008060808587031215612f2b57600080fd5b612f34856129ea565b9350612f42602086016129ea565b92506040850135915060608501356001600160401b03811115612f6457600080fd5b8501601f81018713612f7557600080fd5b612f8487823560208401612d5f565b91505092959194509250565b60008060208385031215612fa357600080fd5b82356001600160401b03811115612fb957600080fd5b612fc585828601612e6d565b90969095509350505050565b60008060408385031215612fe457600080fd5b612fed836129ea565b9150612c9b602084016129ea565b6000808335601e1984360301811261301257600080fd5b8301803591506001600160401b0382111561302c57600080fd5b6020019150600581901b3603821315610a9857600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016130825761308261305a565b5060010190565b600181811c9082168061309d57607f821691505b6020821081036130bd57634e487b7160e01b600052602260045260246000fd5b50919050565b6000602082840312156130d557600080fd5b8151610f4081612e28565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b808202811582820484141761074d5761074d61305a565b60008261316157634e487b7160e01b600052601260045260246000fd5b500490565b6000816131755761317561305a565b506000190190565b601f82111561096257600081815260208120601f850160051c810160208610156131a45750805b601f850160051c820191505b81811015611223578281556001016131b0565b81516001600160401b038111156131dc576131dc612a30565b6131f0816131ea8454613089565b8461317d565b602080601f831160018114613225576000841561320d5750858301515b600019600386901b1c1916600185901b178555611223565b600085815260208120601f198616915b8281101561325457888601518255948401946001909101908401613235565b50858210156132725787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000835161329481846020880161296e565b8351908301906132a881836020880161296e565b01949350505050565b8082018082111561074d5761074d61305a565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161339881601785016020880161296e565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516133c981602884016020880161296e565b01602801949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061344d90830184612992565b9695505050505050565b60006020828403121561346957600080fd5b8151610f408161293b565b8181038181111561074d5761074d61305a565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220db78f674a75be30e896244d83179c8c4f1b45519e52de44c0f337b384795efbc64736f6c63430008110033";
33637
+ const _bytecode$1 = "0x6101606040523480156200001257600080fd5b5060405162004b3738038062004b37833981016040819052620000359162000693565b8787878787878787868681604051806040016040528060018152602001603160f81b815250838381600390816200006d919062000826565b5060046200007c828262000826565b5050506200009a600983620001a960201b620014771790919060201c565b61012052620000b781600a620001a9602090811b6200147717901c565b61014052815160208084019190912060e052815190820120610100524660a0526200014560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506200015e9050600089620001f9565b6200016a82826200023c565b620001758362000341565b600f62000183868262000826565b50600e62000192858262000826565b505050505050505050505050505050505062000970565b6000602083511015620001c957620001c1836200043a565b9050620001f3565b82620001e0836200047d60201b620014a81760201c565b90620001ed908262000826565b5060ff90505b92915050565b6200021082826200048060201b620014ab1760201c565b6000828152600160209081526040909120620002379183906200152f62000521821b17901c565b505050565b6127106001600160601b0382161115620002b05760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620003085760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002a7565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600c55565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa1580156200038d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b39190620008f2565b620003d15760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080829050601f8151111562000468578260405163305a27a960e01b8152600401620002a7919062000916565b805162000475826200094b565b179392505050565b90565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200051d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620004dc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000538836001600160a01b0384166200053f565b9392505050565b60008181526001830160205260408120546200058857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001f3565b506000620001f3565b80516001600160a01b0381168114620005a957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620005e1578181015183820152602001620005c7565b50506000910152565b600082601f830112620005fc57600080fd5b81516001600160401b0380821115620006195762000619620005ae565b604051601f8301601f19908116603f01168101908282118183101715620006445762000644620005ae565b816040528381528660208588010111156200065e57600080fd5b62000671846020830160208901620005c4565b9695505050505050565b80516001600160601b0381168114620005a957600080fd5b600080600080600080600080610100898b031215620006b157600080fd5b620006bc8962000591565b60208a01519098506001600160401b0380821115620006da57600080fd5b620006e88c838d01620005ea565b985060408b0151915080821115620006ff57600080fd5b6200070d8c838d01620005ea565b975060608b01519150808211156200072457600080fd5b620007328c838d01620005ea565b965060808b01519150808211156200074957600080fd5b50620007588b828c01620005ea565b9450506200076960a08a0162000591565b92506200077960c08a0162000591565b91506200078960e08a016200067b565b90509295985092959890939650565b600181811c90821680620007ad57607f821691505b602082108103620007ce57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023757600081815260208120601f850160051c81016020861015620007fd5750805b601f850160051c820191505b818110156200081e5782815560010162000809565b505050505050565b81516001600160401b03811115620008425762000842620005ae565b6200085a8162000853845462000798565b84620007d4565b602080601f831160018114620008925760008415620008795750858301515b600019600386901b1c1916600185901b1785556200081e565b600085815260208120601f198616915b82811015620008c357888601518255948401946001909101908401620008a2565b5085821015620008e25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200090557600080fd5b815180151581146200053857600080fd5b602081526000825180602084015262000937816040850160208701620005c4565b601f01601f19169190910160400192915050565b80516020808301519190811015620007ce5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161416c620009cb6000396000610fdc01526000610fb101526000611b3401526000611b0c01526000611a6701526000611a9101526000611abb015261416c6000f3fe608060405234801561001057600080fd5b50600436106102f05760003560e01c806369e2f0fb1161019d578063a1448194116100e9578063ca15c873116100a2578063e4623c1b1161007c578063e4623c1b146106b8578063e4e18f6d146106cb578063e8a3d485146106de578063e985e9c5146106e657600080fd5b8063ca15c8731461067d578063d539139314610690578063d547741f146106a557600080fd5b8063a144819414610616578063a217fddf14610629578063a22cb46514610631578063a701281614610644578063b88d4fde14610657578063c87b56dd1461066a57600080fd5b8063885e7a0811610156578063938e3d7b11610130578063938e3d7b146105d557806395d89b41146105e85780639e2641a3146105f05780639f15d7001461060357600080fd5b8063885e7a081461059c5780639010d07c146105af57806391d14854146105c257600080fd5b806369e2f0fb1461052d5780636c0360eb1461054057806370a0823114610548578063745a41bc1461055b57806374f16a811461056e57806384b0196e1461058157600080fd5b80632f2ff15d1161025c5780633eaaf86b1161021557806342966c68116101ef57806342966c68146104e1578063439aed34146104f457806355f804b3146105075780636352211e1461051a57600080fd5b80633eaaf86b146104b257806340c10f19146104bb57806342842e0e146104ce57600080fd5b80632f2ff15d1461044957806331ae450b1461045c5780633644e5151461047157806336568abe146104795780633dd1eb611461048c5780633e769acd1461049f57600080fd5b806318160ddd116102ae57806318160ddd146103b3578063234af046146103bb57806323b872dd146103ce578063248a9ca3146103e157806329326f29146104045780632a55205a1461041757600080fd5b80628ad946146102f557806301ffc9a71461030a57806306fdde0314610332578063081812fc14610347578063095ea7b314610372578063141a468c14610385575b600080fd5b610308610303366004613441565b610722565b005b61031d610318366004613491565b6107f8565b60405190151581526020015b60405180910390f35b61033a610809565b60405161032991906134fe565b61035a610355366004613511565b61089b565b6040516001600160a01b039091168152602001610329565b610308610380366004613546565b6108c2565b6103a5610393366004613511565b6000908152600b602052604090205490565b604051908152602001610329565b6010546103a5565b6103086103c9366004613712565b6109dc565b6103086103dc36600461375a565b610a34565b6103a56103ef366004613511565b60009081526020819052604090206001015490565b60025461035a906001600160a01b031681565b61042a610425366004613796565b610a66565b604080516001600160a01b039093168352602083019190915201610329565b6103086104573660046137b8565b610b14565b610464610b39565b60405161032991906137e4565b6103a5610be7565b6103086104873660046137b8565b610bf6565b61030861049a366004613831565b610c70565b6103086104ad366004613712565b610c93565b6103a560105481565b6103086104c9366004613546565b610d1f565b6103086104dc36600461375a565b610d5b565b6103086104ef366004613511565b610d76565b610308610502366004613863565b610db4565b6103086105153660046138f6565b610ddd565b61035a610528366004613511565b610df4565b61030861053b366004613831565b610e54565b61033a610e77565b6103a5610556366004613831565b610f05565b61030861056936600461395e565b610f8b565b61030861057c366004613712565b610f97565b610589610fa3565b60405161032997969594939291906139be565b6103086105aa366004613a54565b61102c565b61035a6105bd366004613796565b611041565b61031d6105d03660046137b8565b611060565b6103086105e33660046138f6565b611089565b61033a6110a0565b6103086105fe366004613712565b6110af565b610308610611366004613546565b611107565b610308610624366004613546565b611161565b6103a5600081565b61030861063f366004613a8c565b611193565b610308610652366004613b07565b6112e4565b610308610665366004613b6b565b611344565b61033a610678366004613511565b611376565b6103a561068b366004613511565b6113dc565b6103a56a4d494e5445525f524f4c4560a81b81565b6103086106b33660046137b8565b6113f3565b6103086106c6366004613bba565b611418565b6103086106d9366004613831565b611456565b61033a61146a565b61031d6106f4366004613bfb565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61072f6020820182613c25565b905061073e6040830183613c25565b90501461075e5760405163359a1bc360e01b815260040160405180910390fd5b60005b61076e6040830183613c25565b90508110156107f4576107e26107876020840184613831565b6107946020850185613c25565b848181106107a4576107a4613c6e565b90506020020160208101906107b99190613831565b6107c66040860186613c25565b858181106107d6576107d6613c6e565b90506020020135610d5b565b806107ec81613c9a565b915050610761565b5050565b600061080382611544565b92915050565b60606003805461081890613cb3565b80601f016020809104026020016040519081016040528092919081815260200182805461084490613cb3565b80156108915780601f1061086657610100808354040283529160200191610891565b820191906000526020600020905b81548152906001019060200180831161087457829003601f168201915b5050505050905090565b60006108a682611569565b506000908152600760205260409020546001600160a01b031690565b60006108cd82610df4565b9050806001600160a01b0316836001600160a01b03160361093f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061095b575061095b81336106f4565b6109cd5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610936565b6109d783836115c8565b505050565b6a4d494e5445525f524f4c4560a81b6109f481611719565b60005b82518110156109d757610a22838281518110610a1557610a15613c6e565b6020026020010151611723565b80610a2c81613c9a565b9150506109f7565b610a3f335b826117b2565b610a5b5760405162461bcd60e51b815260040161093690613ced565b6109d7838383611831565b6000828152600d602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610adb575060408051808201909152600c546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610afa906001600160601b031687613d3a565b610b049190613d51565b91519350909150505b9250929050565b600082815260208190526040902060010154610b2f81611719565b6109d78383611a38565b60606000610b46816113dc565b90506000816001600160401b03811115610b6257610b62613570565b604051908082528060200260200182016040528015610b8b578160200160208202803683370190505b50905060005b82811015610be057610ba4600082611041565b828281518110610bb657610bb6613c6e565b6001600160a01b039092166020928302919091019091015280610bd881613c9a565b915050610b91565b5092915050565b6000610bf1611a5a565b905090565b6001600160a01b0381163314610c665760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610936565b6107f48282611b85565b6000610c7b81611719565b6107f46a4d494e5445525f524f4c4560a81b83610b14565b60005b81518110156107f4576000828281518110610cb357610cb3613c6e565b6020026020010151905060005b816020015151811015610d0a57610cf8826000015183602001518381518110610ceb57610ceb613c6e565b6020026020010151611107565b80610d0281613c9a565b915050610cc0565b50508080610d1790613c9a565b915050610c96565b6a4d494e5445525f524f4c4560a81b610d3781611719565b610d418383611ba7565b60108054906000610d5183613c9a565b9190505550505050565b6109d783838360405180602001604052806000815250611344565b610d7f81611bee565b600881901c60009081526011602052604081208054600160ff85161b1790556010805491610dac83613d73565b919050555050565b6a4d494e5445525f524f4c4560a81b610dcc81611719565b610dd7848484611c1c565b50505050565b6000610de881611719565b600f6109d78382613dd0565b6000818152600560205260408120546001600160a01b0316806108035760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610936565b6000610e5f81611719565b6107f46a4d494e5445525f524f4c4560a81b836113f3565b600f8054610e8490613cb3565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb090613cb3565b8015610efd5780601f10610ed257610100808354040283529160200191610efd565b820191906000526020600020905b815481529060010190602001808311610ee057829003601f168201915b505050505081565b60006001600160a01b038216610f6f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610936565b506001600160a01b031660009081526006602052604090205490565b610dd784848484611ce7565b610fa081610c93565b50565b600060608082808083610fd77f00000000000000000000000000000000000000000000000000000000000000006009611dd0565b6110027f0000000000000000000000000000000000000000000000000000000000000000600a611dd0565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b600061103781611719565b6109d78383611e74565b60008281526001602052604081206110599083611f2e565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600061109481611719565b600e6109d78382613dd0565b60606004805461081890613cb3565b6a4d494e5445525f524f4c4560a81b6110c781611719565b60005b82518110156109d7576110f58382815181106110e8576110e8613c6e565b6020026020010151611f3a565b806110ff81613c9a565b9150506110ca565b600061111282610df4565b9050826001600160a01b0316816001600160a01b03161461115857604051634fefd56160e01b8152600481018390526001600160a01b0382166024820152604401610936565b6109d782610d76565b6a4d494e5445525f524f4c4560a81b61117981611719565b610d41838360405180602001604052806000815250611fb0565b81333b1580159061120d57506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa1580156111e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120b9190613e8f565b155b1561122d5760405163f6fa4cbd60e01b8152336004820152602401610936565b6001600160a01b0381163b158015906112b157506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af9190613e8f565b155b156112da576040516341b8d58160e11b81526001600160a01b0382166004820152602401610936565b6109d78383611fe3565b6a4d494e5445525f524f4c4560a81b6112fc81611719565b60005b8481101561133c5761132a86868381811061131c5761131c613c6e565b905060200201358585611c1c565b8061133481613c9a565b9150506112ff565b505050505050565b61134e33836117b2565b61136a5760405162461bcd60e51b815260040161093690613ced565b610dd784848484611fee565b606061138182611569565b600061138b612021565b905060008151116113ab5760405180602001604052806000815250611059565b806113b584612030565b6040516020016113c6929190613eac565b6040516020818303038152906040529392505050565b6000818152600160205260408120610803906120c2565b60008281526020819052604090206001015461140e81611719565b6109d78383611b85565b60005b818110156109d75761144483838381811061143857611438613c6e565b90506020020135610d76565b8061144e81613c9a565b91505061141b565b600061146181611719565b6107f4826120cc565b600e8054610e8490613cb3565b60006020835110156114935761148c836121c1565b9050610803565b8161149e8482613dd0565b5060ff9050610803565b90565b6114b58282611060565b6107f4576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556114eb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611059836001600160a01b0384166121ff565b60006001600160e01b0319821663152a902d60e11b148061080357506108038261224e565b6000818152600560205260409020546001600160a01b0316610fa05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610936565b81333b1580159061164257506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa15801561161c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116409190613e8f565b155b156116625760405163f6fa4cbd60e01b8152336004820152602401610936565b6001600160a01b0381163b158015906116e657506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa1580156116c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e49190613e8f565b155b1561170f576040516341b8d58160e11b81526001600160a01b0382166004820152602401610936565b6109d78383612273565b610fa081336122e1565b80516001600160a01b031661174b576040516331c3e52960e11b815260040160405180910390fd5b60005b8160200151518110156117985761178682600001518360200151838151811061177957611779613c6e565b602002602001015161233a565b8061179081613c9a565b91505061174e565b508060200151516010546117ac9190613edb565b60105550565b6000806117be83610df4565b9050806001600160a01b0316846001600160a01b0316148061180557506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b806118295750836001600160a01b031661181e8461089b565b6001600160a01b0316145b949350505050565b82823332148015906118ac57506002546040516305a3b80960e01b81523360048201526001600160a01b03909116906305a3b80990602401602060405180830381865afa158015611886573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118aa9190613e8f565b155b156118cc5760405163937db65f60e01b8152336004820152602401610936565b6001600160a01b0382163b1580159061195057506002546040516305a3b80960e01b81526001600160a01b038481166004830152909116906305a3b80990602401602060405180830381865afa15801561192a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194e9190613e8f565b155b156119795760405163f934453160e01b81526001600160a01b0383166004820152602401610936565b6001600160a01b0381163b158015906119fd57506002546040516305a3b80960e01b81526001600160a01b038381166004830152909116906305a3b80990602401602060405180830381865afa1580156119d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fb9190613e8f565b155b15611a2657604051632a67242160e11b81526001600160a01b0382166004820152602401610936565b611a31858585612381565b5050505050565b611a4282826114ab565b60008281526001602052604090206109d7908261152f565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611ab357507f000000000000000000000000000000000000000000000000000000000000000046145b15611add57507f000000000000000000000000000000000000000000000000000000000000000090565b610bf1604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611b8f82826123ab565b60008281526001602052604090206109d79082612410565b600881901c600090815260116020526040902054600160ff83161b1615611be4576040516305dcda1160e51b815260048101829052602401610936565b6107f48282612425565b611bf733610a39565b611c135760405162461bcd60e51b815260040161093690613ced565b610fa0816125b0565b6127106001600160601b0382161115611c475760405162461bcd60e51b815260040161093690613eee565b6001600160a01b038216611c9d5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610936565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600d90529190942093519051909116600160a01b029116179055565b42821015611d085760405163068568f360e21b815260040160405180910390fd5b6000611d15858585612645565b9050611d2a611d2385610df4565b828461271e565b15611d3f57611d3985856115c8565b50610dd7565b60008251604003611d8657611d7f82611d5b8560006020612828565b611d6490613f38565b611d718660206040612828565b611d7a90613f38565b612935565b9050611db2565b8251604103611d9957611d7f8284612952565b604051638baa579f60e01b815260040160405180910390fd5b611dbc8186612976565b15611d9957611dcb86866115c8565b61133c565b606060ff8314611de35761148c83612995565b818054611def90613cb3565b80601f0160208091040260200160405190810160405280929190818152602001828054611e1b90613cb3565b8015611e685780601f10611e3d57610100808354040283529160200191611e68565b820191906000526020600020905b815481529060010190602001808311611e4b57829003601f168201915b50505050509050610803565b6127106001600160601b0382161115611e9f5760405162461bcd60e51b815260040161093690613eee565b6001600160a01b038216611ef55760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610936565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600c55565b600061105983836129d4565b80516001600160a01b031615611f63576040516331c3e52960e11b815260040160405180910390fd5b60005b81602001515181101561179857611f9e826000015183602001518381518110611f9157611f91613c6e565b6020026020010151611ba7565b80611fa881613c9a565b915050611f66565b611fba8383611ba7565b611fc760008484846129fe565b6109d75760405162461bcd60e51b815260040161093690613f5c565b6107f4338383612aff565b611ff9848484611831565b612005848484846129fe565b610dd75760405162461bcd60e51b815260040161093690613f5c565b6060600f805461081890613cb3565b6060600061203d83612bcd565b60010190506000816001600160401b0381111561205c5761205c613570565b6040519080825280601f01601f191660200182016040528015612086576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461209057509392505050565b6000610803825490565b6040516301ffc9a760e01b81526305a3b80960e01b60048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015612117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213b9190613e8f565b6121585760405163d6f93fb760e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527f3edc37a14cc8047c7c8a3f354311efe86c14848efd4e3765a3e1e57eea04ea76910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600080829050601f815111156121ec578260405163305a27a960e01b815260040161093691906134fe565b80516121f782613f38565b179392505050565b600081815260018301602052604081205461224657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610803565b506000610803565b60006001600160e01b03198216635604e22560e01b1480610803575061080382612ca5565b600081815260076020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122a882610df4565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6122eb8282611060565b6107f4576122f881612ce5565b612303836020612cf7565b604051602001612314929190613fae565b60408051601f198184030181529082905262461bcd60e51b8252610936916004016134fe565b600881901c600090815260116020526040902054600160ff83161b1615612377576040516305dcda1160e51b815260048101829052602401610936565b6107f48282612e92565b6000818152600b6020526040812080549161239b83613c9a565b91905055506109d7838383612eac565b6123b58282611060565b156107f4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611059836001600160a01b038416613010565b6001600160a01b03821661247b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610936565b6000818152600560205260409020546001600160a01b0316156124e05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610936565b6000818152600560205260409020546001600160a01b0316156125455760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610936565b6001600160a01b038216600081815260066020908152604080832080546001019055848352600590915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006125bb82610df4565b90506125c682610df4565b600083815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526006845282852080546000190190558785526005909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006118296040516020016126b390660a0cae4dad2e8560cb1b81527f61646472657373207370656e6465722c75696e7432353620746f6b656e49642c60078201527f75696e74323536206e6f6e63652c75696e7432353620646561646c696e652900602782015260460190565b60408051808303601f1901815282825280516020918201206000888152600b835283902054918401526001600160a01b0388169183019190915260608201869052608082015260a0810184905260c00160405160208183030381529060405280519060200120613103565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401612748929190614023565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051612786919061403c565b600060405180830381855afa9150503d80600081146127c1576040519150601f19603f3d011682016040523d82523d6000602084013e6127c6565b606091505b50915091508180156127d9575080516020145b1561281c576000818060200190518101906127f49190614058565b90506374eca2c160e11b6001600160e01b031982160161281a5760019350505050611059565b505b50600095945050505050565b60608161283681601f613edb565b10156128755760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610936565b61287f8284613edb565b845110156128c35760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610936565b6060821580156128e2576040519150600082526020820160405261292c565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561291b578051835260209283019201612903565b5050858452601f01601f1916604052505b50949350505050565b6000806000612945868686613130565b9150915061292c81613169565b600080600061296185856132b3565b9150915061296e81613169565b509392505050565b60006001600160a01b03831615801590611059575061105983836117b2565b606060006129a2836132f5565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60008260000182815481106129eb576129eb613c6e565b9060005260206000200154905092915050565b60006001600160a01b0384163b15612af457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612a42903390899088908890600401614075565b6020604051808303816000875af1925050508015612a7d575060408051601f3d908101601f19168201909252612a7a91810190614058565b60015b612ada573d808015612aab576040519150601f19603f3d011682016040523d82523d6000602084013e612ab0565b606091505b508051600003612ad25760405162461bcd60e51b815260040161093690613f5c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611829565b506001949350505050565b816001600160a01b0316836001600160a01b031603612b605760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610936565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612c0c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612c38576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612c5657662386f26fc10000830492506010015b6305f5e1008310612c6e576305f5e100830492506008015b6127108310612c8257612710830492506004015b60648310612c94576064830492506002015b600a83106108035760010192915050565b60006001600160e01b031982166380ac58cd60e01b1480612cd657506001600160e01b03198216635b5e139f60e01b145b8061080357506108038261331d565b60606108036001600160a01b03831660145b60606000612d06836002613d3a565b612d11906002613edb565b6001600160401b03811115612d2857612d28613570565b6040519080825280601f01601f191660200182016040528015612d52576020820181803683370190505b509050600360fc1b81600081518110612d6d57612d6d613c6e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d9c57612d9c613c6e565b60200101906001600160f81b031916908160001a9053506000612dc0846002613d3a565b612dcb906001613edb565b90505b6001811115612e43576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612dff57612dff613c6e565b1a60f81b828281518110612e1557612e15613c6e565b60200101906001600160f81b031916908160001a90535060049490941c93612e3c81613d73565b9050612dce565b5083156110595760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610936565b6107f4828260405180602001604052806000815250611fb0565b826001600160a01b0316612ebf82610df4565b6001600160a01b031614612ee55760405162461bcd60e51b8152600401610936906140b2565b6001600160a01b038216612f475760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610936565b826001600160a01b0316612f5a82610df4565b6001600160a01b031614612f805760405162461bcd60e51b8152600401610936906140b2565b600081815260076020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260068552838620805460001901905590871680865283862080546001019055868652600590945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815260018301602052604081205480156130f95760006130346001836140f7565b8554909150600090613048906001906140f7565b90508181146130ad57600086600001828154811061306857613068613c6e565b906000526020600020015490508087600001848154811061308b5761308b613c6e565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806130be576130be61410a565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610803565b6000915050610803565b6000610803613110611a5a565b8360405161190160f01b8152600281019290925260228201526042902090565b6000806001600160ff1b0383168161314d60ff86901c601b613edb565b905061315b87828885613328565b935093505050935093915050565b600081600481111561317d5761317d614120565b036131855750565b600181600481111561319957613199614120565b036131e65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610936565b60028160048111156131fa576131fa614120565b036132475760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610936565b600381600481111561325b5761325b614120565b03610fa05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610936565b60008082516041036132e95760208301516040840151606085015160001a6132dd87828585613328565b94509450505050610b0d565b50600090506002610b0d565b600060ff8216601f81111561080357604051632cd44ac360e21b815260040160405180910390fd5b6000610803826133ec565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561335f57506000905060036133e3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156133b3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166133dc576000600192509250506133e3565b9150600090505b94509492505050565b60006001600160e01b03198216635a05180f60e01b148061080357506108038260006001600160e01b03198216637965db0b60e01b148061080357506301ffc9a760e01b6001600160e01b0319831614610803565b60006020828403121561345357600080fd5b81356001600160401b0381111561346957600080fd5b82016060818503121561105957600080fd5b6001600160e01b031981168114610fa057600080fd5b6000602082840312156134a357600080fd5b81356110598161347b565b60005b838110156134c95781810151838201526020016134b1565b50506000910152565b600081518084526134ea8160208601602086016134ae565b601f01601f19169290920160200192915050565b60208152600061105960208301846134d2565b60006020828403121561352357600080fd5b5035919050565b80356001600160a01b038116811461354157600080fd5b919050565b6000806040838503121561355957600080fd5b6135628361352a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156135a8576135a8613570565b60405290565b604051601f8201601f191681016001600160401b03811182821017156135d6576135d6613570565b604052919050565b60006001600160401b038211156135f7576135f7613570565b5060051b60200190565b600061361461360f846135de565b6135ae565b8381529050602080820190600585811b85018781111561363357600080fd5b855b818110156137065780356001600160401b03808211156136555760008081fd5b908801906040828c03121561366a5760008081fd5b613672613586565b61367b8361352a565b8152868301358281111561368f5760008081fd5b8084019350508b601f8401126136a757600091508182fd5b823591506136b761360f836135de565b82815291861b8301870191878101908d8411156136d45760008081fd5b938801935b838510156136f2578435825293880193908801906136d9565b828901525087525050938301938301613635565b50505050509392505050565b60006020828403121561372457600080fd5b81356001600160401b0381111561373a57600080fd5b8201601f8101841361374b57600080fd5b61182984823560208401613601565b60008060006060848603121561376f57600080fd5b6137788461352a565b92506137866020850161352a565b9150604084013590509250925092565b600080604083850312156137a957600080fd5b50508035926020909101359150565b600080604083850312156137cb57600080fd5b823591506137db6020840161352a565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156138255783516001600160a01b031683529284019291840191600101613800565b50909695505050505050565b60006020828403121561384357600080fd5b6110598261352a565b80356001600160601b038116811461354157600080fd5b60008060006060848603121561387857600080fd5b833592506138886020850161352a565b91506138966040850161384c565b90509250925092565b60006001600160401b038311156138b8576138b8613570565b6138cb601f8401601f19166020016135ae565b90508281528383830111156138df57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561390857600080fd5b81356001600160401b0381111561391e57600080fd5b8201601f8101841361392f57600080fd5b6118298482356020840161389f565b600082601f83011261394f57600080fd5b6110598383356020850161389f565b6000806000806080858703121561397457600080fd5b61397d8561352a565b9350602085013592506040850135915060608501356001600160401b038111156139a657600080fd5b6139b28782880161393e565b91505092959194509250565b60ff60f81b881681526000602060e0818401526139de60e084018a6134d2565b83810360408501526139f0818a6134d2565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015613a4257835183529284019291840191600101613a26565b50909c9b505050505050505050505050565b60008060408385031215613a6757600080fd5b613a708361352a565b91506137db6020840161384c565b8015158114610fa057600080fd5b60008060408385031215613a9f57600080fd5b613aa88361352a565b91506020830135613ab881613a7e565b809150509250929050565b60008083601f840112613ad557600080fd5b5081356001600160401b03811115613aec57600080fd5b6020830191508360208260051b8501011115610b0d57600080fd5b60008060008060608587031215613b1d57600080fd5b84356001600160401b03811115613b3357600080fd5b613b3f87828801613ac3565b9095509350613b5290506020860161352a565b9150613b606040860161384c565b905092959194509250565b60008060008060808587031215613b8157600080fd5b613b8a8561352a565b9350613b986020860161352a565b92506040850135915060608501356001600160401b038111156139a657600080fd5b60008060208385031215613bcd57600080fd5b82356001600160401b03811115613be357600080fd5b613bef85828601613ac3565b90969095509350505050565b60008060408385031215613c0e57600080fd5b613c178361352a565b91506137db6020840161352a565b6000808335601e19843603018112613c3c57600080fd5b8301803591506001600160401b03821115613c5657600080fd5b6020019150600581901b3603821315610b0d57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613cac57613cac613c84565b5060010190565b600181811c90821680613cc757607f821691505b602082108103613ce757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b808202811582820484141761080357610803613c84565b600082613d6e57634e487b7160e01b600052601260045260246000fd5b500490565b600081613d8257613d82613c84565b506000190190565b601f8211156109d757600081815260208120601f850160051c81016020861015613db15750805b601f850160051c820191505b8181101561133c57828155600101613dbd565b81516001600160401b03811115613de957613de9613570565b613dfd81613df78454613cb3565b84613d8a565b602080601f831160018114613e325760008415613e1a5750858301515b600019600386901b1c1916600185901b17855561133c565b600085815260208120601f198616915b82811015613e6157888601518255948401946001909101908401613e42565b5085821015613e7f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215613ea157600080fd5b815161105981613a7e565b60008351613ebe8184602088016134ae565b835190830190613ed28183602088016134ae565b01949350505050565b8082018082111561080357610803613c84565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b80516020808301519190811015613ce75760001960209190910360031b1b16919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613fe68160178501602088016134ae565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516140178160288401602088016134ae565b01602801949350505050565b82815260406020820152600061182960408301846134d2565b6000825161404e8184602087016134ae565b9190910192915050565b60006020828403121561406a57600080fd5b81516110598161347b565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906140a8908301846134d2565b9695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b8181038181111561080357610803613c84565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220c47aea78e02adda7e8a36138892c3ed2fc9b754ce58545603813e5750b053f0764736f6c63430008110033";
32198
33638
  const isSuperArgs$1 = (xs) => xs.length > 1;
32199
33639
  class ImmutableERC721MintByID__factory extends ethers.ContractFactory {
32200
33640
  constructor(...args) {
@@ -32291,6 +33731,13 @@ class ERC721 {
32291
33731
  async DEFAULT_ADMIN_ROLE(provider, overrides = {}) {
32292
33732
  return await this.contract.connect(provider).DEFAULT_ADMIN_ROLE(overrides);
32293
33733
  }
33734
+ /**
33735
+ * Returns the domain separator used in the encoding of the signature for permits, as defined by EIP-712
33736
+ * @return the bytes32 domain separator
33737
+ */
33738
+ async DOMAIN_SEPARATOR(provider, overrides) {
33739
+ return await this.contract.connect(provider).DOMAIN_SEPARATOR(overrides);
33740
+ }
32294
33741
  /**
32295
33742
  * @returns the MINTER_ROLE as a string.
32296
33743
  */
@@ -32315,6 +33762,13 @@ class ERC721 {
32315
33762
  async contractURI(provider, overrides = {}) {
32316
33763
  return await this.contract.connect(provider).contractURI(overrides);
32317
33764
  }
33765
+ /**
33766
+ * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
33767
+ * signature.
33768
+ */
33769
+ async eip712Domain(provider, overrides) {
33770
+ return await this.contract.eip712Domain(overrides);
33771
+ }
32318
33772
  /**
32319
33773
  * @returns admin addresses as an array of strings.
32320
33774
  */
@@ -32369,6 +33823,14 @@ class ERC721 {
32369
33823
  async ownerOf(provider, tokenId, overrides = {}) {
32370
33824
  return await this.contract.connect(provider).ownerOf(tokenId, overrides);
32371
33825
  }
33826
+ /**
33827
+ * Returns the current nonce of a given token ID.
33828
+ * @param tokenId The ID of the token for which to retrieve the nonce.
33829
+ * @return Current nonce of the given token.
33830
+ */
33831
+ async nonces(provider, tokenId, overrides) {
33832
+ return await this.contract.connect(provider).nonces(tokenId, overrides);
33833
+ }
32372
33834
  /**
32373
33835
  * @returns the operator allowlist as a string.
32374
33836
  */
@@ -32408,6 +33870,16 @@ class ERC721 {
32408
33870
  async populateApprove(to, tokenId, overrides = {}) {
32409
33871
  return await this.contract.populateTransaction.approve(to, tokenId, overrides);
32410
33872
  }
33873
+ /**
33874
+ * Function to approve by way of owner signature
33875
+ * @param spender the address to approve
33876
+ * @param tokenId the index of the NFT to approve the spender on
33877
+ * @param deadline a timestamp expiry for the permit
33878
+ * @param sig a traditional or EIP-2098 signature
33879
+ */
33880
+ async populatePermit(spender, tokenId, deadline, sig, overrides = {}) {
33881
+ return await this.contract.populateTransaction.permit(spender, tokenId, deadline, sig, overrides);
33882
+ }
32411
33883
  /**
32412
33884
  * @returns a populated transaction for the burn contract function
32413
33885
  */
@@ -32626,9 +34098,7 @@ class ERC721MintByID {
32626
34098
  * @returns the approved address for a token ID, or zero if no address set.
32627
34099
  */
32628
34100
  async getApproved(provider, tokenId, overrides = {}) {
32629
- return await this.contract
32630
- .connect(provider)
32631
- .getApproved(tokenId, overrides);
34101
+ return await this.contract.connect(provider).getApproved(tokenId, overrides);
32632
34102
  }
32633
34103
  /**
32634
34104
  * @returns the role admin address.
@@ -32640,33 +34110,25 @@ class ERC721MintByID {
32640
34110
  * @returns the role member address at a particular index.
32641
34111
  */
32642
34112
  async getRoleMember(provider, role, index, overrides = {}) {
32643
- return await this.contract
32644
- .connect(provider)
32645
- .getRoleMember(role, index, overrides);
34113
+ return await this.contract.connect(provider).getRoleMember(role, index, overrides);
32646
34114
  }
32647
34115
  /**
32648
34116
  * @returns the role member count as a BigNumber.
32649
34117
  */
32650
34118
  async getRoleMemberCount(provider, role, overrides = {}) {
32651
- return await this.contract
32652
- .connect(provider)
32653
- .getRoleMemberCount(role, overrides);
34119
+ return await this.contract.connect(provider).getRoleMemberCount(role, overrides);
32654
34120
  }
32655
34121
  /**
32656
34122
  * @returns a boolean for whether an account has a particular role.
32657
34123
  */
32658
34124
  async hasRole(provider, role, account, overrides = {}) {
32659
- return await this.contract
32660
- .connect(provider)
32661
- .hasRole(role, account, overrides);
34125
+ return await this.contract.connect(provider).hasRole(role, account, overrides);
32662
34126
  }
32663
34127
  /**
32664
34128
  * @returns a booolean that tells whether an operator is approved by a given owner.
32665
34129
  */
32666
34130
  async isApprovedForAll(provider, owner, operator, overrides = {}) {
32667
- return await this.contract
32668
- .connect(provider)
32669
- .isApprovedForAll(owner, operator, overrides);
34131
+ return await this.contract.connect(provider).isApprovedForAll(owner, operator, overrides);
32670
34132
  }
32671
34133
  /**
32672
34134
  * @returns the name of the contract as a string.
@@ -32680,6 +34142,14 @@ class ERC721MintByID {
32680
34142
  async ownerOf(provider, tokenId, overrides = {}) {
32681
34143
  return await this.contract.connect(provider).ownerOf(tokenId, overrides);
32682
34144
  }
34145
+ /**
34146
+ * Returns the current nonce of a given token ID.
34147
+ * @param tokenId The ID of the token for which to retrieve the nonce.
34148
+ * @return Current nonce of the given token.
34149
+ */
34150
+ async nonces(provider, tokenId, overrides) {
34151
+ return await this.contract.connect(provider).nonces(tokenId, overrides);
34152
+ }
32683
34153
  /**
32684
34154
  * @returns the operator allowlist as a string.
32685
34155
  */
@@ -32690,9 +34160,7 @@ class ERC721MintByID {
32690
34160
  * @returns the royalty information for a particular tokenId.
32691
34161
  */
32692
34162
  async royaltyInfo(provider, _tokenId, _salePrice, overrides = {}) {
32693
- return await this.contract
32694
- .connect(provider)
32695
- .royaltyInfo(_tokenId, _salePrice, overrides);
34163
+ return await this.contract.connect(provider).royaltyInfo(_tokenId, _salePrice, overrides);
32696
34164
  }
32697
34165
  /**
32698
34166
  * @returns the symbol of the contract as a string.
@@ -32721,6 +34189,16 @@ class ERC721MintByID {
32721
34189
  async populateApprove(to, tokenId, overrides = {}) {
32722
34190
  return await this.contract.populateTransaction.approve(to, tokenId, overrides);
32723
34191
  }
34192
+ /**
34193
+ * Function to approve by way of owner signature
34194
+ * @param spender the address to approve
34195
+ * @param tokenId the index of the NFT to approve the spender on
34196
+ * @param deadline a timestamp expiry for the permit
34197
+ * @param sig a traditional or EIP-2098 signature
34198
+ */
34199
+ async populatePermit(spender, tokenId, deadline, sig, overrides = {}) {
34200
+ return await this.contract.populateTransaction.permit(spender, tokenId, deadline, sig, overrides);
34201
+ }
32724
34202
  /**
32725
34203
  * @returns a populated transaction for the burn contract function
32726
34204
  */