@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.
@@ -2411,7 +2411,7 @@ var es$1 = /*#__PURE__*/Object.freeze({
2411
2411
  let CONSTANTS = {
2412
2412
  ZERO: '0x0000000000000000000000000000000000000000',
2413
2413
  MAXINT: '115792089237316195423570985008687907853269984665640564039457584007913129639935',
2414
- WRAPPED: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
2414
+ WRAPPED: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
2415
2415
  NATIVE: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
2416
2416
  DECIMALS: 18,
2417
2417
  SYMBOL: 'ETH',
@@ -11356,7 +11356,7 @@ function throwFault$6(fault, operation, value) {
11356
11356
  return logger$H.throwError(fault, Logger$4.errors.NUMERIC_FAULT, params);
11357
11357
  }
11358
11358
  // value should have no prefix
11359
- function _base36To16$2(value) {
11359
+ function _base36To16$3(value) {
11360
11360
  return (new BN$4(value, 36)).toString(16);
11361
11361
  }
11362
11362
 
@@ -12821,7 +12821,7 @@ class Reader$1 {
12821
12821
  }
12822
12822
  }
12823
12823
 
12824
- var sha3$3 = createCommonjsModule$4(function (module) {
12824
+ var sha3$4 = createCommonjsModule$4(function (module) {
12825
12825
  /*jslint bitwise: true */
12826
12826
  (function () {
12827
12827
 
@@ -13465,10 +13465,10 @@ var sha3$3 = createCommonjsModule$4(function (module) {
13465
13465
  })();
13466
13466
  });
13467
13467
 
13468
- var sha3$4 = sha3$3;
13468
+ var sha3$5 = sha3$4;
13469
13469
 
13470
- function keccak256$2(data) {
13471
- return '0x' + sha3$4.keccak_256(arrayify$3(data));
13470
+ function keccak256$3(data) {
13471
+ return '0x' + sha3$5.keccak_256(arrayify$3(data));
13472
13472
  }
13473
13473
 
13474
13474
  const version$s = "rlp/5.5.0";
@@ -13518,7 +13518,7 @@ function encode$4(object) {
13518
13518
  const version$r = "address/5.5.0";
13519
13519
 
13520
13520
  const logger$B = new Logger$4(version$r);
13521
- function getChecksumAddress$2(address) {
13521
+ function getChecksumAddress$3(address) {
13522
13522
  if (!isHexString$4(address, 20)) {
13523
13523
  logger$B.throwArgumentError("invalid address", "address", address);
13524
13524
  }
@@ -13528,7 +13528,7 @@ function getChecksumAddress$2(address) {
13528
13528
  for (let i = 0; i < 40; i++) {
13529
13529
  expanded[i] = chars[i].charCodeAt(0);
13530
13530
  }
13531
- const hashed = arrayify$3(keccak256$2(expanded));
13531
+ const hashed = arrayify$3(keccak256$3(expanded));
13532
13532
  for (let i = 0; i < 40; i += 2) {
13533
13533
  if ((hashed[i >> 1] >> 4) >= 8) {
13534
13534
  chars[i] = chars[i].toUpperCase();
@@ -13540,8 +13540,8 @@ function getChecksumAddress$2(address) {
13540
13540
  return "0x" + chars.join("");
13541
13541
  }
13542
13542
  // Shims for environments that are missing some required constants and functions
13543
- const MAX_SAFE_INTEGER$3 = 0x1fffffffffffff;
13544
- function log10$3(x) {
13543
+ const MAX_SAFE_INTEGER$4 = 0x1fffffffffffff;
13544
+ function log10$4(x) {
13545
13545
  if (Math.log10) {
13546
13546
  return Math.log10(x);
13547
13547
  }
@@ -13549,22 +13549,22 @@ function log10$3(x) {
13549
13549
  }
13550
13550
  // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
13551
13551
  // Create lookup table
13552
- const ibanLookup$2 = {};
13552
+ const ibanLookup$3 = {};
13553
13553
  for (let i = 0; i < 10; i++) {
13554
- ibanLookup$2[String(i)] = String(i);
13554
+ ibanLookup$3[String(i)] = String(i);
13555
13555
  }
13556
13556
  for (let i = 0; i < 26; i++) {
13557
- ibanLookup$2[String.fromCharCode(65 + i)] = String(10 + i);
13557
+ ibanLookup$3[String.fromCharCode(65 + i)] = String(10 + i);
13558
13558
  }
13559
13559
  // How many decimal digits can we process? (for 64-bit float, this is 15)
13560
- const safeDigits$2 = Math.floor(log10$3(MAX_SAFE_INTEGER$3));
13561
- function ibanChecksum$2(address) {
13560
+ const safeDigits$3 = Math.floor(log10$4(MAX_SAFE_INTEGER$4));
13561
+ function ibanChecksum$3(address) {
13562
13562
  address = address.toUpperCase();
13563
13563
  address = address.substring(4) + address.substring(0, 2) + "00";
13564
- let expanded = address.split("").map((c) => { return ibanLookup$2[c]; }).join("");
13564
+ let expanded = address.split("").map((c) => { return ibanLookup$3[c]; }).join("");
13565
13565
  // Javascript can handle integers safely up to 15 (decimal) digits
13566
- while (expanded.length >= safeDigits$2) {
13567
- let block = expanded.substring(0, safeDigits$2);
13566
+ while (expanded.length >= safeDigits$3) {
13567
+ let block = expanded.substring(0, safeDigits$3);
13568
13568
  expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
13569
13569
  }
13570
13570
  let checksum = String(98 - (parseInt(expanded, 10) % 97));
@@ -13573,7 +13573,7 @@ function ibanChecksum$2(address) {
13573
13573
  }
13574
13574
  return checksum;
13575
13575
  }
13576
- function getAddress$2(address) {
13576
+ function getAddress$3(address) {
13577
13577
  let result = null;
13578
13578
  if (typeof (address) !== "string") {
13579
13579
  logger$B.throwArgumentError("invalid address", "address", address);
@@ -13583,7 +13583,7 @@ function getAddress$2(address) {
13583
13583
  if (address.substring(0, 2) !== "0x") {
13584
13584
  address = "0x" + address;
13585
13585
  }
13586
- result = getChecksumAddress$2(address);
13586
+ result = getChecksumAddress$3(address);
13587
13587
  // It is a checksummed address with a bad checksum
13588
13588
  if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
13589
13589
  logger$B.throwArgumentError("bad address checksum", "address", address);
@@ -13592,14 +13592,14 @@ function getAddress$2(address) {
13592
13592
  }
13593
13593
  else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
13594
13594
  // It is an ICAP address with a bad checksum
13595
- if (address.substring(2, 4) !== ibanChecksum$2(address)) {
13595
+ if (address.substring(2, 4) !== ibanChecksum$3(address)) {
13596
13596
  logger$B.throwArgumentError("bad icap checksum", "address", address);
13597
13597
  }
13598
- result = _base36To16$2(address.substring(4));
13598
+ result = _base36To16$3(address.substring(4));
13599
13599
  while (result.length < 40) {
13600
13600
  result = "0" + result;
13601
13601
  }
13602
- result = getChecksumAddress$2("0x" + result);
13602
+ result = getChecksumAddress$3("0x" + result);
13603
13603
  }
13604
13604
  else {
13605
13605
  logger$B.throwArgumentError("invalid address", "address", address);
@@ -13610,13 +13610,13 @@ function getAddress$2(address) {
13610
13610
  function getContractAddress$2(transaction) {
13611
13611
  let from = null;
13612
13612
  try {
13613
- from = getAddress$2(transaction.from);
13613
+ from = getAddress$3(transaction.from);
13614
13614
  }
13615
13615
  catch (error) {
13616
13616
  logger$B.throwArgumentError("missing from address", "transaction", transaction);
13617
13617
  }
13618
13618
  const nonce = stripZeros$2(arrayify$3(BigNumber$4.from(transaction.nonce).toHexString()));
13619
- return getAddress$2(hexDataSlice$2(keccak256$2(encode$4([from, nonce])), 12));
13619
+ return getAddress$3(hexDataSlice$2(keccak256$3(encode$4([from, nonce])), 12));
13620
13620
  }
13621
13621
 
13622
13622
  class AddressCoder$1 extends Coder$1 {
@@ -13628,7 +13628,7 @@ class AddressCoder$1 extends Coder$1 {
13628
13628
  }
13629
13629
  encode(writer, value) {
13630
13630
  try {
13631
- value = getAddress$2(value);
13631
+ value = getAddress$3(value);
13632
13632
  }
13633
13633
  catch (error) {
13634
13634
  this._throwError(error.message, value);
@@ -13636,7 +13636,7 @@ class AddressCoder$1 extends Coder$1 {
13636
13636
  return writer.writeValue(value);
13637
13637
  }
13638
13638
  decode(reader) {
13639
- return getAddress$2(hexZeroPad$3(reader.readValue().toHexString(), 20));
13639
+ return getAddress$3(hexZeroPad$3(reader.readValue().toHexString(), 20));
13640
13640
  }
13641
13641
  }
13642
13642
 
@@ -14349,7 +14349,7 @@ class AbiCoder$1 {
14349
14349
  const defaultAbiCoder$1 = new AbiCoder$1();
14350
14350
 
14351
14351
  function id$2(text) {
14352
- return keccak256$2(toUtf8Bytes$2(text));
14352
+ return keccak256$3(toUtf8Bytes$2(text));
14353
14353
  }
14354
14354
 
14355
14355
  const logger$x = new Logger$4(version$t);
@@ -14466,7 +14466,7 @@ class Interface$1 {
14466
14466
  return defaultAbiCoder$1;
14467
14467
  }
14468
14468
  static getAddress(address) {
14469
- return getAddress$2(address);
14469
+ return getAddress$3(address);
14470
14470
  }
14471
14471
  static getSighash(fragment) {
14472
14472
  return hexDataSlice$2(id$2(fragment.format()), 0, 4);
@@ -14711,7 +14711,7 @@ class Interface$1 {
14711
14711
  return id$2(value);
14712
14712
  }
14713
14713
  else if (param.type === "bytes") {
14714
- return keccak256$2(hexlify$4(value));
14714
+ return keccak256$3(hexlify$4(value));
14715
14715
  }
14716
14716
  // Check addresses are valid
14717
14717
  if (param.type === "address") {
@@ -14766,7 +14766,7 @@ class Interface$1 {
14766
14766
  topics.push(id$2(value));
14767
14767
  }
14768
14768
  else if (param.type === "bytes") {
14769
- topics.push(keccak256$2(value));
14769
+ topics.push(keccak256$3(value));
14770
14770
  }
14771
14771
  else if (param.baseType === "tuple" || param.baseType === "array") {
14772
14772
  // @TODO
@@ -15303,7 +15303,7 @@ var TransactionTypes$2;
15303
15303
  })(TransactionTypes$2 || (TransactionTypes$2 = {}));
15304
15304
  function accessSetify$2(addr, storageKeys) {
15305
15305
  return {
15306
- address: getAddress$2(addr),
15306
+ address: getAddress$3(addr),
15307
15307
  storageKeys: (storageKeys || []).map((storageKey, index) => {
15308
15308
  if (hexDataLength$2(storageKey) !== 32) {
15309
15309
  logger$u.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey);
@@ -15355,7 +15355,7 @@ function resolveName$1(resolver, nameOrPromise) {
15355
15355
  }
15356
15356
  // If it is already an address, just use it (after adding checksum)
15357
15357
  try {
15358
- return getAddress$2(name);
15358
+ return getAddress$3(name);
15359
15359
  }
15360
15360
  catch (error) { }
15361
15361
  if (!resolver) {
@@ -15414,7 +15414,7 @@ function populateTransaction$1(contract, fragment, args) {
15414
15414
  override: resolveName$1(contract.signer, overrides.from),
15415
15415
  signer: contract.signer.getAddress()
15416
15416
  }).then((check) => __awaiter$a(this, void 0, void 0, function* () {
15417
- if (getAddress$2(check.signer) !== check.override) {
15417
+ if (getAddress$3(check.signer) !== check.override) {
15418
15418
  logger$t.throwError("Contract with a Signer cannot override from", Logger$4.errors.UNSUPPORTED_OPERATION, {
15419
15419
  operation: "overrides.from"
15420
15420
  });
@@ -15850,7 +15850,7 @@ class BaseContract$1 {
15850
15850
  }
15851
15851
  else {
15852
15852
  try {
15853
- defineReadOnly$2(this, "resolvedAddress", Promise.resolve(getAddress$2(addressOrName)));
15853
+ defineReadOnly$2(this, "resolvedAddress", Promise.resolve(getAddress$3(addressOrName)));
15854
15854
  }
15855
15855
  catch (error) {
15856
15856
  // Without a provider, we cannot use ENS names
@@ -20915,7 +20915,7 @@ function throwFault$4(fault, operation, value) {
20915
20915
  return logger$e$1.throwError(fault, Logger$3.errors.NUMERIC_FAULT, params);
20916
20916
  }
20917
20917
  // value should have no prefix
20918
- function _base36To16$1(value) {
20918
+ function _base36To16$2(value) {
20919
20919
  return (new BN$3(value, 36)).toString(16);
20920
20920
  }
20921
20921
 
@@ -22121,7 +22121,7 @@ const Base58$1 = new BaseX$1("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqr
22121
22121
  * @license MIT
22122
22122
  */
22123
22123
 
22124
- var sha3$2 = createCommonjsModule$1$2(function (module) {
22124
+ var sha3$3 = createCommonjsModule$1$2(function (module) {
22125
22125
  /*jslint bitwise: true */
22126
22126
  (function () {
22127
22127
 
@@ -22590,14 +22590,14 @@ var sha3$2 = createCommonjsModule$1$2(function (module) {
22590
22590
  })();
22591
22591
  });
22592
22592
 
22593
- var sha3$1$1 = sha3$2;
22593
+ var sha3$1$2 = sha3$3;
22594
22594
 
22595
- function keccak256$1(data) {
22596
- return '0x' + sha3$1$1.keccak_256(arrayify$2(data));
22595
+ function keccak256$2(data) {
22596
+ return '0x' + sha3$1$2.keccak_256(arrayify$2(data));
22597
22597
  }
22598
22598
 
22599
22599
  function id$1(text) {
22600
- return keccak256$1(toUtf8Bytes$1(text));
22600
+ return keccak256$2(toUtf8Bytes$1(text));
22601
22601
  }
22602
22602
 
22603
22603
  const version$7$1 = "hash/5.4.0";
@@ -22619,7 +22619,7 @@ function namehash$1(name) {
22619
22619
  logger$9$1.throwArgumentError("invalid ENS address; missing component", "name", name);
22620
22620
  }
22621
22621
  const label = toUtf8Bytes$1(nameprep$1(partition[3]));
22622
- result = keccak256$1(concat$1([result, keccak256$1(label)]));
22622
+ result = keccak256$2(concat$1([result, keccak256$2(label)]));
22623
22623
  current = partition[2] || "";
22624
22624
  }
22625
22625
  return hexlify$3(result);
@@ -22742,10 +22742,10 @@ function decode$1$1(data) {
22742
22742
  return decoded.result;
22743
22743
  }
22744
22744
 
22745
- const version$5$1 = "address/5.4.0";
22745
+ const version$5$2 = "address/5.4.0";
22746
22746
 
22747
- const logger$7$1 = new Logger$3(version$5$1);
22748
- function getChecksumAddress$1(address) {
22747
+ const logger$7$1 = new Logger$3(version$5$2);
22748
+ function getChecksumAddress$2(address) {
22749
22749
  if (!isHexString$3(address, 20)) {
22750
22750
  logger$7$1.throwArgumentError("invalid address", "address", address);
22751
22751
  }
@@ -22755,7 +22755,7 @@ function getChecksumAddress$1(address) {
22755
22755
  for (let i = 0; i < 40; i++) {
22756
22756
  expanded[i] = chars[i].charCodeAt(0);
22757
22757
  }
22758
- const hashed = arrayify$2(keccak256$1(expanded));
22758
+ const hashed = arrayify$2(keccak256$2(expanded));
22759
22759
  for (let i = 0; i < 40; i += 2) {
22760
22760
  if ((hashed[i >> 1] >> 4) >= 8) {
22761
22761
  chars[i] = chars[i].toUpperCase();
@@ -22767,8 +22767,8 @@ function getChecksumAddress$1(address) {
22767
22767
  return "0x" + chars.join("");
22768
22768
  }
22769
22769
  // Shims for environments that are missing some required constants and functions
22770
- const MAX_SAFE_INTEGER$2 = 0x1fffffffffffff;
22771
- function log10$2(x) {
22770
+ const MAX_SAFE_INTEGER$3 = 0x1fffffffffffff;
22771
+ function log10$3(x) {
22772
22772
  if (Math.log10) {
22773
22773
  return Math.log10(x);
22774
22774
  }
@@ -22776,22 +22776,22 @@ function log10$2(x) {
22776
22776
  }
22777
22777
  // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
22778
22778
  // Create lookup table
22779
- const ibanLookup$1 = {};
22779
+ const ibanLookup$2 = {};
22780
22780
  for (let i = 0; i < 10; i++) {
22781
- ibanLookup$1[String(i)] = String(i);
22781
+ ibanLookup$2[String(i)] = String(i);
22782
22782
  }
22783
22783
  for (let i = 0; i < 26; i++) {
22784
- ibanLookup$1[String.fromCharCode(65 + i)] = String(10 + i);
22784
+ ibanLookup$2[String.fromCharCode(65 + i)] = String(10 + i);
22785
22785
  }
22786
22786
  // How many decimal digits can we process? (for 64-bit float, this is 15)
22787
- const safeDigits$1 = Math.floor(log10$2(MAX_SAFE_INTEGER$2));
22788
- function ibanChecksum$1(address) {
22787
+ const safeDigits$2 = Math.floor(log10$3(MAX_SAFE_INTEGER$3));
22788
+ function ibanChecksum$2(address) {
22789
22789
  address = address.toUpperCase();
22790
22790
  address = address.substring(4) + address.substring(0, 2) + "00";
22791
- let expanded = address.split("").map((c) => { return ibanLookup$1[c]; }).join("");
22791
+ let expanded = address.split("").map((c) => { return ibanLookup$2[c]; }).join("");
22792
22792
  // Javascript can handle integers safely up to 15 (decimal) digits
22793
- while (expanded.length >= safeDigits$1) {
22794
- let block = expanded.substring(0, safeDigits$1);
22793
+ while (expanded.length >= safeDigits$2) {
22794
+ let block = expanded.substring(0, safeDigits$2);
22795
22795
  expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
22796
22796
  }
22797
22797
  let checksum = String(98 - (parseInt(expanded, 10) % 97));
@@ -22800,7 +22800,7 @@ function ibanChecksum$1(address) {
22800
22800
  }
22801
22801
  return checksum;
22802
22802
  }
22803
- function getAddress$1(address) {
22803
+ function getAddress$2(address) {
22804
22804
  let result = null;
22805
22805
  if (typeof (address) !== "string") {
22806
22806
  logger$7$1.throwArgumentError("invalid address", "address", address);
@@ -22810,7 +22810,7 @@ function getAddress$1(address) {
22810
22810
  if (address.substring(0, 2) !== "0x") {
22811
22811
  address = "0x" + address;
22812
22812
  }
22813
- result = getChecksumAddress$1(address);
22813
+ result = getChecksumAddress$2(address);
22814
22814
  // It is a checksummed address with a bad checksum
22815
22815
  if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
22816
22816
  logger$7$1.throwArgumentError("bad address checksum", "address", address);
@@ -22819,14 +22819,14 @@ function getAddress$1(address) {
22819
22819
  }
22820
22820
  else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
22821
22821
  // It is an ICAP address with a bad checksum
22822
- if (address.substring(2, 4) !== ibanChecksum$1(address)) {
22822
+ if (address.substring(2, 4) !== ibanChecksum$2(address)) {
22823
22823
  logger$7$1.throwArgumentError("bad icap checksum", "address", address);
22824
22824
  }
22825
- result = _base36To16$1(address.substring(4));
22825
+ result = _base36To16$2(address.substring(4));
22826
22826
  while (result.length < 40) {
22827
22827
  result = "0" + result;
22828
22828
  }
22829
- result = getChecksumAddress$1("0x" + result);
22829
+ result = getChecksumAddress$2("0x" + result);
22830
22830
  }
22831
22831
  else {
22832
22832
  logger$7$1.throwArgumentError("invalid address", "address", address);
@@ -22837,13 +22837,13 @@ function getAddress$1(address) {
22837
22837
  function getContractAddress$1(transaction) {
22838
22838
  let from = null;
22839
22839
  try {
22840
- from = getAddress$1(transaction.from);
22840
+ from = getAddress$2(transaction.from);
22841
22841
  }
22842
22842
  catch (error) {
22843
22843
  logger$7$1.throwArgumentError("missing from address", "transaction", transaction);
22844
22844
  }
22845
22845
  const nonce = stripZeros$1(arrayify$2(BigNumber$3.from(transaction.nonce).toHexString()));
22846
- return getAddress$1(hexDataSlice$1(keccak256$1(encode$1$1([from, nonce])), 12));
22846
+ return getAddress$2(hexDataSlice$1(keccak256$2(encode$1$1([from, nonce])), 12));
22847
22847
  }
22848
22848
 
22849
22849
  var __awaiter$3$1 = function (thisArg, _arguments, P, generator) {
@@ -22902,7 +22902,7 @@ const domainChecks$1 = {
22902
22902
  },
22903
22903
  verifyingContract: function (value) {
22904
22904
  try {
22905
- return getAddress$1(value).toLowerCase();
22905
+ return getAddress$2(value).toLowerCase();
22906
22906
  }
22907
22907
  catch (error) { }
22908
22908
  return logger$6$1.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value);
@@ -22959,13 +22959,13 @@ function getBaseEncoder$1(type) {
22959
22959
  }
22960
22960
  switch (type) {
22961
22961
  case "address": return function (value) {
22962
- return hexZeroPad$2(getAddress$1(value), 32);
22962
+ return hexZeroPad$2(getAddress$2(value), 32);
22963
22963
  };
22964
22964
  case "bool": return function (value) {
22965
22965
  return ((!value) ? hexFalse$1 : hexTrue$1);
22966
22966
  };
22967
22967
  case "bytes": return function (value) {
22968
- return keccak256$1(value);
22968
+ return keccak256$2(value);
22969
22969
  };
22970
22970
  case "string": return function (value) {
22971
22971
  return id$1(value);
@@ -23081,9 +23081,9 @@ class TypedDataEncoder$1 {
23081
23081
  }
23082
23082
  let result = value.map(subEncoder);
23083
23083
  if (this._types[subtype]) {
23084
- result = result.map(keccak256$1);
23084
+ result = result.map(keccak256$2);
23085
23085
  }
23086
- return keccak256$1(hexConcat$1(result));
23086
+ return keccak256$2(hexConcat$1(result));
23087
23087
  };
23088
23088
  }
23089
23089
  // Struct
@@ -23094,7 +23094,7 @@ class TypedDataEncoder$1 {
23094
23094
  const values = fields.map(({ name, type }) => {
23095
23095
  const result = this.getEncoder(type)(value[name]);
23096
23096
  if (this._types[type]) {
23097
- return keccak256$1(result);
23097
+ return keccak256$2(result);
23098
23098
  }
23099
23099
  return result;
23100
23100
  });
@@ -23115,7 +23115,7 @@ class TypedDataEncoder$1 {
23115
23115
  return this.getEncoder(type)(value);
23116
23116
  }
23117
23117
  hashStruct(name, value) {
23118
- return keccak256$1(this.encodeData(name, value));
23118
+ return keccak256$2(this.encodeData(name, value));
23119
23119
  }
23120
23120
  encode(value) {
23121
23121
  return this.encodeData(this.primaryType, value);
@@ -23185,7 +23185,7 @@ class TypedDataEncoder$1 {
23185
23185
  ]);
23186
23186
  }
23187
23187
  static hash(domain, types, value) {
23188
- return keccak256$1(TypedDataEncoder$1.encode(domain, types, value));
23188
+ return keccak256$2(TypedDataEncoder$1.encode(domain, types, value));
23189
23189
  }
23190
23190
  // Replaces all address types with ENS names with their looked up address
23191
23191
  static resolveNames(domain, types, value, resolveName) {
@@ -27176,7 +27176,7 @@ var EC$1$1 = elliptic_1$1.ec;
27176
27176
 
27177
27177
  const version$2$3 = "signing-key/5.4.0";
27178
27178
 
27179
- const logger$5$1 = new Logger$3(version$2$3);
27179
+ const logger$5$2 = new Logger$3(version$2$3);
27180
27180
  let _curve$1 = null;
27181
27181
  function getCurve$1() {
27182
27182
  if (!_curve$1) {
@@ -27202,7 +27202,7 @@ class SigningKey$1 {
27202
27202
  const keyPair = getCurve$1().keyFromPrivate(arrayify$2(this.privateKey));
27203
27203
  const digestBytes = arrayify$2(digest);
27204
27204
  if (digestBytes.length !== 32) {
27205
- logger$5$1.throwArgumentError("bad digest length", "digest", digest);
27205
+ logger$5$2.throwArgumentError("bad digest length", "digest", digest);
27206
27206
  }
27207
27207
  const signature = keyPair.sign(digestBytes, { canonical: true });
27208
27208
  return splitSignature$1({
@@ -27246,7 +27246,7 @@ function computePublicKey$1(key, compressed) {
27246
27246
  }
27247
27247
  return "0x" + getCurve$1().keyFromPublic(bytes).getPublic(true, "hex");
27248
27248
  }
27249
- return logger$5$1.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
27249
+ return logger$5$2.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
27250
27250
  }
27251
27251
 
27252
27252
  const version$1$3 = "transactions/5.4.0";
@@ -27263,7 +27263,7 @@ function handleAddress$1(value) {
27263
27263
  if (value === "0x") {
27264
27264
  return null;
27265
27265
  }
27266
- return getAddress$1(value);
27266
+ return getAddress$2(value);
27267
27267
  }
27268
27268
  function handleNumber$1(value) {
27269
27269
  if (value === "0x") {
@@ -27273,7 +27273,7 @@ function handleNumber$1(value) {
27273
27273
  }
27274
27274
  function computeAddress$1(key) {
27275
27275
  const publicKey = computePublicKey$1(key);
27276
- return getAddress$1(hexDataSlice$1(keccak256$1(hexDataSlice$1(publicKey, 1)), 12));
27276
+ return getAddress$2(hexDataSlice$1(keccak256$2(hexDataSlice$1(publicKey, 1)), 12));
27277
27277
  }
27278
27278
  function recoverAddress$1(digest, signature) {
27279
27279
  return computeAddress$1(recoverPublicKey$1(arrayify$2(digest), signature));
@@ -27287,7 +27287,7 @@ function formatNumber$1(value, name) {
27287
27287
  }
27288
27288
  function accessSetify$1(addr, storageKeys) {
27289
27289
  return {
27290
- address: getAddress$1(addr),
27290
+ address: getAddress$2(addr),
27291
27291
  storageKeys: (storageKeys || []).map((storageKey, index) => {
27292
27292
  if (hexDataLength$1(storageKey) !== 32) {
27293
27293
  logger$4$2.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey);
@@ -27340,7 +27340,7 @@ function _serializeEip1559$1(transaction, signature) {
27340
27340
  formatNumber$1(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
27341
27341
  formatNumber$1(transaction.maxFeePerGas || 0, "maxFeePerGas"),
27342
27342
  formatNumber$1(transaction.gasLimit || 0, "gasLimit"),
27343
- ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
27343
+ ((transaction.to != null) ? getAddress$2(transaction.to) : "0x"),
27344
27344
  formatNumber$1(transaction.value || 0, "value"),
27345
27345
  (transaction.data || "0x"),
27346
27346
  (formatAccessList$1(transaction.accessList || []))
@@ -27359,7 +27359,7 @@ function _serializeEip2930$1(transaction, signature) {
27359
27359
  formatNumber$1(transaction.nonce || 0, "nonce"),
27360
27360
  formatNumber$1(transaction.gasPrice || 0, "gasPrice"),
27361
27361
  formatNumber$1(transaction.gasLimit || 0, "gasLimit"),
27362
- ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
27362
+ ((transaction.to != null) ? getAddress$2(transaction.to) : "0x"),
27363
27363
  formatNumber$1(transaction.value || 0, "value"),
27364
27364
  (transaction.data || "0x"),
27365
27365
  (formatAccessList$1(transaction.accessList || []))
@@ -27386,7 +27386,7 @@ function _parseEipSignature$1(tx, fields, serialize) {
27386
27386
  tx.r = hexZeroPad$2(fields[1], 32);
27387
27387
  tx.s = hexZeroPad$2(fields[2], 32);
27388
27388
  try {
27389
- const digest = keccak256$1(serialize(tx));
27389
+ const digest = keccak256$2(serialize(tx));
27390
27390
  tx.from = recoverAddress$1(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });
27391
27391
  }
27392
27392
  catch (error) {
@@ -27417,7 +27417,7 @@ function _parseEip1559$1(payload) {
27417
27417
  if (transaction.length === 9) {
27418
27418
  return tx;
27419
27419
  }
27420
- tx.hash = keccak256$1(payload);
27420
+ tx.hash = keccak256$2(payload);
27421
27421
  _parseEipSignature$1(tx, transaction.slice(9), _serializeEip1559$1);
27422
27422
  return tx;
27423
27423
  }
@@ -27441,7 +27441,7 @@ function _parseEip2930$1(payload) {
27441
27441
  if (transaction.length === 8) {
27442
27442
  return tx;
27443
27443
  }
27444
- tx.hash = keccak256$1(payload);
27444
+ tx.hash = keccak256$2(payload);
27445
27445
  _parseEipSignature$1(tx, transaction.slice(8), _serializeEip2930$1);
27446
27446
  return tx;
27447
27447
  }
@@ -27492,14 +27492,14 @@ function _parse$1(rawTransaction) {
27492
27492
  raw.push("0x");
27493
27493
  recoveryParam -= tx.chainId * 2 + 8;
27494
27494
  }
27495
- const digest = keccak256$1(encode$1$1(raw));
27495
+ const digest = keccak256$2(encode$1$1(raw));
27496
27496
  try {
27497
27497
  tx.from = recoverAddress$1(digest, { r: hexlify$3(tx.r), s: hexlify$3(tx.s), recoveryParam: recoveryParam });
27498
27498
  }
27499
27499
  catch (error) {
27500
27500
  console.log(error);
27501
27501
  }
27502
- tx.hash = keccak256$1(rawTransaction);
27502
+ tx.hash = keccak256$2(rawTransaction);
27503
27503
  }
27504
27504
  tx.type = null;
27505
27505
  return tx;
@@ -27701,13 +27701,13 @@ class Formatter$1 {
27701
27701
  // Requires an address
27702
27702
  // Strict! Used on input.
27703
27703
  address(value) {
27704
- return getAddress$1(value);
27704
+ return getAddress$2(value);
27705
27705
  }
27706
27706
  callAddress(value) {
27707
27707
  if (!isHexString$3(value, 32)) {
27708
27708
  return null;
27709
27709
  }
27710
- const address = getAddress$1(hexDataSlice$1(value, 12));
27710
+ const address = getAddress$2(hexDataSlice$1(value, 12));
27711
27711
  return (address === AddressZero$1) ? null : address;
27712
27712
  }
27713
27713
  contractAddress(value) {
@@ -35072,7 +35072,7 @@ function throwFault$1$1(fault, operation, value) {
35072
35072
  return logger$o.throwError(fault, Logger$2.errors.NUMERIC_FAULT, params);
35073
35073
  }
35074
35074
  // value should have no prefix
35075
- function _base36To16(value) {
35075
+ function _base36To16$1(value) {
35076
35076
  return (new BN$2(value, 36)).toString(16);
35077
35077
  }
35078
35078
 
@@ -36556,7 +36556,7 @@ class Reader {
36556
36556
  * @license MIT
36557
36557
  */
36558
36558
 
36559
- var sha3 = createCommonjsModule$1$1(function (module) {
36559
+ var sha3$2 = createCommonjsModule$1$1(function (module) {
36560
36560
  /*jslint bitwise: true */
36561
36561
  (function () {
36562
36562
 
@@ -37025,10 +37025,10 @@ var sha3 = createCommonjsModule$1$1(function (module) {
37025
37025
  })();
37026
37026
  });
37027
37027
 
37028
- var sha3$1 = sha3;
37028
+ var sha3$1$1 = sha3$2;
37029
37029
 
37030
- function keccak256(data) {
37031
- return '0x' + sha3$1.keccak_256(arrayify$1(data));
37030
+ function keccak256$1(data) {
37031
+ return '0x' + sha3$1$1.keccak_256(arrayify$1(data));
37032
37032
  }
37033
37033
 
37034
37034
  const version$d = "rlp/5.4.0";
@@ -37151,7 +37151,7 @@ function decode$1(data) {
37151
37151
  const version$c = "address/5.4.0";
37152
37152
 
37153
37153
  const logger$i = new Logger$2(version$c);
37154
- function getChecksumAddress(address) {
37154
+ function getChecksumAddress$1(address) {
37155
37155
  if (!isHexString$2(address, 20)) {
37156
37156
  logger$i.throwArgumentError("invalid address", "address", address);
37157
37157
  }
@@ -37161,7 +37161,7 @@ function getChecksumAddress(address) {
37161
37161
  for (let i = 0; i < 40; i++) {
37162
37162
  expanded[i] = chars[i].charCodeAt(0);
37163
37163
  }
37164
- const hashed = arrayify$1(keccak256(expanded));
37164
+ const hashed = arrayify$1(keccak256$1(expanded));
37165
37165
  for (let i = 0; i < 40; i += 2) {
37166
37166
  if ((hashed[i >> 1] >> 4) >= 8) {
37167
37167
  chars[i] = chars[i].toUpperCase();
@@ -37173,8 +37173,8 @@ function getChecksumAddress(address) {
37173
37173
  return "0x" + chars.join("");
37174
37174
  }
37175
37175
  // Shims for environments that are missing some required constants and functions
37176
- const MAX_SAFE_INTEGER$1 = 0x1fffffffffffff;
37177
- function log10$1(x) {
37176
+ const MAX_SAFE_INTEGER$2 = 0x1fffffffffffff;
37177
+ function log10$2(x) {
37178
37178
  if (Math.log10) {
37179
37179
  return Math.log10(x);
37180
37180
  }
@@ -37182,22 +37182,22 @@ function log10$1(x) {
37182
37182
  }
37183
37183
  // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
37184
37184
  // Create lookup table
37185
- const ibanLookup = {};
37185
+ const ibanLookup$1 = {};
37186
37186
  for (let i = 0; i < 10; i++) {
37187
- ibanLookup[String(i)] = String(i);
37187
+ ibanLookup$1[String(i)] = String(i);
37188
37188
  }
37189
37189
  for (let i = 0; i < 26; i++) {
37190
- ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);
37190
+ ibanLookup$1[String.fromCharCode(65 + i)] = String(10 + i);
37191
37191
  }
37192
37192
  // How many decimal digits can we process? (for 64-bit float, this is 15)
37193
- const safeDigits = Math.floor(log10$1(MAX_SAFE_INTEGER$1));
37194
- function ibanChecksum(address) {
37193
+ const safeDigits$1 = Math.floor(log10$2(MAX_SAFE_INTEGER$2));
37194
+ function ibanChecksum$1(address) {
37195
37195
  address = address.toUpperCase();
37196
37196
  address = address.substring(4) + address.substring(0, 2) + "00";
37197
- let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join("");
37197
+ let expanded = address.split("").map((c) => { return ibanLookup$1[c]; }).join("");
37198
37198
  // Javascript can handle integers safely up to 15 (decimal) digits
37199
- while (expanded.length >= safeDigits) {
37200
- let block = expanded.substring(0, safeDigits);
37199
+ while (expanded.length >= safeDigits$1) {
37200
+ let block = expanded.substring(0, safeDigits$1);
37201
37201
  expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
37202
37202
  }
37203
37203
  let checksum = String(98 - (parseInt(expanded, 10) % 97));
@@ -37206,7 +37206,7 @@ function ibanChecksum(address) {
37206
37206
  }
37207
37207
  return checksum;
37208
37208
  }
37209
- function getAddress(address) {
37209
+ function getAddress$1(address) {
37210
37210
  let result = null;
37211
37211
  if (typeof (address) !== "string") {
37212
37212
  logger$i.throwArgumentError("invalid address", "address", address);
@@ -37216,7 +37216,7 @@ function getAddress(address) {
37216
37216
  if (address.substring(0, 2) !== "0x") {
37217
37217
  address = "0x" + address;
37218
37218
  }
37219
- result = getChecksumAddress(address);
37219
+ result = getChecksumAddress$1(address);
37220
37220
  // It is a checksummed address with a bad checksum
37221
37221
  if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
37222
37222
  logger$i.throwArgumentError("bad address checksum", "address", address);
@@ -37225,14 +37225,14 @@ function getAddress(address) {
37225
37225
  }
37226
37226
  else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
37227
37227
  // It is an ICAP address with a bad checksum
37228
- if (address.substring(2, 4) !== ibanChecksum(address)) {
37228
+ if (address.substring(2, 4) !== ibanChecksum$1(address)) {
37229
37229
  logger$i.throwArgumentError("bad icap checksum", "address", address);
37230
37230
  }
37231
- result = _base36To16(address.substring(4));
37231
+ result = _base36To16$1(address.substring(4));
37232
37232
  while (result.length < 40) {
37233
37233
  result = "0" + result;
37234
37234
  }
37235
- result = getChecksumAddress("0x" + result);
37235
+ result = getChecksumAddress$1("0x" + result);
37236
37236
  }
37237
37237
  else {
37238
37238
  logger$i.throwArgumentError("invalid address", "address", address);
@@ -37243,13 +37243,13 @@ function getAddress(address) {
37243
37243
  function getContractAddress(transaction) {
37244
37244
  let from = null;
37245
37245
  try {
37246
- from = getAddress(transaction.from);
37246
+ from = getAddress$1(transaction.from);
37247
37247
  }
37248
37248
  catch (error) {
37249
37249
  logger$i.throwArgumentError("missing from address", "transaction", transaction);
37250
37250
  }
37251
37251
  const nonce = stripZeros(arrayify$1(BigNumber$2.from(transaction.nonce).toHexString()));
37252
- return getAddress(hexDataSlice(keccak256(encode$2([from, nonce])), 12));
37252
+ return getAddress$1(hexDataSlice(keccak256$1(encode$2([from, nonce])), 12));
37253
37253
  }
37254
37254
 
37255
37255
  class AddressCoder extends Coder {
@@ -37261,7 +37261,7 @@ class AddressCoder extends Coder {
37261
37261
  }
37262
37262
  encode(writer, value) {
37263
37263
  try {
37264
- value = getAddress(value);
37264
+ value = getAddress$1(value);
37265
37265
  }
37266
37266
  catch (error) {
37267
37267
  this._throwError(error.message, value);
@@ -37269,7 +37269,7 @@ class AddressCoder extends Coder {
37269
37269
  return writer.writeValue(value);
37270
37270
  }
37271
37271
  decode(reader) {
37272
- return getAddress(hexZeroPad$1(reader.readValue().toHexString(), 20));
37272
+ return getAddress$1(hexZeroPad$1(reader.readValue().toHexString(), 20));
37273
37273
  }
37274
37274
  }
37275
37275
 
@@ -38175,7 +38175,7 @@ class AbiCoder {
38175
38175
  const defaultAbiCoder = new AbiCoder();
38176
38176
 
38177
38177
  function id(text) {
38178
- return keccak256(toUtf8Bytes(text));
38178
+ return keccak256$1(toUtf8Bytes(text));
38179
38179
  }
38180
38180
 
38181
38181
  const version$a = "hash/5.4.0";
@@ -38197,7 +38197,7 @@ function namehash(name) {
38197
38197
  logger$e.throwArgumentError("invalid ENS address; missing component", "name", name);
38198
38198
  }
38199
38199
  const label = toUtf8Bytes(nameprep(partition[3]));
38200
- result = keccak256(concat([result, keccak256(label)]));
38200
+ result = keccak256$1(concat([result, keccak256$1(label)]));
38201
38201
  current = partition[2] || "";
38202
38202
  }
38203
38203
  return hexlify$2(result);
@@ -38259,7 +38259,7 @@ const domainChecks = {
38259
38259
  },
38260
38260
  verifyingContract: function (value) {
38261
38261
  try {
38262
- return getAddress(value).toLowerCase();
38262
+ return getAddress$1(value).toLowerCase();
38263
38263
  }
38264
38264
  catch (error) { }
38265
38265
  return logger$d.throwArgumentError(`invalid domain value "verifyingContract"`, "domain.verifyingContract", value);
@@ -38316,13 +38316,13 @@ function getBaseEncoder(type) {
38316
38316
  }
38317
38317
  switch (type) {
38318
38318
  case "address": return function (value) {
38319
- return hexZeroPad$1(getAddress(value), 32);
38319
+ return hexZeroPad$1(getAddress$1(value), 32);
38320
38320
  };
38321
38321
  case "bool": return function (value) {
38322
38322
  return ((!value) ? hexFalse : hexTrue);
38323
38323
  };
38324
38324
  case "bytes": return function (value) {
38325
- return keccak256(value);
38325
+ return keccak256$1(value);
38326
38326
  };
38327
38327
  case "string": return function (value) {
38328
38328
  return id(value);
@@ -38438,9 +38438,9 @@ class TypedDataEncoder {
38438
38438
  }
38439
38439
  let result = value.map(subEncoder);
38440
38440
  if (this._types[subtype]) {
38441
- result = result.map(keccak256);
38441
+ result = result.map(keccak256$1);
38442
38442
  }
38443
- return keccak256(hexConcat(result));
38443
+ return keccak256$1(hexConcat(result));
38444
38444
  };
38445
38445
  }
38446
38446
  // Struct
@@ -38451,7 +38451,7 @@ class TypedDataEncoder {
38451
38451
  const values = fields.map(({ name, type }) => {
38452
38452
  const result = this.getEncoder(type)(value[name]);
38453
38453
  if (this._types[type]) {
38454
- return keccak256(result);
38454
+ return keccak256$1(result);
38455
38455
  }
38456
38456
  return result;
38457
38457
  });
@@ -38472,7 +38472,7 @@ class TypedDataEncoder {
38472
38472
  return this.getEncoder(type)(value);
38473
38473
  }
38474
38474
  hashStruct(name, value) {
38475
- return keccak256(this.encodeData(name, value));
38475
+ return keccak256$1(this.encodeData(name, value));
38476
38476
  }
38477
38477
  encode(value) {
38478
38478
  return this.encodeData(this.primaryType, value);
@@ -38542,7 +38542,7 @@ class TypedDataEncoder {
38542
38542
  ]);
38543
38543
  }
38544
38544
  static hash(domain, types, value) {
38545
- return keccak256(TypedDataEncoder.encode(domain, types, value));
38545
+ return keccak256$1(TypedDataEncoder.encode(domain, types, value));
38546
38546
  }
38547
38547
  // Replaces all address types with ENS names with their looked up address
38548
38548
  static resolveNames(domain, types, value, resolveName) {
@@ -38750,7 +38750,7 @@ class Interface {
38750
38750
  return defaultAbiCoder;
38751
38751
  }
38752
38752
  static getAddress(address) {
38753
- return getAddress(address);
38753
+ return getAddress$1(address);
38754
38754
  }
38755
38755
  static getSighash(fragment) {
38756
38756
  return hexDataSlice(id(fragment.format()), 0, 4);
@@ -38995,7 +38995,7 @@ class Interface {
38995
38995
  return id(value);
38996
38996
  }
38997
38997
  else if (param.type === "bytes") {
38998
- return keccak256(hexlify$2(value));
38998
+ return keccak256$1(hexlify$2(value));
38999
38999
  }
39000
39000
  // Check addresses are valid
39001
39001
  if (param.type === "address") {
@@ -39050,7 +39050,7 @@ class Interface {
39050
39050
  topics.push(id(value));
39051
39051
  }
39052
39052
  else if (param.type === "bytes") {
39053
- topics.push(keccak256(value));
39053
+ topics.push(keccak256$1(value));
39054
39054
  }
39055
39055
  else if (param.baseType === "tuple" || param.baseType === "array") {
39056
39056
  // @TOOD
@@ -46823,7 +46823,7 @@ function handleAddress(value) {
46823
46823
  if (value === "0x") {
46824
46824
  return null;
46825
46825
  }
46826
- return getAddress(value);
46826
+ return getAddress$1(value);
46827
46827
  }
46828
46828
  function handleNumber(value) {
46829
46829
  if (value === "0x") {
@@ -46833,7 +46833,7 @@ function handleNumber(value) {
46833
46833
  }
46834
46834
  function computeAddress(key) {
46835
46835
  const publicKey = computePublicKey(key);
46836
- return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));
46836
+ return getAddress$1(hexDataSlice(keccak256$1(hexDataSlice(publicKey, 1)), 12));
46837
46837
  }
46838
46838
  function recoverAddress(digest, signature) {
46839
46839
  return computeAddress(recoverPublicKey(arrayify$1(digest), signature));
@@ -46847,7 +46847,7 @@ function formatNumber(value, name) {
46847
46847
  }
46848
46848
  function accessSetify(addr, storageKeys) {
46849
46849
  return {
46850
- address: getAddress(addr),
46850
+ address: getAddress$1(addr),
46851
46851
  storageKeys: (storageKeys || []).map((storageKey, index) => {
46852
46852
  if (hexDataLength(storageKey) !== 32) {
46853
46853
  logger$8.throwArgumentError("invalid access list storageKey", `accessList[${addr}:${index}]`, storageKey);
@@ -46900,7 +46900,7 @@ function _serializeEip1559(transaction, signature) {
46900
46900
  formatNumber(transaction.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
46901
46901
  formatNumber(transaction.maxFeePerGas || 0, "maxFeePerGas"),
46902
46902
  formatNumber(transaction.gasLimit || 0, "gasLimit"),
46903
- ((transaction.to != null) ? getAddress(transaction.to) : "0x"),
46903
+ ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
46904
46904
  formatNumber(transaction.value || 0, "value"),
46905
46905
  (transaction.data || "0x"),
46906
46906
  (formatAccessList(transaction.accessList || []))
@@ -46919,7 +46919,7 @@ function _serializeEip2930(transaction, signature) {
46919
46919
  formatNumber(transaction.nonce || 0, "nonce"),
46920
46920
  formatNumber(transaction.gasPrice || 0, "gasPrice"),
46921
46921
  formatNumber(transaction.gasLimit || 0, "gasLimit"),
46922
- ((transaction.to != null) ? getAddress(transaction.to) : "0x"),
46922
+ ((transaction.to != null) ? getAddress$1(transaction.to) : "0x"),
46923
46923
  formatNumber(transaction.value || 0, "value"),
46924
46924
  (transaction.data || "0x"),
46925
46925
  (formatAccessList(transaction.accessList || []))
@@ -46946,7 +46946,7 @@ function _parseEipSignature(tx, fields, serialize) {
46946
46946
  tx.r = hexZeroPad$1(fields[1], 32);
46947
46947
  tx.s = hexZeroPad$1(fields[2], 32);
46948
46948
  try {
46949
- const digest = keccak256(serialize(tx));
46949
+ const digest = keccak256$1(serialize(tx));
46950
46950
  tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });
46951
46951
  }
46952
46952
  catch (error) {
@@ -46977,7 +46977,7 @@ function _parseEip1559(payload) {
46977
46977
  if (transaction.length === 9) {
46978
46978
  return tx;
46979
46979
  }
46980
- tx.hash = keccak256(payload);
46980
+ tx.hash = keccak256$1(payload);
46981
46981
  _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);
46982
46982
  return tx;
46983
46983
  }
@@ -47001,7 +47001,7 @@ function _parseEip2930(payload) {
47001
47001
  if (transaction.length === 8) {
47002
47002
  return tx;
47003
47003
  }
47004
- tx.hash = keccak256(payload);
47004
+ tx.hash = keccak256$1(payload);
47005
47005
  _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);
47006
47006
  return tx;
47007
47007
  }
@@ -47052,14 +47052,14 @@ function _parse(rawTransaction) {
47052
47052
  raw.push("0x");
47053
47053
  recoveryParam -= tx.chainId * 2 + 8;
47054
47054
  }
47055
- const digest = keccak256(encode$2(raw));
47055
+ const digest = keccak256$1(encode$2(raw));
47056
47056
  try {
47057
47057
  tx.from = recoverAddress(digest, { r: hexlify$2(tx.r), s: hexlify$2(tx.s), recoveryParam: recoveryParam });
47058
47058
  }
47059
47059
  catch (error) {
47060
47060
  console.log(error);
47061
47061
  }
47062
- tx.hash = keccak256(rawTransaction);
47062
+ tx.hash = keccak256$1(rawTransaction);
47063
47063
  }
47064
47064
  tx.type = null;
47065
47065
  return tx;
@@ -47083,7 +47083,7 @@ function parse(rawTransaction) {
47083
47083
  });
47084
47084
  }
47085
47085
 
47086
- const version$5 = "contracts/5.4.1";
47086
+ const version$5$1 = "contracts/5.4.1";
47087
47087
 
47088
47088
  var __awaiter$4 = function (thisArg, _arguments, P, generator) {
47089
47089
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -47094,13 +47094,13 @@ var __awaiter$4 = function (thisArg, _arguments, P, generator) {
47094
47094
  step((generator = generator.apply(thisArg, _arguments || [])).next());
47095
47095
  });
47096
47096
  };
47097
- const logger$7 = new Logger$2(version$5);
47097
+ const logger$7 = new Logger$2(version$5$1);
47098
47098
  function resolveName(resolver, nameOrPromise) {
47099
47099
  return __awaiter$4(this, void 0, void 0, function* () {
47100
47100
  const name = yield nameOrPromise;
47101
47101
  // If it is already an address, just use it (after adding checksum)
47102
47102
  try {
47103
- return getAddress(name);
47103
+ return getAddress$1(name);
47104
47104
  }
47105
47105
  catch (error) { }
47106
47106
  if (!resolver) {
@@ -47156,7 +47156,7 @@ function populateTransaction(contract, fragment, args) {
47156
47156
  override: resolveName(contract.signer, overrides.from),
47157
47157
  signer: contract.signer.getAddress()
47158
47158
  }).then((check) => __awaiter$4(this, void 0, void 0, function* () {
47159
- if (getAddress(check.signer) !== check.override) {
47159
+ if (getAddress$1(check.signer) !== check.override) {
47160
47160
  logger$7.throwError("Contract with a Signer cannot override from", Logger$2.errors.UNSUPPORTED_OPERATION, {
47161
47161
  operation: "overrides.from"
47162
47162
  });
@@ -47585,7 +47585,7 @@ class BaseContract {
47585
47585
  }
47586
47586
  else {
47587
47587
  try {
47588
- defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName)));
47588
+ defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress$1(addressOrName)));
47589
47589
  }
47590
47590
  catch (error) {
47591
47591
  // Without a provider, we cannot use ENS names
@@ -48349,7 +48349,7 @@ var __awaiter$2 = function (thisArg, _arguments, P, generator) {
48349
48349
  step((generator = generator.apply(thisArg, _arguments || [])).next());
48350
48350
  });
48351
48351
  };
48352
- const logger$5 = new Logger$2(version$2$2);
48352
+ const logger$5$1 = new Logger$2(version$2$2);
48353
48353
  function staller(duration) {
48354
48354
  return new Promise((resolve) => {
48355
48355
  setTimeout(resolve, duration);
@@ -48382,10 +48382,10 @@ function bodyify(value, type) {
48382
48382
  function _fetchData(connection, body, processFunc) {
48383
48383
  // How many times to retry in the event of a throttle
48384
48384
  const attemptLimit = (typeof (connection) === "object" && connection.throttleLimit != null) ? connection.throttleLimit : 12;
48385
- logger$5.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit);
48385
+ logger$5$1.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), "invalid connection throttle limit", "connection.throttleLimit", attemptLimit);
48386
48386
  const throttleCallback = ((typeof (connection) === "object") ? connection.throttleCallback : null);
48387
48387
  const throttleSlotInterval = ((typeof (connection) === "object" && typeof (connection.throttleSlotInterval) === "number") ? connection.throttleSlotInterval : 100);
48388
- logger$5.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval);
48388
+ logger$5$1.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval);
48389
48389
  const headers = {};
48390
48390
  let url = null;
48391
48391
  // @TODO: Allow ConnectionInfo to override some of these values
@@ -48399,7 +48399,7 @@ function _fetchData(connection, body, processFunc) {
48399
48399
  }
48400
48400
  else if (typeof (connection) === "object") {
48401
48401
  if (connection == null || connection.url == null) {
48402
- logger$5.throwArgumentError("missing URL", "connection.url", connection);
48402
+ logger$5$1.throwArgumentError("missing URL", "connection.url", connection);
48403
48403
  }
48404
48404
  url = connection.url;
48405
48405
  if (typeof (connection.timeout) === "number" && connection.timeout > 0) {
@@ -48416,7 +48416,7 @@ function _fetchData(connection, body, processFunc) {
48416
48416
  options.allowGzip = !!connection.allowGzip;
48417
48417
  if (connection.user != null && connection.password != null) {
48418
48418
  if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) {
48419
- logger$5.throwError("basic authentication requires a secure https url", Logger$2.errors.INVALID_ARGUMENT, { argument: "url", url: url, user: connection.user, password: "[REDACTED]" });
48419
+ 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]" });
48420
48420
  }
48421
48421
  const authorization = connection.user + ":" + connection.password;
48422
48422
  headers["authorization"] = {
@@ -48450,7 +48450,7 @@ function _fetchData(connection, body, processFunc) {
48450
48450
  return;
48451
48451
  }
48452
48452
  timer = null;
48453
- reject(logger$5.makeError("timeout", Logger$2.errors.TIMEOUT, {
48453
+ reject(logger$5$1.makeError("timeout", Logger$2.errors.TIMEOUT, {
48454
48454
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
48455
48455
  requestMethod: options.method,
48456
48456
  timeout: timeout,
@@ -48499,7 +48499,7 @@ function _fetchData(connection, body, processFunc) {
48499
48499
  response = error.response;
48500
48500
  if (response == null) {
48501
48501
  runningTimeout.cancel();
48502
- logger$5.throwError("missing response", Logger$2.errors.SERVER_ERROR, {
48502
+ logger$5$1.throwError("missing response", Logger$2.errors.SERVER_ERROR, {
48503
48503
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
48504
48504
  requestMethod: options.method,
48505
48505
  serverError: error,
@@ -48513,7 +48513,7 @@ function _fetchData(connection, body, processFunc) {
48513
48513
  }
48514
48514
  else if (response.statusCode < 200 || response.statusCode >= 300) {
48515
48515
  runningTimeout.cancel();
48516
- logger$5.throwError("bad response", Logger$2.errors.SERVER_ERROR, {
48516
+ logger$5$1.throwError("bad response", Logger$2.errors.SERVER_ERROR, {
48517
48517
  status: response.statusCode,
48518
48518
  headers: response.headers,
48519
48519
  body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
@@ -48543,7 +48543,7 @@ function _fetchData(connection, body, processFunc) {
48543
48543
  }
48544
48544
  }
48545
48545
  runningTimeout.cancel();
48546
- logger$5.throwError("processing response error", Logger$2.errors.SERVER_ERROR, {
48546
+ logger$5$1.throwError("processing response error", Logger$2.errors.SERVER_ERROR, {
48547
48547
  body: bodyify(body, ((response.headers) ? response.headers["content-type"] : null)),
48548
48548
  error: error,
48549
48549
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
@@ -48557,7 +48557,7 @@ function _fetchData(connection, body, processFunc) {
48557
48557
  // The "body" is now a Uint8Array.
48558
48558
  return body;
48559
48559
  }
48560
- return logger$5.throwError("failed response", Logger$2.errors.SERVER_ERROR, {
48560
+ return logger$5$1.throwError("failed response", Logger$2.errors.SERVER_ERROR, {
48561
48561
  requestBody: bodyify(options.body, flatHeaders["content-type"]),
48562
48562
  requestMethod: options.method,
48563
48563
  url: url
@@ -48574,7 +48574,7 @@ function fetchJson(connection, json, processFunc) {
48574
48574
  result = JSON.parse(toUtf8String(value));
48575
48575
  }
48576
48576
  catch (error) {
48577
- logger$5.throwError("invalid JSON", Logger$2.errors.SERVER_ERROR, {
48577
+ logger$5$1.throwError("invalid JSON", Logger$2.errors.SERVER_ERROR, {
48578
48578
  body: value,
48579
48579
  error: error
48580
48580
  });
@@ -49049,13 +49049,13 @@ class Formatter {
49049
49049
  // Requires an address
49050
49050
  // Strict! Used on input.
49051
49051
  address(value) {
49052
- return getAddress(value);
49052
+ return getAddress$1(value);
49053
49053
  }
49054
49054
  callAddress(value) {
49055
49055
  if (!isHexString$2(value, 32)) {
49056
49056
  return null;
49057
49057
  }
49058
- const address = getAddress(hexDataSlice(value, 12));
49058
+ const address = getAddress$1(hexDataSlice(value, 12));
49059
49059
  return (address === AddressZero) ? null : address;
49060
49060
  }
49061
49061
  contractAddress(value) {
@@ -52518,7 +52518,7 @@ var CardStyle = (function (style) {
52518
52518
  });
52519
52519
 
52520
52520
  var DialogStyle = (function (style) {
52521
- 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 ";
52521
+ 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 ";
52522
52522
  });
52523
52523
 
52524
52524
  var FontStyle = (function (style) {
@@ -53002,7 +53002,7 @@ var EXP_LIMIT = 9e15, // 0 to 9e15
53002
53002
 
53003
53003
  BASE = 1e7,
53004
53004
  LOG_BASE = 7,
53005
- MAX_SAFE_INTEGER = 9007199254740991,
53005
+ MAX_SAFE_INTEGER$1 = 9007199254740991,
53006
53006
 
53007
53007
  LN10_PRECISION = LN10.length - 1,
53008
53008
  PI_PRECISION = PI.length - 1,
@@ -55172,7 +55172,7 @@ P.toPower = P.pow = function (y) {
55172
55172
  e = mathfloor(y.e / LOG_BASE);
55173
55173
 
55174
55174
  // If y is a small integer use the 'exponentiation by squaring' algorithm.
55175
- if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {
55175
+ if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER$1) {
55176
55176
  r = intPow(Ctor, x, k, pr);
55177
55177
  return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);
55178
55178
  }
@@ -57306,7 +57306,7 @@ function clone(obj) {
57306
57306
  Decimal.hypot = hypot; // ES6
57307
57307
  Decimal.ln = ln;
57308
57308
  Decimal.log = log;
57309
- Decimal.log10 = log10; // ES6
57309
+ Decimal.log10 = log10$1; // ES6
57310
57310
  Decimal.log2 = log2; // ES6
57311
57311
  Decimal.max = max;
57312
57312
  Decimal.min = min;
@@ -57465,7 +57465,7 @@ function log2(x) {
57465
57465
  * x {number|string|Decimal}
57466
57466
  *
57467
57467
  */
57468
- function log10(x) {
57468
+ function log10$1(x) {
57469
57469
  return new this(x).log(10);
57470
57470
  }
57471
57471
 
@@ -58299,7 +58299,7 @@ class Token {
58299
58299
 
58300
58300
  constructor({ blockchain, address }) {
58301
58301
  this.blockchain = blockchain;
58302
- this.address = getAddress$2(address);
58302
+ this.address = getAddress$3(address);
58303
58303
  }
58304
58304
 
58305
58305
  async decimals() {
@@ -62097,7 +62097,7 @@ var bn$1 = createCommonjsModule$1(function (module) {
62097
62097
  })(module, commonjsGlobal$1);
62098
62098
  });
62099
62099
 
62100
- const version$3 = "logger/5.4.1";
62100
+ const version$4 = "logger/5.4.1";
62101
62101
 
62102
62102
  let _permanentCensorErrors$1 = false;
62103
62103
  let _censorErrors$1 = false;
@@ -62373,7 +62373,7 @@ class Logger$1 {
62373
62373
  }
62374
62374
  static globalLogger() {
62375
62375
  if (!_globalLogger$1) {
62376
- _globalLogger$1 = new Logger$1(version$3);
62376
+ _globalLogger$1 = new Logger$1(version$4);
62377
62377
  }
62378
62378
  return _globalLogger$1;
62379
62379
  }
@@ -62409,9 +62409,9 @@ class Logger$1 {
62409
62409
  Logger$1.errors = ErrorCode$1;
62410
62410
  Logger$1.levels = LogLevel$1;
62411
62411
 
62412
- const version$2$1 = "bytes/5.4.0";
62412
+ const version$3 = "bytes/5.4.0";
62413
62413
 
62414
- const logger$3 = new Logger$1(version$2$1);
62414
+ const logger$4 = new Logger$1(version$3);
62415
62415
  ///////////////////////////////
62416
62416
  function isHexable$1(value) {
62417
62417
  return !!(value.toHexString);
@@ -62452,7 +62452,7 @@ function arrayify(value, options) {
62452
62452
  options = {};
62453
62453
  }
62454
62454
  if (typeof (value) === "number") {
62455
- logger$3.checkSafeUint53(value, "invalid arrayify value");
62455
+ logger$4.checkSafeUint53(value, "invalid arrayify value");
62456
62456
  const result = [];
62457
62457
  while (value) {
62458
62458
  result.unshift(value & 0xff);
@@ -62479,7 +62479,7 @@ function arrayify(value, options) {
62479
62479
  hex += "0";
62480
62480
  }
62481
62481
  else {
62482
- logger$3.throwArgumentError("hex data is odd-length", "value", value);
62482
+ logger$4.throwArgumentError("hex data is odd-length", "value", value);
62483
62483
  }
62484
62484
  }
62485
62485
  const result = [];
@@ -62491,7 +62491,7 @@ function arrayify(value, options) {
62491
62491
  if (isBytes$1(value)) {
62492
62492
  return addSlice(new Uint8Array(value));
62493
62493
  }
62494
- return logger$3.throwArgumentError("invalid arrayify value", "value", value);
62494
+ return logger$4.throwArgumentError("invalid arrayify value", "value", value);
62495
62495
  }
62496
62496
  function isHexString$1(value, length) {
62497
62497
  if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) {
@@ -62508,7 +62508,7 @@ function hexlify$1(value, options) {
62508
62508
  options = {};
62509
62509
  }
62510
62510
  if (typeof (value) === "number") {
62511
- logger$3.checkSafeUint53(value, "invalid hexlify value");
62511
+ logger$4.checkSafeUint53(value, "invalid hexlify value");
62512
62512
  let hex = "";
62513
62513
  while (value) {
62514
62514
  hex = HexCharacters$1[value & 0xf] + hex;
@@ -62544,7 +62544,7 @@ function hexlify$1(value, options) {
62544
62544
  value += "0";
62545
62545
  }
62546
62546
  else {
62547
- logger$3.throwArgumentError("hex data is odd-length", "value", value);
62547
+ logger$4.throwArgumentError("hex data is odd-length", "value", value);
62548
62548
  }
62549
62549
  }
62550
62550
  return value.toLowerCase();
@@ -62557,17 +62557,17 @@ function hexlify$1(value, options) {
62557
62557
  }
62558
62558
  return result;
62559
62559
  }
62560
- return logger$3.throwArgumentError("invalid hexlify value", "value", value);
62560
+ return logger$4.throwArgumentError("invalid hexlify value", "value", value);
62561
62561
  }
62562
62562
  function hexZeroPad(value, length) {
62563
62563
  if (typeof (value) !== "string") {
62564
62564
  value = hexlify$1(value);
62565
62565
  }
62566
62566
  else if (!isHexString$1(value)) {
62567
- logger$3.throwArgumentError("invalid hex string", "value", value);
62567
+ logger$4.throwArgumentError("invalid hex string", "value", value);
62568
62568
  }
62569
62569
  if (value.length > 2 * length + 2) {
62570
- logger$3.throwArgumentError("value out of range", "value", arguments[1]);
62570
+ logger$4.throwArgumentError("value out of range", "value", arguments[1]);
62571
62571
  }
62572
62572
  while (value.length < 2 * length + 2) {
62573
62573
  value = "0x0" + value.substring(2);
@@ -62575,10 +62575,10 @@ function hexZeroPad(value, length) {
62575
62575
  return value;
62576
62576
  }
62577
62577
 
62578
- const version$1$1 = "bignumber/5.4.1";
62578
+ const version$2$1 = "bignumber/5.4.1";
62579
62579
 
62580
62580
  var BN$1 = bn$1.BN;
62581
- const logger$2 = new Logger$1(version$1$1);
62581
+ const logger$3 = new Logger$1(version$2$1);
62582
62582
  const _constructorGuard$1 = {};
62583
62583
  const MAX_SAFE$1 = 0x1fffffffffffff;
62584
62584
  function isBigNumberish(value) {
@@ -62593,9 +62593,9 @@ function isBigNumberish(value) {
62593
62593
  let _warnedToStringRadix$1 = false;
62594
62594
  class BigNumber$1 {
62595
62595
  constructor(constructorGuard, hex) {
62596
- logger$2.checkNew(new.target, BigNumber$1);
62596
+ logger$3.checkNew(new.target, BigNumber$1);
62597
62597
  if (constructorGuard !== _constructorGuard$1) {
62598
- logger$2.throwError("cannot call constructor directly; use BigNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62598
+ logger$3.throwError("cannot call constructor directly; use BigNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62599
62599
  operation: "new (BigNumber)"
62600
62600
  });
62601
62601
  }
@@ -62719,7 +62719,7 @@ class BigNumber$1 {
62719
62719
  return BigInt(this.toString());
62720
62720
  }
62721
62721
  catch (e) { }
62722
- return logger$2.throwError("this platform does not support BigInt", Logger$1.errors.UNSUPPORTED_OPERATION, {
62722
+ return logger$3.throwError("this platform does not support BigInt", Logger$1.errors.UNSUPPORTED_OPERATION, {
62723
62723
  value: this.toString()
62724
62724
  });
62725
62725
  }
@@ -62729,14 +62729,14 @@ class BigNumber$1 {
62729
62729
  if (arguments[0] === 10) {
62730
62730
  if (!_warnedToStringRadix$1) {
62731
62731
  _warnedToStringRadix$1 = true;
62732
- logger$2.warn("BigNumber.toString does not accept any parameters; base-10 is assumed");
62732
+ logger$3.warn("BigNumber.toString does not accept any parameters; base-10 is assumed");
62733
62733
  }
62734
62734
  }
62735
62735
  else if (arguments[0] === 16) {
62736
- logger$2.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62736
+ logger$3.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62737
62737
  }
62738
62738
  else {
62739
- logger$2.throwError("BigNumber.toString does not accept parameters", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62739
+ logger$3.throwError("BigNumber.toString does not accept parameters", Logger$1.errors.UNEXPECTED_ARGUMENT, {});
62740
62740
  }
62741
62741
  }
62742
62742
  return toBN$1(this).toString(10);
@@ -62758,7 +62758,7 @@ class BigNumber$1 {
62758
62758
  if (value.match(/^-?[0-9]+$/)) {
62759
62759
  return new BigNumber$1(_constructorGuard$1, toHex$1(new BN$1(value)));
62760
62760
  }
62761
- return logger$2.throwArgumentError("invalid BigNumber string", "value", value);
62761
+ return logger$3.throwArgumentError("invalid BigNumber string", "value", value);
62762
62762
  }
62763
62763
  if (typeof (value) === "number") {
62764
62764
  if (value % 1) {
@@ -62798,7 +62798,7 @@ class BigNumber$1 {
62798
62798
  }
62799
62799
  }
62800
62800
  }
62801
- return logger$2.throwArgumentError("invalid BigNumber value", "value", value);
62801
+ return logger$3.throwArgumentError("invalid BigNumber value", "value", value);
62802
62802
  }
62803
62803
  static isBigNumber(value) {
62804
62804
  return !!(value && value._isBigNumber);
@@ -62816,7 +62816,7 @@ function toHex$1(value) {
62816
62816
  value = value.substring(1);
62817
62817
  // Cannot have mulitple negative signs (e.g. "--0x04")
62818
62818
  if (value[0] === "-") {
62819
- logger$2.throwArgumentError("invalid hex", "value", value);
62819
+ logger$3.throwArgumentError("invalid hex", "value", value);
62820
62820
  }
62821
62821
  // Call toHex on the positive component
62822
62822
  value = toHex$1(value);
@@ -62860,10 +62860,14 @@ function throwFault$1(fault, operation, value) {
62860
62860
  if (value != null) {
62861
62861
  params.value = value;
62862
62862
  }
62863
- return logger$2.throwError(fault, Logger$1.errors.NUMERIC_FAULT, params);
62863
+ return logger$3.throwError(fault, Logger$1.errors.NUMERIC_FAULT, params);
62864
+ }
62865
+ // value should have no prefix
62866
+ function _base36To16(value) {
62867
+ return (new BN$1(value, 36)).toString(16);
62864
62868
  }
62865
62869
 
62866
- const logger$1$1 = new Logger$1(version$1$1);
62870
+ const logger$2 = new Logger$1(version$2$1);
62867
62871
  const _constructorGuard$2 = {};
62868
62872
  const Zero = BigNumber$1.from(0);
62869
62873
  const NegativeOne = BigNumber$1.from(-1);
@@ -62872,7 +62876,7 @@ function throwFault$2(message, fault, operation, value) {
62872
62876
  if (value !== undefined) {
62873
62877
  params.value = value;
62874
62878
  }
62875
- return logger$1$1.throwError(message, Logger$1.errors.NUMERIC_FAULT, params);
62879
+ return logger$2.throwError(message, Logger$1.errors.NUMERIC_FAULT, params);
62876
62880
  }
62877
62881
  // Constant to pull zeros from for multipliers
62878
62882
  let zeros = "0";
@@ -62890,7 +62894,7 @@ function getMultiplier(decimals) {
62890
62894
  if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {
62891
62895
  return ("1" + zeros.substring(0, decimals));
62892
62896
  }
62893
- return logger$1$1.throwArgumentError("invalid decimal size", "decimals", decimals);
62897
+ return logger$2.throwArgumentError("invalid decimal size", "decimals", decimals);
62894
62898
  }
62895
62899
  function formatFixed(value, decimals) {
62896
62900
  if (decimals == null) {
@@ -62927,7 +62931,7 @@ function parseFixed(value, decimals) {
62927
62931
  }
62928
62932
  const multiplier = getMultiplier(decimals);
62929
62933
  if (typeof (value) !== "string" || !value.match(/^-?[0-9.,]+$/)) {
62930
- logger$1$1.throwArgumentError("invalid decimal value", "value", value);
62934
+ logger$2.throwArgumentError("invalid decimal value", "value", value);
62931
62935
  }
62932
62936
  // Is it negative?
62933
62937
  const negative = (value.substring(0, 1) === "-");
@@ -62935,12 +62939,12 @@ function parseFixed(value, decimals) {
62935
62939
  value = value.substring(1);
62936
62940
  }
62937
62941
  if (value === ".") {
62938
- logger$1$1.throwArgumentError("missing value", "value", value);
62942
+ logger$2.throwArgumentError("missing value", "value", value);
62939
62943
  }
62940
62944
  // Split it into a whole and fractional part
62941
62945
  const comps = value.split(".");
62942
62946
  if (comps.length > 2) {
62943
- logger$1$1.throwArgumentError("too many decimal points", "value", value);
62947
+ logger$2.throwArgumentError("too many decimal points", "value", value);
62944
62948
  }
62945
62949
  let whole = comps[0], fraction = comps[1];
62946
62950
  if (!whole) {
@@ -62971,7 +62975,7 @@ function parseFixed(value, decimals) {
62971
62975
  class FixedFormat {
62972
62976
  constructor(constructorGuard, signed, width, decimals) {
62973
62977
  if (constructorGuard !== _constructorGuard$2) {
62974
- logger$1$1.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62978
+ logger$2.throwError("cannot use FixedFormat constructor; use FixedFormat.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
62975
62979
  operation: "new FixedFormat"
62976
62980
  });
62977
62981
  }
@@ -63000,7 +63004,7 @@ class FixedFormat {
63000
63004
  else {
63001
63005
  const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);
63002
63006
  if (!match) {
63003
- logger$1$1.throwArgumentError("invalid fixed format", "format", value);
63007
+ logger$2.throwArgumentError("invalid fixed format", "format", value);
63004
63008
  }
63005
63009
  signed = (match[1] !== "u");
63006
63010
  width = parseInt(match[2]);
@@ -63013,7 +63017,7 @@ class FixedFormat {
63013
63017
  return defaultValue;
63014
63018
  }
63015
63019
  if (typeof (value[key]) !== type) {
63016
- logger$1$1.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]);
63020
+ logger$2.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]);
63017
63021
  }
63018
63022
  return value[key];
63019
63023
  };
@@ -63022,19 +63026,19 @@ class FixedFormat {
63022
63026
  decimals = check("decimals", "number", decimals);
63023
63027
  }
63024
63028
  if (width % 8) {
63025
- logger$1$1.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width);
63029
+ logger$2.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width);
63026
63030
  }
63027
63031
  if (decimals > 80) {
63028
- logger$1$1.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals);
63032
+ logger$2.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals);
63029
63033
  }
63030
63034
  return new FixedFormat(_constructorGuard$2, signed, width, decimals);
63031
63035
  }
63032
63036
  }
63033
63037
  class FixedNumber {
63034
63038
  constructor(constructorGuard, hex, value, format) {
63035
- logger$1$1.checkNew(new.target, FixedNumber);
63039
+ logger$2.checkNew(new.target, FixedNumber);
63036
63040
  if (constructorGuard !== _constructorGuard$2) {
63037
- logger$1$1.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
63041
+ logger$2.throwError("cannot use FixedNumber constructor; use FixedNumber.from", Logger$1.errors.UNSUPPORTED_OPERATION, {
63038
63042
  operation: "new FixedFormat"
63039
63043
  });
63040
63044
  }
@@ -63046,7 +63050,7 @@ class FixedNumber {
63046
63050
  }
63047
63051
  _checkFormat(other) {
63048
63052
  if (this.format.name !== other.format.name) {
63049
- logger$1$1.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other);
63053
+ logger$2.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other);
63050
63054
  }
63051
63055
  }
63052
63056
  addUnsafe(other) {
@@ -63108,7 +63112,7 @@ class FixedNumber {
63108
63112
  comps.push("0");
63109
63113
  }
63110
63114
  if (decimals < 0 || decimals > 80 || (decimals % 1)) {
63111
- logger$1$1.throwArgumentError("invalid decimal count", "decimals", decimals);
63115
+ logger$2.throwArgumentError("invalid decimal count", "decimals", decimals);
63112
63116
  }
63113
63117
  if (comps[1].length <= decimals) {
63114
63118
  return this;
@@ -63129,7 +63133,7 @@ class FixedNumber {
63129
63133
  return this._hex;
63130
63134
  }
63131
63135
  if (width % 8) {
63132
- logger$1$1.throwArgumentError("invalid byte width", "width", width);
63136
+ logger$2.throwArgumentError("invalid byte width", "width", width);
63133
63137
  }
63134
63138
  const hex = BigNumber$1.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();
63135
63139
  return hexZeroPad(hex, width / 8);
@@ -63204,7 +63208,7 @@ class FixedNumber {
63204
63208
  throw error;
63205
63209
  }
63206
63210
  }
63207
- return logger$1$1.throwArgumentError("invalid FixedNumber value", "value", value);
63211
+ return logger$2.throwArgumentError("invalid FixedNumber value", "value", value);
63208
63212
  }
63209
63213
  static isFixedNumber(value) {
63210
63214
  return !!(value && value._isFixedNumber);
@@ -63213,9 +63217,585 @@ class FixedNumber {
63213
63217
  const ONE = FixedNumber.from(1);
63214
63218
  const BUMP = FixedNumber.from("0.5");
63215
63219
 
63216
- const version$4 = "units/5.4.0";
63220
+ /**
63221
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
63222
+ *
63223
+ * @version 0.5.7
63224
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
63225
+ * @copyright Chen, Yi-Cyuan 2015-2016
63226
+ * @license MIT
63227
+ */
63228
+
63229
+ var sha3 = createCommonjsModule$1(function (module) {
63230
+ /*jslint bitwise: true */
63231
+ (function () {
63232
+
63233
+ var root = typeof window === 'object' ? window : {};
63234
+ var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
63235
+ if (NODE_JS) {
63236
+ root = commonjsGlobal$1;
63237
+ }
63238
+ var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && 'object' === 'object' && module.exports;
63239
+ var HEX_CHARS = '0123456789abcdef'.split('');
63240
+ var SHAKE_PADDING = [31, 7936, 2031616, 520093696];
63241
+ var KECCAK_PADDING = [1, 256, 65536, 16777216];
63242
+ var PADDING = [6, 1536, 393216, 100663296];
63243
+ var SHIFT = [0, 8, 16, 24];
63244
+ var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,
63245
+ 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,
63246
+ 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,
63247
+ 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,
63248
+ 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];
63249
+ var BITS = [224, 256, 384, 512];
63250
+ var SHAKE_BITS = [128, 256];
63251
+ var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array'];
63252
+
63253
+ var createOutputMethod = function (bits, padding, outputType) {
63254
+ return function (message) {
63255
+ return new Keccak(bits, padding, bits).update(message)[outputType]();
63256
+ };
63257
+ };
63258
+
63259
+ var createShakeOutputMethod = function (bits, padding, outputType) {
63260
+ return function (message, outputBits) {
63261
+ return new Keccak(bits, padding, outputBits).update(message)[outputType]();
63262
+ };
63263
+ };
63264
+
63265
+ var createMethod = function (bits, padding) {
63266
+ var method = createOutputMethod(bits, padding, 'hex');
63267
+ method.create = function () {
63268
+ return new Keccak(bits, padding, bits);
63269
+ };
63270
+ method.update = function (message) {
63271
+ return method.create().update(message);
63272
+ };
63273
+ for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
63274
+ var type = OUTPUT_TYPES[i];
63275
+ method[type] = createOutputMethod(bits, padding, type);
63276
+ }
63277
+ return method;
63278
+ };
63279
+
63280
+ var createShakeMethod = function (bits, padding) {
63281
+ var method = createShakeOutputMethod(bits, padding, 'hex');
63282
+ method.create = function (outputBits) {
63283
+ return new Keccak(bits, padding, outputBits);
63284
+ };
63285
+ method.update = function (message, outputBits) {
63286
+ return method.create(outputBits).update(message);
63287
+ };
63288
+ for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
63289
+ var type = OUTPUT_TYPES[i];
63290
+ method[type] = createShakeOutputMethod(bits, padding, type);
63291
+ }
63292
+ return method;
63293
+ };
63294
+
63295
+ var algorithms = [
63296
+ {name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod},
63297
+ {name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod},
63298
+ {name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod}
63299
+ ];
63300
+
63301
+ var methods = {}, methodNames = [];
63302
+
63303
+ for (var i = 0; i < algorithms.length; ++i) {
63304
+ var algorithm = algorithms[i];
63305
+ var bits = algorithm.bits;
63306
+ for (var j = 0; j < bits.length; ++j) {
63307
+ var methodName = algorithm.name +'_' + bits[j];
63308
+ methodNames.push(methodName);
63309
+ methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);
63310
+ }
63311
+ }
63312
+
63313
+ function Keccak(bits, padding, outputBits) {
63314
+ this.blocks = [];
63315
+ this.s = [];
63316
+ this.padding = padding;
63317
+ this.outputBits = outputBits;
63318
+ this.reset = true;
63319
+ this.block = 0;
63320
+ this.start = 0;
63321
+ this.blockCount = (1600 - (bits << 1)) >> 5;
63322
+ this.byteCount = this.blockCount << 2;
63323
+ this.outputBlocks = outputBits >> 5;
63324
+ this.extraBytes = (outputBits & 31) >> 3;
63325
+
63326
+ for (var i = 0; i < 50; ++i) {
63327
+ this.s[i] = 0;
63328
+ }
63329
+ }
63330
+
63331
+ Keccak.prototype.update = function (message) {
63332
+ var notString = typeof message !== 'string';
63333
+ if (notString && message.constructor === ArrayBuffer) {
63334
+ message = new Uint8Array(message);
63335
+ }
63336
+ var length = message.length, blocks = this.blocks, byteCount = this.byteCount,
63337
+ blockCount = this.blockCount, index = 0, s = this.s, i, code;
63338
+
63339
+ while (index < length) {
63340
+ if (this.reset) {
63341
+ this.reset = false;
63342
+ blocks[0] = this.block;
63343
+ for (i = 1; i < blockCount + 1; ++i) {
63344
+ blocks[i] = 0;
63345
+ }
63346
+ }
63347
+ if (notString) {
63348
+ for (i = this.start; index < length && i < byteCount; ++index) {
63349
+ blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
63350
+ }
63351
+ } else {
63352
+ for (i = this.start; index < length && i < byteCount; ++index) {
63353
+ code = message.charCodeAt(index);
63354
+ if (code < 0x80) {
63355
+ blocks[i >> 2] |= code << SHIFT[i++ & 3];
63356
+ } else if (code < 0x800) {
63357
+ blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
63358
+ blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
63359
+ } else if (code < 0xd800 || code >= 0xe000) {
63360
+ blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
63361
+ blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
63362
+ blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
63363
+ } else {
63364
+ code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
63365
+ blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
63366
+ blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
63367
+ blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
63368
+ blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
63369
+ }
63370
+ }
63371
+ }
63372
+ this.lastByteIndex = i;
63373
+ if (i >= byteCount) {
63374
+ this.start = i - byteCount;
63375
+ this.block = blocks[blockCount];
63376
+ for (i = 0; i < blockCount; ++i) {
63377
+ s[i] ^= blocks[i];
63378
+ }
63379
+ f(s);
63380
+ this.reset = true;
63381
+ } else {
63382
+ this.start = i;
63383
+ }
63384
+ }
63385
+ return this;
63386
+ };
63387
+
63388
+ Keccak.prototype.finalize = function () {
63389
+ var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;
63390
+ blocks[i >> 2] |= this.padding[i & 3];
63391
+ if (this.lastByteIndex === this.byteCount) {
63392
+ blocks[0] = blocks[blockCount];
63393
+ for (i = 1; i < blockCount + 1; ++i) {
63394
+ blocks[i] = 0;
63395
+ }
63396
+ }
63397
+ blocks[blockCount - 1] |= 0x80000000;
63398
+ for (i = 0; i < blockCount; ++i) {
63399
+ s[i] ^= blocks[i];
63400
+ }
63401
+ f(s);
63402
+ };
63403
+
63404
+ Keccak.prototype.toString = Keccak.prototype.hex = function () {
63405
+ this.finalize();
63406
+
63407
+ var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,
63408
+ extraBytes = this.extraBytes, i = 0, j = 0;
63409
+ var hex = '', block;
63410
+ while (j < outputBlocks) {
63411
+ for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {
63412
+ block = s[i];
63413
+ hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +
63414
+ HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +
63415
+ HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +
63416
+ HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];
63417
+ }
63418
+ if (j % blockCount === 0) {
63419
+ f(s);
63420
+ i = 0;
63421
+ }
63422
+ }
63423
+ if (extraBytes) {
63424
+ block = s[i];
63425
+ if (extraBytes > 0) {
63426
+ hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];
63427
+ }
63428
+ if (extraBytes > 1) {
63429
+ hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];
63430
+ }
63431
+ if (extraBytes > 2) {
63432
+ hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];
63433
+ }
63434
+ }
63435
+ return hex;
63436
+ };
63437
+
63438
+ Keccak.prototype.arrayBuffer = function () {
63439
+ this.finalize();
63440
+
63441
+ var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,
63442
+ extraBytes = this.extraBytes, i = 0, j = 0;
63443
+ var bytes = this.outputBits >> 3;
63444
+ var buffer;
63445
+ if (extraBytes) {
63446
+ buffer = new ArrayBuffer((outputBlocks + 1) << 2);
63447
+ } else {
63448
+ buffer = new ArrayBuffer(bytes);
63449
+ }
63450
+ var array = new Uint32Array(buffer);
63451
+ while (j < outputBlocks) {
63452
+ for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {
63453
+ array[j] = s[i];
63454
+ }
63455
+ if (j % blockCount === 0) {
63456
+ f(s);
63457
+ }
63458
+ }
63459
+ if (extraBytes) {
63460
+ array[i] = s[i];
63461
+ buffer = buffer.slice(0, bytes);
63462
+ }
63463
+ return buffer;
63464
+ };
63465
+
63466
+ Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;
63467
+
63468
+ Keccak.prototype.digest = Keccak.prototype.array = function () {
63469
+ this.finalize();
63470
+
63471
+ var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,
63472
+ extraBytes = this.extraBytes, i = 0, j = 0;
63473
+ var array = [], offset, block;
63474
+ while (j < outputBlocks) {
63475
+ for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {
63476
+ offset = j << 2;
63477
+ block = s[i];
63478
+ array[offset] = block & 0xFF;
63479
+ array[offset + 1] = (block >> 8) & 0xFF;
63480
+ array[offset + 2] = (block >> 16) & 0xFF;
63481
+ array[offset + 3] = (block >> 24) & 0xFF;
63482
+ }
63483
+ if (j % blockCount === 0) {
63484
+ f(s);
63485
+ }
63486
+ }
63487
+ if (extraBytes) {
63488
+ offset = j << 2;
63489
+ block = s[i];
63490
+ if (extraBytes > 0) {
63491
+ array[offset] = block & 0xFF;
63492
+ }
63493
+ if (extraBytes > 1) {
63494
+ array[offset + 1] = (block >> 8) & 0xFF;
63495
+ }
63496
+ if (extraBytes > 2) {
63497
+ array[offset + 2] = (block >> 16) & 0xFF;
63498
+ }
63499
+ }
63500
+ return array;
63501
+ };
63502
+
63503
+ var f = function (s) {
63504
+ var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,
63505
+ b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,
63506
+ b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,
63507
+ b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;
63508
+ for (n = 0; n < 48; n += 2) {
63509
+ c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];
63510
+ c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];
63511
+ c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];
63512
+ c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];
63513
+ c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];
63514
+ c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];
63515
+ c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];
63516
+ c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];
63517
+ c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];
63518
+ c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];
63519
+
63520
+ h = c8 ^ ((c2 << 1) | (c3 >>> 31));
63521
+ l = c9 ^ ((c3 << 1) | (c2 >>> 31));
63522
+ s[0] ^= h;
63523
+ s[1] ^= l;
63524
+ s[10] ^= h;
63525
+ s[11] ^= l;
63526
+ s[20] ^= h;
63527
+ s[21] ^= l;
63528
+ s[30] ^= h;
63529
+ s[31] ^= l;
63530
+ s[40] ^= h;
63531
+ s[41] ^= l;
63532
+ h = c0 ^ ((c4 << 1) | (c5 >>> 31));
63533
+ l = c1 ^ ((c5 << 1) | (c4 >>> 31));
63534
+ s[2] ^= h;
63535
+ s[3] ^= l;
63536
+ s[12] ^= h;
63537
+ s[13] ^= l;
63538
+ s[22] ^= h;
63539
+ s[23] ^= l;
63540
+ s[32] ^= h;
63541
+ s[33] ^= l;
63542
+ s[42] ^= h;
63543
+ s[43] ^= l;
63544
+ h = c2 ^ ((c6 << 1) | (c7 >>> 31));
63545
+ l = c3 ^ ((c7 << 1) | (c6 >>> 31));
63546
+ s[4] ^= h;
63547
+ s[5] ^= l;
63548
+ s[14] ^= h;
63549
+ s[15] ^= l;
63550
+ s[24] ^= h;
63551
+ s[25] ^= l;
63552
+ s[34] ^= h;
63553
+ s[35] ^= l;
63554
+ s[44] ^= h;
63555
+ s[45] ^= l;
63556
+ h = c4 ^ ((c8 << 1) | (c9 >>> 31));
63557
+ l = c5 ^ ((c9 << 1) | (c8 >>> 31));
63558
+ s[6] ^= h;
63559
+ s[7] ^= l;
63560
+ s[16] ^= h;
63561
+ s[17] ^= l;
63562
+ s[26] ^= h;
63563
+ s[27] ^= l;
63564
+ s[36] ^= h;
63565
+ s[37] ^= l;
63566
+ s[46] ^= h;
63567
+ s[47] ^= l;
63568
+ h = c6 ^ ((c0 << 1) | (c1 >>> 31));
63569
+ l = c7 ^ ((c1 << 1) | (c0 >>> 31));
63570
+ s[8] ^= h;
63571
+ s[9] ^= l;
63572
+ s[18] ^= h;
63573
+ s[19] ^= l;
63574
+ s[28] ^= h;
63575
+ s[29] ^= l;
63576
+ s[38] ^= h;
63577
+ s[39] ^= l;
63578
+ s[48] ^= h;
63579
+ s[49] ^= l;
63580
+
63581
+ b0 = s[0];
63582
+ b1 = s[1];
63583
+ b32 = (s[11] << 4) | (s[10] >>> 28);
63584
+ b33 = (s[10] << 4) | (s[11] >>> 28);
63585
+ b14 = (s[20] << 3) | (s[21] >>> 29);
63586
+ b15 = (s[21] << 3) | (s[20] >>> 29);
63587
+ b46 = (s[31] << 9) | (s[30] >>> 23);
63588
+ b47 = (s[30] << 9) | (s[31] >>> 23);
63589
+ b28 = (s[40] << 18) | (s[41] >>> 14);
63590
+ b29 = (s[41] << 18) | (s[40] >>> 14);
63591
+ b20 = (s[2] << 1) | (s[3] >>> 31);
63592
+ b21 = (s[3] << 1) | (s[2] >>> 31);
63593
+ b2 = (s[13] << 12) | (s[12] >>> 20);
63594
+ b3 = (s[12] << 12) | (s[13] >>> 20);
63595
+ b34 = (s[22] << 10) | (s[23] >>> 22);
63596
+ b35 = (s[23] << 10) | (s[22] >>> 22);
63597
+ b16 = (s[33] << 13) | (s[32] >>> 19);
63598
+ b17 = (s[32] << 13) | (s[33] >>> 19);
63599
+ b48 = (s[42] << 2) | (s[43] >>> 30);
63600
+ b49 = (s[43] << 2) | (s[42] >>> 30);
63601
+ b40 = (s[5] << 30) | (s[4] >>> 2);
63602
+ b41 = (s[4] << 30) | (s[5] >>> 2);
63603
+ b22 = (s[14] << 6) | (s[15] >>> 26);
63604
+ b23 = (s[15] << 6) | (s[14] >>> 26);
63605
+ b4 = (s[25] << 11) | (s[24] >>> 21);
63606
+ b5 = (s[24] << 11) | (s[25] >>> 21);
63607
+ b36 = (s[34] << 15) | (s[35] >>> 17);
63608
+ b37 = (s[35] << 15) | (s[34] >>> 17);
63609
+ b18 = (s[45] << 29) | (s[44] >>> 3);
63610
+ b19 = (s[44] << 29) | (s[45] >>> 3);
63611
+ b10 = (s[6] << 28) | (s[7] >>> 4);
63612
+ b11 = (s[7] << 28) | (s[6] >>> 4);
63613
+ b42 = (s[17] << 23) | (s[16] >>> 9);
63614
+ b43 = (s[16] << 23) | (s[17] >>> 9);
63615
+ b24 = (s[26] << 25) | (s[27] >>> 7);
63616
+ b25 = (s[27] << 25) | (s[26] >>> 7);
63617
+ b6 = (s[36] << 21) | (s[37] >>> 11);
63618
+ b7 = (s[37] << 21) | (s[36] >>> 11);
63619
+ b38 = (s[47] << 24) | (s[46] >>> 8);
63620
+ b39 = (s[46] << 24) | (s[47] >>> 8);
63621
+ b30 = (s[8] << 27) | (s[9] >>> 5);
63622
+ b31 = (s[9] << 27) | (s[8] >>> 5);
63623
+ b12 = (s[18] << 20) | (s[19] >>> 12);
63624
+ b13 = (s[19] << 20) | (s[18] >>> 12);
63625
+ b44 = (s[29] << 7) | (s[28] >>> 25);
63626
+ b45 = (s[28] << 7) | (s[29] >>> 25);
63627
+ b26 = (s[38] << 8) | (s[39] >>> 24);
63628
+ b27 = (s[39] << 8) | (s[38] >>> 24);
63629
+ b8 = (s[48] << 14) | (s[49] >>> 18);
63630
+ b9 = (s[49] << 14) | (s[48] >>> 18);
63631
+
63632
+ s[0] = b0 ^ (~b2 & b4);
63633
+ s[1] = b1 ^ (~b3 & b5);
63634
+ s[10] = b10 ^ (~b12 & b14);
63635
+ s[11] = b11 ^ (~b13 & b15);
63636
+ s[20] = b20 ^ (~b22 & b24);
63637
+ s[21] = b21 ^ (~b23 & b25);
63638
+ s[30] = b30 ^ (~b32 & b34);
63639
+ s[31] = b31 ^ (~b33 & b35);
63640
+ s[40] = b40 ^ (~b42 & b44);
63641
+ s[41] = b41 ^ (~b43 & b45);
63642
+ s[2] = b2 ^ (~b4 & b6);
63643
+ s[3] = b3 ^ (~b5 & b7);
63644
+ s[12] = b12 ^ (~b14 & b16);
63645
+ s[13] = b13 ^ (~b15 & b17);
63646
+ s[22] = b22 ^ (~b24 & b26);
63647
+ s[23] = b23 ^ (~b25 & b27);
63648
+ s[32] = b32 ^ (~b34 & b36);
63649
+ s[33] = b33 ^ (~b35 & b37);
63650
+ s[42] = b42 ^ (~b44 & b46);
63651
+ s[43] = b43 ^ (~b45 & b47);
63652
+ s[4] = b4 ^ (~b6 & b8);
63653
+ s[5] = b5 ^ (~b7 & b9);
63654
+ s[14] = b14 ^ (~b16 & b18);
63655
+ s[15] = b15 ^ (~b17 & b19);
63656
+ s[24] = b24 ^ (~b26 & b28);
63657
+ s[25] = b25 ^ (~b27 & b29);
63658
+ s[34] = b34 ^ (~b36 & b38);
63659
+ s[35] = b35 ^ (~b37 & b39);
63660
+ s[44] = b44 ^ (~b46 & b48);
63661
+ s[45] = b45 ^ (~b47 & b49);
63662
+ s[6] = b6 ^ (~b8 & b0);
63663
+ s[7] = b7 ^ (~b9 & b1);
63664
+ s[16] = b16 ^ (~b18 & b10);
63665
+ s[17] = b17 ^ (~b19 & b11);
63666
+ s[26] = b26 ^ (~b28 & b20);
63667
+ s[27] = b27 ^ (~b29 & b21);
63668
+ s[36] = b36 ^ (~b38 & b30);
63669
+ s[37] = b37 ^ (~b39 & b31);
63670
+ s[46] = b46 ^ (~b48 & b40);
63671
+ s[47] = b47 ^ (~b49 & b41);
63672
+ s[8] = b8 ^ (~b0 & b2);
63673
+ s[9] = b9 ^ (~b1 & b3);
63674
+ s[18] = b18 ^ (~b10 & b12);
63675
+ s[19] = b19 ^ (~b11 & b13);
63676
+ s[28] = b28 ^ (~b20 & b22);
63677
+ s[29] = b29 ^ (~b21 & b23);
63678
+ s[38] = b38 ^ (~b30 & b32);
63679
+ s[39] = b39 ^ (~b31 & b33);
63680
+ s[48] = b48 ^ (~b40 & b42);
63681
+ s[49] = b49 ^ (~b41 & b43);
63682
+
63683
+ s[0] ^= RC[n];
63684
+ s[1] ^= RC[n + 1];
63685
+ }
63686
+ };
63687
+
63688
+ if (COMMON_JS) {
63689
+ module.exports = methods;
63690
+ } else {
63691
+ for (var i = 0; i < methodNames.length; ++i) {
63692
+ root[methodNames[i]] = methods[methodNames[i]];
63693
+ }
63694
+ }
63695
+ })();
63696
+ });
63697
+
63698
+ var sha3$1 = sha3;
63699
+
63700
+ function keccak256(data) {
63701
+ return '0x' + sha3$1.keccak_256(arrayify(data));
63702
+ }
63703
+
63704
+ const version$1$1 = "address/5.4.0";
63217
63705
 
63218
- const logger$4 = new Logger$1(version$4);
63706
+ const logger$1$1 = new Logger$1(version$1$1);
63707
+ function getChecksumAddress(address) {
63708
+ if (!isHexString$1(address, 20)) {
63709
+ logger$1$1.throwArgumentError("invalid address", "address", address);
63710
+ }
63711
+ address = address.toLowerCase();
63712
+ const chars = address.substring(2).split("");
63713
+ const expanded = new Uint8Array(40);
63714
+ for (let i = 0; i < 40; i++) {
63715
+ expanded[i] = chars[i].charCodeAt(0);
63716
+ }
63717
+ const hashed = arrayify(keccak256(expanded));
63718
+ for (let i = 0; i < 40; i += 2) {
63719
+ if ((hashed[i >> 1] >> 4) >= 8) {
63720
+ chars[i] = chars[i].toUpperCase();
63721
+ }
63722
+ if ((hashed[i >> 1] & 0x0f) >= 8) {
63723
+ chars[i + 1] = chars[i + 1].toUpperCase();
63724
+ }
63725
+ }
63726
+ return "0x" + chars.join("");
63727
+ }
63728
+ // Shims for environments that are missing some required constants and functions
63729
+ const MAX_SAFE_INTEGER = 0x1fffffffffffff;
63730
+ function log10(x) {
63731
+ if (Math.log10) {
63732
+ return Math.log10(x);
63733
+ }
63734
+ return Math.log(x) / Math.LN10;
63735
+ }
63736
+ // See: https://en.wikipedia.org/wiki/International_Bank_Account_Number
63737
+ // Create lookup table
63738
+ const ibanLookup = {};
63739
+ for (let i = 0; i < 10; i++) {
63740
+ ibanLookup[String(i)] = String(i);
63741
+ }
63742
+ for (let i = 0; i < 26; i++) {
63743
+ ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);
63744
+ }
63745
+ // How many decimal digits can we process? (for 64-bit float, this is 15)
63746
+ const safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));
63747
+ function ibanChecksum(address) {
63748
+ address = address.toUpperCase();
63749
+ address = address.substring(4) + address.substring(0, 2) + "00";
63750
+ let expanded = address.split("").map((c) => { return ibanLookup[c]; }).join("");
63751
+ // Javascript can handle integers safely up to 15 (decimal) digits
63752
+ while (expanded.length >= safeDigits) {
63753
+ let block = expanded.substring(0, safeDigits);
63754
+ expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
63755
+ }
63756
+ let checksum = String(98 - (parseInt(expanded, 10) % 97));
63757
+ while (checksum.length < 2) {
63758
+ checksum = "0" + checksum;
63759
+ }
63760
+ return checksum;
63761
+ }
63762
+ function getAddress(address) {
63763
+ let result = null;
63764
+ if (typeof (address) !== "string") {
63765
+ logger$1$1.throwArgumentError("invalid address", "address", address);
63766
+ }
63767
+ if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
63768
+ // Missing the 0x prefix
63769
+ if (address.substring(0, 2) !== "0x") {
63770
+ address = "0x" + address;
63771
+ }
63772
+ result = getChecksumAddress(address);
63773
+ // It is a checksummed address with a bad checksum
63774
+ if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
63775
+ logger$1$1.throwArgumentError("bad address checksum", "address", address);
63776
+ }
63777
+ // Maybe ICAP? (we only support direct mode)
63778
+ }
63779
+ else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
63780
+ // It is an ICAP address with a bad checksum
63781
+ if (address.substring(2, 4) !== ibanChecksum(address)) {
63782
+ logger$1$1.throwArgumentError("bad icap checksum", "address", address);
63783
+ }
63784
+ result = _base36To16(address.substring(4));
63785
+ while (result.length < 40) {
63786
+ result = "0" + result;
63787
+ }
63788
+ result = getChecksumAddress("0x" + result);
63789
+ }
63790
+ else {
63791
+ logger$1$1.throwArgumentError("invalid address", "address", address);
63792
+ }
63793
+ return result;
63794
+ }
63795
+
63796
+ const version$5 = "units/5.4.0";
63797
+
63798
+ const logger$5 = new Logger$1(version$5);
63219
63799
  const names = [
63220
63800
  "wei",
63221
63801
  "kwei",
@@ -63227,7 +63807,7 @@ const names = [
63227
63807
  ];
63228
63808
  function parseUnits(value, unitName) {
63229
63809
  if (typeof (value) !== "string") {
63230
- logger$4.throwArgumentError("value must be a string", "value", value);
63810
+ logger$5.throwArgumentError("value must be a string", "value", value);
63231
63811
  }
63232
63812
  if (typeof (unitName) === "string") {
63233
63813
  const index = names.indexOf(unitName);
@@ -63490,6 +64070,10 @@ let getTransaction$1 = ({
63490
64070
  return transaction
63491
64071
  };
63492
64072
 
64073
+ const fixCheckSum = (address)=>{
64074
+ return getAddress(address)
64075
+ };
64076
+
63493
64077
  let route$6 = ({
63494
64078
  exchange,
63495
64079
  tokenIn,
@@ -63501,6 +64085,8 @@ let route$6 = ({
63501
64085
  amountInMax = undefined,
63502
64086
  amountOutMin = undefined,
63503
64087
  }) => {
64088
+ tokenIn = fixCheckSum(tokenIn);
64089
+ tokenOut = fixCheckSum(tokenOut);
63504
64090
  return new Promise(async (resolve)=> {
63505
64091
  let path = await findPath$1({ tokenIn, tokenOut });
63506
64092
  if (path === undefined || path.length == 0) { return resolve() }
@@ -63838,6 +64424,8 @@ let route$4 = ({
63838
64424
  amountInMax = undefined,
63839
64425
  amountOutMin = undefined,
63840
64426
  }) => {
64427
+ tokenIn = fixCheckSum(tokenIn);
64428
+ tokenOut = fixCheckSum(tokenOut);
63841
64429
  return new Promise(async (resolve)=> {
63842
64430
  let path = await findPath({ tokenIn, tokenOut });
63843
64431
  if (path === undefined || path.length == 0) { return resolve() }
@@ -64187,12 +64775,18 @@ var ChangableAmountProvider = (function (props) {
64187
64775
  });
64188
64776
  })).then(function (amounts) {
64189
64777
  setAcceptWithAmount(props.accept.map(function (configuration, index) {
64778
+ if (amounts[index] == undefined) {
64779
+ return;
64780
+ }
64781
+
64190
64782
  return {
64191
64783
  blockchain: configuration.blockchain,
64192
- amount: round$1(amounts[index]) || 1,
64784
+ amount: round$1(amounts[index]),
64193
64785
  token: configuration.token,
64194
64786
  receiver: configuration.receiver || account
64195
64787
  };
64788
+ }).filter(function (configuration) {
64789
+ return !!configuration;
64196
64790
  }));
64197
64791
  })["catch"](setError);
64198
64792
  })["catch"](setError);
@@ -71986,11 +72580,7 @@ var ChangePaymentDialog = (function (props) {
71986
72580
  className: "TokenAmountCell"
71987
72581
  }, format(payment.amount)))), /*#__PURE__*/react.createElement("h3", {
71988
72582
  className: "CardText"
71989
- }, /*#__PURE__*/react.createElement("small", null, format(round$1(parseFloat(payment.route.fromBalance.toString()) / Math.pow(10, payment.decimals), 'down')))))), /*#__PURE__*/react.createElement("div", {
71990
- className: "CardInfo"
71991
- }, payment.route.approvalRequired && /*#__PURE__*/react.createElement("span", {
71992
- className: "Label"
71993
- }, "Requires Approval")));
72583
+ }, /*#__PURE__*/react.createElement("small", null, format(round$1(parseFloat(payment.route.fromBalance.toString()) / Math.pow(10, payment.decimals), 'down')))))));
71994
72584
  }));
71995
72585
  }, [allPaymentRoutesWithData]);
71996
72586