@depay/widgets 4.4.0 → 4.4.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.
@@ -2409,7 +2409,7 @@ var es$1 = /*#__PURE__*/Object.freeze({
2409
2409
  let CONSTANTS = {
2410
2410
  ZERO: '0x0000000000000000000000000000000000000000',
2411
2411
  MAXINT: '115792089237316195423570985008687907853269984665640564039457584007913129639935',
2412
- WRAPPED: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
2412
+ WRAPPED: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
2413
2413
  NATIVE: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
2414
2414
  DECIMALS: 18,
2415
2415
  SYMBOL: 'ETH',
@@ -11354,7 +11354,7 @@ function throwFault$6(fault, operation, value) {
11354
11354
  return logger$H.throwError(fault, Logger$4.errors.NUMERIC_FAULT, params);
11355
11355
  }
11356
11356
  // value should have no prefix
11357
- function _base36To16$2(value) {
11357
+ function _base36To16$3(value) {
11358
11358
  return (new BN$4(value, 36)).toString(16);
11359
11359
  }
11360
11360
 
@@ -12819,7 +12819,7 @@ class Reader$1 {
12819
12819
  }
12820
12820
  }
12821
12821
 
12822
- var sha3$3 = createCommonjsModule$4(function (module) {
12822
+ var sha3$4 = createCommonjsModule$4(function (module) {
12823
12823
  /*jslint bitwise: true */
12824
12824
  (function () {
12825
12825
 
@@ -13463,10 +13463,10 @@ var sha3$3 = createCommonjsModule$4(function (module) {
13463
13463
  })();
13464
13464
  });
13465
13465
 
13466
- var sha3$4 = sha3$3;
13466
+ var sha3$5 = sha3$4;
13467
13467
 
13468
- function keccak256$2(data) {
13469
- return '0x' + sha3$4.keccak_256(arrayify$3(data));
13468
+ function keccak256$3(data) {
13469
+ return '0x' + sha3$5.keccak_256(arrayify$3(data));
13470
13470
  }
13471
13471
 
13472
13472
  const version$s = "rlp/5.5.0";
@@ -13516,7 +13516,7 @@ function encode$4(object) {
13516
13516
  const version$r = "address/5.5.0";
13517
13517
 
13518
13518
  const logger$B = new Logger$4(version$r);
13519
- function getChecksumAddress$2(address) {
13519
+ function getChecksumAddress$3(address) {
13520
13520
  if (!isHexString$4(address, 20)) {
13521
13521
  logger$B.throwArgumentError("invalid address", "address", address);
13522
13522
  }
@@ -13526,7 +13526,7 @@ function getChecksumAddress$2(address) {
13526
13526
  for (let i = 0; i < 40; i++) {
13527
13527
  expanded[i] = chars[i].charCodeAt(0);
13528
13528
  }
13529
- const hashed = arrayify$3(keccak256$2(expanded));
13529
+ const hashed = arrayify$3(keccak256$3(expanded));
13530
13530
  for (let i = 0; i < 40; i += 2) {
13531
13531
  if ((hashed[i >> 1] >> 4) >= 8) {
13532
13532
  chars[i] = chars[i].toUpperCase();
@@ -13538,8 +13538,8 @@ function getChecksumAddress$2(address) {
13538
13538
  return "0x" + chars.join("");
13539
13539
  }
13540
13540
  // Shims for environments that are missing some required constants and functions
13541
- const MAX_SAFE_INTEGER$3 = 0x1fffffffffffff;
13542
- function log10$3(x) {
13541
+ const MAX_SAFE_INTEGER$4 = 0x1fffffffffffff;
13542
+ function log10$4(x) {
13543
13543
  if (Math.log10) {
13544
13544
  return Math.log10(x);
13545
13545
  }
@@ -13547,22 +13547,22 @@ function log10$3(x) {
13547
13547
  }
13548
13548
  // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
13549
13549
  // Create lookup table
13550
- const ibanLookup$2 = {};
13550
+ const ibanLookup$3 = {};
13551
13551
  for (let i = 0; i < 10; i++) {
13552
- ibanLookup$2[String(i)] = String(i);
13552
+ ibanLookup$3[String(i)] = String(i);
13553
13553
  }
13554
13554
  for (let i = 0; i < 26; i++) {
13555
- ibanLookup$2[String.fromCharCode(65 + i)] = String(10 + i);
13555
+ ibanLookup$3[String.fromCharCode(65 + i)] = String(10 + i);
13556
13556
  }
13557
13557
  // How many decimal digits can we process? (for 64-bit float, this is 15)
13558
- const safeDigits$2 = Math.floor(log10$3(MAX_SAFE_INTEGER$3));
13559
- function ibanChecksum$2(address) {
13558
+ const safeDigits$3 = Math.floor(log10$4(MAX_SAFE_INTEGER$4));
13559
+ function ibanChecksum$3(address) {
13560
13560
  address = address.toUpperCase();
13561
13561
  address = address.substring(4) + address.substring(0, 2) + "00";
13562
- let expanded = address.split("").map((c) => { return ibanLookup$2[c]; }).join("");
13562
+ let expanded = address.split("").map((c) => { return ibanLookup$3[c]; }).join("");
13563
13563
  // Javascript can handle integers safely up to 15 (decimal) digits
13564
- while (expanded.length >= safeDigits$2) {
13565
- let block = expanded.substring(0, safeDigits$2);
13564
+ while (expanded.length >= safeDigits$3) {
13565
+ let block = expanded.substring(0, safeDigits$3);
13566
13566
  expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
13567
13567
  }
13568
13568
  let checksum = String(98 - (parseInt(expanded, 10) % 97));
@@ -13571,7 +13571,7 @@ function ibanChecksum$2(address) {
13571
13571
  }
13572
13572
  return checksum;
13573
13573
  }
13574
- function getAddress$2(address) {
13574
+ function getAddress$3(address) {
13575
13575
  let result = null;
13576
13576
  if (typeof (address) !== "string") {
13577
13577
  logger$B.throwArgumentError("invalid address", "address", address);
@@ -13581,7 +13581,7 @@ function getAddress$2(address) {
13581
13581
  if (address.substring(0, 2) !== "0x") {
13582
13582
  address = "0x" + address;
13583
13583
  }
13584
- result = getChecksumAddress$2(address);
13584
+ result = getChecksumAddress$3(address);
13585
13585
  // It is a checksummed address with a bad checksum
13586
13586
  if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
13587
13587
  logger$B.throwArgumentError("bad address checksum", "address", address);
@@ -13590,14 +13590,14 @@ function getAddress$2(address) {
13590
13590
  }
13591
13591
  else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
13592
13592
  // It is an ICAP address with a bad checksum
13593
- if (address.substring(2, 4) !== ibanChecksum$2(address)) {
13593
+ if (address.substring(2, 4) !== ibanChecksum$3(address)) {
13594
13594
  logger$B.throwArgumentError("bad icap checksum", "address", address);
13595
13595
  }
13596
- result = _base36To16$2(address.substring(4));
13596
+ result = _base36To16$3(address.substring(4));
13597
13597
  while (result.length < 40) {
13598
13598
  result = "0" + result;
13599
13599
  }
13600
- result = getChecksumAddress$2("0x" + result);
13600
+ result = getChecksumAddress$3("0x" + result);
13601
13601
  }
13602
13602
  else {
13603
13603
  logger$B.throwArgumentError("invalid address", "address", address);
@@ -13608,13 +13608,13 @@ function getAddress$2(address) {
13608
13608
  function getContractAddress$2(transaction) {
13609
13609
  let from = null;
13610
13610
  try {
13611
- from = getAddress$2(transaction.from);
13611
+ from = getAddress$3(transaction.from);
13612
13612
  }
13613
13613
  catch (error) {
13614
13614
  logger$B.throwArgumentError("missing from address", "transaction", transaction);
13615
13615
  }
13616
13616
  const nonce = stripZeros$2(arrayify$3(BigNumber$4.from(transaction.nonce).toHexString()));
13617
- return getAddress$2(hexDataSlice$2(keccak256$2(encode$4([from, nonce])), 12));
13617
+ return getAddress$3(hexDataSlice$2(keccak256$3(encode$4([from, nonce])), 12));
13618
13618
  }
13619
13619
 
13620
13620
  class AddressCoder$1 extends Coder$1 {
@@ -13626,7 +13626,7 @@ class AddressCoder$1 extends Coder$1 {
13626
13626
  }
13627
13627
  encode(writer, value) {
13628
13628
  try {
13629
- value = getAddress$2(value);
13629
+ value = getAddress$3(value);
13630
13630
  }
13631
13631
  catch (error) {
13632
13632
  this._throwError(error.message, value);
@@ -13634,7 +13634,7 @@ class AddressCoder$1 extends Coder$1 {
13634
13634
  return writer.writeValue(value);
13635
13635
  }
13636
13636
  decode(reader) {
13637
- return getAddress$2(hexZeroPad$3(reader.readValue().toHexString(), 20));
13637
+ return getAddress$3(hexZeroPad$3(reader.readValue().toHexString(), 20));
13638
13638
  }
13639
13639
  }
13640
13640
 
@@ -14347,7 +14347,7 @@ class AbiCoder$1 {
14347
14347
  const defaultAbiCoder$1 = new AbiCoder$1();
14348
14348
 
14349
14349
  function id$2(text) {
14350
- return keccak256$2(toUtf8Bytes$2(text));
14350
+ return keccak256$3(toUtf8Bytes$2(text));
14351
14351
  }
14352
14352
 
14353
14353
  const logger$x = new Logger$4(version$t);
@@ -14464,7 +14464,7 @@ class Interface$1 {
14464
14464
  return defaultAbiCoder$1;
14465
14465
  }
14466
14466
  static getAddress(address) {
14467
- return getAddress$2(address);
14467
+ return getAddress$3(address);
14468
14468
  }
14469
14469
  static getSighash(fragment) {
14470
14470
  return hexDataSlice$2(id$2(fragment.format()), 0, 4);
@@ -14709,7 +14709,7 @@ class Interface$1 {
14709
14709
  return id$2(value);
14710
14710
  }
14711
14711
  else if (param.type === "bytes") {
14712
- return keccak256$2(hexlify$4(value));
14712
+ return keccak256$3(hexlify$4(value));
14713
14713
  }
14714
14714
  // Check addresses are valid
14715
14715
  if (param.type === "address") {
@@ -14764,7 +14764,7 @@ class Interface$1 {
14764
14764
  topics.push(id$2(value));
14765
14765
  }
14766
14766
  else if (param.type === "bytes") {
14767
- topics.push(keccak256$2(value));
14767
+ topics.push(keccak256$3(value));
14768
14768
  }
14769
14769
  else if (param.baseType === "tuple" || param.baseType === "array") {
14770
14770
  // @TODO
@@ -15301,7 +15301,7 @@ var TransactionTypes$2;
15301
15301
  })(TransactionTypes$2 || (TransactionTypes$2 = {}));
15302
15302
  function accessSetify$2(addr, storageKeys) {
15303
15303
  return {
15304
- address: getAddress$2(addr),
15304
+ address: getAddress$3(addr),
15305
15305
  storageKeys: (storageKeys || []).map((storageKey, index) => {
15306
15306
  if (hexDataLength$2(storageKey) !== 32) {
15307
15307
  logger$u.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey);
@@ -15353,7 +15353,7 @@ function resolveName$1(resolver, nameOrPromise) {
15353
15353
  }
15354
15354
  // If it is already an address, just use it (after adding checksum)
15355
15355
  try {
15356
- return getAddress$2(name);
15356
+ return getAddress$3(name);
15357
15357
  }
15358
15358
  catch (error) { }
15359
15359
  if (!resolver) {
@@ -15412,7 +15412,7 @@ function populateTransaction$1(contract, fragment, args) {
15412
15412
  override: resolveName$1(contract.signer, overrides.from),
15413
15413
  signer: contract.signer.getAddress()
15414
15414
  }).then((check) => __awaiter$a(this, void 0, void 0, function* () {
15415
- if (getAddress$2(check.signer) !== check.override) {
15415
+ if (getAddress$3(check.signer) !== check.override) {
15416
15416
  logger$t.throwError("Contract with a Signer cannot override from", Logger$4.errors.UNSUPPORTED_OPERATION, {
15417
15417
  operation: "overrides.from"
15418
15418
  });
@@ -15848,7 +15848,7 @@ class BaseContract$1 {
15848
15848
  }
15849
15849
  else {
15850
15850
  try {
15851
- defineReadOnly$2(this, "resolvedAddress", Promise.resolve(getAddress$2(addressOrName)));
15851
+ defineReadOnly$2(this, "resolvedAddress", Promise.resolve(getAddress$3(addressOrName)));
15852
15852
  }
15853
15853
  catch (error) {
15854
15854
  // Without a provider, we cannot use ENS names
@@ -20913,7 +20913,7 @@ function throwFault$4(fault, operation, value) {
20913
20913
  return logger$e$1.throwError(fault, Logger$3.errors.NUMERIC_FAULT, params);
20914
20914
  }
20915
20915
  // value should have no prefix
20916
- function _base36To16$1(value) {
20916
+ function _base36To16$2(value) {
20917
20917
  return (new BN$3(value, 36)).toString(16);
20918
20918
  }
20919
20919
 
@@ -22119,7 +22119,7 @@ const Base58$1 = new BaseX$1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqr
22119
22119
  * @license MIT
22120
22120
  */
22121
22121
 
22122
- var sha3$2 = createCommonjsModule$1$2(function (module) {
22122
+ var sha3$3 = createCommonjsModule$1$2(function (module) {
22123
22123
  /*jslint bitwise: true */
22124
22124
  (function () {
22125
22125
 
@@ -22588,14 +22588,14 @@ var sha3$2 = createCommonjsModule$1$2(function (module) {
22588
22588
  })();
22589
22589
  });
22590
22590
 
22591
- var sha3$1$1 = sha3$2;
22591
+ var sha3$1$2 = sha3$3;
22592
22592
 
22593
- function keccak256$1(data) {
22594
- return '0x' + sha3$1$1.keccak_256(arrayify$2(data));
22593
+ function keccak256$2(data) {
22594
+ return '0x' + sha3$1$2.keccak_256(arrayify$2(data));
22595
22595
  }
22596
22596
 
22597
22597
  function id$1(text) {
22598
- return keccak256$1(toUtf8Bytes$1(text));
22598
+ return keccak256$2(toUtf8Bytes$1(text));
22599
22599
  }
22600
22600
 
22601
22601
  const version$7$1 = "hash/5.4.0";
@@ -22617,7 +22617,7 @@ function namehash$1(name) {
22617
22617
  logger$9$1.throwArgumentError("invalid ENS address; missing component", "name", name);
22618
22618
  }
22619
22619
  const label = toUtf8Bytes$1(nameprep$1(partition[3]));
22620
- result = keccak256$1(concat$1([result, keccak256$1(label)]));
22620
+ result = keccak256$2(concat$1([result, keccak256$2(label)]));
22621
22621
  current = partition[2] || "";
22622
22622
  }
22623
22623
  return hexlify$3(result);
@@ -22740,10 +22740,10 @@ function decode$1$1(data) {
22740
22740
  return decoded.result;
22741
22741
  }
22742
22742
 
22743
- const version$5$1 = "address/5.4.0";
22743
+ const version$5$2 = "address/5.4.0";
22744
22744
 
22745
- const logger$7$1 = new Logger$3(version$5$1);
22746
- function getChecksumAddress$1(address) {
22745
+ const logger$7$1 = new Logger$3(version$5$2);
22746
+ function getChecksumAddress$2(address) {
22747
22747
  if (!isHexString$3(address, 20)) {
22748
22748
  logger$7$1.throwArgumentError("invalid address", "address", address);
22749
22749
  }
@@ -22753,7 +22753,7 @@ function getChecksumAddress$1(address) {
22753
22753
  for (let i = 0; i < 40; i++) {
22754
22754
  expanded[i] = chars[i].charCodeAt(0);
22755
22755
  }
22756
- const hashed = arrayify$2(keccak256$1(expanded));
22756
+ const hashed = arrayify$2(keccak256$2(expanded));
22757
22757
  for (let i = 0; i < 40; i += 2) {
22758
22758
  if ((hashed[i >> 1] >> 4) >= 8) {
22759
22759
  chars[i] = chars[i].toUpperCase();
@@ -22765,8 +22765,8 @@ function getChecksumAddress$1(address) {
22765
22765
  return "0x" + chars.join("");
22766
22766
  }
22767
22767
  // Shims for environments that are missing some required constants and functions
22768
- const MAX_SAFE_INTEGER$2 = 0x1fffffffffffff;
22769
- function log10$2(x) {
22768
+ const MAX_SAFE_INTEGER$3 = 0x1fffffffffffff;
22769
+ function log10$3(x) {
22770
22770
  if (Math.log10) {
22771
22771
  return Math.log10(x);
22772
22772
  }
@@ -22774,22 +22774,22 @@ function log10$2(x) {
22774
22774
  }
22775
22775
  // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
22776
22776
  // Create lookup table
22777
- const ibanLookup$1 = {};
22777
+ const ibanLookup$2 = {};
22778
22778
  for (let i = 0; i < 10; i++) {
22779
- ibanLookup$1[String(i)] = String(i);
22779
+ ibanLookup$2[String(i)] = String(i);
22780
22780
  }
22781
22781
  for (let i = 0; i < 26; i++) {
22782
- ibanLookup$1[String.fromCharCode(65 + i)] = String(10 + i);
22782
+ ibanLookup$2[String.fromCharCode(65 + i)] = String(10 + i);
22783
22783
  }
22784
22784
  // How many decimal digits can we process? (for 64-bit float, this is 15)
22785
- const safeDigits$1 = Math.floor(log10$2(MAX_SAFE_INTEGER$2));
22786
- function ibanChecksum$1(address) {
22785
+ const safeDigits$2 = Math.floor(log10$3(MAX_SAFE_INTEGER$3));
22786
+ function ibanChecksum$2(address) {
22787
22787
  address = address.toUpperCase();
22788
22788
  address = address.substring(4) + address.substring(0, 2) + "00";
22789
- let expanded = address.split("").map((c) => { return ibanLookup$1[c]; }).join("");
22789
+ let expanded = address.split("").map((c) => { return ibanLookup$2[c]; }).join("");
22790
22790
  // Javascript can handle integers safely up to 15 (decimal) digits
22791
- while (expanded.length >= safeDigits$1) {
22792
- let block = expanded.substring(0, safeDigits$1);
22791
+ while (expanded.length >= safeDigits$2) {
22792
+ let block = expanded.substring(0, safeDigits$2);
22793
22793
  expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
22794
22794
  }
22795
22795
  let checksum = String(98 - (parseInt(expanded, 10) % 97));
@@ -22798,7 +22798,7 @@ function ibanChecksum$1(address) {
22798
22798
  }
22799
22799
  return checksum;
22800
22800
  }
22801
- function getAddress$1(address) {
22801
+ function getAddress$2(address) {
22802
22802
  let result = null;
22803
22803
  if (typeof (address) !== "string") {
22804
22804
  logger$7$1.throwArgumentError("invalid address", "address", address);
@@ -22808,7 +22808,7 @@ function getAddress$1(address) {
22808
22808
  if (address.substring(0, 2) !== "0x") {
22809
22809
  address = "0x" + address;
22810
22810
  }
22811
- result = getChecksumAddress$1(address);
22811
+ result = getChecksumAddress$2(address);
22812
22812
  // It is a checksummed address with a bad checksum
22813
22813
  if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
22814
22814
  logger$7$1.throwArgumentError("bad address checksum", "address", address);
@@ -22817,14 +22817,14 @@ function getAddress$1(address) {
22817
22817
  }
22818
22818
  else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
22819
22819
  // It is an ICAP address with a bad checksum
22820
- if (address.substring(2, 4) !== ibanChecksum$1(address)) {
22820
+ if (address.substring(2, 4) !== ibanChecksum$2(address)) {
22821
22821
  logger$7$1.throwArgumentError("bad icap checksum", "address", address);
22822
22822
  }
22823
- result = _base36To16$1(address.substring(4));
22823
+ result = _base36To16$2(address.substring(4));
22824
22824
  while (result.length < 40) {
22825
22825
  result = "0" + result;
22826
22826
  }
22827
- result = getChecksumAddress$1("0x" + result);
22827
+ result = getChecksumAddress$2("0x" + result);
22828
22828
  }
22829
22829
  else {
22830
22830
  logger$7$1.throwArgumentError("invalid address", "address", address);
@@ -22835,13 +22835,13 @@ function getAddress$1(address) {
22835
22835
  function getContractAddress$1(transaction) {
22836
22836
  let from = null;
22837
22837
  try {
22838
- from = getAddress$1(transaction.from);
22838
+ from = getAddress$2(transaction.from);
22839
22839
  }
22840
22840
  catch (error) {
22841
22841
  logger$7$1.throwArgumentError("missing from address", "transaction", transaction);
22842
22842
  }
22843
22843
  const nonce = stripZeros$1(arrayify$2(BigNumber$3.from(transaction.nonce).toHexString()));
22844
- return getAddress$1(hexDataSlice$1(keccak256$1(encode$1$1([from, nonce])), 12));
22844
+ return getAddress$2(hexDataSlice$1(keccak256$2(encode$1$1([from, nonce])), 12));
22845
22845
  }
22846
22846
 
22847
22847
  var __awaiter$3$1 = function (thisArg, _arguments, P, generator) {
@@ -22900,7 +22900,7 @@ const domainChecks$1 = {
22900
22900
  },
22901
22901
  verifyingContract: function (value) {
22902
22902
  try {
22903
- return getAddress$1(value).toLowerCase();
22903
+ return getAddress$2(value).toLowerCase();
22904
22904
  }
22905
22905
  catch (error) { }
22906
22906
  return logger$6$1.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value);
@@ -22957,13 +22957,13 @@ function getBaseEncoder$1(type) {
22957
22957
  }
22958
22958
  switch (type) {
22959
22959
  case "address": return function (value) {
22960
- return hexZeroPad$2(getAddress$1(value), 32);
22960
+ return hexZeroPad$2(getAddress$2(value), 32);
22961
22961
  };
22962
22962
  case "bool": return function (value) {
22963
22963
  return ((!value) ? hexFalse$1 : hexTrue$1);
22964
22964
  };
22965
22965
  case "bytes": return function (value) {
22966
- return keccak256$1(value);
22966
+ return keccak256$2(value);
22967
22967
  };
22968
22968
  case "string": return function (value) {
22969
22969
  return id$1(value);
@@ -23079,9 +23079,9 @@ class TypedDataEncoder$1 {
23079
23079
  }
23080
23080
  let result = value.map(subEncoder);
23081
23081
  if (this._types[subtype]) {
23082
- result = result.map(keccak256$1);
23082
+ result = result.map(keccak256$2);
23083
23083
  }
23084
- return keccak256$1(hexConcat$1(result));
23084
+ return keccak256$2(hexConcat$1(result));
23085
23085
  };
23086
23086
  }
23087
23087
  // Struct
@@ -23092,7 +23092,7 @@ class TypedDataEncoder$1 {
23092
23092
  const values = fields.map(({ name, type }) => {
23093
23093
  const result = this.getEncoder(type)(value[name]);
23094
23094
  if (this._types[type]) {
23095
- return keccak256$1(result);
23095
+ return keccak256$2(result);
23096
23096
  }
23097
23097
  return result;
23098
23098
  });
@@ -23113,7 +23113,7 @@ class TypedDataEncoder$1 {
23113
23113
  return this.getEncoder(type)(value);
23114
23114
  }
23115
23115
  hashStruct(name, value) {
23116
- return keccak256$1(this.encodeData(name, value));
23116
+ return keccak256$2(this.encodeData(name, value));
23117
23117
  }
23118
23118
  encode(value) {
23119
23119
  return this.encodeData(this.primaryType, value);
@@ -23183,7 +23183,7 @@ class TypedDataEncoder$1 {
23183
23183
  ]);
23184
23184
  }
23185
23185
  static hash(domain, types, value) {
23186
- return keccak256$1(TypedDataEncoder$1.encode(domain, types, value));
23186
+ return keccak256$2(TypedDataEncoder$1.encode(domain, types, value));
23187
23187
  }
23188
23188
  // Replaces all address types with ENS names with their looked up address
23189
23189
  static resolveNames(domain, types, value, resolveName) {
@@ -27174,7 +27174,7 @@ var EC$1$1 = elliptic_1$1.ec;
27174
27174
 
27175
27175
  const version$2$3 = "signing-key/5.4.0";
27176
27176
 
27177
- const logger$5$1 = new Logger$3(version$2$3);
27177
+ const logger$5$2 = new Logger$3(version$2$3);
27178
27178
  let _curve$1 = null;
27179
27179
  function getCurve$1() {
27180
27180
  if (!_curve$1) {
@@ -27200,7 +27200,7 @@ class SigningKey$1 {
27200
27200
  const keyPair = getCurve$1().keyFromPrivate(arrayify$2(this.privateKey));
27201
27201
  const digestBytes = arrayify$2(digest);
27202
27202
  if (digestBytes.length !== 32) {
27203
- logger$5$1.throwArgumentError("bad digest length", "digest", digest);
27203
+ logger$5$2.throwArgumentError("bad digest length", "digest", digest);
27204
27204
  }
27205
27205
  const signature = keyPair.sign(digestBytes, { canonical: true });
27206
27206
  return splitSignature$1({
@@ -27244,7 +27244,7 @@ function computePublicKey$1(key, compressed) {
27244
27244
  }
27245
27245
  return "0x" + getCurve$1().keyFromPublic(bytes).getPublic(true, "hex");
27246
27246
  }
27247
- return logger$5$1.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
27247
+ return logger$5$2.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
27248
27248
  }
27249
27249
 
27250
27250
  const version$1$3 = "transactions/5.4.0";
@@ -27261,7 +27261,7 @@ function handleAddress$1(value) {
27261
27261
  if (value === "0x") {
27262
27262
  return null;
27263
27263
  }
27264
- return getAddress$1(value);
27264
+ return getAddress$2(value);
27265
27265
  }
27266
27266
  function handleNumber$1(value) {
27267
27267
  if (value === "0x") {
@@ -27271,7 +27271,7 @@ function handleNumber$1(value) {
27271
27271
  }
27272
27272
  function computeAddress$1(key) {
27273
27273
  const publicKey = computePublicKey$1(key);
27274
- return getAddress$1(hexDataSlice$1(keccak256$1(hexDataSlice$1(publicKey, 1)), 12));
27274
+ return getAddress$2(hexDataSlice$1(keccak256$2(hexDataSlice$1(publicKey, 1)), 12));
27275
27275
  }
27276
27276
  function recoverAddress$1(digest, signature) {
27277
27277
  return computeAddress$1(recoverPublicKey$1(arrayify$2(digest), signature));
@@ -27285,7 +27285,7 @@ function formatNumber$1(value, name) {
27285
27285
  }
27286
27286
  function accessSetify$1(addr, storageKeys) {
27287
27287
  return {
27288
- address: getAddress$1(addr),
27288
+ address: getAddress$2(addr),
27289
27289
  storageKeys: (storageKeys || []).map((storageKey, index) => {
27290
27290
  if (hexDataLength$1(storageKey) !== 32) {
27291
27291
  logger$4$2.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey);
@@ -27338,7 +27338,7 @@ function _serializeEip1559$1(transaction, signature) {
27338
27338
  formatNumber$1(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
27339
27339
  formatNumber$1(transaction.maxFeePerGas || 0, "maxFeePerGas"),
27340
27340
  formatNumber$1(transaction.gasLimit || 0, "gasLimit"),
27341
- ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
27341
+ ((transaction.to != null) ? getAddress$2(transaction.to) : "0x"),
27342
27342
  formatNumber$1(transaction.value || 0, "value"),
27343
27343
  (transaction.data || "0x"),
27344
27344
  (formatAccessList$1(transaction.accessList || []))
@@ -27357,7 +27357,7 @@ function _serializeEip2930$1(transaction, signature) {
27357
27357
  formatNumber$1(transaction.nonce || 0, "nonce"),
27358
27358
  formatNumber$1(transaction.gasPrice || 0, "gasPrice"),
27359
27359
  formatNumber$1(transaction.gasLimit || 0, "gasLimit"),
27360
- ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
27360
+ ((transaction.to != null) ? getAddress$2(transaction.to) : "0x"),
27361
27361
  formatNumber$1(transaction.value || 0, "value"),
27362
27362
  (transaction.data || "0x"),
27363
27363
  (formatAccessList$1(transaction.accessList || []))
@@ -27384,7 +27384,7 @@ function _parseEipSignature$1(tx, fields, serialize) {
27384
27384
  tx.r = hexZeroPad$2(fields[1], 32);
27385
27385
  tx.s = hexZeroPad$2(fields[2], 32);
27386
27386
  try {
27387
- const digest = keccak256$1(serialize(tx));
27387
+ const digest = keccak256$2(serialize(tx));
27388
27388
  tx.from = recoverAddress$1(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });
27389
27389
  }
27390
27390
  catch (error) {
@@ -27415,7 +27415,7 @@ function _parseEip1559$1(payload) {
27415
27415
  if (transaction.length === 9) {
27416
27416
  return tx;
27417
27417
  }
27418
- tx.hash = keccak256$1(payload);
27418
+ tx.hash = keccak256$2(payload);
27419
27419
  _parseEipSignature$1(tx, transaction.slice(9), _serializeEip1559$1);
27420
27420
  return tx;
27421
27421
  }
@@ -27439,7 +27439,7 @@ function _parseEip2930$1(payload) {
27439
27439
  if (transaction.length === 8) {
27440
27440
  return tx;
27441
27441
  }
27442
- tx.hash = keccak256$1(payload);
27442
+ tx.hash = keccak256$2(payload);
27443
27443
  _parseEipSignature$1(tx, transaction.slice(8), _serializeEip2930$1);
27444
27444
  return tx;
27445
27445
  }
@@ -27490,14 +27490,14 @@ function _parse$1(rawTransaction) {
27490
27490
  raw.push("0x");
27491
27491
  recoveryParam -= tx.chainId * 2 + 8;
27492
27492
  }
27493
- const digest = keccak256$1(encode$1$1(raw));
27493
+ const digest = keccak256$2(encode$1$1(raw));
27494
27494
  try {
27495
27495
  tx.from = recoverAddress$1(digest, { r: hexlify$3(tx.r), s: hexlify$3(tx.s), recoveryParam: recoveryParam });
27496
27496
  }
27497
27497
  catch (error) {
27498
27498
  console.log(error);
27499
27499
  }
27500
- tx.hash = keccak256$1(rawTransaction);
27500
+ tx.hash = keccak256$2(rawTransaction);
27501
27501
  }
27502
27502
  tx.type = null;
27503
27503
  return tx;
@@ -27699,13 +27699,13 @@ class Formatter$1 {
27699
27699
  // Requires an address
27700
27700
  // Strict! Used on input.
27701
27701
  address(value) {
27702
- return getAddress$1(value);
27702
+ return getAddress$2(value);
27703
27703
  }
27704
27704
  callAddress(value) {
27705
27705
  if (!isHexString$3(value, 32)) {
27706
27706
  return null;
27707
27707
  }
27708
- const address = getAddress$1(hexDataSlice$1(value, 12));
27708
+ const address = getAddress$2(hexDataSlice$1(value, 12));
27709
27709
  return (address === AddressZero$1) ? null : address;
27710
27710
  }
27711
27711
  contractAddress(value) {
@@ -35070,7 +35070,7 @@ function throwFault$1$1(fault, operation, value) {
35070
35070
  return logger$o.throwError(fault, Logger$2.errors.NUMERIC_FAULT, params);
35071
35071
  }
35072
35072
  // value should have no prefix
35073
- function _base36To16(value) {
35073
+ function _base36To16$1(value) {
35074
35074
  return (new BN$2(value, 36)).toString(16);
35075
35075
  }
35076
35076
 
@@ -36554,7 +36554,7 @@ class Reader {
36554
36554
  * @license MIT
36555
36555
  */
36556
36556
 
36557
- var sha3 = createCommonjsModule$1$1(function (module) {
36557
+ var sha3$2 = createCommonjsModule$1$1(function (module) {
36558
36558
  /*jslint bitwise: true */
36559
36559
  (function () {
36560
36560
 
@@ -37023,10 +37023,10 @@ var sha3 = createCommonjsModule$1$1(function (module) {
37023
37023
  })();
37024
37024
  });
37025
37025
 
37026
- var sha3$1 = sha3;
37026
+ var sha3$1$1 = sha3$2;
37027
37027
 
37028
- function keccak256(data) {
37029
- return '0x' + sha3$1.keccak_256(arrayify$1(data));
37028
+ function keccak256$1(data) {
37029
+ return '0x' + sha3$1$1.keccak_256(arrayify$1(data));
37030
37030
  }
37031
37031
 
37032
37032
  const version$d = "rlp/5.4.0";
@@ -37149,7 +37149,7 @@ function decode$1(data) {
37149
37149
  const version$c = "address/5.4.0";
37150
37150
 
37151
37151
  const logger$i = new Logger$2(version$c);
37152
- function getChecksumAddress(address) {
37152
+ function getChecksumAddress$1(address) {
37153
37153
  if (!isHexString$2(address, 20)) {
37154
37154
  logger$i.throwArgumentError("invalid address", "address", address);
37155
37155
  }
@@ -37159,7 +37159,7 @@ function getChecksumAddress(address) {
37159
37159
  for (let i = 0; i < 40; i++) {
37160
37160
  expanded[i] = chars[i].charCodeAt(0);
37161
37161
  }
37162
- const hashed = arrayify$1(keccak256(expanded));
37162
+ const hashed = arrayify$1(keccak256$1(expanded));
37163
37163
  for (let i = 0; i < 40; i += 2) {
37164
37164
  if ((hashed[i >> 1] >> 4) >= 8) {
37165
37165
  chars[i] = chars[i].toUpperCase();
@@ -37171,8 +37171,8 @@ function getChecksumAddress(address) {
37171
37171
  return "0x" + chars.join("");
37172
37172
  }
37173
37173
  // Shims for environments that are missing some required constants and functions
37174
- const MAX_SAFE_INTEGER$1 = 0x1fffffffffffff;
37175
- function log10$1(x) {
37174
+ const MAX_SAFE_INTEGER$2 = 0x1fffffffffffff;
37175
+ function log10$2(x) {
37176
37176
  if (Math.log10) {
37177
37177
  return Math.log10(x);
37178
37178
  }
@@ -37180,22 +37180,22 @@ function log10$1(x) {
37180
37180
  }
37181
37181
  // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
37182
37182
  // Create lookup table
37183
- const ibanLookup = {};
37183
+ const ibanLookup$1 = {};
37184
37184
  for (let i = 0; i < 10; i++) {
37185
- ibanLookup[String(i)] = String(i);
37185
+ ibanLookup$1[String(i)] = String(i);
37186
37186
  }
37187
37187
  for (let i = 0; i < 26; i++) {
37188
- ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);
37188
+ ibanLookup$1[String.fromCharCode(65 + i)] = String(10 + i);
37189
37189
  }
37190
37190
  // How many decimal digits can we process? (for 64-bit float, this is 15)
37191
- const safeDigits = Math.floor(log10$1(MAX_SAFE_INTEGER$1));
37192
- function ibanChecksum(address) {
37191
+ const safeDigits$1 = Math.floor(log10$2(MAX_SAFE_INTEGER$2));
37192
+ function ibanChecksum$1(address) {
37193
37193
  address = address.toUpperCase();
37194
37194
  address = address.substring(4) + address.substring(0, 2) + "00";
37195
- let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join("");
37195
+ let expanded = address.split("").map((c) => { return ibanLookup$1[c]; }).join("");
37196
37196
  // Javascript can handle integers safely up to 15 (decimal) digits
37197
- while (expanded.length >= safeDigits) {
37198
- let block = expanded.substring(0, safeDigits);
37197
+ while (expanded.length >= safeDigits$1) {
37198
+ let block = expanded.substring(0, safeDigits$1);
37199
37199
  expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
37200
37200
  }
37201
37201
  let checksum = String(98 - (parseInt(expanded, 10) % 97));
@@ -37204,7 +37204,7 @@ function ibanChecksum(address) {
37204
37204
  }
37205
37205
  return checksum;
37206
37206
  }
37207
- function getAddress(address) {
37207
+ function getAddress$1(address) {
37208
37208
  let result = null;
37209
37209
  if (typeof (address) !== "string") {
37210
37210
  logger$i.throwArgumentError("invalid address", "address", address);
@@ -37214,7 +37214,7 @@ function getAddress(address) {
37214
37214
  if (address.substring(0, 2) !== "0x") {
37215
37215
  address = "0x" + address;
37216
37216
  }
37217
- result = getChecksumAddress(address);
37217
+ result = getChecksumAddress$1(address);
37218
37218
  // It is a checksummed address with a bad checksum
37219
37219
  if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
37220
37220
  logger$i.throwArgumentError("bad address checksum", "address", address);
@@ -37223,14 +37223,14 @@ function getAddress(address) {
37223
37223
  }
37224
37224
  else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
37225
37225
  // It is an ICAP address with a bad checksum
37226
- if (address.substring(2, 4) !== ibanChecksum(address)) {
37226
+ if (address.substring(2, 4) !== ibanChecksum$1(address)) {
37227
37227
  logger$i.throwArgumentError("bad icap checksum", "address", address);
37228
37228
  }
37229
- result = _base36To16(address.substring(4));
37229
+ result = _base36To16$1(address.substring(4));
37230
37230
  while (result.length < 40) {
37231
37231
  result = "0" + result;
37232
37232
  }
37233
- result = getChecksumAddress("0x" + result);
37233
+ result = getChecksumAddress$1("0x" + result);
37234
37234
  }
37235
37235
  else {
37236
37236
  logger$i.throwArgumentError("invalid address", "address", address);
@@ -37241,13 +37241,13 @@ function getAddress(address) {
37241
37241
  function getContractAddress(transaction) {
37242
37242
  let from = null;
37243
37243
  try {
37244
- from = getAddress(transaction.from);
37244
+ from = getAddress$1(transaction.from);
37245
37245
  }
37246
37246
  catch (error) {
37247
37247
  logger$i.throwArgumentError("missing from address", "transaction", transaction);
37248
37248
  }
37249
37249
  const nonce = stripZeros(arrayify$1(BigNumber$2.from(transaction.nonce).toHexString()));
37250
- return getAddress(hexDataSlice(keccak256(encode$2([from, nonce])), 12));
37250
+ return getAddress$1(hexDataSlice(keccak256$1(encode$2([from, nonce])), 12));
37251
37251
  }
37252
37252
 
37253
37253
  class AddressCoder extends Coder {
@@ -37259,7 +37259,7 @@ class AddressCoder extends Coder {
37259
37259
  }
37260
37260
  encode(writer, value) {
37261
37261
  try {
37262
- value = getAddress(value);
37262
+ value = getAddress$1(value);
37263
37263
  }
37264
37264
  catch (error) {
37265
37265
  this._throwError(error.message, value);
@@ -37267,7 +37267,7 @@ class AddressCoder extends Coder {
37267
37267
  return writer.writeValue(value);
37268
37268
  }
37269
37269
  decode(reader) {
37270
- return getAddress(hexZeroPad$1(reader.readValue().toHexString(), 20));
37270
+ return getAddress$1(hexZeroPad$1(reader.readValue().toHexString(), 20));
37271
37271
  }
37272
37272
  }
37273
37273
 
@@ -38173,7 +38173,7 @@ class AbiCoder {
38173
38173
  const defaultAbiCoder = new AbiCoder();
38174
38174
 
38175
38175
  function id(text) {
38176
- return keccak256(toUtf8Bytes(text));
38176
+ return keccak256$1(toUtf8Bytes(text));
38177
38177
  }
38178
38178
 
38179
38179
  const version$a = "hash/5.4.0";
@@ -38195,7 +38195,7 @@ function namehash(name) {
38195
38195
  logger$e.throwArgumentError("invalid ENS address; missing component", "name", name);
38196
38196
  }
38197
38197
  const label = toUtf8Bytes(nameprep(partition[3]));
38198
- result = keccak256(concat([result, keccak256(label)]));
38198
+ result = keccak256$1(concat([result, keccak256$1(label)]));
38199
38199
  current = partition[2] || "";
38200
38200
  }
38201
38201
  return hexlify$2(result);
@@ -38257,7 +38257,7 @@ const domainChecks = {
38257
38257
  },
38258
38258
  verifyingContract: function (value) {
38259
38259
  try {
38260
- return getAddress(value).toLowerCase();
38260
+ return getAddress$1(value).toLowerCase();
38261
38261
  }
38262
38262
  catch (error) { }
38263
38263
  return logger$d.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value);
@@ -38314,13 +38314,13 @@ function getBaseEncoder(type) {
38314
38314
  }
38315
38315
  switch (type) {
38316
38316
  case "address": return function (value) {
38317
- return hexZeroPad$1(getAddress(value), 32);
38317
+ return hexZeroPad$1(getAddress$1(value), 32);
38318
38318
  };
38319
38319
  case "bool": return function (value) {
38320
38320
  return ((!value) ? hexFalse : hexTrue);
38321
38321
  };
38322
38322
  case "bytes": return function (value) {
38323
- return keccak256(value);
38323
+ return keccak256$1(value);
38324
38324
  };
38325
38325
  case "string": return function (value) {
38326
38326
  return id(value);
@@ -38436,9 +38436,9 @@ class TypedDataEncoder {
38436
38436
  }
38437
38437
  let result = value.map(subEncoder);
38438
38438
  if (this._types[subtype]) {
38439
- result = result.map(keccak256);
38439
+ result = result.map(keccak256$1);
38440
38440
  }
38441
- return keccak256(hexConcat(result));
38441
+ return keccak256$1(hexConcat(result));
38442
38442
  };
38443
38443
  }
38444
38444
  // Struct
@@ -38449,7 +38449,7 @@ class TypedDataEncoder {
38449
38449
  const values = fields.map(({ name, type }) => {
38450
38450
  const result = this.getEncoder(type)(value[name]);
38451
38451
  if (this._types[type]) {
38452
- return keccak256(result);
38452
+ return keccak256$1(result);
38453
38453
  }
38454
38454
  return result;
38455
38455
  });
@@ -38470,7 +38470,7 @@ class TypedDataEncoder {
38470
38470
  return this.getEncoder(type)(value);
38471
38471
  }
38472
38472
  hashStruct(name, value) {
38473
- return keccak256(this.encodeData(name, value));
38473
+ return keccak256$1(this.encodeData(name, value));
38474
38474
  }
38475
38475
  encode(value) {
38476
38476
  return this.encodeData(this.primaryType, value);
@@ -38540,7 +38540,7 @@ class TypedDataEncoder {
38540
38540
  ]);
38541
38541
  }
38542
38542
  static hash(domain, types, value) {
38543
- return keccak256(TypedDataEncoder.encode(domain, types, value));
38543
+ return keccak256$1(TypedDataEncoder.encode(domain, types, value));
38544
38544
  }
38545
38545
  // Replaces all address types with ENS names with their looked up address
38546
38546
  static resolveNames(domain, types, value, resolveName) {
@@ -38748,7 +38748,7 @@ class Interface {
38748
38748
  return defaultAbiCoder;
38749
38749
  }
38750
38750
  static getAddress(address) {
38751
- return getAddress(address);
38751
+ return getAddress$1(address);
38752
38752
  }
38753
38753
  static getSighash(fragment) {
38754
38754
  return hexDataSlice(id(fragment.format()), 0, 4);
@@ -38993,7 +38993,7 @@ class Interface {
38993
38993
  return id(value);
38994
38994
  }
38995
38995
  else if (param.type === "bytes") {
38996
- return keccak256(hexlify$2(value));
38996
+ return keccak256$1(hexlify$2(value));
38997
38997
  }
38998
38998
  // Check addresses are valid
38999
38999
  if (param.type === "address") {
@@ -39048,7 +39048,7 @@ class Interface {
39048
39048
  topics.push(id(value));
39049
39049
  }
39050
39050
  else if (param.type === "bytes") {
39051
- topics.push(keccak256(value));
39051
+ topics.push(keccak256$1(value));
39052
39052
  }
39053
39053
  else if (param.baseType === "tuple" || param.baseType === "array") {
39054
39054
  // @TOOD
@@ -46821,7 +46821,7 @@ function handleAddress(value) {
46821
46821
  if (value === "0x") {
46822
46822
  return null;
46823
46823
  }
46824
- return getAddress(value);
46824
+ return getAddress$1(value);
46825
46825
  }
46826
46826
  function handleNumber(value) {
46827
46827
  if (value === "0x") {
@@ -46831,7 +46831,7 @@ function handleNumber(value) {
46831
46831
  }
46832
46832
  function computeAddress(key) {
46833
46833
  const publicKey = computePublicKey(key);
46834
- return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));
46834
+ return getAddress$1(hexDataSlice(keccak256$1(hexDataSlice(publicKey, 1)), 12));
46835
46835
  }
46836
46836
  function recoverAddress(digest, signature) {
46837
46837
  return computeAddress(recoverPublicKey(arrayify$1(digest), signature));
@@ -46845,7 +46845,7 @@ function formatNumber(value, name) {
46845
46845
  }
46846
46846
  function accessSetify(addr, storageKeys) {
46847
46847
  return {
46848
- address: getAddress(addr),
46848
+ address: getAddress$1(addr),
46849
46849
  storageKeys: (storageKeys || []).map((storageKey, index) => {
46850
46850
  if (hexDataLength(storageKey) !== 32) {
46851
46851
  logger$8.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey);
@@ -46898,7 +46898,7 @@ function _serializeEip1559(transaction, signature) {
46898
46898
  formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
46899
46899
  formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"),
46900
46900
  formatNumber(transaction.gasLimit || 0, "gasLimit"),
46901
- ((transaction.to != null) ? getAddress(transaction.to) : "0x"),
46901
+ ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
46902
46902
  formatNumber(transaction.value || 0, "value"),
46903
46903
  (transaction.data || "0x"),
46904
46904
  (formatAccessList(transaction.accessList || []))
@@ -46917,7 +46917,7 @@ function _serializeEip2930(transaction, signature) {
46917
46917
  formatNumber(transaction.nonce || 0, "nonce"),
46918
46918
  formatNumber(transaction.gasPrice || 0, "gasPrice"),
46919
46919
  formatNumber(transaction.gasLimit || 0, "gasLimit"),
46920
- ((transaction.to != null) ? getAddress(transaction.to) : "0x"),
46920
+ ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
46921
46921
  formatNumber(transaction.value || 0, "value"),
46922
46922
  (transaction.data || "0x"),
46923
46923
  (formatAccessList(transaction.accessList || []))
@@ -46944,7 +46944,7 @@ function _parseEipSignature(tx, fields, serialize) {
46944
46944
  tx.r = hexZeroPad$1(fields[1], 32);
46945
46945
  tx.s = hexZeroPad$1(fields[2], 32);
46946
46946
  try {
46947
- const digest = keccak256(serialize(tx));
46947
+ const digest = keccak256$1(serialize(tx));
46948
46948
  tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });
46949
46949
  }
46950
46950
  catch (error) {
@@ -46975,7 +46975,7 @@ function _parseEip1559(payload) {
46975
46975
  if (transaction.length === 9) {
46976
46976
  return tx;
46977
46977
  }
46978
- tx.hash = keccak256(payload);
46978
+ tx.hash = keccak256$1(payload);
46979
46979
  _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);
46980
46980
  return tx;
46981
46981
  }
@@ -46999,7 +46999,7 @@ function _parseEip2930(payload) {
46999
46999
  if (transaction.length === 8) {
47000
47000
  return tx;
47001
47001
  }
47002
- tx.hash = keccak256(payload);
47002
+ tx.hash = keccak256$1(payload);
47003
47003
  _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);
47004
47004
  return tx;
47005
47005
  }
@@ -47050,14 +47050,14 @@ function _parse(rawTransaction) {
47050
47050
  raw.push("0x");
47051
47051
  recoveryParam -= tx.chainId * 2 + 8;
47052
47052
  }
47053
- const digest = keccak256(encode$2(raw));
47053
+ const digest = keccak256$1(encode$2(raw));
47054
47054
  try {
47055
47055
  tx.from = recoverAddress(digest, { r: hexlify$2(tx.r), s: hexlify$2(tx.s), recoveryParam: recoveryParam });
47056
47056
  }
47057
47057
  catch (error) {
47058
47058
  console.log(error);
47059
47059
  }
47060
- tx.hash = keccak256(rawTransaction);
47060
+ tx.hash = keccak256$1(rawTransaction);
47061
47061
  }
47062
47062
  tx.type = null;
47063
47063
  return tx;
@@ -47081,7 +47081,7 @@ function parse(rawTransaction) {
47081
47081
  });
47082
47082
  }
47083
47083
 
47084
- const version$5 = "contracts/5.4.1";
47084
+ const version$5$1 = "contracts/5.4.1";
47085
47085
 
47086
47086
  var __awaiter$4 = function (thisArg, _arguments, P, generator) {
47087
47087
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -47092,13 +47092,13 @@ var __awaiter$4 = function (thisArg, _arguments, P, generator) {
47092
47092
  step((generator = generator.apply(thisArg, _arguments || [])).next());
47093
47093
  });
47094
47094
  };
47095
- const logger$7 = new Logger$2(version$5);
47095
+ const logger$7 = new Logger$2(version$5$1);
47096
47096
  function resolveName(resolver, nameOrPromise) {
47097
47097
  return __awaiter$4(this, void 0, void 0, function* () {
47098
47098
  const name = yield nameOrPromise;
47099
47099
  // If it is already an address, just use it (after adding checksum)
47100
47100
  try {
47101
- return getAddress(name);
47101
+ return getAddress$1(name);
47102
47102
  }
47103
47103
  catch (error) { }
47104
47104
  if (!resolver) {
@@ -47154,7 +47154,7 @@ function populateTransaction(contract, fragment, args) {
47154
47154
  override: resolveName(contract.signer, overrides.from),
47155
47155
  signer: contract.signer.getAddress()
47156
47156
  }).then((check) => __awaiter$4(this, void 0, void 0, function* () {
47157
- if (getAddress(check.signer) !== check.override) {
47157
+ if (getAddress$1(check.signer) !== check.override) {
47158
47158
  logger$7.throwError("Contract with a Signer cannot override from", Logger$2.errors.UNSUPPORTED_OPERATION, {
47159
47159
  operation: "overrides.from"
47160
47160
  });
@@ -47583,7 +47583,7 @@ class BaseContract {
47583
47583
  }
47584
47584
  else {
47585
47585
  try {
47586
- defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName)));
47586
+ defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress$1(addressOrName)));
47587
47587
  }
47588
47588
  catch (error) {
47589
47589
  // Without a provider, we cannot use ENS names
@@ -48347,7 +48347,7 @@ var __awaiter$2 = function (thisArg, _arguments, P, generator) {
48347
48347
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48348
48348
  });
48349
48349
  };
48350
- const logger$5 = new Logger$2(version$2$2);
48350
+ const logger$5$1 = new Logger$2(version$2$2);
48351
48351
  function staller(duration) {
48352
48352
  return new Promise((resolve) => {
48353
48353
  setTimeout(resolve, duration);
@@ -48380,10 +48380,10 @@ function bodyify(value, type) {
48380
48380
  function _fetchData(connection, body, processFunc) {
48381
48381
  // How many times to retry in the event of a throttle
48382
48382
  const attemptLimit = (typeof (connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit : 12;
48383
- logger$5.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit);
48383
+ logger$5$1.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit);
48384
48384
  const throttleCallback = ((typeof (connection) === "object") ? connection.throttleCallback : null);
48385
48385
  const throttleSlotInterval = ((typeof (connection) === "object" && typeof (connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval : 100);
48386
- logger$5.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval);
48386
+ logger$5$1.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval);
48387
48387
  const headers = {};
48388
48388
  let url = null;
48389
48389
  // @TODO: Allow ConnectionInfo to override some of these values
@@ -48397,7 +48397,7 @@ function _fetchData(connection, body, processFunc) {
48397
48397
  }
48398
48398
  else if (typeof (connection) === "object") {
48399
48399
  if (connection == null || connection.url == null) {
48400
- logger$5.throwArgumentError("missing URL", "connection.url", connection);
48400
+ logger$5$1.throwArgumentError("missing URL", "connection.url", connection);
48401
48401
  }
48402
48402
  url = connection.url;
48403
48403
  if (typeof (connection.timeout) === "number" && connection.timeout > 0) {
@@ -48414,7 +48414,7 @@ function _fetchData(connection, body, processFunc) {
48414
48414
  options.allowGzip = !!connection.allowGzip;
48415
48415
  if (connection.user != null && connection.password != null) {
48416
48416
  if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) {
48417
- logger$5.throwError("basic authentication requires a secure https url", Logger$2.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" });
48417
+ logger$5$1.throwError("basic authentication requires a secure https url", Logger$2.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" });
48418
48418
  }
48419
48419
  const authorization = connection.user + ":" + connection.password;
48420
48420
  headers["authorization"] = {
@@ -48448,7 +48448,7 @@ function _fetchData(connection, body, processFunc) {
48448
48448
  return;
48449
48449
  }
48450
48450
  timer = null;
48451
- reject(logger$5.makeError("timeout", Logger$2.errors.TIMEOUT, {
48451
+ reject(logger$5$1.makeError("timeout", Logger$2.errors.TIMEOUT, {
48452
48452
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
48453
48453
  requestMethod: options.method,
48454
48454
  timeout: timeout,
@@ -48497,7 +48497,7 @@ function _fetchData(connection, body, processFunc) {
48497
48497
  response = error.response;
48498
48498
  if (response == null) {
48499
48499
  runningTimeout.cancel();
48500
- logger$5.throwError("missing response", Logger$2.errors.SERVER_ERROR, {
48500
+ logger$5$1.throwError("missing response", Logger$2.errors.SERVER_ERROR, {
48501
48501
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
48502
48502
  requestMethod: options.method,
48503
48503
  serverError: error,
@@ -48511,7 +48511,7 @@ function _fetchData(connection, body, processFunc) {
48511
48511
  }
48512
48512
  else if (response.statusCode < 200 || response.statusCode >= 300) {
48513
48513
  runningTimeout.cancel();
48514
- logger$5.throwError("bad response", Logger$2.errors.SERVER_ERROR, {
48514
+ logger$5$1.throwError("bad response", Logger$2.errors.SERVER_ERROR, {
48515
48515
  status: response.statusCode,
48516
48516
  headers: response.headers,
48517
48517
  body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
@@ -48541,7 +48541,7 @@ function _fetchData(connection, body, processFunc) {
48541
48541
  }
48542
48542
  }
48543
48543
  runningTimeout.cancel();
48544
- logger$5.throwError("processing response error", Logger$2.errors.SERVER_ERROR, {
48544
+ logger$5$1.throwError("processing response error", Logger$2.errors.SERVER_ERROR, {
48545
48545
  body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
48546
48546
  error: error,
48547
48547
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
@@ -48555,7 +48555,7 @@ function _fetchData(connection, body, processFunc) {
48555
48555
  // The "body" is now a Uint8Array.
48556
48556
  return body;
48557
48557
  }
48558
- return logger$5.throwError("failed response", Logger$2.errors.SERVER_ERROR, {
48558
+ return logger$5$1.throwError("failed response", Logger$2.errors.SERVER_ERROR, {
48559
48559
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
48560
48560
  requestMethod: options.method,
48561
48561
  url: url
@@ -48572,7 +48572,7 @@ function fetchJson(connection, json, processFunc) {
48572
48572
  result = JSON.parse(toUtf8String(value));
48573
48573
  }
48574
48574
  catch (error) {
48575
- logger$5.throwError("invalid JSON", Logger$2.errors.SERVER_ERROR, {
48575
+ logger$5$1.throwError("invalid JSON", Logger$2.errors.SERVER_ERROR, {
48576
48576
  body: value,
48577
48577
  error: error
48578
48578
  });
@@ -49047,13 +49047,13 @@ class Formatter {
49047
49047
  // Requires an address
49048
49048
  // Strict! Used on input.
49049
49049
  address(value) {
49050
- return getAddress(value);
49050
+ return getAddress$1(value);
49051
49051
  }
49052
49052
  callAddress(value) {
49053
49053
  if (!isHexString$2(value, 32)) {
49054
49054
  return null;
49055
49055
  }
49056
- const address = getAddress(hexDataSlice(value, 12));
49056
+ const address = getAddress$1(hexDataSlice(value, 12));
49057
49057
  return (address === AddressZero) ? null : address;
49058
49058
  }
49059
49059
  contractAddress(value) {
@@ -52516,7 +52516,7 @@ var CardStyle = (function (style) {
52516
52516
  });
52517
52517
 
52518
52518
  var DialogStyle = (function (style) {
52519
- return "\n\n .ReactDialogBackground {\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n max-height: 40vh !important;\n }\n\n .FooterLink {\n bottom: 0;\n left: 0;\n position: absolute;\n padding-bottom: 1rem;\n right: 0;\n width: 100%;\n }\n\n .DialogFooter {\n padding-bottom: 50px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n max-height: 66vh !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.HeightAuto {\n height: auto;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n display: flex;\n flex-direction: row;\n position: relative;\n }\n\n .DialogHeaderTitle {\n flex-basis: auto;\n flex-grow: 1;\n }\n \n .DialogHeaderAction {\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
52519
+ return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n max-height: 40vh !important;\n }\n\n .FooterLink {\n bottom: 0;\n left: 0;\n position: absolute;\n padding-bottom: 1rem;\n right: 0;\n width: 100%;\n }\n\n .DialogFooter {\n padding-bottom: 50px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n max-height: 66vh !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.HeightAuto {\n height: auto;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n display: flex;\n flex-direction: row;\n position: relative;\n }\n\n .DialogHeaderTitle {\n flex-basis: auto;\n flex-grow: 1;\n }\n \n .DialogHeaderAction {\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
52520
52520
  });
52521
52521
 
52522
52522
  var FontStyle = (function (style) {
@@ -53000,7 +53000,7 @@ var EXP_LIMIT = 9e15, // 0 to 9e15
53000
53000
 
53001
53001
  BASE = 1e7,
53002
53002
  LOG_BASE = 7,
53003
- MAX_SAFE_INTEGER = 9007199254740991,
53003
+ MAX_SAFE_INTEGER$1 = 9007199254740991,
53004
53004
 
53005
53005
  LN10_PRECISION = LN10.length - 1,
53006
53006
  PI_PRECISION = PI.length - 1,
@@ -55170,7 +55170,7 @@ P.toPower = P.pow = function (y) {
55170
55170
  e = mathfloor(y.e / LOG_BASE);
55171
55171
 
55172
55172
  // If y is a small integer use the 'exponentiation by squaring' algorithm.
55173
- if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {
55173
+ if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER$1) {
55174
55174
  r = intPow(Ctor, x, k, pr);
55175
55175
  return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);
55176
55176
  }
@@ -57304,7 +57304,7 @@ function clone(obj) {
57304
57304
  Decimal.hypot = hypot; // ES6
57305
57305
  Decimal.ln = ln;
57306
57306
  Decimal.log = log;
57307
- Decimal.log10 = log10; // ES6
57307
+ Decimal.log10 = log10$1; // ES6
57308
57308
  Decimal.log2 = log2; // ES6
57309
57309
  Decimal.max = max;
57310
57310
  Decimal.min = min;
@@ -57463,7 +57463,7 @@ function log2(x) {
57463
57463
  * x {number|string|Decimal}
57464
57464
  *
57465
57465
  */
57466
- function log10(x) {
57466
+ function log10$1(x) {
57467
57467
  return new this(x).log(10);
57468
57468
  }
57469
57469
 
@@ -58297,7 +58297,7 @@ class Token {
58297
58297
 
58298
58298
  constructor({ blockchain, address }) {
58299
58299
  this.blockchain = blockchain;
58300
- this.address = getAddress$2(address);
58300
+ this.address = getAddress$3(address);
58301
58301
  }
58302
58302
 
58303
58303
  async decimals() {
@@ -62095,7 +62095,7 @@ var bn$1 = createCommonjsModule$1(function (module) {
62095
62095
  })(module, commonjsGlobal$1);
62096
62096
  });
62097
62097
 
62098
- const version$3 = "logger/5.4.1";
62098
+ const version$4 = "logger/5.4.1";
62099
62099
 
62100
62100
  let _permanentCensorErrors$1 = false;
62101
62101
  let _censorErrors$1 = false;
@@ -62371,7 +62371,7 @@ class Logger$1 {
62371
62371
  }
62372
62372
  static globalLogger() {
62373
62373
  if (!_globalLogger$1) {
62374
- _globalLogger$1 = new Logger$1(version$3);
62374
+ _globalLogger$1 = new Logger$1(version$4);
62375
62375
  }
62376
62376
  return _globalLogger$1;
62377
62377
  }
@@ -62407,9 +62407,9 @@ class Logger$1 {
62407
62407
  Logger$1.errors = ErrorCode$1;
62408
62408
  Logger$1.levels = LogLevel$1;
62409
62409
 
62410
- const version$2$1 = "bytes/5.4.0";
62410
+ const version$3 = "bytes/5.4.0";
62411
62411
 
62412
- const logger$3 = new Logger$1(version$2$1);
62412
+ const logger$4 = new Logger$1(version$3);
62413
62413
  ///////////////////////////////
62414
62414
  function isHexable$1(value) {
62415
62415
  return !!(value.toHexString);
@@ -62450,7 +62450,7 @@ function arrayify(value, options) {
62450
62450
  options = {};
62451
62451
  }
62452
62452
  if (typeof (value) === "number") {
62453
- logger$3.checkSafeUint53(value, "invalid arrayify value");
62453
+ logger$4.checkSafeUint53(value, "invalid arrayify value");
62454
62454
  const result = [];
62455
62455
  while (value) {
62456
62456
  result.unshift(value & 0xff);
@@ -62477,7 +62477,7 @@ function arrayify(value, options) {
62477
62477
  hex += "0";
62478
62478
  }
62479
62479
  else {
62480
- logger$3.throwArgumentError("hex data is odd-length", "value", value);
62480
+ logger$4.throwArgumentError("hex data is odd-length", "value", value);
62481
62481
  }
62482
62482
  }
62483
62483
  const result = [];
@@ -62489,7 +62489,7 @@ function arrayify(value, options) {
62489
62489
  if (isBytes$1(value)) {
62490
62490
  return addSlice(new Uint8Array(value));
62491
62491
  }
62492
- return logger$3.throwArgumentError("invalid arrayify value", "value", value);
62492
+ return logger$4.throwArgumentError("invalid arrayify value", "value", value);
62493
62493
  }
62494
62494
  function isHexString$1(value, length) {
62495
62495
  if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) {
@@ -62506,7 +62506,7 @@ function hexlify$1(value, options) {
62506
62506
  options = {};
62507
62507
  }
62508
62508
  if (typeof (value) === "number") {
62509
- logger$3.checkSafeUint53(value, "invalid hexlify value");
62509
+ logger$4.checkSafeUint53(value, "invalid hexlify value");
62510
62510
  let hex = "";
62511
62511
  while (value) {
62512
62512
  hex = HexCharacters$1[value & 0xf] + hex;
@@ -62542,7 +62542,7 @@ function hexlify$1(value, options) {
62542
62542
  value += "0";
62543
62543
  }
62544
62544
  else {
62545
- logger$3.throwArgumentError("hex data is odd-length", "value", value);
62545
+ logger$4.throwArgumentError("hex data is odd-length", "value", value);
62546
62546
  }
62547
62547
  }
62548
62548
  return value.toLowerCase();
@@ -62555,17 +62555,17 @@ function hexlify$1(value, options) {
62555
62555
  }
62556
62556
  return result;
62557
62557
  }
62558
- return logger$3.throwArgumentError("invalid hexlify value", "value", value);
62558
+ return logger$4.throwArgumentError("invalid hexlify value", "value", value);
62559
62559
  }
62560
62560
  function hexZeroPad(value, length) {
62561
62561
  if (typeof (value) !== "string") {
62562
62562
  value = hexlify$1(value);
62563
62563
  }
62564
62564
  else if (!isHexString$1(value)) {
62565
- logger$3.throwArgumentError("invalid hex string", "value", value);
62565
+ logger$4.throwArgumentError("invalid hex string", "value", value);
62566
62566
  }
62567
62567
  if (value.length > 2 * length + 2) {
62568
- logger$3.throwArgumentError("value out of range", "value", arguments[1]);
62568
+ logger$4.throwArgumentError("value out of range", "value", arguments[1]);
62569
62569
  }
62570
62570
  while (value.length < 2 * length + 2) {
62571
62571
  value = "0x0" + value.substring(2);
@@ -62573,10 +62573,10 @@ function hexZeroPad(value, length) {
62573
62573
  return value;
62574
62574
  }
62575
62575
 
62576
- const version$1$1 = "bignumber/5.4.1";
62576
+ const version$2$1 = "bignumber/5.4.1";
62577
62577
 
62578
62578
  var BN$1 = bn$1.BN;
62579
- const logger$2 = new Logger$1(version$1$1);
62579
+ const logger$3 = new Logger$1(version$2$1);
62580
62580
  const _constructorGuard$1 = {};
62581
62581
  const MAX_SAFE$1 = 0x1fffffffffffff;
62582
62582
  function isBigNumberish(value) {
@@ -62591,9 +62591,9 @@ function isBigNumberish(value) {
62591
62591
  let _warnedToStringRadix$1 = false;
62592
62592
  class BigNumber$1 {
62593
62593
  constructor(constructorGuard, hex) {
62594
- logger$2.checkNew(new.target, BigNumber$1);
62594
+ logger$3.checkNew(new.target, BigNumber$1);
62595
62595
  if (constructorGuard !== _constructorGuard$1) {
62596
- logger$2.throwError("cannot call constructor directly; use BigNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62596
+ logger$3.throwError("cannot call constructor directly; use BigNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62597
62597
  operation: "new (BigNumber)"
62598
62598
  });
62599
62599
  }
@@ -62717,7 +62717,7 @@ class BigNumber$1 {
62717
62717
  return BigInt(this.toString());
62718
62718
  }
62719
62719
  catch (e) { }
62720
- return logger$2.throwError("this platform does not support BigInt", Logger$1.errors.UNSUPPORTED_OPERATION, {
62720
+ return logger$3.throwError("this platform does not support BigInt", Logger$1.errors.UNSUPPORTED_OPERATION, {
62721
62721
  value: this.toString()
62722
62722
  });
62723
62723
  }
@@ -62727,14 +62727,14 @@ class BigNumber$1 {
62727
62727
  if (arguments[0] === 10) {
62728
62728
  if (!_warnedToStringRadix$1) {
62729
62729
  _warnedToStringRadix$1 = true;
62730
- logger$2.warn("BigNumber.toString does not accept any parameters; base-10 is assumed");
62730
+ logger$3.warn("BigNumber.toString does not accept any parameters; base-10 is assumed");
62731
62731
  }
62732
62732
  }
62733
62733
  else if (arguments[0] === 16) {
62734
- logger$2.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62734
+ logger$3.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62735
62735
  }
62736
62736
  else {
62737
- logger$2.throwError("BigNumber.toString does not accept parameters", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62737
+ logger$3.throwError("BigNumber.toString does not accept parameters", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62738
62738
  }
62739
62739
  }
62740
62740
  return toBN$1(this).toString(10);
@@ -62756,7 +62756,7 @@ class BigNumber$1 {
62756
62756
  if (value.match(/^-?[0-9]+$/)) {
62757
62757
  return new BigNumber$1(_constructorGuard$1, toHex$1(new BN$1(value)));
62758
62758
  }
62759
- return logger$2.throwArgumentError("invalid BigNumber string", "value", value);
62759
+ return logger$3.throwArgumentError("invalid BigNumber string", "value", value);
62760
62760
  }
62761
62761
  if (typeof (value) === "number") {
62762
62762
  if (value % 1) {
@@ -62796,7 +62796,7 @@ class BigNumber$1 {
62796
62796
  }
62797
62797
  }
62798
62798
  }
62799
- return logger$2.throwArgumentError("invalid BigNumber value", "value", value);
62799
+ return logger$3.throwArgumentError("invalid BigNumber value", "value", value);
62800
62800
  }
62801
62801
  static isBigNumber(value) {
62802
62802
  return !!(value && value._isBigNumber);
@@ -62814,7 +62814,7 @@ function toHex$1(value) {
62814
62814
  value = value.substring(1);
62815
62815
  // Cannot have mulitple negative signs (e.g. "--0x04")
62816
62816
  if (value[0] === "-") {
62817
- logger$2.throwArgumentError("invalid hex", "value", value);
62817
+ logger$3.throwArgumentError("invalid hex", "value", value);
62818
62818
  }
62819
62819
  // Call toHex on the positive component
62820
62820
  value = toHex$1(value);
@@ -62858,10 +62858,14 @@ function throwFault$1(fault, operation, value) {
62858
62858
  if (value != null) {
62859
62859
  params.value = value;
62860
62860
  }
62861
- return logger$2.throwError(fault, Logger$1.errors.NUMERIC_FAULT, params);
62861
+ return logger$3.throwError(fault, Logger$1.errors.NUMERIC_FAULT, params);
62862
+ }
62863
+ // value should have no prefix
62864
+ function _base36To16(value) {
62865
+ return (new BN$1(value, 36)).toString(16);
62862
62866
  }
62863
62867
 
62864
- const logger$1$1 = new Logger$1(version$1$1);
62868
+ const logger$2 = new Logger$1(version$2$1);
62865
62869
  const _constructorGuard$2 = {};
62866
62870
  const Zero = BigNumber$1.from(0);
62867
62871
  const NegativeOne = BigNumber$1.from(-1);
@@ -62870,7 +62874,7 @@ function throwFault$2(message, fault, operation, value) {
62870
62874
  if (value !== undefined) {
62871
62875
  params.value = value;
62872
62876
  }
62873
- return logger$1$1.throwError(message, Logger$1.errors.NUMERIC_FAULT, params);
62877
+ return logger$2.throwError(message, Logger$1.errors.NUMERIC_FAULT, params);
62874
62878
  }
62875
62879
  // Constant to pull zeros from for multipliers
62876
62880
  let zeros = "0";
@@ -62888,7 +62892,7 @@ function getMultiplier(decimals) {
62888
62892
  if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {
62889
62893
  return ("1" + zeros.substring(0, decimals));
62890
62894
  }
62891
- return logger$1$1.throwArgumentError("invalid decimal size", "decimals", decimals);
62895
+ return logger$2.throwArgumentError("invalid decimal size", "decimals", decimals);
62892
62896
  }
62893
62897
  function formatFixed(value, decimals) {
62894
62898
  if (decimals == null) {
@@ -62925,7 +62929,7 @@ function parseFixed(value, decimals) {
62925
62929
  }
62926
62930
  const multiplier = getMultiplier(decimals);
62927
62931
  if (typeof (value) !== "string" || !value.match(/^-?[0-9.,]+$/)) {
62928
- logger$1$1.throwArgumentError("invalid decimal value", "value", value);
62932
+ logger$2.throwArgumentError("invalid decimal value", "value", value);
62929
62933
  }
62930
62934
  // Is it negative?
62931
62935
  const negative = (value.substring(0, 1) === "-");
@@ -62933,12 +62937,12 @@ function parseFixed(value, decimals) {
62933
62937
  value = value.substring(1);
62934
62938
  }
62935
62939
  if (value === ".") {
62936
- logger$1$1.throwArgumentError("missing value", "value", value);
62940
+ logger$2.throwArgumentError("missing value", "value", value);
62937
62941
  }
62938
62942
  // Split it into a whole and fractional part
62939
62943
  const comps = value.split(".");
62940
62944
  if (comps.length > 2) {
62941
- logger$1$1.throwArgumentError("too many decimal points", "value", value);
62945
+ logger$2.throwArgumentError("too many decimal points", "value", value);
62942
62946
  }
62943
62947
  let whole = comps[0], fraction = comps[1];
62944
62948
  if (!whole) {
@@ -62969,7 +62973,7 @@ function parseFixed(value, decimals) {
62969
62973
  class FixedFormat {
62970
62974
  constructor(constructorGuard, signed, width, decimals) {
62971
62975
  if (constructorGuard !== _constructorGuard$2) {
62972
- logger$1$1.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62976
+ logger$2.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62973
62977
  operation: "new FixedFormat"
62974
62978
  });
62975
62979
  }
@@ -62998,7 +63002,7 @@ class FixedFormat {
62998
63002
  else {
62999
63003
  const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);
63000
63004
  if (!match) {
63001
- logger$1$1.throwArgumentError("invalid fixed format", "format", value);
63005
+ logger$2.throwArgumentError("invalid fixed format", "format", value);
63002
63006
  }
63003
63007
  signed = (match[1] !== "u");
63004
63008
  width = parseInt(match[2]);
@@ -63011,7 +63015,7 @@ class FixedFormat {
63011
63015
  return defaultValue;
63012
63016
  }
63013
63017
  if (typeof (value[key]) !== type) {
63014
- logger$1$1.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]);
63018
+ logger$2.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]);
63015
63019
  }
63016
63020
  return value[key];
63017
63021
  };
@@ -63020,19 +63024,19 @@ class FixedFormat {
63020
63024
  decimals = check("decimals", "number", decimals);
63021
63025
  }
63022
63026
  if (width % 8) {
63023
- logger$1$1.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width);
63027
+ logger$2.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width);
63024
63028
  }
63025
63029
  if (decimals > 80) {
63026
- logger$1$1.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals);
63030
+ logger$2.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals);
63027
63031
  }
63028
63032
  return new FixedFormat(_constructorGuard$2, signed, width, decimals);
63029
63033
  }
63030
63034
  }
63031
63035
  class FixedNumber {
63032
63036
  constructor(constructorGuard, hex, value, format) {
63033
- logger$1$1.checkNew(new.target, FixedNumber);
63037
+ logger$2.checkNew(new.target, FixedNumber);
63034
63038
  if (constructorGuard !== _constructorGuard$2) {
63035
- logger$1$1.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
63039
+ logger$2.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
63036
63040
  operation: "new FixedFormat"
63037
63041
  });
63038
63042
  }
@@ -63044,7 +63048,7 @@ class FixedNumber {
63044
63048
  }
63045
63049
  _checkFormat(other) {
63046
63050
  if (this.format.name !== other.format.name) {
63047
- logger$1$1.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other);
63051
+ logger$2.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other);
63048
63052
  }
63049
63053
  }
63050
63054
  addUnsafe(other) {
@@ -63106,7 +63110,7 @@ class FixedNumber {
63106
63110
  comps.push("0");
63107
63111
  }
63108
63112
  if (decimals < 0 || decimals > 80 || (decimals % 1)) {
63109
- logger$1$1.throwArgumentError("invalid decimal count", "decimals", decimals);
63113
+ logger$2.throwArgumentError("invalid decimal count", "decimals", decimals);
63110
63114
  }
63111
63115
  if (comps[1].length <= decimals) {
63112
63116
  return this;
@@ -63127,7 +63131,7 @@ class FixedNumber {
63127
63131
  return this._hex;
63128
63132
  }
63129
63133
  if (width % 8) {
63130
- logger$1$1.throwArgumentError("invalid byte width", "width", width);
63134
+ logger$2.throwArgumentError("invalid byte width", "width", width);
63131
63135
  }
63132
63136
  const hex = BigNumber$1.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();
63133
63137
  return hexZeroPad(hex, width / 8);
@@ -63202,7 +63206,7 @@ class FixedNumber {
63202
63206
  throw error;
63203
63207
  }
63204
63208
  }
63205
- return logger$1$1.throwArgumentError("invalid FixedNumber value", "value", value);
63209
+ return logger$2.throwArgumentError("invalid FixedNumber value", "value", value);
63206
63210
  }
63207
63211
  static isFixedNumber(value) {
63208
63212
  return !!(value && value._isFixedNumber);
@@ -63211,9 +63215,585 @@ class FixedNumber {
63211
63215
  const ONE = FixedNumber.from(1);
63212
63216
  const BUMP = FixedNumber.from("0.5");
63213
63217
 
63214
- const version$4 = "units/5.4.0";
63218
+ /**
63219
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
63220
+ *
63221
+ * @version 0.5.7
63222
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
63223
+ * @copyright Chen, Yi-Cyuan 2015-2016
63224
+ * @license MIT
63225
+ */
63226
+
63227
+ var sha3 = createCommonjsModule$1(function (module) {
63228
+ /*jslint bitwise: true */
63229
+ (function () {
63230
+
63231
+ var root = typeof window === 'object' ? window : {};
63232
+ var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
63233
+ if (NODE_JS) {
63234
+ root = commonjsGlobal$1;
63235
+ }
63236
+ var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && 'object' === 'object' && module.exports;
63237
+ var HEX_CHARS = '0123456789abcdef'.split('');
63238
+ var SHAKE_PADDING = [31, 7936, 2031616, 520093696];
63239
+ var KECCAK_PADDING = [1, 256, 65536, 16777216];
63240
+ var PADDING = [6, 1536, 393216, 100663296];
63241
+ var SHIFT = [0, 8, 16, 24];
63242
+ var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,
63243
+ 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,
63244
+ 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,
63245
+ 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,
63246
+ 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];
63247
+ var BITS = [224, 256, 384, 512];
63248
+ var SHAKE_BITS = [128, 256];
63249
+ var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array'];
63250
+
63251
+ var createOutputMethod = function (bits, padding, outputType) {
63252
+ return function (message) {
63253
+ return new Keccak(bits, padding, bits).update(message)[outputType]();
63254
+ };
63255
+ };
63256
+
63257
+ var createShakeOutputMethod = function (bits, padding, outputType) {
63258
+ return function (message, outputBits) {
63259
+ return new Keccak(bits, padding, outputBits).update(message)[outputType]();
63260
+ };
63261
+ };
63262
+
63263
+ var createMethod = function (bits, padding) {
63264
+ var method = createOutputMethod(bits, padding, 'hex');
63265
+ method.create = function () {
63266
+ return new Keccak(bits, padding, bits);
63267
+ };
63268
+ method.update = function (message) {
63269
+ return method.create().update(message);
63270
+ };
63271
+ for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
63272
+ var type = OUTPUT_TYPES[i];
63273
+ method[type] = createOutputMethod(bits, padding, type);
63274
+ }
63275
+ return method;
63276
+ };
63277
+
63278
+ var createShakeMethod = function (bits, padding) {
63279
+ var method = createShakeOutputMethod(bits, padding, 'hex');
63280
+ method.create = function (outputBits) {
63281
+ return new Keccak(bits, padding, outputBits);
63282
+ };
63283
+ method.update = function (message, outputBits) {
63284
+ return method.create(outputBits).update(message);
63285
+ };
63286
+ for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
63287
+ var type = OUTPUT_TYPES[i];
63288
+ method[type] = createShakeOutputMethod(bits, padding, type);
63289
+ }
63290
+ return method;
63291
+ };
63292
+
63293
+ var algorithms = [
63294
+ {name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod},
63295
+ {name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod},
63296
+ {name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod}
63297
+ ];
63298
+
63299
+ var methods = {}, methodNames = [];
63300
+
63301
+ for (var i = 0; i < algorithms.length; ++i) {
63302
+ var algorithm = algorithms[i];
63303
+ var bits = algorithm.bits;
63304
+ for (var j = 0; j < bits.length; ++j) {
63305
+ var methodName = algorithm.name +'_' + bits[j];
63306
+ methodNames.push(methodName);
63307
+ methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);
63308
+ }
63309
+ }
63310
+
63311
+ function Keccak(bits, padding, outputBits) {
63312
+ this.blocks = [];
63313
+ this.s = [];
63314
+ this.padding = padding;
63315
+ this.outputBits = outputBits;
63316
+ this.reset = true;
63317
+ this.block = 0;
63318
+ this.start = 0;
63319
+ this.blockCount = (1600 - (bits << 1)) >> 5;
63320
+ this.byteCount = this.blockCount << 2;
63321
+ this.outputBlocks = outputBits >> 5;
63322
+ this.extraBytes = (outputBits & 31) >> 3;
63323
+
63324
+ for (var i = 0; i < 50; ++i) {
63325
+ this.s[i] = 0;
63326
+ }
63327
+ }
63328
+
63329
+ Keccak.prototype.update = function (message) {
63330
+ var notString = typeof message !== 'string';
63331
+ if (notString && message.constructor === ArrayBuffer) {
63332
+ message = new Uint8Array(message);
63333
+ }
63334
+ var length = message.length, blocks = this.blocks, byteCount = this.byteCount,
63335
+ blockCount = this.blockCount, index = 0, s = this.s, i, code;
63336
+
63337
+ while (index < length) {
63338
+ if (this.reset) {
63339
+ this.reset = false;
63340
+ blocks[0] = this.block;
63341
+ for (i = 1; i < blockCount + 1; ++i) {
63342
+ blocks[i] = 0;
63343
+ }
63344
+ }
63345
+ if (notString) {
63346
+ for (i = this.start; index < length && i < byteCount; ++index) {
63347
+ blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
63348
+ }
63349
+ } else {
63350
+ for (i = this.start; index < length && i < byteCount; ++index) {
63351
+ code = message.charCodeAt(index);
63352
+ if (code < 0x80) {
63353
+ blocks[i >> 2] |= code << SHIFT[i++ & 3];
63354
+ } else if (code < 0x800) {
63355
+ blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
63356
+ blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
63357
+ } else if (code < 0xd800 || code >= 0xe000) {
63358
+ blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
63359
+ blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
63360
+ blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
63361
+ } else {
63362
+ code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
63363
+ blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
63364
+ blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
63365
+ blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
63366
+ blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
63367
+ }
63368
+ }
63369
+ }
63370
+ this.lastByteIndex = i;
63371
+ if (i >= byteCount) {
63372
+ this.start = i - byteCount;
63373
+ this.block = blocks[blockCount];
63374
+ for (i = 0; i < blockCount; ++i) {
63375
+ s[i] ^= blocks[i];
63376
+ }
63377
+ f(s);
63378
+ this.reset = true;
63379
+ } else {
63380
+ this.start = i;
63381
+ }
63382
+ }
63383
+ return this;
63384
+ };
63385
+
63386
+ Keccak.prototype.finalize = function () {
63387
+ var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;
63388
+ blocks[i >> 2] |= this.padding[i & 3];
63389
+ if (this.lastByteIndex === this.byteCount) {
63390
+ blocks[0] = blocks[blockCount];
63391
+ for (i = 1; i < blockCount + 1; ++i) {
63392
+ blocks[i] = 0;
63393
+ }
63394
+ }
63395
+ blocks[blockCount - 1] |= 0x80000000;
63396
+ for (i = 0; i < blockCount; ++i) {
63397
+ s[i] ^= blocks[i];
63398
+ }
63399
+ f(s);
63400
+ };
63401
+
63402
+ Keccak.prototype.toString = Keccak.prototype.hex = function () {
63403
+ this.finalize();
63404
+
63405
+ var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,
63406
+ extraBytes = this.extraBytes, i = 0, j = 0;
63407
+ var hex = '', block;
63408
+ while (j < outputBlocks) {
63409
+ for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {
63410
+ block = s[i];
63411
+ hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +
63412
+ HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +
63413
+ HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +
63414
+ HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];
63415
+ }
63416
+ if (j % blockCount === 0) {
63417
+ f(s);
63418
+ i = 0;
63419
+ }
63420
+ }
63421
+ if (extraBytes) {
63422
+ block = s[i];
63423
+ if (extraBytes > 0) {
63424
+ hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];
63425
+ }
63426
+ if (extraBytes > 1) {
63427
+ hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];
63428
+ }
63429
+ if (extraBytes > 2) {
63430
+ hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];
63431
+ }
63432
+ }
63433
+ return hex;
63434
+ };
63435
+
63436
+ Keccak.prototype.arrayBuffer = function () {
63437
+ this.finalize();
63438
+
63439
+ var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,
63440
+ extraBytes = this.extraBytes, i = 0, j = 0;
63441
+ var bytes = this.outputBits >> 3;
63442
+ var buffer;
63443
+ if (extraBytes) {
63444
+ buffer = new ArrayBuffer((outputBlocks + 1) << 2);
63445
+ } else {
63446
+ buffer = new ArrayBuffer(bytes);
63447
+ }
63448
+ var array = new Uint32Array(buffer);
63449
+ while (j < outputBlocks) {
63450
+ for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {
63451
+ array[j] = s[i];
63452
+ }
63453
+ if (j % blockCount === 0) {
63454
+ f(s);
63455
+ }
63456
+ }
63457
+ if (extraBytes) {
63458
+ array[i] = s[i];
63459
+ buffer = buffer.slice(0, bytes);
63460
+ }
63461
+ return buffer;
63462
+ };
63463
+
63464
+ Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;
63465
+
63466
+ Keccak.prototype.digest = Keccak.prototype.array = function () {
63467
+ this.finalize();
63468
+
63469
+ var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,
63470
+ extraBytes = this.extraBytes, i = 0, j = 0;
63471
+ var array = [], offset, block;
63472
+ while (j < outputBlocks) {
63473
+ for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {
63474
+ offset = j << 2;
63475
+ block = s[i];
63476
+ array[offset] = block & 0xFF;
63477
+ array[offset + 1] = (block >> 8) & 0xFF;
63478
+ array[offset + 2] = (block >> 16) & 0xFF;
63479
+ array[offset + 3] = (block >> 24) & 0xFF;
63480
+ }
63481
+ if (j % blockCount === 0) {
63482
+ f(s);
63483
+ }
63484
+ }
63485
+ if (extraBytes) {
63486
+ offset = j << 2;
63487
+ block = s[i];
63488
+ if (extraBytes > 0) {
63489
+ array[offset] = block & 0xFF;
63490
+ }
63491
+ if (extraBytes > 1) {
63492
+ array[offset + 1] = (block >> 8) & 0xFF;
63493
+ }
63494
+ if (extraBytes > 2) {
63495
+ array[offset + 2] = (block >> 16) & 0xFF;
63496
+ }
63497
+ }
63498
+ return array;
63499
+ };
63500
+
63501
+ var f = function (s) {
63502
+ var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,
63503
+ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,
63504
+ b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,
63505
+ b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;
63506
+ for (n = 0; n < 48; n += 2) {
63507
+ c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];
63508
+ c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];
63509
+ c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];
63510
+ c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];
63511
+ c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];
63512
+ c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];
63513
+ c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];
63514
+ c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];
63515
+ c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];
63516
+ c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];
63517
+
63518
+ h = c8 ^ ((c2 << 1) | (c3 >>> 31));
63519
+ l = c9 ^ ((c3 << 1) | (c2 >>> 31));
63520
+ s[0] ^= h;
63521
+ s[1] ^= l;
63522
+ s[10] ^= h;
63523
+ s[11] ^= l;
63524
+ s[20] ^= h;
63525
+ s[21] ^= l;
63526
+ s[30] ^= h;
63527
+ s[31] ^= l;
63528
+ s[40] ^= h;
63529
+ s[41] ^= l;
63530
+ h = c0 ^ ((c4 << 1) | (c5 >>> 31));
63531
+ l = c1 ^ ((c5 << 1) | (c4 >>> 31));
63532
+ s[2] ^= h;
63533
+ s[3] ^= l;
63534
+ s[12] ^= h;
63535
+ s[13] ^= l;
63536
+ s[22] ^= h;
63537
+ s[23] ^= l;
63538
+ s[32] ^= h;
63539
+ s[33] ^= l;
63540
+ s[42] ^= h;
63541
+ s[43] ^= l;
63542
+ h = c2 ^ ((c6 << 1) | (c7 >>> 31));
63543
+ l = c3 ^ ((c7 << 1) | (c6 >>> 31));
63544
+ s[4] ^= h;
63545
+ s[5] ^= l;
63546
+ s[14] ^= h;
63547
+ s[15] ^= l;
63548
+ s[24] ^= h;
63549
+ s[25] ^= l;
63550
+ s[34] ^= h;
63551
+ s[35] ^= l;
63552
+ s[44] ^= h;
63553
+ s[45] ^= l;
63554
+ h = c4 ^ ((c8 << 1) | (c9 >>> 31));
63555
+ l = c5 ^ ((c9 << 1) | (c8 >>> 31));
63556
+ s[6] ^= h;
63557
+ s[7] ^= l;
63558
+ s[16] ^= h;
63559
+ s[17] ^= l;
63560
+ s[26] ^= h;
63561
+ s[27] ^= l;
63562
+ s[36] ^= h;
63563
+ s[37] ^= l;
63564
+ s[46] ^= h;
63565
+ s[47] ^= l;
63566
+ h = c6 ^ ((c0 << 1) | (c1 >>> 31));
63567
+ l = c7 ^ ((c1 << 1) | (c0 >>> 31));
63568
+ s[8] ^= h;
63569
+ s[9] ^= l;
63570
+ s[18] ^= h;
63571
+ s[19] ^= l;
63572
+ s[28] ^= h;
63573
+ s[29] ^= l;
63574
+ s[38] ^= h;
63575
+ s[39] ^= l;
63576
+ s[48] ^= h;
63577
+ s[49] ^= l;
63578
+
63579
+ b0 = s[0];
63580
+ b1 = s[1];
63581
+ b32 = (s[11] << 4) | (s[10] >>> 28);
63582
+ b33 = (s[10] << 4) | (s[11] >>> 28);
63583
+ b14 = (s[20] << 3) | (s[21] >>> 29);
63584
+ b15 = (s[21] << 3) | (s[20] >>> 29);
63585
+ b46 = (s[31] << 9) | (s[30] >>> 23);
63586
+ b47 = (s[30] << 9) | (s[31] >>> 23);
63587
+ b28 = (s[40] << 18) | (s[41] >>> 14);
63588
+ b29 = (s[41] << 18) | (s[40] >>> 14);
63589
+ b20 = (s[2] << 1) | (s[3] >>> 31);
63590
+ b21 = (s[3] << 1) | (s[2] >>> 31);
63591
+ b2 = (s[13] << 12) | (s[12] >>> 20);
63592
+ b3 = (s[12] << 12) | (s[13] >>> 20);
63593
+ b34 = (s[22] << 10) | (s[23] >>> 22);
63594
+ b35 = (s[23] << 10) | (s[22] >>> 22);
63595
+ b16 = (s[33] << 13) | (s[32] >>> 19);
63596
+ b17 = (s[32] << 13) | (s[33] >>> 19);
63597
+ b48 = (s[42] << 2) | (s[43] >>> 30);
63598
+ b49 = (s[43] << 2) | (s[42] >>> 30);
63599
+ b40 = (s[5] << 30) | (s[4] >>> 2);
63600
+ b41 = (s[4] << 30) | (s[5] >>> 2);
63601
+ b22 = (s[14] << 6) | (s[15] >>> 26);
63602
+ b23 = (s[15] << 6) | (s[14] >>> 26);
63603
+ b4 = (s[25] << 11) | (s[24] >>> 21);
63604
+ b5 = (s[24] << 11) | (s[25] >>> 21);
63605
+ b36 = (s[34] << 15) | (s[35] >>> 17);
63606
+ b37 = (s[35] << 15) | (s[34] >>> 17);
63607
+ b18 = (s[45] << 29) | (s[44] >>> 3);
63608
+ b19 = (s[44] << 29) | (s[45] >>> 3);
63609
+ b10 = (s[6] << 28) | (s[7] >>> 4);
63610
+ b11 = (s[7] << 28) | (s[6] >>> 4);
63611
+ b42 = (s[17] << 23) | (s[16] >>> 9);
63612
+ b43 = (s[16] << 23) | (s[17] >>> 9);
63613
+ b24 = (s[26] << 25) | (s[27] >>> 7);
63614
+ b25 = (s[27] << 25) | (s[26] >>> 7);
63615
+ b6 = (s[36] << 21) | (s[37] >>> 11);
63616
+ b7 = (s[37] << 21) | (s[36] >>> 11);
63617
+ b38 = (s[47] << 24) | (s[46] >>> 8);
63618
+ b39 = (s[46] << 24) | (s[47] >>> 8);
63619
+ b30 = (s[8] << 27) | (s[9] >>> 5);
63620
+ b31 = (s[9] << 27) | (s[8] >>> 5);
63621
+ b12 = (s[18] << 20) | (s[19] >>> 12);
63622
+ b13 = (s[19] << 20) | (s[18] >>> 12);
63623
+ b44 = (s[29] << 7) | (s[28] >>> 25);
63624
+ b45 = (s[28] << 7) | (s[29] >>> 25);
63625
+ b26 = (s[38] << 8) | (s[39] >>> 24);
63626
+ b27 = (s[39] << 8) | (s[38] >>> 24);
63627
+ b8 = (s[48] << 14) | (s[49] >>> 18);
63628
+ b9 = (s[49] << 14) | (s[48] >>> 18);
63629
+
63630
+ s[0] = b0 ^ (~b2 & b4);
63631
+ s[1] = b1 ^ (~b3 & b5);
63632
+ s[10] = b10 ^ (~b12 & b14);
63633
+ s[11] = b11 ^ (~b13 & b15);
63634
+ s[20] = b20 ^ (~b22 & b24);
63635
+ s[21] = b21 ^ (~b23 & b25);
63636
+ s[30] = b30 ^ (~b32 & b34);
63637
+ s[31] = b31 ^ (~b33 & b35);
63638
+ s[40] = b40 ^ (~b42 & b44);
63639
+ s[41] = b41 ^ (~b43 & b45);
63640
+ s[2] = b2 ^ (~b4 & b6);
63641
+ s[3] = b3 ^ (~b5 & b7);
63642
+ s[12] = b12 ^ (~b14 & b16);
63643
+ s[13] = b13 ^ (~b15 & b17);
63644
+ s[22] = b22 ^ (~b24 & b26);
63645
+ s[23] = b23 ^ (~b25 & b27);
63646
+ s[32] = b32 ^ (~b34 & b36);
63647
+ s[33] = b33 ^ (~b35 & b37);
63648
+ s[42] = b42 ^ (~b44 & b46);
63649
+ s[43] = b43 ^ (~b45 & b47);
63650
+ s[4] = b4 ^ (~b6 & b8);
63651
+ s[5] = b5 ^ (~b7 & b9);
63652
+ s[14] = b14 ^ (~b16 & b18);
63653
+ s[15] = b15 ^ (~b17 & b19);
63654
+ s[24] = b24 ^ (~b26 & b28);
63655
+ s[25] = b25 ^ (~b27 & b29);
63656
+ s[34] = b34 ^ (~b36 & b38);
63657
+ s[35] = b35 ^ (~b37 & b39);
63658
+ s[44] = b44 ^ (~b46 & b48);
63659
+ s[45] = b45 ^ (~b47 & b49);
63660
+ s[6] = b6 ^ (~b8 & b0);
63661
+ s[7] = b7 ^ (~b9 & b1);
63662
+ s[16] = b16 ^ (~b18 & b10);
63663
+ s[17] = b17 ^ (~b19 & b11);
63664
+ s[26] = b26 ^ (~b28 & b20);
63665
+ s[27] = b27 ^ (~b29 & b21);
63666
+ s[36] = b36 ^ (~b38 & b30);
63667
+ s[37] = b37 ^ (~b39 & b31);
63668
+ s[46] = b46 ^ (~b48 & b40);
63669
+ s[47] = b47 ^ (~b49 & b41);
63670
+ s[8] = b8 ^ (~b0 & b2);
63671
+ s[9] = b9 ^ (~b1 & b3);
63672
+ s[18] = b18 ^ (~b10 & b12);
63673
+ s[19] = b19 ^ (~b11 & b13);
63674
+ s[28] = b28 ^ (~b20 & b22);
63675
+ s[29] = b29 ^ (~b21 & b23);
63676
+ s[38] = b38 ^ (~b30 & b32);
63677
+ s[39] = b39 ^ (~b31 & b33);
63678
+ s[48] = b48 ^ (~b40 & b42);
63679
+ s[49] = b49 ^ (~b41 & b43);
63680
+
63681
+ s[0] ^= RC[n];
63682
+ s[1] ^= RC[n + 1];
63683
+ }
63684
+ };
63685
+
63686
+ if (COMMON_JS) {
63687
+ module.exports = methods;
63688
+ } else {
63689
+ for (var i = 0; i < methodNames.length; ++i) {
63690
+ root[methodNames[i]] = methods[methodNames[i]];
63691
+ }
63692
+ }
63693
+ })();
63694
+ });
63695
+
63696
+ var sha3$1 = sha3;
63697
+
63698
+ function keccak256(data) {
63699
+ return '0x' + sha3$1.keccak_256(arrayify(data));
63700
+ }
63701
+
63702
+ const version$1$1 = "address/5.4.0";
63215
63703
 
63216
- const logger$4 = new Logger$1(version$4);
63704
+ const logger$1$1 = new Logger$1(version$1$1);
63705
+ function getChecksumAddress(address) {
63706
+ if (!isHexString$1(address, 20)) {
63707
+ logger$1$1.throwArgumentError("invalid address", "address", address);
63708
+ }
63709
+ address = address.toLowerCase();
63710
+ const chars = address.substring(2).split("");
63711
+ const expanded = new Uint8Array(40);
63712
+ for (let i = 0; i < 40; i++) {
63713
+ expanded[i] = chars[i].charCodeAt(0);
63714
+ }
63715
+ const hashed = arrayify(keccak256(expanded));
63716
+ for (let i = 0; i < 40; i += 2) {
63717
+ if ((hashed[i >> 1] >> 4) >= 8) {
63718
+ chars[i] = chars[i].toUpperCase();
63719
+ }
63720
+ if ((hashed[i >> 1] & 0x0f) >= 8) {
63721
+ chars[i + 1] = chars[i + 1].toUpperCase();
63722
+ }
63723
+ }
63724
+ return "0x" + chars.join("");
63725
+ }
63726
+ // Shims for environments that are missing some required constants and functions
63727
+ const MAX_SAFE_INTEGER = 0x1fffffffffffff;
63728
+ function log10(x) {
63729
+ if (Math.log10) {
63730
+ return Math.log10(x);
63731
+ }
63732
+ return Math.log(x) / Math.LN10;
63733
+ }
63734
+ // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
63735
+ // Create lookup table
63736
+ const ibanLookup = {};
63737
+ for (let i = 0; i < 10; i++) {
63738
+ ibanLookup[String(i)] = String(i);
63739
+ }
63740
+ for (let i = 0; i < 26; i++) {
63741
+ ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);
63742
+ }
63743
+ // How many decimal digits can we process? (for 64-bit float, this is 15)
63744
+ const safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));
63745
+ function ibanChecksum(address) {
63746
+ address = address.toUpperCase();
63747
+ address = address.substring(4) + address.substring(0, 2) + "00";
63748
+ let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join("");
63749
+ // Javascript can handle integers safely up to 15 (decimal) digits
63750
+ while (expanded.length >= safeDigits) {
63751
+ let block = expanded.substring(0, safeDigits);
63752
+ expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
63753
+ }
63754
+ let checksum = String(98 - (parseInt(expanded, 10) % 97));
63755
+ while (checksum.length < 2) {
63756
+ checksum = "0" + checksum;
63757
+ }
63758
+ return checksum;
63759
+ }
63760
+ function getAddress(address) {
63761
+ let result = null;
63762
+ if (typeof (address) !== "string") {
63763
+ logger$1$1.throwArgumentError("invalid address", "address", address);
63764
+ }
63765
+ if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
63766
+ // Missing the 0x prefix
63767
+ if (address.substring(0, 2) !== "0x") {
63768
+ address = "0x" + address;
63769
+ }
63770
+ result = getChecksumAddress(address);
63771
+ // It is a checksummed address with a bad checksum
63772
+ if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
63773
+ logger$1$1.throwArgumentError("bad address checksum", "address", address);
63774
+ }
63775
+ // Maybe ICAP? (we only support direct mode)
63776
+ }
63777
+ else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
63778
+ // It is an ICAP address with a bad checksum
63779
+ if (address.substring(2, 4) !== ibanChecksum(address)) {
63780
+ logger$1$1.throwArgumentError("bad icap checksum", "address", address);
63781
+ }
63782
+ result = _base36To16(address.substring(4));
63783
+ while (result.length < 40) {
63784
+ result = "0" + result;
63785
+ }
63786
+ result = getChecksumAddress("0x" + result);
63787
+ }
63788
+ else {
63789
+ logger$1$1.throwArgumentError("invalid address", "address", address);
63790
+ }
63791
+ return result;
63792
+ }
63793
+
63794
+ const version$5 = "units/5.4.0";
63795
+
63796
+ const logger$5 = new Logger$1(version$5);
63217
63797
  const names = [
63218
63798
  "wei",
63219
63799
  "kwei",
@@ -63225,7 +63805,7 @@ const names = [
63225
63805
  ];
63226
63806
  function parseUnits(value, unitName) {
63227
63807
  if (typeof (value) !== "string") {
63228
- logger$4.throwArgumentError("value must be a string", "value", value);
63808
+ logger$5.throwArgumentError("value must be a string", "value", value);
63229
63809
  }
63230
63810
  if (typeof (unitName) === "string") {
63231
63811
  const index = names.indexOf(unitName);
@@ -63488,6 +64068,10 @@ let getTransaction$1 = ({
63488
64068
  return transaction
63489
64069
  };
63490
64070
 
64071
+ const fixCheckSum = (address)=>{
64072
+ return getAddress(address)
64073
+ };
64074
+
63491
64075
  let route$6 = ({
63492
64076
  exchange,
63493
64077
  tokenIn,
@@ -63499,6 +64083,8 @@ let route$6 = ({
63499
64083
  amountInMax = undefined,
63500
64084
  amountOutMin = undefined,
63501
64085
  }) => {
64086
+ tokenIn = fixCheckSum(tokenIn);
64087
+ tokenOut = fixCheckSum(tokenOut);
63502
64088
  return new Promise(async (resolve)=> {
63503
64089
  let path = await findPath$1({ tokenIn, tokenOut });
63504
64090
  if (path === undefined || path.length == 0) { return resolve() }
@@ -63836,6 +64422,8 @@ let route$4 = ({
63836
64422
  amountInMax = undefined,
63837
64423
  amountOutMin = undefined,
63838
64424
  }) => {
64425
+ tokenIn = fixCheckSum(tokenIn);
64426
+ tokenOut = fixCheckSum(tokenOut);
63839
64427
  return new Promise(async (resolve)=> {
63840
64428
  let path = await findPath({ tokenIn, tokenOut });
63841
64429
  if (path === undefined || path.length == 0) { return resolve() }
@@ -64185,12 +64773,18 @@ var ChangableAmountProvider = (function (props) {
64185
64773
  });
64186
64774
  })).then(function (amounts) {
64187
64775
  setAcceptWithAmount(props.accept.map(function (configuration, index) {
64776
+ if (amounts[index] == undefined) {
64777
+ return;
64778
+ }
64779
+
64188
64780
  return {
64189
64781
  blockchain: configuration.blockchain,
64190
- amount: round$1(amounts[index]) || 1,
64782
+ amount: round$1(amounts[index]),
64191
64783
  token: configuration.token,
64192
64784
  receiver: configuration.receiver || account
64193
64785
  };
64786
+ }).filter(function (configuration) {
64787
+ return !!configuration;
64194
64788
  }));
64195
64789
  })["catch"](setError);
64196
64790
  })["catch"](setError);
@@ -71984,11 +72578,7 @@ var ChangePaymentDialog = (function (props) {
71984
72578
  className: "TokenAmountCell"
71985
72579
  }, format(payment.amount)))), /*#__PURE__*/react.createElement("h3", {
71986
72580
  className: "CardText"
71987
- }, /*#__PURE__*/react.createElement("small", null, format(round$1(parseFloat(payment.route.fromBalance.toString()) / Math.pow(10, payment.decimals), 'down')))))), /*#__PURE__*/react.createElement("div", {
71988
- className: "CardInfo"
71989
- }, payment.route.approvalRequired && /*#__PURE__*/react.createElement("span", {
71990
- className: "Label"
71991
- }, "Requires Approval")));
72581
+ }, /*#__PURE__*/react.createElement("small", null, format(round$1(parseFloat(payment.route.fromBalance.toString()) / Math.pow(10, payment.decimals), 'down')))))));
71992
72582
  }));
71993
72583
  }, [allPaymentRoutesWithData]);
71994
72584