@imtbl/sdk 0.12.0-alpha → 0.13.0-alpha.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.
@@ -11536,7 +11536,8 @@ declare enum CheckoutErrorType {
11536
11536
  UNSUPPORTED_TOKEN_TYPE_ERROR = "UNSUPPORTED_TOKEN_TYPE_ERROR",
11537
11537
  GET_ORDER_LISTING_ERROR = "GET_ORDER_LISTING_ERROR",
11538
11538
  SWITCH_NETWORK_UNSUPPORTED = "SWITCH_NETWORK_UNSUPPORTED",
11539
- GET_ERC20_ALLOWANCE_ERROR = "GET_ERC20_ALLOWANCE_ERROR"
11539
+ GET_ERC20_ALLOWANCE_ERROR = "GET_ERC20_ALLOWANCE_ERROR",
11540
+ GET_ERC721_ALLOWANCE_ERROR = "GET_ERC721_ALLOWANCE_ERROR"
11540
11541
  }
11541
11542
  /**
11542
11543
  * Represents an error object with a specific type, optional message, and optional data.
@@ -11666,4 +11667,4 @@ declare class Checkout {
11666
11667
  gasEstimate(params: GasEstimateParams): Promise<GasEstimateSwapResult | GasEstimateBridgeToL2Result>;
11667
11668
  }
11668
11669
 
11669
- export { AllowedNetworkConfig, BuyParams, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, ConnectParams, ConnectResult, DexConfig, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, NetworkFilter, NetworkFilterTypes, NetworkInfo, RemoteConfiguration, SendTransactionParams, SendTransactionResult, SmartCheckoutParams, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };
11670
+ export { AllowedNetworkConfig, BuyParams, CHECKOUT_API_BASE_URL, ChainId, ChainName, CheckConnectionParams, CheckConnectionResult, Checkout, CheckoutErrorType, CheckoutModuleConfiguration, ConnectParams, ConnectResult, DexConfig, ErrorType, GasEstimateBridgeToL2Result, GasEstimateParams, GasEstimateSwapResult, GasEstimateTokenConfig, GasEstimateType, GasTokenType, GetAllBalancesParams, GetAllBalancesResult, GetBalanceParams, GetBalanceResult, GetNetworkAllowListParams, GetNetworkAllowListResult, GetNetworkParams, GetTokenAllowListParams, GetTokenAllowListResult, GetWalletAllowListParams, GetWalletAllowListResult, ItemType, NetworkFilter, NetworkFilterTypes, NetworkInfo, RemoteConfiguration, SendTransactionParams, SendTransactionResult, SmartCheckoutParams, SwitchNetworkParams, SwitchNetworkResult, TokenFilter, TokenFilterTypes, TokenInfo, TransactionOrGasType, WalletFilter, WalletFilterTypes, WalletInfo, WalletProviderName };
@@ -16147,16 +16147,6 @@ class OrderBookClient {
16147
16147
  }
16148
16148
  }
16149
16149
 
16150
- /* istanbul ignore file */
16151
- /* tslint:disable */
16152
- /* eslint-disable */
16153
- var CreateOrderProtocolData;
16154
- (function (CreateOrderProtocolData) {
16155
- (function (order_type) {
16156
- order_type["FULL_RESTRICTED"] = "FULL_RESTRICTED";
16157
- })(CreateOrderProtocolData.order_type || (CreateOrderProtocolData.order_type = {}));
16158
- })(CreateOrderProtocolData || (CreateOrderProtocolData = {}));
16159
-
16160
16150
  /* istanbul ignore file */
16161
16151
  /* tslint:disable */
16162
16152
  /* eslint-disable */
@@ -16186,6 +16176,16 @@ var OrderStatus;
16186
16176
  OrderStatus["EXPIRED"] = "EXPIRED";
16187
16177
  })(OrderStatus || (OrderStatus = {}));
16188
16178
 
16179
+ /* istanbul ignore file */
16180
+ /* tslint:disable */
16181
+ /* eslint-disable */
16182
+ var ProtocolData;
16183
+ (function (ProtocolData) {
16184
+ (function (order_type) {
16185
+ order_type["FULL_RESTRICTED"] = "FULL_RESTRICTED";
16186
+ })(ProtocolData.order_type || (ProtocolData.order_type = {}));
16187
+ })(ProtocolData || (ProtocolData = {}));
16188
+
16189
16189
  var TransactionPurpose;
16190
16190
  (function (TransactionPurpose) {
16191
16191
  TransactionPurpose["APPROVAL"] = "APPROVAL";
@@ -16551,7 +16551,7 @@ class ImmutableApiClient {
16551
16551
  fees: makerFee ? [makerFee] : [],
16552
16552
  end_time: new Date(parseInt(`${orderComponents.endTime.toString()}000`, 10)).toISOString(),
16553
16553
  protocol_data: {
16554
- order_type: CreateOrderProtocolData.order_type.FULL_RESTRICTED,
16554
+ order_type: ProtocolData.order_type.FULL_RESTRICTED,
16555
16555
  zone_address: orderComponents.zone,
16556
16556
  seaport_address: this.seaportAddress,
16557
16557
  seaport_version: SEAPORT_CONTRACT_VERSION_V1_5,
@@ -17078,6 +17078,75 @@ const $d85ad1457a3f1a83$export$db5daa1b5156ccfe = [
17078
17078
  type: "function"
17079
17079
  }
17080
17080
  ];
17081
+ const $d85ad1457a3f1a83$export$8b8be7a2a654f23e = [
17082
+ {
17083
+ constant: false,
17084
+ inputs: [
17085
+ {
17086
+ internalType: "address",
17087
+ name: "to",
17088
+ type: "address"
17089
+ },
17090
+ {
17091
+ internalType: "uint256",
17092
+ name: "tokenId",
17093
+ type: "uint256"
17094
+ }
17095
+ ],
17096
+ name: "approve",
17097
+ outputs: [],
17098
+ payable: false,
17099
+ stateMutability: "nonpayable",
17100
+ type: "function"
17101
+ },
17102
+ {
17103
+ constant: true,
17104
+ inputs: [
17105
+ {
17106
+ internalType: "address",
17107
+ name: "owner",
17108
+ type: "address"
17109
+ },
17110
+ {
17111
+ internalType: "address",
17112
+ name: "operator",
17113
+ type: "address"
17114
+ }
17115
+ ],
17116
+ name: "isApprovedForAll",
17117
+ outputs: [
17118
+ {
17119
+ internalType: "bool",
17120
+ name: "",
17121
+ type: "bool"
17122
+ }
17123
+ ],
17124
+ payable: false,
17125
+ stateMutability: "view",
17126
+ type: "function"
17127
+ },
17128
+ {
17129
+ constant: true,
17130
+ inputs: [
17131
+ {
17132
+ internalType: "uint256",
17133
+ name: "tokenId",
17134
+ type: "uint256"
17135
+ }
17136
+ ],
17137
+ name: "getApproved",
17138
+ outputs: [
17139
+ {
17140
+ internalType: "address",
17141
+ name: "",
17142
+ type: "address"
17143
+ }
17144
+ ],
17145
+ payable: false,
17146
+ stateMutability: "view",
17147
+ type: "function"
17148
+ }
17149
+ ];
17081
17150
 
17082
17151
 
17083
17152
  var $4b58188d47aafe8d$export$1fc8f52ad1810e52;
@@ -17131,6 +17200,7 @@ var $4b58188d47aafe8d$export$5d3b0ad129b9b98e;
17131
17200
  CheckoutErrorType["GET_ORDER_LISTING_ERROR"] = "GET_ORDER_LISTING_ERROR";
17132
17201
  CheckoutErrorType["SWITCH_NETWORK_UNSUPPORTED"] = "SWITCH_NETWORK_UNSUPPORTED";
17133
17202
  CheckoutErrorType["GET_ERC20_ALLOWANCE_ERROR"] = "GET_ERC20_ALLOWANCE_ERROR";
17203
+ CheckoutErrorType["GET_ERC721_ALLOWANCE_ERROR"] = "GET_ERC721_ALLOWANCE_ERROR";
17134
17204
  })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
17135
17205
  class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
17136
17206
  message;
@@ -17850,13 +17920,31 @@ const $2499eab4caa6dc71$export$1ede6278abcdf1cb = (itemRequirements)=>{
17850
17920
  });
17851
17921
  return aggregatedItemRequirements.concat(Array.from(aggregatedMap.values()));
17852
17922
  };
17853
- const $2499eab4caa6dc71$export$c804c9ade5c28607 = (itemRequirements)=>$2499eab4caa6dc71$export$1ede6278abcdf1cb(itemRequirements);
17923
+ const $2499eab4caa6dc71$export$fa1f577106a81103 = (itemRequirements)=>{
17924
+ const aggregatedMap = new Map();
17925
+ const aggregatedItemRequirements = [];
17926
+ itemRequirements.forEach((itemRequirement)=>{
17927
+ const { type: type } = itemRequirement;
17928
+ if (type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) {
17929
+ aggregatedItemRequirements.push(itemRequirement);
17930
+ return;
17931
+ }
17932
+ const { contractAddress: contractAddress, spenderAddress: spenderAddress, id: id } = itemRequirement;
17933
+ const key = `${contractAddress}${spenderAddress}${id}`;
17934
+ const aggregateItem = aggregatedMap.get(key);
17935
+ if (!aggregateItem) aggregatedMap.set(key, {
17936
+ ...itemRequirement
17937
+ });
17938
+ });
17939
+ return aggregatedItemRequirements.concat(Array.from(aggregatedMap.values()));
17940
+ };
17941
+ const $2499eab4caa6dc71$export$c804c9ade5c28607 = (itemRequirements)=>$2499eab4caa6dc71$export$fa1f577106a81103($2499eab4caa6dc71$export$1ede6278abcdf1cb(itemRequirements));
17854
17942
 
17855
17943
 
17856
17944
 
17857
17945
 
17858
17946
 
17859
- const $95b61a5bfb091547$export$41491ea105c4dc2d = async (provider, ownerAddress, contractAddress, spenderAddress)=>{
17947
+ const $fc8b338399d890f3$export$41491ea105c4dc2d = async (provider, ownerAddress, contractAddress, spenderAddress)=>{
17860
17948
  try {
17861
17949
  const contract = new (0, Contract$1)(contractAddress, JSON.stringify((0, $d85ad1457a3f1a83$export$db5daa1b5156ccfe)), provider);
17862
17950
  return await contract.allowance(ownerAddress, spenderAddress);
@@ -17866,7 +17954,7 @@ const $95b61a5bfb091547$export$41491ea105c4dc2d = async (provider, ownerAddress,
17866
17954
  });
17867
17955
  }
17868
17956
  };
17869
- const $95b61a5bfb091547$export$5c6bea080a6ee647 = async (provider, ownerAddress, contractAddress, spenderAddress, amount)=>{
17957
+ const $fc8b338399d890f3$export$5c6bea080a6ee647 = async (provider, ownerAddress, contractAddress, spenderAddress, amount)=>{
17870
17958
  try {
17871
17959
  const contract = new (0, Contract$1)(contractAddress, JSON.stringify((0, $d85ad1457a3f1a83$export$db5daa1b5156ccfe)), provider);
17872
17960
  const approveTransaction = await contract.populateTransaction.approve(spenderAddress, amount);
@@ -17878,7 +17966,7 @@ const $95b61a5bfb091547$export$5c6bea080a6ee647 = async (provider, ownerAddress,
17878
17966
  });
17879
17967
  }
17880
17968
  };
17881
- const $95b61a5bfb091547$export$d93c00812189e36 = async (provider, ownerAddress, itemRequirements)=>{
17969
+ const $fc8b338399d890f3$export$d93c00812189e36 = async (provider, ownerAddress, itemRequirements)=>{
17882
17970
  let sufficient = true;
17883
17971
  const sufficientAllowances = [];
17884
17972
  const erc20s = new Map();
@@ -17890,8 +17978,9 @@ const $95b61a5bfb091547$export$d93c00812189e36 = async (provider, ownerAddress,
17890
17978
  for (const itemRequirement of itemRequirements){
17891
17979
  if (itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20) continue;
17892
17980
  const { contractAddress: contractAddress, spenderAddress: spenderAddress } = itemRequirement;
17893
- erc20s.set(`${contractAddress}${spenderAddress}`, itemRequirement);
17894
- allowancePromises.set(`${contractAddress}${spenderAddress}`, $95b61a5bfb091547$export$41491ea105c4dc2d(provider, ownerAddress, contractAddress, spenderAddress));
17981
+ const key = `${contractAddress}${spenderAddress}`;
17982
+ erc20s.set(key, itemRequirement);
17983
+ allowancePromises.set(key, $fc8b338399d890f3$export$41491ea105c4dc2d(provider, ownerAddress, contractAddress, spenderAddress));
17895
17984
  }
17896
17985
  const allowances = await Promise.all(allowancePromises.values());
17897
17986
  const allowancePromiseIds = Array.from(allowancePromises.keys());
@@ -17910,19 +17999,21 @@ const $95b61a5bfb091547$export$d93c00812189e36 = async (provider, ownerAddress,
17910
17999
  }
17911
18000
  sufficient = false; // Set sufficient false on the root of the return object when an ERC20 is insufficient
17912
18001
  const { contractAddress: contractAddress, spenderAddress: spenderAddress } = itemRequirement;
18002
+ const key = `${contractAddress}${spenderAddress}`;
17913
18003
  const delta = itemRequirement.amount.sub(allowances[index]);
17914
18004
  // Create maps for both the insufficient ERC20 data and the transaction promises using the same key so the results can be merged
17915
- insufficientERC20s.set(`${contractAddress}${spenderAddress}`, {
18005
+ insufficientERC20s.set(key, {
18006
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC20,
17916
18007
  sufficient: false,
17917
18008
  delta: delta,
17918
18009
  itemRequirement: itemRequirement,
17919
18010
  approvalTransaction: undefined
17920
18011
  });
17921
- transactionPromises.set(`${contractAddress}${spenderAddress}`, $95b61a5bfb091547$export$5c6bea080a6ee647(provider, ownerAddress, contractAddress, spenderAddress, delta));
18012
+ transactionPromises.set(key, $fc8b338399d890f3$export$5c6bea080a6ee647(provider, ownerAddress, contractAddress, spenderAddress, delta));
17922
18013
  }
17923
18014
  // Resolves the approval transactions and merges them with the insufficient ERC20 data
17924
18015
  const transactions = await Promise.all(transactionPromises.values());
17925
- const transactionPromiseIds = Array.from(allowancePromises.keys());
18016
+ const transactionPromiseIds = Array.from(transactionPromises.keys());
17926
18017
  transactions.forEach((transaction, index)=>{
17927
18018
  const insufficientERC20 = insufficientERC20s.get(transactionPromiseIds[index]);
17928
18019
  if (!insufficientERC20) return;
@@ -17937,16 +18028,156 @@ const $95b61a5bfb091547$export$d93c00812189e36 = async (provider, ownerAddress,
17937
18028
  };
17938
18029
 
17939
18030
 
18031
+
18032
+
18033
+
18034
+ const $35c3fc7013888ba5$export$90366d6b714c6f69 = async (provider, ownerAddress, contractAddress, spenderAddress)=>{
18035
+ try {
18036
+ const contract = new (0, Contract$1)(contractAddress, JSON.stringify((0, $d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
18037
+ return await contract.isApprovedForAll(ownerAddress, spenderAddress);
18038
+ } catch (err) {
18039
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to check approval for all ERC721s of collection", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
18040
+ contractAddress: contractAddress
18041
+ });
18042
+ }
18043
+ };
18044
+ const $35c3fc7013888ba5$export$ebb2a35f2b4cf5f6 = async (provider, ownerAddress, contractAddress, spenderAddress, id)=>{
18045
+ try {
18046
+ const contract = new (0, Contract$1)(contractAddress, JSON.stringify((0, $d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
18047
+ const transaction = await contract.populateTransaction.approve(spenderAddress, id);
18048
+ if (transaction) transaction.from = ownerAddress;
18049
+ return transaction;
18050
+ } catch (err) {
18051
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to get the approval transaction for ERC721", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
18052
+ contractAddress: contractAddress
18053
+ });
18054
+ }
18055
+ };
18056
+ const $35c3fc7013888ba5$export$c4605a8dd415eeea = async (provider, contractAddress, id)=>{
18057
+ try {
18058
+ const contract = new (0, Contract$1)(contractAddress, JSON.stringify((0, $d85ad1457a3f1a83$export$8b8be7a2a654f23e)), provider);
18059
+ return await contract.getApproved(id);
18060
+ } catch (err) {
18061
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Failed to get approved address for ERC721", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
18062
+ contractAddress: contractAddress
18063
+ });
18064
+ }
18065
+ };
18066
+ const $35c3fc7013888ba5$export$280481f16b8b6845 = (id, contractAddress)=>{
18067
+ const parsedId = parseInt(id, 10);
18068
+ if (Number.isNaN(parsedId)) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)("Invalid ERC721 ID", ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).GET_ERC721_ALLOWANCE_ERROR, {
18069
+ id: id,
18070
+ contractAddress: contractAddress
18071
+ });
18072
+ return parsedId;
18073
+ };
18074
+ const $35c3fc7013888ba5$export$bc63cf1bab32d6da = async (provider, itemRequirements, owner)=>{
18075
+ const approvedCollections = new Map();
18076
+ const approvedForAllPromises = new Map();
18077
+ for (const itemRequirement of itemRequirements){
18078
+ if (itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) continue;
18079
+ const { contractAddress: contractAddress, spenderAddress: spenderAddress } = itemRequirement;
18080
+ const key = `${contractAddress}-${spenderAddress}`;
18081
+ approvedCollections.set(key, false);
18082
+ if (approvedForAllPromises.has(key)) continue;
18083
+ approvedForAllPromises.set(key, $35c3fc7013888ba5$export$90366d6b714c6f69(provider, owner, contractAddress, spenderAddress));
18084
+ }
18085
+ const approvals = await Promise.all(approvedForAllPromises.values());
18086
+ const keys = Array.from(approvedForAllPromises.keys());
18087
+ approvals.forEach((approval, index)=>{
18088
+ approvedCollections.set(keys[index], approval);
18089
+ });
18090
+ return approvedCollections;
18091
+ };
18092
+ const $35c3fc7013888ba5$export$be546c525d418988 = async (provider, ownerAddress, itemRequirements)=>{
18093
+ let sufficient = true;
18094
+ const sufficientAllowances = [];
18095
+ // Setup maps to be able to link data back to the associated promises
18096
+ const erc721s = new Map();
18097
+ const approvedAddressPromises = new Map();
18098
+ const insufficientERC721s = new Map();
18099
+ const transactionPromises = new Map();
18100
+ // Check if there are any collections with approvals for all ERC721s for a given spender
18101
+ const approvedCollections = await $35c3fc7013888ba5$export$bc63cf1bab32d6da(provider, itemRequirements, ownerAddress);
18102
+ // Populate maps for both the ERC721 data and promises to get the approved addresses using the same key
18103
+ // so the promise and data can be linked together when the promise is resolved
18104
+ for (const itemRequirement of itemRequirements){
18105
+ if (itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) continue;
18106
+ const { contractAddress: contractAddress, id: id, spenderAddress: spenderAddress } = itemRequirement;
18107
+ // If the collection is approved for all then just set the item requirements and sufficient true
18108
+ const approvedForAllKey = `${contractAddress}-${spenderAddress}`;
18109
+ const approvedForAll = approvedCollections.get(approvedForAllKey);
18110
+ if (approvedForAll) {
18111
+ sufficientAllowances.push({
18112
+ sufficient: true,
18113
+ itemRequirement: itemRequirement
18114
+ });
18115
+ continue;
18116
+ }
18117
+ // If collection not approved for all then check if the given ERC721 is approved for the spender
18118
+ const key = `${contractAddress}-${id}`;
18119
+ const convertedId = $35c3fc7013888ba5$export$280481f16b8b6845(id, contractAddress);
18120
+ erc721s.set(key, itemRequirement);
18121
+ approvedAddressPromises.set(key, $35c3fc7013888ba5$export$c4605a8dd415eeea(provider, contractAddress, convertedId));
18122
+ }
18123
+ const approvedAddresses = await Promise.all(approvedAddressPromises.values());
18124
+ const approvedAddressPromiseIds = Array.from(approvedAddressPromises.keys());
18125
+ // Iterate through the approved address promises and get the ERC721 data from the ERC721 map
18126
+ // If the approved address returned for that ERC721 is for the spender then just set the item requirements and sufficient true
18127
+ // If the approved address does not match the spender then return the approval transaction
18128
+ for(let index = 0; index < approvedAddresses.length; index++){
18129
+ const itemRequirement = erc721s.get(approvedAddressPromiseIds[index]);
18130
+ if (!itemRequirement || itemRequirement.type !== ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721) continue;
18131
+ if (approvedAddresses[index] === itemRequirement.spenderAddress) {
18132
+ sufficientAllowances.push({
18133
+ sufficient: true,
18134
+ itemRequirement: itemRequirement
18135
+ });
18136
+ continue;
18137
+ }
18138
+ sufficient = false; // Set sufficient false on the root of the return object when an ERC721 is insufficient
18139
+ const { contractAddress: contractAddress, id: id, spenderAddress: spenderAddress } = itemRequirement;
18140
+ const key = `${contractAddress}-${id}`;
18141
+ const convertedId = $35c3fc7013888ba5$export$280481f16b8b6845(id, contractAddress);
18142
+ // Create maps for both the insufficient ERC721 data and the transaction promises using the same key so the results can be merged
18143
+ insufficientERC721s.set(key, {
18144
+ type: ($4b58188d47aafe8d$export$1fc8f52ad1810e52).ERC721,
18145
+ sufficient: false,
18146
+ itemRequirement: itemRequirement,
18147
+ approvalTransaction: undefined
18148
+ });
18149
+ transactionPromises.set(key, $35c3fc7013888ba5$export$ebb2a35f2b4cf5f6(provider, ownerAddress, contractAddress, spenderAddress, convertedId));
18150
+ }
18151
+ // Resolves the approval transactions and merges them with the insufficient ERC721 data
18152
+ const transactions = await Promise.all(transactionPromises.values());
18153
+ const transactionPromiseIds = Array.from(transactionPromises.keys());
18154
+ transactions.forEach((transaction, index)=>{
18155
+ const insufficientERC721 = insufficientERC721s.get(transactionPromiseIds[index]);
18156
+ if (!insufficientERC721) return;
18157
+ if (insufficientERC721.sufficient) return;
18158
+ insufficientERC721.approvalTransaction = transaction;
18159
+ });
18160
+ // Merge the allowance arrays to get both the sufficient allowances and the insufficient ERC721 allowances
18161
+ return {
18162
+ sufficient: sufficient,
18163
+ allowances: sufficientAllowances.concat(Array.from(insufficientERC721s.values()))
18164
+ };
18165
+ };
18166
+
18167
+
18168
+
18169
+
17940
18170
  const $0e7419077c373b24$export$9e073f9ada8c81e6 = async (provider, itemRequirements, transactionOrGasAmount)=>{
17941
- const ownerAddress = await provider.getSigner().getAddress();
17942
18171
  // eslint-disable-next-line no-console
17943
18172
  console.log(provider, itemRequirements, transactionOrGasAmount);
18173
+ const ownerAddress = await provider.getSigner().getAddress();
17944
18174
  const aggregatedItems = ($2499eab4caa6dc71$export$c804c9ade5c28607)(itemRequirements);
18175
+ const erc20Allowances = await ($fc8b338399d890f3$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
18176
+ const erc721Allowances = await ($35c3fc7013888ba5$export$be546c525d418988)(provider, ownerAddress, aggregatedItems);
17945
18177
  // eslint-disable-next-line no-console
17946
- console.log(aggregatedItems);
17947
- const erc20Allowances = await ($95b61a5bfb091547$export$d93c00812189e36)(provider, ownerAddress, aggregatedItems);
18178
+ console.log("ERC20 Allowances", erc20Allowances);
17948
18179
  // eslint-disable-next-line no-console
17949
- console.log(erc20Allowances);
18180
+ console.log("ERC721 Allowances", erc721Allowances);
17950
18181
  return {
17951
18182
  sufficient: true,
17952
18183
  transactionRequirements: [
@@ -18255,4 +18486,4 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
18255
18486
  }
18256
18487
  }
18257
18488
 
18258
- export { $d85ad1457a3f1a83$export$161d4a74df65fc08 as CHECKOUT_API_BASE_URL, $0472f23319457bfb$export$c06e1e7429de6283 as ChainId, $0472f23319457bfb$export$b874c6b1dfe85e02 as ChainName, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $de275b98d2b651c3$export$788b1fd17f3dad84 as GasEstimateType, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $e768639828688ca3$export$2d7a51a18d87e21d as WalletProviderName };
18489
+ export { $d85ad1457a3f1a83$export$161d4a74df65fc08 as CHECKOUT_API_BASE_URL, $0472f23319457bfb$export$c06e1e7429de6283 as ChainId, $0472f23319457bfb$export$b874c6b1dfe85e02 as ChainName, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $de275b98d2b651c3$export$788b1fd17f3dad84 as GasEstimateType, $4b58188d47aafe8d$export$537fa3efd10ed435 as GasTokenType, $4b58188d47aafe8d$export$1fc8f52ad1810e52 as ItemType, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $4b58188d47aafe8d$export$65c64e46348ee3c1 as TransactionOrGasType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $e768639828688ca3$export$2d7a51a18d87e21d as WalletProviderName };
@@ -4,7 +4,7 @@ import { useEffect } from 'react';
4
4
  function $parcel$export(e, n, v, s) {
5
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
6
  }
7
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.12.0-alpha";
7
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.13.0-alpha.1";
8
8
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
9
9
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
10
10
 
package/dist/erc20.js CHANGED
@@ -3,7 +3,7 @@ import { ContractFactory, utils, Contract } from 'ethers';
3
3
  /* Autogenerated file. Do not edit manually. */
4
4
  /* tslint:disable */
5
5
  /* eslint-disable */
6
- const _abi$4 = [
6
+ const _abi$5 = [
7
7
  {
8
8
  inputs: [
9
9
  {
@@ -291,15 +291,15 @@ const _abi$4 = [
291
291
  type: "function",
292
292
  },
293
293
  ];
294
- const _bytecode$2 = "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339818101604052810190620000379190620001f6565b8160039081620000489190620004c6565b5080600490816200005a9190620004c6565b505050620005ad565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cc8262000081565b810181811067ffffffffffffffff82111715620000ee57620000ed62000092565b5b80604052505050565b60006200010362000063565b9050620001118282620000c1565b919050565b600067ffffffffffffffff82111562000134576200013362000092565b5b6200013f8262000081565b9050602081019050919050565b60005b838110156200016c5780820151818401526020810190506200014f565b60008484015250505050565b60006200018f620001898462000116565b620000f7565b905082815260208101848484011115620001ae57620001ad6200007c565b5b620001bb8482856200014c565b509392505050565b600082601f830112620001db57620001da62000077565b5b8151620001ed84826020860162000178565b91505092915050565b6000806040838503121562000210576200020f6200006d565b5b600083015167ffffffffffffffff81111562000231576200023062000072565b5b6200023f85828601620001c3565b925050602083015167ffffffffffffffff81111562000263576200026262000072565b5b6200027185828601620001c3565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ce57607f821691505b602082108103620002e457620002e362000286565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200034e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200030f565b6200035a86836200030f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003a7620003a16200039b8462000372565b6200037c565b62000372565b9050919050565b6000819050919050565b620003c38362000386565b620003db620003d282620003ae565b8484546200031c565b825550505050565b600090565b620003f2620003e3565b620003ff818484620003b8565b505050565b5b8181101562000427576200041b600082620003e8565b60018101905062000405565b5050565b601f82111562000476576200044081620002ea565b6200044b84620002ff565b810160208510156200045b578190505b620004736200046a85620002ff565b83018262000404565b50505b505050565b600082821c905092915050565b60006200049b600019846008026200047b565b1980831691505092915050565b6000620004b6838362000488565b9150826002028217905092915050565b620004d1826200027b565b67ffffffffffffffff811115620004ed57620004ec62000092565b5b620004f98254620002b5565b620005068282856200042b565b600060209050601f8311600181146200053e576000841562000529578287015190505b620005358582620004a8565b865550620005a5565b601f1984166200054e86620002ea565b60005b82811015620005785784890151825560018201915060208501945060208101905062000551565b8683101562000598578489015162000594601f89168262000488565b8355505b6001600288020188555050505b505050505050565b61122f80620005bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212204188b273199f085e1921ec1a1fa55abdee2e425960bda675a51fac85acd9972064736f6c63430008110033";
295
- const isSuperArgs$2 = (xs) => xs.length > 1;
294
+ const _bytecode$3 = "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339818101604052810190620000379190620001f6565b8160039081620000489190620004c6565b5080600490816200005a9190620004c6565b505050620005ad565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cc8262000081565b810181811067ffffffffffffffff82111715620000ee57620000ed62000092565b5b80604052505050565b60006200010362000063565b9050620001118282620000c1565b919050565b600067ffffffffffffffff82111562000134576200013362000092565b5b6200013f8262000081565b9050602081019050919050565b60005b838110156200016c5780820151818401526020810190506200014f565b60008484015250505050565b60006200018f620001898462000116565b620000f7565b905082815260208101848484011115620001ae57620001ad6200007c565b5b620001bb8482856200014c565b509392505050565b600082601f830112620001db57620001da62000077565b5b8151620001ed84826020860162000178565b91505092915050565b6000806040838503121562000210576200020f6200006d565b5b600083015167ffffffffffffffff81111562000231576200023062000072565b5b6200023f85828601620001c3565b925050602083015167ffffffffffffffff81111562000263576200026262000072565b5b6200027185828601620001c3565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ce57607f821691505b602082108103620002e457620002e362000286565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200034e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200030f565b6200035a86836200030f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003a7620003a16200039b8462000372565b6200037c565b62000372565b9050919050565b6000819050919050565b620003c38362000386565b620003db620003d282620003ae565b8484546200031c565b825550505050565b600090565b620003f2620003e3565b620003ff818484620003b8565b505050565b5b8181101562000427576200041b600082620003e8565b60018101905062000405565b5050565b601f82111562000476576200044081620002ea565b6200044b84620002ff565b810160208510156200045b578190505b620004736200046a85620002ff565b83018262000404565b50505b505050565b600082821c905092915050565b60006200049b600019846008026200047b565b1980831691505092915050565b6000620004b6838362000488565b9150826002028217905092915050565b620004d1826200027b565b67ffffffffffffffff811115620004ed57620004ec62000092565b5b620004f98254620002b5565b620005068282856200042b565b600060209050601f8311600181146200053e576000841562000529578287015190505b620005358582620004a8565b865550620005a5565b601f1984166200054e86620002ea565b60005b82811015620005785784890151825560018201915060208501945060208101905062000551565b8683101562000598578489015162000594601f89168262000488565b8355505b6001600288020188555050505b505050505050565b61122f80620005bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212204188b273199f085e1921ec1a1fa55abdee2e425960bda675a51fac85acd9972064736f6c63430008110033";
295
+ const isSuperArgs$3 = (xs) => xs.length > 1;
296
296
  class ERC20__factory extends ContractFactory {
297
297
  constructor(...args) {
298
- if (isSuperArgs$2(args)) {
298
+ if (isSuperArgs$3(args)) {
299
299
  super(...args);
300
300
  }
301
301
  else {
302
- super(_abi$4, _bytecode$2, args[0]);
302
+ super(_abi$5, _bytecode$3, args[0]);
303
303
  }
304
304
  }
305
305
  deploy(name_, symbol_, overrides) {
@@ -314,13 +314,13 @@ class ERC20__factory extends ContractFactory {
314
314
  connect(signer) {
315
315
  return super.connect(signer);
316
316
  }
317
- static bytecode = _bytecode$2;
318
- static abi = _abi$4;
317
+ static bytecode = _bytecode$3;
318
+ static abi = _abi$5;
319
319
  static createInterface() {
320
- return new utils.Interface(_abi$4);
320
+ return new utils.Interface(_abi$5);
321
321
  }
322
322
  static connect(address, signerOrProvider) {
323
- return new Contract(address, _abi$4, signerOrProvider);
323
+ return new Contract(address, _abi$5, signerOrProvider);
324
324
  }
325
325
  }
326
326