admin: updated dist files

This commit is contained in:
Richard Moore 2024-02-02 03:25:03 -05:00
parent 47f1addb41
commit eeb1a4b650
116 changed files with 1222 additions and 479 deletions

@ -3,12 +3,25 @@ Change Log
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
ethers/v6.10.1 (2024-01-17 20:34)
ethers/v6.11.0 (2024-02-02 03:13)
---------------------------------
- Updated third-party provider network URLs ([#4542](https://github.com/ethers-io/ethers.js/issues/4542); [84ca14f](https://github.com/ethers-io/ethers.js/commit/84ca14f1ffc5afbdd7f4c26a9b734ec5951eee3c), [fed28e4](https://github.com/ethers-io/ethers.js/commit/fed28e4a8ce052b7976a70747aefd5fa13e6ac9d), [2b4891d](https://github.com/ethers-io/ethers.js/commit/2b4891d86e72e849079cb1dc98b18e158b0c0620)).
- Assert BrowserProvider receives an EIP-1193 provider to fail early when passing undefined ethereum object ([b69f43b](https://github.com/ethers-io/ethers.js/commit/b69f43bc6f35da881ca7a0c8ccc5fda92edd076d)).
- Add timeout to ContractTransactionResponse wait ([#4497](https://github.com/ethers-io/ethers.js/issues/4497); [095de51](https://github.com/ethers-io/ethers.js/commit/095de51e605a9b88576e5e34fd55a6e32befa4eb)).
- Allow override keyword in human-readable ABI and improve error messages ([#4514](https://github.com/ethers-io/ethers.js/issues/4514), [#4548](https://github.com/ethers-io/ethers.js/issues/4548); [be5ec2d](https://github.com/ethers-io/ethers.js/commit/be5ec2d327a503b2e5fc0f37c47eee9e828f8e23)).
- Expand Contract sub-class to accept BaseContract super-class constructor arguments ([#4538](https://github.com/ethers-io/ethers.js/issues/4538); [98496bc](https://github.com/ethers-io/ethers.js/commit/98496bc48ec23ce0d9c21d3c6c87e5b1b796a610)).
- Allow network for default provider to be null to select mainnet ([#4501](https://github.com/ethers-io/ethers.js/issues/4501); [b6bf7ab](https://github.com/ethers-io/ethers.js/commit/b6bf7aba62fb38839cd01858432b801cc5c28a11)).
- Allow long dnsEncode names with optional length parameter ([#4543](https://github.com/ethers-io/ethers.js/issues/4543); [a136348](https://github.com/ethers-io/ethers.js/commit/a1363483a56b0dee342595c8f44ed8fcce7ecca9)).
- Fix parseLog signature when receiving read-only array for topics ([#4029](https://github.com/ethers-io/ethers.js/issues/4029), [#4459](https://github.com/ethers-io/ethers.js/issues/4459); [20cd8a2](https://github.com/ethers-io/ethers.js/commit/20cd8a23eaf8e8a14e2b51f7f64da4cb3e32fccb)).
- Use Secure endpoints for BNB on Etherscan ([#4525](https://github.com/ethers-io/ethers.js/issues/4525); [1f6e188](https://github.com/ethers-io/ethers.js/commit/1f6e1882515195bd67f0bce9fe347ec05107324b)).
- Added holesky network and related end-points for supporting providers ([c6e6c43](https://github.com/ethers-io/ethers.js/commit/c6e6c432574a0b7e55c300ab3e470aafdace28b3)).
- Added EIP-4844 BLOb transactions ([#4554](https://github.com/ethers-io/ethers.js/issues/4554); [9c1e82e](https://github.com/ethers-io/ethers.js/commit/9c1e82e1230526ebcd62902890c4f24b1f7f7d79)).
- Normalize EIP-712 types before computing the payload ([#4541](https://github.com/ethers-io/ethers.js/issues/4541); [56c1361](https://github.com/ethers-io/ethers.js/commit/56c1361ee83db8b68859caf0850c95ff70e7e306)).
- Updated thrid-part provider URLs for QuickNode ([2b4891d](https://github.com/ethers-io/ethers.js/commit/2b4891d86e72e849079cb1dc98b18e158b0c0620)).
- Fixed normalization and abstracted EIP-712 Array parsing ([#4541](https://github.com/ethers-io/ethers.js/issues/4541); [8f99601](https://github.com/ethers-io/ethers.js/commit/8f99601df1f26a8ba4d6d9dea5e033e7f688107e)).
- Updated third-party provider network URLs ([#4542](https://github.com/ethers-io/ethers.js/issues/4542); [84ca14f](https://github.com/ethers-io/ethers.js/commit/84ca14f1ffc5afbdd7f4c26a9b734ec5951eee3c)).
- Added additional sepolia testnets ([4efef76](https://github.com/ethers-io/ethers.js/commit/4efef76e8cab0acaf1b2ba231a0148f9381bb1ee)).
- Fix EIP-712 type aliases for uint and int ([#4541](https://github.com/ethers-io/ethers.js/issues/4541); [43fb9c2](https://github.com/ethers-io/ethers.js/commit/43fb9c233696aeaa80b1c2b0e5fafce90e0ad508), [56c1361](https://github.com/ethers-io/ethers.js/commit/56c1361ee83db8b68859caf0850c95ff70e7e306), [8f99601](https://github.com/ethers-io/ethers.js/commit/8f99601df1f26a8ba4d6d9dea5e033e7f688107e)).
- Fix EIP-712 type aliases for uint and int ([#4541](https://github.com/ethers-io/ethers.js/issues/4541); [43fb9c2](https://github.com/ethers-io/ethers.js/commit/43fb9c233696aeaa80b1c2b0e5fafce90e0ad508)).
- Fixed typo in Error string ([#4539](https://github.com/ethers-io/ethers.js/issues/4539); [7882905](https://github.com/ethers-io/ethers.js/commit/78829050853093bc5291ae78fc5a904044759aa0)).
- Better debugging output on fetch errors ([bee07a0](https://github.com/ethers-io/ethers.js/commit/bee07a0750b448a9d13c2d57014bcf27f43e2ed7)).

268
dist/ethers.js vendored

@ -3,7 +3,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
/**
* The current version of Ethers.
*/
const version = "6.10.1";
const version = "6.11.0";
/**
* Property helper functions.
@ -9529,12 +9529,11 @@ function namehash(name) {
* This is used for various parts of ENS name resolution, such
* as the wildcard resolution.
*/
function dnsEncode(name) {
function dnsEncode(name, _maxLength) {
const length = (_maxLength != null) ? _maxLength : 63;
assertArgument(length <= 255, "DNS encoded label cannot exceed 255", "length", length);
return hexlify(concat(ensNameSplit(name).map((comp) => {
// DNS does not allow components over 63 bytes in length
if (comp.length > 63) {
throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");
}
assertArgument(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, "name", name);
const bytes = new Uint8Array(comp.length + 1);
bytes.set(comp, 1);
bytes[0] = bytes.length - 1;
@ -9643,6 +9642,13 @@ function formatNumber(_value, name) {
function formatAccessList(value) {
return accessListify(value).map((set) => [set.address, set.storageKeys]);
}
function formatHashes(value, param) {
assertArgument(Array.isArray(value), `invalid ${param}`, "value", value);
for (let i = 0; i < value.length; i++) {
assertArgument(isHexString(value[i], 32), "invalid ${ param } hash", `value[${i}]`, value[i]);
}
return value;
}
function _parseLegacy(data) {
const fields = decodeRlp(data);
assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), "invalid field count for legacy transaction", "data", data);
@ -9686,13 +9692,14 @@ function _parseLegacy(data) {
return tx;
}
function _serializeLegacy(tx, sig) {
assertArgument(tx.isLegacy(), "internal check failed; !legacy", "tx", tx);
const fields = [
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.gasPrice || 0, "gasPrice"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? getAddress(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.gasPrice, "gasPrice"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
];
let chainId = BN_0$4;
if (tx.chainId != BN_0$4) {
@ -9755,14 +9762,12 @@ function _parseEipSignature(tx, fields) {
function _parseEip1559(data) {
const fields = decodeRlp(getBytes(data).slice(1));
assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), "invalid field count for transaction type: 2", "data", hexlify(data));
const maxPriorityFeePerGas = handleUint(fields[2], "maxPriorityFeePerGas");
const maxFeePerGas = handleUint(fields[3], "maxFeePerGas");
const tx = {
type: 2,
chainId: handleUint(fields[0], "chainId"),
nonce: handleNumber(fields[1], "nonce"),
maxPriorityFeePerGas: maxPriorityFeePerGas,
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
gasPrice: null,
gasLimit: handleUint(fields[4], "gasLimit"),
to: handleAddress(fields[5]),
@ -9779,16 +9784,17 @@ function _parseEip1559(data) {
return tx;
}
function _serializeEip1559(tx, sig) {
assertArgument(tx.isLondon(), "internal check failed; !london", "tx", tx);
const fields = [
formatNumber(tx.chainId || 0, "chainId"),
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas || 0, "maxFeePerGas"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? getAddress(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
(formatAccessList(tx.accessList || []))
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas, "maxFeePerGas"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
formatAccessList(tx.accessList)
];
if (sig) {
fields.push(formatNumber(sig.yParity, "yParity"));
@ -9820,15 +9826,16 @@ function _parseEip2930(data) {
return tx;
}
function _serializeEip2930(tx, sig) {
assertArgument(tx.isBerlin(), "internal check failed; !berlin", "tx", tx);
const fields = [
formatNumber(tx.chainId || 0, "chainId"),
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.gasPrice || 0, "gasPrice"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? getAddress(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
(formatAccessList(tx.accessList || []))
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.gasPrice, "gasPrice"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
formatAccessList(tx.accessList)
];
if (sig) {
fields.push(formatNumber(sig.yParity, "recoveryParam"));
@ -9837,6 +9844,59 @@ function _serializeEip2930(tx, sig) {
}
return concat(["0x01", encodeRlp(fields)]);
}
function _parseEip4844(data) {
const fields = decodeRlp(getBytes(data).slice(1));
assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), "invalid field count for transaction type: 3", "data", hexlify(data));
const tx = {
type: 3,
chainId: handleUint(fields[0], "chainId"),
nonce: handleNumber(fields[1], "nonce"),
maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
gasPrice: null,
gasLimit: handleUint(fields[4], "gasLimit"),
to: handleAddress(fields[5]),
value: handleUint(fields[6], "value"),
data: hexlify(fields[7]),
accessList: handleAccessList(fields[8], "accessList"),
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
blobVersionedHashes: fields[10]
};
assertArgument(tx.to != null, "invalid address for transaction type: 3", "data", data);
assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
}
// Unsigned EIP-4844 Transaction
if (fields.length === 11) {
return tx;
}
tx.hash = keccak256(data);
_parseEipSignature(tx, fields.slice(11));
return tx;
}
function _serializeEip4844(tx, sig) {
assertArgument(tx.isCancun(), "internal check failed; !cancun", "tx", tx);
const fields = [
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas, "maxFeePerGas"),
formatNumber(tx.gasLimit, "gasLimit"),
tx.to,
formatNumber(tx.value, "value"),
tx.data,
(formatAccessList(tx.accessList)),
formatNumber(tx.maxFeePerBlobGas, "maxFeePerBlobGas"),
formatHashes(tx.blobVersionedHashes, "blobVersionedHashes")
];
if (sig) {
fields.push(formatNumber(sig.yParity, "yParity"));
fields.push(toBeArray(sig.r));
fields.push(toBeArray(sig.s));
}
return concat(["0x03", encodeRlp(fields)]);
}
/**
* A **Transaction** describes an operation to be executed on
* Ethereum by an Externally Owned Account (EOA). It includes
@ -9863,6 +9923,8 @@ class Transaction {
#chainId;
#sig;
#accessList;
#maxFeePerBlobGas;
#blobVersionedHashes;
/**
* The transaction type.
*
@ -9889,6 +9951,11 @@ class Transaction {
case "eip-1559":
this.#type = 2;
break;
case 3:
case "cancun":
case "eip-4844":
this.#type = 3;
break;
default:
assertArgument(false, "unsupported transaction type", "type", value);
}
@ -9901,6 +9968,7 @@ class Transaction {
case 0: return "legacy";
case 1: return "eip-2930";
case 2: return "eip-1559";
case 3: return "eip-4844";
}
return null;
}
@ -9908,7 +9976,13 @@ class Transaction {
* The ``to`` address for the transaction or ``null`` if the
* transaction is an ``init`` transaction.
*/
get to() { return this.#to; }
get to() {
const value = this.#to;
if (value == null && this.type === 3) {
return ZeroAddress;
}
return value;
}
set to(value) {
this.#to = (value == null) ? null : getAddress(value);
}
@ -9945,7 +10019,7 @@ class Transaction {
get maxPriorityFeePerGas() {
const value = this.#maxPriorityFeePerGas;
if (value == null) {
if (this.type === 2) {
if (this.type === 2 || this.type === 3) {
return BN_0$4;
}
return null;
@ -9962,7 +10036,7 @@ class Transaction {
get maxFeePerGas() {
const value = this.#maxFeePerGas;
if (value == null) {
if (this.type === 2) {
if (this.type === 2 || this.type === 3) {
return BN_0$4;
}
return null;
@ -10006,7 +10080,9 @@ class Transaction {
get accessList() {
const value = this.#accessList || null;
if (value == null) {
if (this.type === 1 || this.type === 2) {
if (this.type === 1 || this.type === 2 || this.type === 3) {
// @TODO: in v7, this should assign the value or become
// a live object itself, otherwise mutation is inconsistent
return [];
}
return null;
@ -10016,6 +10092,41 @@ class Transaction {
set accessList(value) {
this.#accessList = (value == null) ? null : accessListify(value);
}
/**
* The max fee per blob gas for Cancun transactions.
*/
get maxFeePerBlobGas() {
const value = this.#maxFeePerBlobGas;
if (value == null && this.type === 3) {
return BN_0$4;
}
return value;
}
set maxFeePerBlobGas(value) {
this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, "maxFeePerBlobGas");
}
/**
* The BLOB versioned hashes for Cancun transactions.
*/
get blobVersionedHashes() {
// @TODO: Mutation is inconsistent; if unset, the returned value
// cannot mutate the object, if set it can
let value = this.#blobVersionedHashes;
if (value == null && this.type === 3) {
return [];
}
return value;
}
set blobVersionedHashes(value) {
if (value != null) {
assertArgument(Array.isArray(value), "blobVersionedHashes must be an Array", "value", value);
value = value.slice();
for (let i = 0; i < value.length; i++) {
assertArgument(isHexString(value[i], 32), "invalid blobVersionedHash", `value[${i}]`, value[i]);
}
}
this.#blobVersionedHashes = value;
}
/**
* Creates a new Transaction with default values.
*/
@ -10023,15 +10134,17 @@ class Transaction {
this.#type = null;
this.#to = null;
this.#nonce = 0;
this.#gasLimit = BigInt(0);
this.#gasLimit = BN_0$4;
this.#gasPrice = null;
this.#maxPriorityFeePerGas = null;
this.#maxFeePerGas = null;
this.#data = "0x";
this.#value = BigInt(0);
this.#chainId = BigInt(0);
this.#value = BN_0$4;
this.#chainId = BN_0$4;
this.#sig = null;
this.#accessList = null;
this.#maxFeePerBlobGas = null;
this.#blobVersionedHashes = null;
}
/**
* The transaction hash, if signed. Otherwise, ``null``.
@ -10076,7 +10189,6 @@ class Transaction {
* transaction are non-null.
*/
isSigned() {
//isSigned(): this is SignedTransaction {
return this.signature != null;
}
/**
@ -10094,6 +10206,8 @@ class Transaction {
return _serializeEip2930(this, this.signature);
case 2:
return _serializeEip1559(this, this.signature);
case 3:
return _serializeEip4844(this, this.signature);
}
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
}
@ -10111,6 +10225,8 @@ class Transaction {
return _serializeEip2930(this);
case 2:
return _serializeEip1559(this);
case 3:
return _serializeEip4844(this);
}
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".unsignedSerialized" });
}
@ -10119,7 +10235,13 @@ class Transaction {
* supported transaction type.
*/
inferType() {
return (this.inferTypes().pop());
const types = this.inferTypes();
// Prefer London (EIP-1559) over Cancun (BLOb)
if (types.indexOf(2) >= 0) {
return 2;
}
// Return the highest inferred type
return (types.pop());
}
/**
* Validates the explicit properties and returns a list of compatible
@ -10130,6 +10252,7 @@ class Transaction {
const hasGasPrice = this.gasPrice != null;
const hasFee = (this.maxFeePerGas != null || this.maxPriorityFeePerGas != null);
const hasAccessList = (this.accessList != null);
const hasBlob = (this.#maxFeePerBlobGas != null || this.#blobVersionedHashes);
//if (hasGasPrice && hasFee) {
// throw new Error("transaction cannot have gasPrice and maxFeePerGas");
//}
@ -10160,10 +10283,14 @@ class Transaction {
types.push(1);
types.push(2);
}
else if (hasBlob && this.to) {
types.push(3);
}
else {
types.push(0);
types.push(1);
types.push(2);
types.push(3);
}
}
types.sort();
@ -10199,6 +10326,16 @@ class Transaction {
isLondon() {
return (this.type === 2);
}
/**
* Returns true if this transaction is an [[link-eip-4844]] BLOB
* transaction.
*
* This provides a Type Guard that the related properties are
* non-null.
*/
isCancun() {
return (this.type === 3);
}
/**
* Create a copy of this transaciton.
*/
@ -10247,6 +10384,7 @@ class Transaction {
switch (payload[0]) {
case 1: return Transaction.from(_parseEip2930(payload));
case 2: return Transaction.from(_parseEip1559(payload));
case 3: return Transaction.from(_parseEip4844(payload));
}
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: "from" });
}
@ -10272,6 +10410,9 @@ class Transaction {
if (tx.maxFeePerGas != null) {
result.maxFeePerGas = tx.maxFeePerGas;
}
if (tx.maxFeePerBlobGas != null) {
result.maxFeePerBlobGas = tx.maxFeePerBlobGas;
}
if (tx.data != null) {
result.data = tx.data;
}
@ -10287,6 +10428,9 @@ class Transaction {
if (tx.accessList != null) {
result.accessList = tx.accessList;
}
if (tx.blobVersionedHashes != null) {
result.blobVersionedHashes = tx.blobVersionedHashes;
}
if (tx.hash != null) {
assertArgument(result.isSigned(), "unsigned transaction cannot define hash", "tx", tx);
assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
@ -10975,10 +11119,10 @@ function setify(items) {
items.forEach((k) => result.add(k));
return Object.freeze(result);
}
const _kwVisibDeploy = "external public payable";
const _kwVisibDeploy = "external public payable override";
const KwVisibDeploy = setify(_kwVisibDeploy.split(" "));
// Visibility Keywords
const _kwVisib = "constant external internal payable private public pure view";
const _kwVisib = "constant external internal payable private public pure view override";
const KwVisib = setify(_kwVisib.split(" "));
const _kwTypes = "constructor error event fallback function receive struct";
const KwTypes = setify(_kwTypes.split(" "));
@ -11032,7 +11176,8 @@ class TokenString {
// Pops and returns the value of the next token if it is `type`; throws if out of tokens
popType(type) {
if (this.peek().type !== type) {
throw new Error(`expected ${type}; got ${JSON.stringify(this.peek())}`);
const top = this.peek();
throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);
}
return this.pop().text;
}
@ -11264,7 +11409,7 @@ function consumeGas(tokens) {
}
function consumeEoi(tokens) {
if (tokens.length) {
throw new Error(`unexpected tokens: ${tokens.toString()}`);
throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);
}
}
const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/);
@ -12743,7 +12888,7 @@ class Interface {
frags.push(Fragment.from(a));
}
catch (error) {
console.log("EE", error);
console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, error.message);
}
}
defineProperties(this, {
@ -14916,8 +15061,8 @@ class ContractTransactionResponse extends TransactionResponse {
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
async wait(confirms) {
const receipt = await super.wait(confirms);
async wait(confirms, timeout) {
const receipt = await super.wait(confirms, timeout);
if (receipt == null) {
return null;
}
@ -16000,7 +16145,7 @@ class ContractFactory {
* Resolves to the Contract deployed by passing %%args%% into the
* constructor.
*
* This will resovle to the Contract before it has been deployed to the
* This will resolve to the Contract before it has been deployed to the
* network, so the [[BaseContract-waitForDeployment]] should be used before
* sending any transactions to it.
*/
@ -17291,6 +17436,7 @@ function injectCommonNetworks() {
registerEth("goerli", 5, { ensNetwork: 5 });
registerEth("kovan", 42, { ensNetwork: 42 });
registerEth("sepolia", 11155111, { ensNetwork: 11155111 });
registerEth("holesky", 17000, { ensNetwork: 17000 });
registerEth("classic", 61, {});
registerEth("classicKotti", 6, {});
registerEth("arbitrum", 42161, {
@ -20636,8 +20782,11 @@ class CloudflareProvider extends JsonRpcProvider {
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Sepolia Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Polygon (``matic``)
@ -20725,10 +20874,16 @@ class EtherscanProvider extends AbstractProvider {
return "https:/\/api-goerli.etherscan.io";
case "sepolia":
return "https:/\/api-sepolia.etherscan.io";
case "holesky":
return "https:/\/api-holesky.etherscan.io";
case "arbitrum":
return "https:/\/api.arbiscan.io";
case "arbitrum-goerli":
return "https:/\/api-goerli.arbiscan.io";
case "bnb":
return "https:/\/api.bscscan.com";
case "bnbt":
return "https:/\/api-testnet.bscscan.com";
case "matic":
return "https:/\/api.polygonscan.com";
case "matic-mumbai":
@ -20737,10 +20892,6 @@ class EtherscanProvider extends AbstractProvider {
return "https:/\/api-optimistic.etherscan.io";
case "optimism-goerli":
return "https:/\/api-goerli-optimistic.etherscan.io";
case "bnb":
return "http:/\/api.bscscan.com";
case "bnbt":
return "http:/\/api-testnet.bscscan.com";
}
assertArgument(false, "unsupported network", "network", this.network);
}
@ -21700,6 +21851,7 @@ class InfuraProvider extends JsonRpcProvider {
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Holesky Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
@ -21725,6 +21877,8 @@ function getHost$1(name) {
return "ethers.ethereum-goerli.quiknode.pro";
case "sepolia":
return "ethers.ethereum-sepolia.quiknode.pro";
case "holesky":
return "ethers.ethereum-holesky.quiknode.pro";
case "arbitrum":
return "ethers.arbitrum-mainnet.quiknode.pro";
case "arbitrum-goerli":
@ -21763,7 +21917,6 @@ function getHost$1(name) {
are EVM compatible and work with ethers
http://ethers.matic-amoy.quiknode.pro
http://ethers.ethereum-holesky.quiknode.pro
http://ethers.avalanche-mainnet.quiknode.pro
http://ethers.avalanche-testnet.quiknode.pro
@ -21845,7 +21998,7 @@ class QuickNodeProvider extends JsonRpcProvider {
}
/**
* A **FallbackProvider** providers resiliance, security and performatnce
* A **FallbackProvider** provides resilience, security and performance
* in a way that is customizable and configurable.
*
* @_section: api/providers/fallback-provider:Fallback Provider [about-fallback-provider]
@ -22043,7 +22196,7 @@ function getFuzzyMode(quorum, results) {
}
/**
* A **FallbackProvider** manages several [[Providers]] providing
* resiliance by switching between slow or misbehaving nodes, security
* resilience by switching between slow or misbehaving nodes, security
* by requiring multiple backends to aggree and performance by allowing
* faster backends to respond earlier.
*
@ -22700,6 +22853,7 @@ class BrowserProvider extends JsonRpcApiPollingProvider {
* %%network%%.
*/
constructor(ethereum, network) {
assertArgument(ethereum && ethereum.request, "invalid EIP-1193 provider", "ethereum", ethereum);
super(network, { batchMaxCount: 1 });
this.#request = async (method, params) => {
const payload = { method, params };

2
dist/ethers.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/ethers.min.js vendored

File diff suppressed because one or more lines are too long

268
dist/ethers.umd.js vendored

@ -9,7 +9,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
/**
* The current version of Ethers.
*/
const version = "6.10.1";
const version = "6.11.0";
/**
* Property helper functions.
@ -9535,12 +9535,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* This is used for various parts of ENS name resolution, such
* as the wildcard resolution.
*/
function dnsEncode(name) {
function dnsEncode(name, _maxLength) {
const length = (_maxLength != null) ? _maxLength : 63;
assertArgument(length <= 255, "DNS encoded label cannot exceed 255", "length", length);
return hexlify(concat(ensNameSplit(name).map((comp) => {
// DNS does not allow components over 63 bytes in length
if (comp.length > 63) {
throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");
}
assertArgument(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, "name", name);
const bytes = new Uint8Array(comp.length + 1);
bytes.set(comp, 1);
bytes[0] = bytes.length - 1;
@ -9649,6 +9648,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
function formatAccessList(value) {
return accessListify(value).map((set) => [set.address, set.storageKeys]);
}
function formatHashes(value, param) {
assertArgument(Array.isArray(value), `invalid ${param}`, "value", value);
for (let i = 0; i < value.length; i++) {
assertArgument(isHexString(value[i], 32), "invalid ${ param } hash", `value[${i}]`, value[i]);
}
return value;
}
function _parseLegacy(data) {
const fields = decodeRlp(data);
assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), "invalid field count for legacy transaction", "data", data);
@ -9692,13 +9698,14 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return tx;
}
function _serializeLegacy(tx, sig) {
assertArgument(tx.isLegacy(), "internal check failed; !legacy", "tx", tx);
const fields = [
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.gasPrice || 0, "gasPrice"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? getAddress(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.gasPrice, "gasPrice"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
];
let chainId = BN_0$4;
if (tx.chainId != BN_0$4) {
@ -9761,14 +9768,12 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
function _parseEip1559(data) {
const fields = decodeRlp(getBytes(data).slice(1));
assertArgument(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), "invalid field count for transaction type: 2", "data", hexlify(data));
const maxPriorityFeePerGas = handleUint(fields[2], "maxPriorityFeePerGas");
const maxFeePerGas = handleUint(fields[3], "maxFeePerGas");
const tx = {
type: 2,
chainId: handleUint(fields[0], "chainId"),
nonce: handleNumber(fields[1], "nonce"),
maxPriorityFeePerGas: maxPriorityFeePerGas,
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
gasPrice: null,
gasLimit: handleUint(fields[4], "gasLimit"),
to: handleAddress(fields[5]),
@ -9785,16 +9790,17 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return tx;
}
function _serializeEip1559(tx, sig) {
assertArgument(tx.isLondon(), "internal check failed; !london", "tx", tx);
const fields = [
formatNumber(tx.chainId || 0, "chainId"),
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas || 0, "maxFeePerGas"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? getAddress(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
(formatAccessList(tx.accessList || []))
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas, "maxFeePerGas"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
formatAccessList(tx.accessList)
];
if (sig) {
fields.push(formatNumber(sig.yParity, "yParity"));
@ -9826,15 +9832,16 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return tx;
}
function _serializeEip2930(tx, sig) {
assertArgument(tx.isBerlin(), "internal check failed; !berlin", "tx", tx);
const fields = [
formatNumber(tx.chainId || 0, "chainId"),
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.gasPrice || 0, "gasPrice"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? getAddress(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
(formatAccessList(tx.accessList || []))
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.gasPrice, "gasPrice"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
formatAccessList(tx.accessList)
];
if (sig) {
fields.push(formatNumber(sig.yParity, "recoveryParam"));
@ -9843,6 +9850,59 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
}
return concat(["0x01", encodeRlp(fields)]);
}
function _parseEip4844(data) {
const fields = decodeRlp(getBytes(data).slice(1));
assertArgument(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), "invalid field count for transaction type: 3", "data", hexlify(data));
const tx = {
type: 3,
chainId: handleUint(fields[0], "chainId"),
nonce: handleNumber(fields[1], "nonce"),
maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
gasPrice: null,
gasLimit: handleUint(fields[4], "gasLimit"),
to: handleAddress(fields[5]),
value: handleUint(fields[6], "value"),
data: hexlify(fields[7]),
accessList: handleAccessList(fields[8], "accessList"),
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
blobVersionedHashes: fields[10]
};
assertArgument(tx.to != null, "invalid address for transaction type: 3", "data", data);
assertArgument(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
assertArgument(isHexString(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
}
// Unsigned EIP-4844 Transaction
if (fields.length === 11) {
return tx;
}
tx.hash = keccak256(data);
_parseEipSignature(tx, fields.slice(11));
return tx;
}
function _serializeEip4844(tx, sig) {
assertArgument(tx.isCancun(), "internal check failed; !cancun", "tx", tx);
const fields = [
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas, "maxFeePerGas"),
formatNumber(tx.gasLimit, "gasLimit"),
tx.to,
formatNumber(tx.value, "value"),
tx.data,
(formatAccessList(tx.accessList)),
formatNumber(tx.maxFeePerBlobGas, "maxFeePerBlobGas"),
formatHashes(tx.blobVersionedHashes, "blobVersionedHashes")
];
if (sig) {
fields.push(formatNumber(sig.yParity, "yParity"));
fields.push(toBeArray(sig.r));
fields.push(toBeArray(sig.s));
}
return concat(["0x03", encodeRlp(fields)]);
}
/**
* A **Transaction** describes an operation to be executed on
* Ethereum by an Externally Owned Account (EOA). It includes
@ -9869,6 +9929,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
#chainId;
#sig;
#accessList;
#maxFeePerBlobGas;
#blobVersionedHashes;
/**
* The transaction type.
*
@ -9895,6 +9957,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
case "eip-1559":
this.#type = 2;
break;
case 3:
case "cancun":
case "eip-4844":
this.#type = 3;
break;
default:
assertArgument(false, "unsupported transaction type", "type", value);
}
@ -9907,6 +9974,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
case 0: return "legacy";
case 1: return "eip-2930";
case 2: return "eip-1559";
case 3: return "eip-4844";
}
return null;
}
@ -9914,7 +9982,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* The ``to`` address for the transaction or ``null`` if the
* transaction is an ``init`` transaction.
*/
get to() { return this.#to; }
get to() {
const value = this.#to;
if (value == null && this.type === 3) {
return ZeroAddress;
}
return value;
}
set to(value) {
this.#to = (value == null) ? null : getAddress(value);
}
@ -9951,7 +10025,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
get maxPriorityFeePerGas() {
const value = this.#maxPriorityFeePerGas;
if (value == null) {
if (this.type === 2) {
if (this.type === 2 || this.type === 3) {
return BN_0$4;
}
return null;
@ -9968,7 +10042,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
get maxFeePerGas() {
const value = this.#maxFeePerGas;
if (value == null) {
if (this.type === 2) {
if (this.type === 2 || this.type === 3) {
return BN_0$4;
}
return null;
@ -10012,7 +10086,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
get accessList() {
const value = this.#accessList || null;
if (value == null) {
if (this.type === 1 || this.type === 2) {
if (this.type === 1 || this.type === 2 || this.type === 3) {
// @TODO: in v7, this should assign the value or become
// a live object itself, otherwise mutation is inconsistent
return [];
}
return null;
@ -10022,6 +10098,41 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
set accessList(value) {
this.#accessList = (value == null) ? null : accessListify(value);
}
/**
* The max fee per blob gas for Cancun transactions.
*/
get maxFeePerBlobGas() {
const value = this.#maxFeePerBlobGas;
if (value == null && this.type === 3) {
return BN_0$4;
}
return value;
}
set maxFeePerBlobGas(value) {
this.#maxFeePerBlobGas = (value == null) ? null : getBigInt(value, "maxFeePerBlobGas");
}
/**
* The BLOB versioned hashes for Cancun transactions.
*/
get blobVersionedHashes() {
// @TODO: Mutation is inconsistent; if unset, the returned value
// cannot mutate the object, if set it can
let value = this.#blobVersionedHashes;
if (value == null && this.type === 3) {
return [];
}
return value;
}
set blobVersionedHashes(value) {
if (value != null) {
assertArgument(Array.isArray(value), "blobVersionedHashes must be an Array", "value", value);
value = value.slice();
for (let i = 0; i < value.length; i++) {
assertArgument(isHexString(value[i], 32), "invalid blobVersionedHash", `value[${i}]`, value[i]);
}
}
this.#blobVersionedHashes = value;
}
/**
* Creates a new Transaction with default values.
*/
@ -10029,15 +10140,17 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
this.#type = null;
this.#to = null;
this.#nonce = 0;
this.#gasLimit = BigInt(0);
this.#gasLimit = BN_0$4;
this.#gasPrice = null;
this.#maxPriorityFeePerGas = null;
this.#maxFeePerGas = null;
this.#data = "0x";
this.#value = BigInt(0);
this.#chainId = BigInt(0);
this.#value = BN_0$4;
this.#chainId = BN_0$4;
this.#sig = null;
this.#accessList = null;
this.#maxFeePerBlobGas = null;
this.#blobVersionedHashes = null;
}
/**
* The transaction hash, if signed. Otherwise, ``null``.
@ -10082,7 +10195,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* transaction are non-null.
*/
isSigned() {
//isSigned(): this is SignedTransaction {
return this.signature != null;
}
/**
@ -10100,6 +10212,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return _serializeEip2930(this, this.signature);
case 2:
return _serializeEip1559(this, this.signature);
case 3:
return _serializeEip4844(this, this.signature);
}
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
}
@ -10117,6 +10231,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return _serializeEip2930(this);
case 2:
return _serializeEip1559(this);
case 3:
return _serializeEip4844(this);
}
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".unsignedSerialized" });
}
@ -10125,7 +10241,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* supported transaction type.
*/
inferType() {
return (this.inferTypes().pop());
const types = this.inferTypes();
// Prefer London (EIP-1559) over Cancun (BLOb)
if (types.indexOf(2) >= 0) {
return 2;
}
// Return the highest inferred type
return (types.pop());
}
/**
* Validates the explicit properties and returns a list of compatible
@ -10136,6 +10258,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
const hasGasPrice = this.gasPrice != null;
const hasFee = (this.maxFeePerGas != null || this.maxPriorityFeePerGas != null);
const hasAccessList = (this.accessList != null);
const hasBlob = (this.#maxFeePerBlobGas != null || this.#blobVersionedHashes);
//if (hasGasPrice && hasFee) {
// throw new Error("transaction cannot have gasPrice and maxFeePerGas");
//}
@ -10166,10 +10289,14 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
types.push(1);
types.push(2);
}
else if (hasBlob && this.to) {
types.push(3);
}
else {
types.push(0);
types.push(1);
types.push(2);
types.push(3);
}
}
types.sort();
@ -10205,6 +10332,16 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
isLondon() {
return (this.type === 2);
}
/**
* Returns true if this transaction is an [[link-eip-4844]] BLOB
* transaction.
*
* This provides a Type Guard that the related properties are
* non-null.
*/
isCancun() {
return (this.type === 3);
}
/**
* Create a copy of this transaciton.
*/
@ -10253,6 +10390,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
switch (payload[0]) {
case 1: return Transaction.from(_parseEip2930(payload));
case 2: return Transaction.from(_parseEip1559(payload));
case 3: return Transaction.from(_parseEip4844(payload));
}
assert(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: "from" });
}
@ -10278,6 +10416,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
if (tx.maxFeePerGas != null) {
result.maxFeePerGas = tx.maxFeePerGas;
}
if (tx.maxFeePerBlobGas != null) {
result.maxFeePerBlobGas = tx.maxFeePerBlobGas;
}
if (tx.data != null) {
result.data = tx.data;
}
@ -10293,6 +10434,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
if (tx.accessList != null) {
result.accessList = tx.accessList;
}
if (tx.blobVersionedHashes != null) {
result.blobVersionedHashes = tx.blobVersionedHashes;
}
if (tx.hash != null) {
assertArgument(result.isSigned(), "unsigned transaction cannot define hash", "tx", tx);
assertArgument(result.hash === tx.hash, "hash mismatch", "tx", tx);
@ -10981,10 +11125,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
items.forEach((k) => result.add(k));
return Object.freeze(result);
}
const _kwVisibDeploy = "external public payable";
const _kwVisibDeploy = "external public payable override";
const KwVisibDeploy = setify(_kwVisibDeploy.split(" "));
// Visibility Keywords
const _kwVisib = "constant external internal payable private public pure view";
const _kwVisib = "constant external internal payable private public pure view override";
const KwVisib = setify(_kwVisib.split(" "));
const _kwTypes = "constructor error event fallback function receive struct";
const KwTypes = setify(_kwTypes.split(" "));
@ -11038,7 +11182,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
// Pops and returns the value of the next token if it is `type`; throws if out of tokens
popType(type) {
if (this.peek().type !== type) {
throw new Error(`expected ${type}; got ${JSON.stringify(this.peek())}`);
const top = this.peek();
throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);
}
return this.pop().text;
}
@ -11270,7 +11415,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
}
function consumeEoi(tokens) {
if (tokens.length) {
throw new Error(`unexpected tokens: ${tokens.toString()}`);
throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);
}
}
const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/);
@ -12749,7 +12894,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
frags.push(Fragment.from(a));
}
catch (error) {
console.log("EE", error);
console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, error.message);
}
}
defineProperties(this, {
@ -14922,8 +15067,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
async wait(confirms) {
const receipt = await super.wait(confirms);
async wait(confirms, timeout) {
const receipt = await super.wait(confirms, timeout);
if (receipt == null) {
return null;
}
@ -16006,7 +16151,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* Resolves to the Contract deployed by passing %%args%% into the
* constructor.
*
* This will resovle to the Contract before it has been deployed to the
* This will resolve to the Contract before it has been deployed to the
* network, so the [[BaseContract-waitForDeployment]] should be used before
* sending any transactions to it.
*/
@ -17297,6 +17442,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
registerEth("goerli", 5, { ensNetwork: 5 });
registerEth("kovan", 42, { ensNetwork: 42 });
registerEth("sepolia", 11155111, { ensNetwork: 11155111 });
registerEth("holesky", 17000, { ensNetwork: 17000 });
registerEth("classic", 61, {});
registerEth("classicKotti", 6, {});
registerEth("arbitrum", 42161, {
@ -20642,8 +20788,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Sepolia Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Polygon (``matic``)
@ -20731,10 +20880,16 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return "https:/\/api-goerli.etherscan.io";
case "sepolia":
return "https:/\/api-sepolia.etherscan.io";
case "holesky":
return "https:/\/api-holesky.etherscan.io";
case "arbitrum":
return "https:/\/api.arbiscan.io";
case "arbitrum-goerli":
return "https:/\/api-goerli.arbiscan.io";
case "bnb":
return "https:/\/api.bscscan.com";
case "bnbt":
return "https:/\/api-testnet.bscscan.com";
case "matic":
return "https:/\/api.polygonscan.com";
case "matic-mumbai":
@ -20743,10 +20898,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return "https:/\/api-optimistic.etherscan.io";
case "optimism-goerli":
return "https:/\/api-goerli-optimistic.etherscan.io";
case "bnb":
return "http:/\/api.bscscan.com";
case "bnbt":
return "http:/\/api-testnet.bscscan.com";
}
assertArgument(false, "unsupported network", "network", this.network);
}
@ -21706,6 +21857,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Holesky Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
@ -21731,6 +21883,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return "ethers.ethereum-goerli.quiknode.pro";
case "sepolia":
return "ethers.ethereum-sepolia.quiknode.pro";
case "holesky":
return "ethers.ethereum-holesky.quiknode.pro";
case "arbitrum":
return "ethers.arbitrum-mainnet.quiknode.pro";
case "arbitrum-goerli":
@ -21769,7 +21923,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
are EVM compatible and work with ethers
http://ethers.matic-amoy.quiknode.pro
http://ethers.ethereum-holesky.quiknode.pro
http://ethers.avalanche-mainnet.quiknode.pro
http://ethers.avalanche-testnet.quiknode.pro
@ -21851,7 +22004,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
}
/**
* A **FallbackProvider** providers resiliance, security and performatnce
* A **FallbackProvider** provides resilience, security and performance
* in a way that is customizable and configurable.
*
* @_section: api/providers/fallback-provider:Fallback Provider [about-fallback-provider]
@ -22049,7 +22202,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
}
/**
* A **FallbackProvider** manages several [[Providers]] providing
* resiliance by switching between slow or misbehaving nodes, security
* resilience by switching between slow or misbehaving nodes, security
* by requiring multiple backends to aggree and performance by allowing
* faster backends to respond earlier.
*
@ -22706,6 +22859,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* %%network%%.
*/
constructor(ethereum, network) {
assertArgument(ethereum && ethereum.request, "invalid EIP-1193 provider", "ethereum", ethereum);
super(network, { batchMaxCount: 1 });
this.#request = async (method, params) => {
const payload = { method, params };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -100,7 +100,7 @@ const rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));
/**
* The current version of Ethers.
*/
const version = "6.10.1";
const version = "6.11.0";
/**
* Property helper functions.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
const assert_1 = tslib_1.__importDefault(require("assert"));
const index_js_1 = require("../index.js");
const utils_js_1 = require("./utils.js");
//import { dnsEncode, isValidName, namehash } from "../index.js";
const index_js_2 = require("../index.js");
describe("Tests Namehash", function () {
const tests = (0, utils_js_1.loadTests)("namehash");
for (const test of tests) {
@ -37,94 +37,48 @@ describe("Tests Namehash", function () {
}
}
});
/*
describe("Tests Bad ENS Names", function() {
const badTests: Array<{ ensName: any, prefix: string }> = [
{ ensName: ".", prefix: "missing component" },
{ ensName:"..", prefix: "missing component" },
{ ensName:"ricmoo..eth", prefix: "missing component" },
{ ensName:"ricmoo...eth", prefix: "missing component" },
{ ensName:".foo", prefix: "missing component" },
{ ensName:"foo.", prefix: "missing component" },
{ ensName: 1234, prefix: "not a string" },
{ ensName: true, prefix: "not a string" },
describe("Test dnsEncode", function () {
const tests = [
{ name: "ricmoo.com", result: "0x067269636d6f6f03636f6d00" },
{ name: "ricmoo.com", length: 5, error: "exceeds 5 bytes" },
{
name: "a-very-long-label-without-a-length-override-foo-12345678901234567890",
error: "exceeds 63 bytes"
},
{
name: "a-very-long-label-with-a-length-override-to-255-foo-12345678901234567890",
length: 255, result: "0x48612d766572792d6c6f6e672d6c6162656c2d776974682d612d6c656e6774682d6f766572726964652d746f2d3235352d666f6f2d313233343536373839303132333435363738393000"
},
];
// The empty string is not a valid name, but has a valid namehash
// (the zero hash) as it is the base case for recursion
it("empty ENS name", function() {
assert.ok(!isValidName(""), "!isValidName");
});
for (const { ensName, prefix } of badTests) {
it(`fails on bad ENS name: ${ JSON.stringify(ensName) }`, function() {
assert.ok(!isValidName(ensName), "!isValidName");
assert.throws(() => {
const result = namehash(ensName);
console.log(result);
}, (error) => {
const errorPrefix = `invalid ENS name; ${ prefix }`;
return (error.code === "INVALID_ARGUMENT" &&
error.argument === "name" && error.value === ensName &&
error.message.substring(0, errorPrefix.length) === errorPrefix);
});
for (const test of tests) {
it(`tests dnsEncode: ${test.name}`, function () {
if (test.error) {
assert_1.default.throws(() => {
let result;
if (test.length != null) {
result = (0, index_js_2.dnsEncode)(test.name, test.length);
}
else {
result = (0, index_js_2.dnsEncode)(test.name);
}
console.log("result", result);
}, (error) => {
return ((0, index_js_1.isError)(error, "INVALID_ARGUMENT") &&
error.argument === "name" && error.value === test.name &&
error.message.indexOf(test.error || "") >= 0);
});
}
else {
if (test.length != null) {
assert_1.default.equal((0, index_js_2.dnsEncode)(test.name, test.length), test.result, "dnsEncode(name, length)");
}
else {
assert_1.default.equal((0, index_js_2.dnsEncode)(test.name), test.result, "dnsEncode(name)");
}
}
});
}
});
describe("Tests DNS Encoding", function() {
const tests: Array<{ ensName: string, dnsEncoded: string}> = [
{ ensName: "", dnsEncoded: "0x00" },
{ ensName: "ricmoo.eth", dnsEncoded: "0x067269636d6f6f0365746800" },
];
for (const { ensName, dnsEncoded } of tests) {
it(`computes the DNS Encoding: ${ JSON.stringify(ensName) }`, function() {
assert.equal(dnsEncode(ensName), dnsEncoded, "dnsEncoded");
});
}
});
describe("Tests DNS Names", function() {
const badTests: Array<{ ensName: any, prefix: string}> = [
{ ensName: ".", prefix: "invalid DNS name; missing component" },
{ ensName: "foo..bar", prefix: "invalid DNS name; missing component" },
{ ensName: ".foo", prefix: "invalid DNS name; missing component" },
{ ensName: "foo.", prefix: "invalid DNS name; missing component" },
{ ensName: 1234, prefix: "invalid DNS name; not a string" },
{ ensName: true, prefix: "invalid DNS name; not a string" },
];
for (const { ensName, prefix } of badTests) {
it(`fails on bad DNS name: ${ JSON.stringify(ensName) }`, function() {
assert.throws(() => {
const result = dnsEncode(ensName);
console.log(result);
}, (error) => {
return (error.code === "INVALID_ARGUMENT" &&
error.argument === "name" && error.value === ensName &&
error.message.substring(0, prefix.length) === prefix);
});
});
}
{
const ensName = "foobar012345678901234567890123456789012345678901234567890123456789";
const prefix = "too long";
it(`fails on bad DNS name: ${ JSON.stringify(ensName) }`, function() {
assert.throws(() => {
const result = dnsEncode(ensName);
console.log(result);
}, (error) => {
return (error.code === "INVALID_ARGUMENT" &&
error.argument === "value" && error.value === ensName &&
error.message.substring(0, prefix.length) === prefix);
});
});
}
});
*/
describe("Test EIP-191 Personal Message Hash", function () {
const tests = [
{

@ -1 +1 @@
{"version":3,"file":"test-hash.js","sourceRoot":"","sources":["../../src.ts/_tests/test-hash.ts"],"names":[],"mappings":";;;AAAA,4DAA4B;AAE5B,0CAKqB;AAErB,yCAAsC;AAKtC,iEAAiE;AAEjE,QAAQ,CAAC,gBAAgB,EAAE;IACvB,MAAM,KAAK,GAAG,IAAA,oBAAS,EAAmB,UAAU,CAAC,CAAC;IAEtD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACb,EAAE,CAAC,oBAAqB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAE,EAAE,EAAE;gBAClD,MAAM,MAAM,GAAG,IAAA,mBAAQ,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAEtC,gBAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;gBAEhD,2CAA2C;gBAC3C,IAAI,IAAI,CAAC,OAAO,EAAE;oBACd,gBAAM,CAAC,EAAE,CAAC,IAAA,sBAAW,EAAC,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;iBACvD;YACL,CAAC,CAAC,CAAC;SACN;KACJ;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,EAAE,CAAC,qCAAsC,IAAI,CAAC,KAAM,IAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAE,EA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AQ,CAAE,EAAE,MAAM,EAAE,CAAE,IAAI,CAAE,EAAE;QACzC,EAAE,KAAK,EAAE,CAAE,OAAO,CAAE,EAAE,MAAM,EAAE,CAAE,KAAK,CAAE,EAAE;KAC5C,CAAC;IAEF,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,QAAQ,EAAE;QACtC,EAAE,CAAC,iCAAiC,EAAE;YAClC,gBAAM,CAAC,MAAM,CAAC;gBACV,MAAM,MAAM,GAAG,IAAA,yBAAc,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,CAAC,EAAE,UAAU,KAAK;gBACd,OAAO,CAAC,IAAA,kBAAO,EAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}

@ -205,7 +205,7 @@ describe("Test Provider Transaction operations", function () {
});
describe("Test Networks", function () {
const networks = [
"mainnet", "goerli", "sepolia",
"mainnet", "goerli", "sepolia", "holesky",
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
"base", "base-goerli", "base-sepolia",
"bnb", "bnbt",

File diff suppressed because one or more lines are too long

@ -57,6 +57,16 @@ describe("Tests Unsigned Transaction Serializing", function () {
assert_1.default.equal(tx.unsignedSerialized, test.unsignedLondon, "unsignedLondon");
});
}
for (const test of tests) {
if (!test.unsignedCancun) {
continue;
}
it(`serialized unsigned cancun transaction: ${test.name}`, function () {
const txData = Object.assign({}, test.transaction, { type: 3 });
const tx = index_js_1.Transaction.from(txData);
assert_1.default.equal(tx.unsignedSerialized, test.unsignedCancun, "unsignedCancun");
});
}
});
describe("Tests Signed Transaction Serializing", function () {
const tests = (0, utils_js_1.loadTests)("transactions");
@ -114,6 +124,19 @@ describe("Tests Signed Transaction Serializing", function () {
assert_1.default.equal(tx.serialized, test.signedLondon, "signedLondon");
});
}
for (const test of tests) {
if (!test.signedCancun) {
continue;
}
it(`serialized signed Cancun transaction: ${test.name}`, function () {
const txData = Object.assign({}, test.transaction, {
type: 3,
signature: test.signatureCancun
});
const tx = index_js_1.Transaction.from(txData);
assert_1.default.equal(tx.serialized, test.signedCancun, "signedCancun");
});
}
});
function assertTxUint(actual, _expected, name) {
const expected = (_expected != null ? BigInt(_expected) : null);
@ -197,6 +220,17 @@ describe("Tests Unsigned Transaction Parsing", function () {
assertTxEqual(tx, expected);
});
}
for (const test of tests) {
if (!test.unsignedCancun) {
continue;
}
it(`parses unsigned Cancun transaction: ${test.name}`, function () {
const tx = index_js_1.Transaction.from(test.unsignedCancun);
const expected = addDefaults(test.transaction);
expected.gasPrice = null;
assertTxEqual(tx, expected);
});
}
});
describe("Tests Signed Transaction Parsing", function () {
const tests = (0, utils_js_1.loadTests)("transactions");
@ -238,6 +272,7 @@ describe("Tests Signed Transaction Parsing", function () {
assert_1.default.equal(tx.isLegacy(), true, "isLegacy");
assert_1.default.equal(tx.isBerlin(), false, "isBerlin");
assert_1.default.equal(tx.isLondon(), false, "isLondon");
assert_1.default.equal(tx.isCancun(), false, "isCancun");
assert_1.default.ok(!!tx.signature, "signature:!null");
assert_1.default.equal(tx.signature.r, test.signatureEip155.r, "signature.r");
assert_1.default.equal(tx.signature.s, test.signatureEip155.s, "signature.s");
@ -258,6 +293,7 @@ describe("Tests Signed Transaction Parsing", function () {
assert_1.default.equal(tx.isLegacy(), false, "isLegacy");
assert_1.default.equal(tx.isBerlin(), true, "isBerlin");
assert_1.default.equal(tx.isLondon(), false, "isLondon");
assert_1.default.equal(tx.isCancun(), false, "isCancun");
assert_1.default.ok(!!tx.signature, "signature:!null");
assert_1.default.equal(tx.signature.r, test.signatureBerlin.r, "signature.r");
assert_1.default.equal(tx.signature.s, test.signatureBerlin.s, "signature.s");
@ -277,6 +313,7 @@ describe("Tests Signed Transaction Parsing", function () {
assert_1.default.equal(tx.isLegacy(), false, "isLegacy");
assert_1.default.equal(tx.isBerlin(), false, "isBerlin");
assert_1.default.equal(tx.isLondon(), true, "isLondon");
assert_1.default.equal(tx.isCancun(), false, "isCancun");
assert_1.default.ok(!!tx.signature, "signature:!null");
assert_1.default.equal(tx.signature.r, test.signatureLondon.r, "signature.r");
assert_1.default.equal(tx.signature.s, test.signatureLondon.s, "signature.s");
@ -286,6 +323,30 @@ describe("Tests Signed Transaction Parsing", function () {
}
});
}
for (const test of tests) {
if (!test.signedCancun) {
continue;
}
it(`parses signed Cancun transaction: ${test.name}`, function () {
let tx = index_js_1.Transaction.from(test.signedCancun);
const expected = addDefaults(test.transaction);
expected.gasPrice = null;
for (let i = 0; i < 2; i++) {
assertTxEqual(tx, expected);
assert_1.default.equal(tx.typeName, "eip-4844", "typeName");
assert_1.default.equal(tx.isLegacy(), false, "isLegacy");
assert_1.default.equal(tx.isBerlin(), false, "isBerlin");
assert_1.default.equal(tx.isLondon(), false, "isLondon");
assert_1.default.equal(tx.isCancun(), true, "isCancun");
assert_1.default.ok(!!tx.signature, "signature:!null");
assert_1.default.equal(tx.signature.r, test.signatureCancun.r, "signature.r");
assert_1.default.equal(tx.signature.s, test.signatureCancun.s, "signature.s");
assert_1.default.equal(tx.signature.yParity, parseInt(test.signatureCancun.v), "signature.v");
// Test cloning
tx = tx.clone();
}
});
}
});
describe("Tests Transaction Parameters", function () {
const badData = [

File diff suppressed because one or more lines are too long

@ -173,10 +173,13 @@ export interface TestCaseTransaction {
signedBerlin: string;
unsignedLondon: string;
signedLondon: string;
unsignedCancun: string;
signedCancun: string;
signatureLegacy: TestCaseTransactionSig;
signatureEip155: TestCaseTransactionSig;
signatureBerlin: TestCaseTransactionSig;
signatureLondon: TestCaseTransactionSig;
signatureCancun: TestCaseTransactionSig;
}
export interface TestCaseMnemonicNode {
path: string;

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":";;AA4PC,CAAC"}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":";;AA+PC,CAAC"}

@ -5,5 +5,5 @@ exports.version = void 0;
/**
* The current version of Ethers.
*/
exports.version = "6.10.1";
exports.version = "6.11.0";
//# sourceMappingURL=_version.js.map

File diff suppressed because one or more lines are too long

@ -21,10 +21,10 @@ function setify(items) {
items.forEach((k) => result.add(k));
return Object.freeze(result);
}
const _kwVisibDeploy = "external public payable";
const _kwVisibDeploy = "external public payable override";
const KwVisibDeploy = setify(_kwVisibDeploy.split(" "));
// Visibility Keywords
const _kwVisib = "constant external internal payable private public pure view";
const _kwVisib = "constant external internal payable private public pure view override";
const KwVisib = setify(_kwVisib.split(" "));
const _kwTypes = "constructor error event fallback function receive struct";
const KwTypes = setify(_kwTypes.split(" "));
@ -78,7 +78,8 @@ class TokenString {
// Pops and returns the value of the next token if it is `type`; throws if out of tokens
popType(type) {
if (this.peek().type !== type) {
throw new Error(`expected ${type}; got ${JSON.stringify(this.peek())}`);
const top = this.peek();
throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);
}
return this.pop().text;
}
@ -310,7 +311,7 @@ function consumeGas(tokens) {
}
function consumeEoi(tokens) {
if (tokens.length) {
throw new Error(`unexpected tokens: ${tokens.toString()}`);
throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);
}
}
const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/);

File diff suppressed because one or more lines are too long

@ -361,7 +361,7 @@ export declare class Interface {
* If the matching event cannot be found, returns null.
*/
parseLog(log: {
topics: Array<string>;
topics: ReadonlyArray<string>;
data: string;
}): null | LogDescription;
/**

File diff suppressed because one or more lines are too long

@ -253,7 +253,7 @@ class Interface {
frags.push(fragments_js_1.Fragment.from(a));
}
catch (error) {
console.log("EE", error);
console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, error.message);
}
}
(0, index_js_3.defineProperties)(this, {

File diff suppressed because one or more lines are too long

@ -158,7 +158,7 @@ export declare class BaseContract implements Addressable, EventEmitterable<Contr
*/
static from<T = ContractInterface>(target: string, abi: Interface | InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
}
declare const Contract_base: new (target: string, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
declare const Contract_base: new (target: string | Addressable, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
/**
* A [[BaseContract]] with no type guards on its methods or events.
*/

@ -42,7 +42,7 @@ export declare class ContractFactory<A extends Array<any> = Array<any>, I = Base
* Resolves to the Contract deployed by passing %%args%% into the
* constructor.
*
* This will resovle to the Contract before it has been deployed to the
* This will resolve to the Contract before it has been deployed to the
* network, so the [[BaseContract-waitForDeployment]] should be used before
* sending any transactions to it.
*/

@ -73,7 +73,7 @@ class ContractFactory {
* Resolves to the Contract deployed by passing %%args%% into the
* constructor.
*
* This will resovle to the Contract before it has been deployed to the
* This will resolve to the Contract before it has been deployed to the
* network, so the [[BaseContract-waitForDeployment]] should be used before
* sending any transactions to it.
*/

@ -82,7 +82,7 @@ export declare class ContractTransactionResponse extends TransactionResponse {
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
wait(confirms?: number): Promise<null | ContractTransactionReceipt>;
wait(confirms?: number, timeout?: number): Promise<null | ContractTransactionReceipt>;
}
/**
* A **ContractUnknownEventPayload** is included as the last parameter to

@ -1 +1 @@
{"version":3,"file":"wrappers.d.ts","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EAAE,GAAG,EAAE,kBAAkB,EAAE,mBAAmB,EACtD,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,aAA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AQ,EAAE,EAAE,EAAE,mBAAmB;IAKzE;;;;;;;;OAQG;IACG,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,0BAA0B,CAAC;CAK9F;AAED;;;GAGG;AACH,qBAAc,2BAA4B,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAC7E;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAG,GAAG,CAAC;IAEnB;;OAEG;gBACS,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG;IAKlG;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC;IAIhC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIpD;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAG7D;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,2BAA2B;IAEjE;;OAEG;IACH,SAAiB,QAAQ,EAAE,aAAa,CAAC;IAEzC;;OAEG;IACH,SAAiB,GAAG,EAAE,QAAQ,CAAC;IAE/B;;OAEG;IACH,SAAiB,IAAI,EAAE,MAAM,CAAC;IAE9B;;OAEG;gBACS,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG;IAM5H;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;CACJ"}

@ -111,8 +111,8 @@ class ContractTransactionResponse extends provider_js_1.TransactionResponse {
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
async wait(confirms) {
const receipt = await super.wait(confirms);
async wait(confirms, timeout) {
const receipt = await super.wait(confirms, timeout);
if (receipt == null) {
return null;
}

@ -1 +1 @@
{"version":3,"file":"wrappers.js","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACtE,yBAAyB;AACzB,0DAEkC;AAClC,gDAAmE;AAWnE;;GAEG;AACH,MAAa,QAAS,SAAQ,iBAAG;IAC7B;;OAEG;IACM,SAAS,CAAa;IAE/B;;OAEG;IACM,QAAQ,CAAiB;IAElC;;OAEG;IACM,IAAI,CAAU;IAEvB;;OAEG;IACH,YAAY,GAAQ,EAAE,KAAgB,EAAE,QAAuB;QAC3D,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzB,MAAM,IAAI,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAClE,IAAA,2BAAgB,EAAW,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,IAAI,SAAS,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAEtD;;OAEG;IACH,IAAI,cAAc,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CAClE;AAlCD,4BAkCC;AAED;;GAEG;AACH,MAAa,iBAAkB,SAAQ,iBAAG;IAEtC;;OAEG;IACM,KAAK,CAAS;IAEvB;;OAEG;IACH,YAAY,GAAQ,EAAE,KAAY;QAC9B,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzB,IAAA,2BAAgB,EAAoB,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ;AAdD,8CAcC;AAED;;;GAGG;AACH,MAAa,0BAA2B,SAAQ,gCAAkB;IACrD,MAAM,C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AC;QACpF,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzF,IAAA,2BAAgB,EAAuB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;CACJ;AAvCD,oDAuCC"}

@ -16,5 +16,5 @@ export declare function namehash(name: string): string;
* This is used for various parts of ENS name resolution, such
* as the wildcard resolution.
*/
export declare function dnsEncode(name: string): string;
export declare function dnsEncode(name: string, _maxLength?: number): string;
//# sourceMappingURL=namehash.d.ts.map

@ -1 +1 @@
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAKxD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"}
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAKxD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAanE"}

@ -76,12 +76,11 @@ exports.namehash = namehash;
* This is used for various parts of ENS name resolution, such
* as the wildcard resolution.
*/
function dnsEncode(name) {
function dnsEncode(name, _maxLength) {
const length = (_maxLength != null) ? _maxLength : 63;
(0, index_js_2.assertArgument)(length <= 255, "DNS encoded label cannot exceed 255", "length", length);
return (0, index_js_2.hexlify)((0, index_js_2.concat)(ensNameSplit(name).map((comp) => {
// DNS does not allow components over 63 bytes in length
if (comp.length > 63) {
throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");
}
(0, index_js_2.assertArgument)(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, "name", name);
const bytes = new Uint8Array(comp.length + 1);
bytes.set(comp, 1);
bytes[0] = bytes.length - 1;

@ -1 +1 @@
{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":";;;AACA,iDAA+C;AAC/C,gDAE2B;AAG3B,0DAAuD;AAEvD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,SAAS,cAAc,CAAC,IAAgB;IACpC,IAAA,yBAAc,EAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACpF,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,IAAA,sBAAW,EAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAsB,EAAG,CAAC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AAC,CAAC,CAAE,CAAC,CAAC;KAChF;IAED,OAAO,IAAA,kBAAO,EAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAbD,4BAaC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY,EAAE,UAAmB;IACvD,MAAM,MAAM,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA,CAAC,CAAC,EAAE,CAAC;IAErD,IAAA,yBAAc,EAAC,MAAM,IAAI,GAAG,EAAE,qCAAqC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEvF,OAAO,IAAA,kBAAO,EAAC,IAAA,iBAAM,EAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,IAAA,yBAAc,EAAC,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,SAAU,IAAI,CAAC,SAAS,CAAC,IAAI,CAAE,YAAa,MAAO,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAEjH,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC;AAbD,8BAaC"}

@ -44,5 +44,5 @@ import { WebSocketLike } from "./provider-websocket.js";
* exclusive: [ "etherscan", "infura" ]
* });
*/
export declare function getDefaultProvider(network: string | Networkish | WebSocketLike, options?: any): AbstractProvider;
export declare function getDefaultProvider(network?: string | Networkish | WebSocketLike, options?: any): AbstractProvider;
//# sourceMappingURL=default-provider.d.ts.map

@ -1 +1 @@
{"version":3,"file":"default-provider.d.ts","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,gBAAgB,CAkHhH"}
{"version":3,"file":"default-provider.d.ts","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,gBAAgB,CAkHjH"}

@ -1 +1 @@
{"version":3,"file":"default-provider.js","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":";;;AACA,gDAA2C;AAE3C,yDAAkD;AAClD,+DAAwD;AACxD,qEAA8D;AAC9D,mEAA4D;AAC5D,6DAAsD;AACtD,wDAAwD;AACxD,mEAA4D;AAE5D,iEAA0D;AAC1D,+DAAwD;AACxD,6CAAuC;AACvC,mEAA4D;AAM5D,SAAS,eAAe,CAAC,KAAU;IAC/B,OAAO,CAAC,KAAK,IAAI,OAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,UAAU;QAC9C,OAAM,CAAC,KAAK,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CAAC,MAAM,KAAK,CAAC,EAAE;QAAE,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;KAAE;IAEpD,2EAA2E;IAC3E,uEAAuE;IACvE,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,IAAI,MAAM,GAAG,CAAC,EAAE;QAAE,MAAM,GAAG,CAAC,CAAC;KAAE;IAE/B,kEAAkE;IAClE,6BAA6B;IAC7B,IAAI,aAAa,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;QAAE,MAAM,GAAG,CAAC,CAAC;KAAE;IAEjF,yCAAyC;IACzC,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE;QAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;KAAE;IAE3D,OAAO,IAAI,uCAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AAClE,CAAC;AAlHD,gDAkHC"}

@ -327,6 +327,7 @@ function injectCommonNetworks() {
registerEth("goerli", 5, { ensNetwork: 5 });
registerEth("kovan", 42, { ensNetwork: 42 });
registerEth("sepolia", 11155111, { ensNetwork: 11155111 });
registerEth("holesky", 17000, { ensNetwork: 17000 });
registerEth("classic", 61, {});
registerEth("classicKotti", 6, {});
registerEth("arbitrum", 42161, {

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"provider-browser.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-browser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EACR,YAAY,EAAE,cAAc,EAAE,aAAa,EAC3C,aAAa,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAA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AG,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,YAAY,CAAC,CAAC;IAc1G,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,KAAK;IAkBhE;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYrD,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAiBrE"}

@ -16,6 +16,7 @@ class BrowserProvider extends provider_jsonrpc_js_1.JsonRpcApiPollingProvider {
* %%network%%.
*/
constructor(ethereum, network) {
(0, index_js_1.assertArgument)(ethereum && ethereum.request, "invalid EIP-1193 provider", "ethereum", ethereum);
super(network, { batchMaxCount: 1 });
this.#request = async (method, params) => {
const payload = { method, params };

@ -1 +1 @@
{"version":3,"file":"provider-browser.js","sourceRoot":"","sources":["../../src.ts/providers/provider-browser.ts"],"names":[],"mappings":";;;AAAA,gDAAmD;AAEnD,+DAAkE;AAkBjE,CAAC;AAkBF;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,+CAAyB;IAC1D,QAAQ,CAA6E;IAErF;;;OAGG;IACH,YAAY,QAAyB,EAAE,OAAoB;QACvD,KAAK,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;QAErC,IAAI,CAAC,QAAQ,GAAG,KAAK,EAAE,MAAc,EAAE,MAAwC,EAAE,EAAE;YAC/E,MAAM,OAAO,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,CAAC;YAC9D,IAAI;gBACA,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBAC/C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM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CAAC;IACtF,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAyB;QACrC,IAAI,OAAO,IAAI,IAAI,EAAE;YAAE,OAAO,GAAG,CAAC,CAAC;SAAE;QAErC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE;YAClC,IAAI;gBACA,eAAe;gBACf,MAAM,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,EAAG,CAAC,CAAC;gBAChD,4BAA4B;aAE/B;YAAC,OAAO,KAAU,EAAE;gBACjB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;gBAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;aAC9D;SACJ;QAED,OAAO,MAAM,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACJ;AApGD,0CAoGC"}

@ -8,8 +8,11 @@
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Sepolia Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Polygon (``matic``)

@ -1 +1 @@
{"version":3,"file":"provider-etherscan.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-etherscan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAWhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,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WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAMvE,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIvC;;;;OAIG;IACG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;IAsFtF;;OAEG;IACH,uBAAuB,CAAC,WAAW,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAyBhF;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,KAAK;IAiEvE,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAIlC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC;IAsMjD,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAIpC;;;;OAIG;IACG,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAKtC;;;OAGG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC;IAc7D,mBAAmB,IAAI,OAAO;CAGjC"}

@ -9,8 +9,11 @@
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Sepolia Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Polygon (``matic``)
@ -109,10 +112,16 @@ class EtherscanProvider extends abstract_provider_js_1.AbstractProvider {
return "https:/\/api-goerli.etherscan.io";
case "sepolia":
return "https:/\/api-sepolia.etherscan.io";
case "holesky":
return "https:/\/api-holesky.etherscan.io";
case "arbitrum":
return "https:/\/api.arbiscan.io";
case "arbitrum-goerli":
return "https:/\/api-goerli.arbiscan.io";
case "bnb":
return "https:/\/api.bscscan.com";
case "bnbt":
return "https:/\/api-testnet.bscscan.com";
case "matic":
return "https:/\/api.polygonscan.com";
case "matic-mumbai":
@ -121,10 +130,6 @@ class EtherscanProvider extends abstract_provider_js_1.AbstractProvider {
return "https:/\/api-optimistic.etherscan.io";
case "optimism-goerli":
return "https:/\/api-goerli-optimistic.etherscan.io";
case "bnb":
return "http:/\/api.bscscan.com";
case "bnbt":
return "http:/\/api-testnet.bscscan.com";
default:
}
(0, index_js_4.assertArgument)(false, "unsupported network", "network", this.network);

File diff suppressed because one or more lines are too long

@ -75,7 +75,7 @@ export type FallbackProviderOptions = {
};
/**
* A **FallbackProvider** manages several [[Providers]] providing
* resiliance by switching between slow or misbehaving nodes, security
* resilience by switching between slow or misbehaving nodes, security
* by requiring multiple backends to aggree and performance by allowing
* faster backends to respond earlier.
*

@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.FallbackProvider = void 0;
/**
* A **FallbackProvider** providers resiliance, security and performatnce
* A **FallbackProvider** provides resilience, security and performance
* in a way that is customizable and configurable.
*
* @_section: api/providers/fallback-provider:Fallback Provider [about-fallback-provider]
@ -204,7 +204,7 @@ function getFuzzyMode(quorum, results) {
}
/**
* A **FallbackProvider** manages several [[Providers]] providing
* resiliance by switching between slow or misbehaving nodes, security
* resilience by switching between slow or misbehaving nodes, security
* by requiring multiple backends to aggree and performance by allowing
* faster backends to respond earlier.
*

@ -100,7 +100,7 @@ export type DebugEventJsonRpcApiProvider = {
* cannot change, such as when using INFURA (since the URL dictates the
* network). If the network is assumed static and it does change, this
* can have tragic consequences. For example, this **CANNOT** be used
* with MetaMask, since the used can select a new network from the
* with MetaMask, since the user can select a new network from the
* drop-down at any time.
*
* **``batchStallTime``** - how long (ms) to aggregate requests into a

@ -7,6 +7,7 @@
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Holesky Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)

@ -1 +1 @@
{"version":3,"file":"provider-quicknode.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-quicknode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACe,YAAY,EACjC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+E/C;;;;;;;;GAQG;AACH,qBAAa,iBAAkB,SAAQ,eAAgB,YAAW,oBAAoB;IAClF;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IAExB;;OAEG;gBACS,QAAQ,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM;IAWxD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAO/C,mBAAmB,IAAI,OAAO;IAI9B;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,YAAY;CAgB3E"}
{"version":3,"file":"provider-quicknode.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-quicknode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EACe,YAAY,EACjC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA+E/C;;;;;;;;GAQG;AACH,qBAAa,iBAAkB,SAAQ,eAAgB,YAAW,oBAAoB;IAClF;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IAExB;;OAEG;gBACS,QAAQ,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM;IAWxD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAO/C,mBAAmB,IAAI,OAAO;IAI9B;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,YAAY;CAgB3E"}

@ -8,6 +8,7 @@
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Holesky Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
@ -39,6 +40,8 @@ function getHost(name) {
return "ethers.ethereum-goerli.quiknode.pro";
case "sepolia":
return "ethers.ethereum-sepolia.quiknode.pro";
case "holesky":
return "ethers.ethereum-holesky.quiknode.pro";
case "arbitrum":
return "ethers.arbitrum-mainnet.quiknode.pro";
case "arbitrum-goerli":
@ -77,7 +80,6 @@ function getHost(name) {
are EVM compatible and work with ethers
http://ethers.matic-amoy.quiknode.pro
http://ethers.ethereum-holesky.quiknode.pro
http://ethers.avalanche-mainnet.quiknode.pro
http://ethers.avalanche-testnet.quiknode.pro

@ -1 +1 @@
{"version":3,"file":"provider-quicknode.js","sourceRoot":"","sources":["../../src.ts/providers/provider-quicknode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;AAEH,gDAE2B;AAE3B,iDAAqD;AACrD,6CAAuC;AACvC,+DAAwD;AAOxD,MAAM,YAAY,GAAG,0CAA0C,CAAC;AAEhE,SAAS,OAAO,CAAC,IAAY;IACzB,QAAO,IAAI,EAAE;QACT,KAAK,SAAS;YACV,OAAO,qBAAqB,CAAC;QACjC,KAAK,QAAQ;YACT,OAAO,qCAAqC,CAAC;QACjD,KAAK,SAAS;YACV,OAAO,sCAAsC,CAAC;QAGlD,KAAK,UAAU;YACX,OAAO,sCAAsC,CAAC;QAClD,KAAK,iBAAiB;YAClB,OAAO,qCAAqC,CAAC;QACjD,KAAK,kBAAkB;YACnB,OAAO,sCAAsC,CAAC;QAClD,KAAK,MAAM;YACP,OAAO,kCAAkC,CAAC;QAC9C,KAAK,aAAa;YACd,OAAO,iCAAiC,CAAC;QAC7C,KAAK,aAAa;YACd,OAAO,kCAAkC,CAAC;QAC9C,KAAK,KAAK;YACN,OAAO,yBAAyB,CAAC;QACrC,KAAK,MAAM;YACP,OAAO,iCAAiC,CAAC;QAC7C,KAAK,OAAO;YACR,OAAO,2BAA2B,CAAC;QACvC,KAAK,cAAc;YACf,OAAO,mCAAmC,CAAC;QAC/C,KAAK,UAAU;YACX,OAAO,8BAA8B,CAAC;QAC1C,KAAK,iBAAiB;YAClB,OAAO,qCAAqC,CAAC;QACjD,KAAK,kBAAkB;YACnB,OAAO,sCAAsC,CAAC;QAClD,KAAK,MAAM;YACP,OAAO,0BAA0B,CAAC;KACzC;IAED,IAAA,yBAAc,EAAC,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,IAAI,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,GAAG,IAAI,CAAC;QACzB,mEAAmE;QAEnE,IAAI,KAAK,KAAK,YAAY,EAAE;YACxB,OAAO,CAAC,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;gBACrD,IAAA,kCAAmB,EAAC,mBAAmB,CAAC,CAAC;gBACzC,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC;SACL;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAnDD,8CAmDC"}
{"version":3,"file":"provider-quicknode.js","sourceRoot":"","sources":["../../src.ts/providers/provider-quicknode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;;AAEH,gDAE2B;AAE3B,iDAAqD;AACrD,6CAAuC;AACvC,+DAAwD;AAOxD,MAAM,YAAY,GAAG,0CAA0C,CAAC;AAEhE,SAAS,OAAO,CAAC,IAAY;IACzB,QAAO,IAAI,EAAE;QACT,KAAK,SAAS;YACV,OAAO,qBAAqB,CAAC;QACjC,KAAK,QAAQ;YACT,OAAO,qCAAqC,CAAC;QACjD,KAAK,SAAS;YACV,OAAO,sCAAsC,CAAC;QAClD,KAAK,SAAS;YACV,OAAO,sCAAsC,CAAC;QAElD,KAAK,UAAU;YACX,OAAO,sCAAsC,CAAC;QAClD,KAAK,iBAAiB;YAClB,OAAO,qCAAqC,CAAC;QACjD,KAAK,kBAAkB;YACnB,OAAO,sCAAsC,CAAC;QAClD,KAAK,MAAM;YACP,OAAO,kCAAkC,CAAC;QAC9C,KAAK,aAAa;YACd,OAAO,iCAAiC,CAAC;QAC7C,KAAK,aAAa;YACd,OAAO,kCAAkC,CAAC;QAC9C,KAAK,KAAK;YACN,OAAO,yBAAyB,CAAC;QACrC,KAAK,MAAM;YACP,OAAO,iCAAiC,CAAC;QAC7C,KAAK,OAAO;YACR,OAAO,2BAA2B,CAAC;QACvC,KAAK,cAAc;YACf,OAAO,mCAAmC,CAAC;QAC/C,KAAK,UAAU;YACX,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OAAgB,EAAE,KAAqB;QACrD,IAAI,KAAK,IAAI,IAAI,EAAE;YAAE,KAAK,GAAG,YAAY,CAAC;SAAE;QAE5C,MAAM,OAAO,GAAG,IAAI,uBAAY,CAAC,YAAa,OAAO,CAAC,OAAO,CAAC,IAAI,CAAE,IAAK,KAAM,EAAE,CAAC,CAAC;QACnF,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;QACzB,mEAAmE;QAEnE,IAAI,KAAK,KAAK,YAAY,EAAE;YACxB,OAAO,CAAC,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;gBACrD,IAAA,kCAAmB,EAAC,mBAAmB,CAAC,CAAC;gBACzC,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC;SACL;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAnDD,8CAmDC"}

@ -86,7 +86,7 @@ export interface TransactionRequest {
*/
nonce?: null | number;
/**
* The maximum amount of gas to allow this transaction to consime.
* The maximum amount of gas to allow this transaction to consume.
*/
gasLimit?: null | BigNumberish;
/**

@ -64,6 +64,14 @@ export interface TransactionLike<A = string> {
* The access list for berlin and london transactions.
*/
accessList?: null | AccessListish;
/**
* The maximum fee per blob gas (see [[link-eip-4844]]).
*/
maxFeePerBlobGas?: null | BigNumberish;
/**
* The versioned hashes (see [[link-eip-4844]]).
*/
blobVersionedHashes?: null | Array<string>;
}
/**
* A **Transaction** describes an operation to be executed on
@ -157,6 +165,16 @@ export declare class Transaction implements TransactionLike<string> {
*/
get accessList(): null | AccessList;
set accessList(value: null | AccessListish);
/**
* The max fee per blob gas for Cancun transactions.
*/
get maxFeePerBlobGas(): null | bigint;
set maxFeePerBlobGas(value: null | BigNumberish);
/**
* The BLOB versioned hashes for Cancun transactions.
*/
get blobVersionedHashes(): null | Array<string>;
set blobVersionedHashes(value: null | Array<string>);
/**
* Creates a new Transaction with default values.
*/
@ -252,6 +270,22 @@ export declare class Transaction implements TransactionLike<string> {
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
});
/**
* Returns true if this transaction is an [[link-eip-4844]] BLOB
* transaction.
*
* This provides a Type Guard that the related properties are
* non-null.
*/
isCancun(): this is (Transaction & {
type: 3;
to: string;
accessList: AccessList;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
maxFeePerBlobGas: bigint;
blobVersionedHashes: Array<string>;
});
/**
* Create a copy of this transaciton.
*/

@ -1 +1 @@
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src.ts/transaction/transaction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,SAAS,EAAc,MAAM,oBAAoB,CAAC;AAStE,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAU5D;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,MAAM;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC;IAE/B;;OAEG;IACH,oBAAoB,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC;IAE3C;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC;IAEnC;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH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;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,UAAU,EAAE,UAAU,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,CAAC;IAI3H;;;;;;OAMG;IACH,QAAQ,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAIrM;;OAEG;IACH,KAAK,IAAI,WAAW;IAIpB;;OAEG;IACH,MAAM,IAAI,GAAG;IAuBb;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,WAAW;CA8ClE"}

@ -2,6 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.Transaction = void 0;
const index_js_1 = require("../address/index.js");
const addresses_js_1 = require("../constants/addresses.js");
const index_js_2 = require("../crypto/index.js");
const index_js_3 = require("../utils/index.js");
const accesslist_js_1 = require("./accesslist.js");
@ -49,6 +50,13 @@ function formatNumber(_value, name) {
function formatAccessList(value) {
return (0, accesslist_js_1.accessListify)(value).map((set) => [set.address, set.storageKeys]);
}
function formatHashes(value, param) {
(0, index_js_3.assertArgument)(Array.isArray(value), `invalid ${param}`, "value", value);
for (let i = 0; i < value.length; i++) {
(0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i], 32), "invalid ${ param } hash", `value[${i}]`, value[i]);
}
return value;
}
function _parseLegacy(data) {
const fields = (0, index_js_3.decodeRlp)(data);
(0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 6), "invalid field count for legacy transaction", "data", data);
@ -92,13 +100,14 @@ function _parseLegacy(data) {
return tx;
}
function _serializeLegacy(tx, sig) {
(0, index_js_3.assertArgument)(tx.isLegacy(), "internal check failed; !legacy", "tx", tx);
const fields = [
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.gasPrice || 0, "gasPrice"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? (0, index_js_1.getAddress)(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.gasPrice, "gasPrice"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
];
let chainId = BN_0;
if (tx.chainId != BN_0) {
@ -161,14 +170,12 @@ function _parseEipSignature(tx, fields) {
function _parseEip1559(data) {
const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));
(0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 9 || fields.length === 12), "invalid field count for transaction type: 2", "data", (0, index_js_3.hexlify)(data));
const maxPriorityFeePerGas = handleUint(fields[2], "maxPriorityFeePerGas");
const maxFeePerGas = handleUint(fields[3], "maxFeePerGas");
const tx = {
type: 2,
chainId: handleUint(fields[0], "chainId"),
nonce: handleNumber(fields[1], "nonce"),
maxPriorityFeePerGas: maxPriorityFeePerGas,
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
gasPrice: null,
gasLimit: handleUint(fields[4], "gasLimit"),
to: handleAddress(fields[5]),
@ -185,16 +192,17 @@ function _parseEip1559(data) {
return tx;
}
function _serializeEip1559(tx, sig) {
(0, index_js_3.assertArgument)(tx.isLondon(), "internal check failed; !london", "tx", tx);
const fields = [
formatNumber(tx.chainId || 0, "chainId"),
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas || 0, "maxFeePerGas"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? (0, index_js_1.getAddress)(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
(formatAccessList(tx.accessList || []))
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas, "maxFeePerGas"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
formatAccessList(tx.accessList)
];
if (sig) {
fields.push(formatNumber(sig.yParity, "yParity"));
@ -226,15 +234,16 @@ function _parseEip2930(data) {
return tx;
}
function _serializeEip2930(tx, sig) {
(0, index_js_3.assertArgument)(tx.isBerlin(), "internal check failed; !berlin", "tx", tx);
const fields = [
formatNumber(tx.chainId || 0, "chainId"),
formatNumber(tx.nonce || 0, "nonce"),
formatNumber(tx.gasPrice || 0, "gasPrice"),
formatNumber(tx.gasLimit || 0, "gasLimit"),
((tx.to != null) ? (0, index_js_1.getAddress)(tx.to) : "0x"),
formatNumber(tx.value || 0, "value"),
(tx.data || "0x"),
(formatAccessList(tx.accessList || []))
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.gasPrice, "gasPrice"),
formatNumber(tx.gasLimit, "gasLimit"),
(tx.to || "0x"),
formatNumber(tx.value, "value"),
tx.data,
formatAccessList(tx.accessList)
];
if (sig) {
fields.push(formatNumber(sig.yParity, "recoveryParam"));
@ -243,6 +252,59 @@ function _serializeEip2930(tx, sig) {
}
return (0, index_js_3.concat)(["0x01", (0, index_js_3.encodeRlp)(fields)]);
}
function _parseEip4844(data) {
const fields = (0, index_js_3.decodeRlp)((0, index_js_3.getBytes)(data).slice(1));
(0, index_js_3.assertArgument)(Array.isArray(fields) && (fields.length === 11 || fields.length === 14), "invalid field count for transaction type: 3", "data", (0, index_js_3.hexlify)(data));
const tx = {
type: 3,
chainId: handleUint(fields[0], "chainId"),
nonce: handleNumber(fields[1], "nonce"),
maxPriorityFeePerGas: handleUint(fields[2], "maxPriorityFeePerGas"),
maxFeePerGas: handleUint(fields[3], "maxFeePerGas"),
gasPrice: null,
gasLimit: handleUint(fields[4], "gasLimit"),
to: handleAddress(fields[5]),
value: handleUint(fields[6], "value"),
data: (0, index_js_3.hexlify)(fields[7]),
accessList: handleAccessList(fields[8], "accessList"),
maxFeePerBlobGas: handleUint(fields[9], "maxFeePerBlobGas"),
blobVersionedHashes: fields[10]
};
(0, index_js_3.assertArgument)(tx.to != null, "invalid address for transaction type: 3", "data", data);
(0, index_js_3.assertArgument)(Array.isArray(tx.blobVersionedHashes), "invalid blobVersionedHashes: must be an array", "data", data);
for (let i = 0; i < tx.blobVersionedHashes.length; i++) {
(0, index_js_3.assertArgument)((0, index_js_3.isHexString)(tx.blobVersionedHashes[i], 32), `invalid blobVersionedHash at index ${i}: must be length 32`, "data", data);
}
// Unsigned EIP-4844 Transaction
if (fields.length === 11) {
return tx;
}
tx.hash = (0, index_js_2.keccak256)(data);
_parseEipSignature(tx, fields.slice(11));
return tx;
}
function _serializeEip4844(tx, sig) {
(0, index_js_3.assertArgument)(tx.isCancun(), "internal check failed; !cancun", "tx", tx);
const fields = [
formatNumber(tx.chainId, "chainId"),
formatNumber(tx.nonce, "nonce"),
formatNumber(tx.maxPriorityFeePerGas, "maxPriorityFeePerGas"),
formatNumber(tx.maxFeePerGas, "maxFeePerGas"),
formatNumber(tx.gasLimit, "gasLimit"),
tx.to,
formatNumber(tx.value, "value"),
tx.data,
(formatAccessList(tx.accessList)),
formatNumber(tx.maxFeePerBlobGas, "maxFeePerBlobGas"),
formatHashes(tx.blobVersionedHashes, "blobVersionedHashes")
];
if (sig) {
fields.push(formatNumber(sig.yParity, "yParity"));
fields.push((0, index_js_3.toBeArray)(sig.r));
fields.push((0, index_js_3.toBeArray)(sig.s));
}
return (0, index_js_3.concat)(["0x03", (0, index_js_3.encodeRlp)(fields)]);
}
/**
* A **Transaction** describes an operation to be executed on
* Ethereum by an Externally Owned Account (EOA). It includes
@ -269,6 +331,8 @@ class Transaction {
#chainId;
#sig;
#accessList;
#maxFeePerBlobGas;
#blobVersionedHashes;
/**
* The transaction type.
*
@ -295,6 +359,11 @@ class Transaction {
case "eip-1559":
this.#type = 2;
break;
case 3:
case "cancun":
case "eip-4844":
this.#type = 3;
break;
default:
(0, index_js_3.assertArgument)(false, "unsupported transaction type", "type", value);
}
@ -307,6 +376,7 @@ class Transaction {
case 0: return "legacy";
case 1: return "eip-2930";
case 2: return "eip-1559";
case 3: return "eip-4844";
}
return null;
}
@ -314,7 +384,13 @@ class Transaction {
* The ``to`` address for the transaction or ``null`` if the
* transaction is an ``init`` transaction.
*/
get to() { return this.#to; }
get to() {
const value = this.#to;
if (value == null && this.type === 3) {
return addresses_js_1.ZeroAddress;
}
return value;
}
set to(value) {
this.#to = (value == null) ? null : (0, index_js_1.getAddress)(value);
}
@ -351,7 +427,7 @@ class Transaction {
get maxPriorityFeePerGas() {
const value = this.#maxPriorityFeePerGas;
if (value == null) {
if (this.type === 2) {
if (this.type === 2 || this.type === 3) {
return BN_0;
}
return null;
@ -368,7 +444,7 @@ class Transaction {
get maxFeePerGas() {
const value = this.#maxFeePerGas;
if (value == null) {
if (this.type === 2) {
if (this.type === 2 || this.type === 3) {
return BN_0;
}
return null;
@ -412,7 +488,9 @@ class Transaction {
get accessList() {
const value = this.#accessList || null;
if (value == null) {
if (this.type === 1 || this.type === 2) {
if (this.type === 1 || this.type === 2 || this.type === 3) {
// @TODO: in v7, this should assign the value or become
// a live object itself, otherwise mutation is inconsistent
return [];
}
return null;
@ -422,6 +500,41 @@ class Transaction {
set accessList(value) {
this.#accessList = (value == null) ? null : (0, accesslist_js_1.accessListify)(value);
}
/**
* The max fee per blob gas for Cancun transactions.
*/
get maxFeePerBlobGas() {
const value = this.#maxFeePerBlobGas;
if (value == null && this.type === 3) {
return BN_0;
}
return value;
}
set maxFeePerBlobGas(value) {
this.#maxFeePerBlobGas = (value == null) ? null : (0, index_js_3.getBigInt)(value, "maxFeePerBlobGas");
}
/**
* The BLOB versioned hashes for Cancun transactions.
*/
get blobVersionedHashes() {
// @TODO: Mutation is inconsistent; if unset, the returned value
// cannot mutate the object, if set it can
let value = this.#blobVersionedHashes;
if (value == null && this.type === 3) {
return [];
}
return value;
}
set blobVersionedHashes(value) {
if (value != null) {
(0, index_js_3.assertArgument)(Array.isArray(value), "blobVersionedHashes must be an Array", "value", value);
value = value.slice();
for (let i = 0; i < value.length; i++) {
(0, index_js_3.assertArgument)((0, index_js_3.isHexString)(value[i], 32), "invalid blobVersionedHash", `value[${i}]`, value[i]);
}
}
this.#blobVersionedHashes = value;
}
/**
* Creates a new Transaction with default values.
*/
@ -429,15 +542,17 @@ class Transaction {
this.#type = null;
this.#to = null;
this.#nonce = 0;
this.#gasLimit = BigInt(0);
this.#gasLimit = BN_0;
this.#gasPrice = null;
this.#maxPriorityFeePerGas = null;
this.#maxFeePerGas = null;
this.#data = "0x";
this.#value = BigInt(0);
this.#chainId = BigInt(0);
this.#value = BN_0;
this.#chainId = BN_0;
this.#sig = null;
this.#accessList = null;
this.#maxFeePerBlobGas = null;
this.#blobVersionedHashes = null;
}
/**
* The transaction hash, if signed. Otherwise, ``null``.
@ -482,7 +597,6 @@ class Transaction {
* transaction are non-null.
*/
isSigned() {
//isSigned(): this is SignedTransaction {
return this.signature != null;
}
/**
@ -500,6 +614,8 @@ class Transaction {
return _serializeEip2930(this, this.signature);
case 2:
return _serializeEip1559(this, this.signature);
case 3:
return _serializeEip4844(this, this.signature);
}
(0, index_js_3.assert)(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".serialized" });
}
@ -517,6 +633,8 @@ class Transaction {
return _serializeEip2930(this);
case 2:
return _serializeEip1559(this);
case 3:
return _serializeEip4844(this);
}
(0, index_js_3.assert)(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: ".unsignedSerialized" });
}
@ -525,7 +643,13 @@ class Transaction {
* supported transaction type.
*/
inferType() {
return (this.inferTypes().pop());
const types = this.inferTypes();
// Prefer London (EIP-1559) over Cancun (BLOb)
if (types.indexOf(2) >= 0) {
return 2;
}
// Return the highest inferred type
return (types.pop());
}
/**
* Validates the explicit properties and returns a list of compatible
@ -536,6 +660,7 @@ class Transaction {
const hasGasPrice = this.gasPrice != null;
const hasFee = (this.maxFeePerGas != null || this.maxPriorityFeePerGas != null);
const hasAccessList = (this.accessList != null);
const hasBlob = (this.#maxFeePerBlobGas != null || this.#blobVersionedHashes);
//if (hasGasPrice && hasFee) {
// throw new Error("transaction cannot have gasPrice and maxFeePerGas");
//}
@ -566,10 +691,14 @@ class Transaction {
types.push(1);
types.push(2);
}
else if (hasBlob && this.to) {
types.push(3);
}
else {
types.push(0);
types.push(1);
types.push(2);
types.push(3);
}
}
types.sort();
@ -605,6 +734,16 @@ class Transaction {
isLondon() {
return (this.type === 2);
}
/**
* Returns true if this transaction is an [[link-eip-4844]] BLOB
* transaction.
*
* This provides a Type Guard that the related properties are
* non-null.
*/
isCancun() {
return (this.type === 3);
}
/**
* Create a copy of this transaciton.
*/
@ -653,6 +792,7 @@ class Transaction {
switch (payload[0]) {
case 1: return Transaction.from(_parseEip2930(payload));
case 2: return Transaction.from(_parseEip1559(payload));
case 3: return Transaction.from(_parseEip4844(payload));
}
(0, index_js_3.assert)(false, "unsupported transaction type", "UNSUPPORTED_OPERATION", { operation: "from" });
}
@ -678,6 +818,9 @@ class Transaction {
if (tx.maxFeePerGas != null) {
result.maxFeePerGas = tx.maxFeePerGas;
}
if (tx.maxFeePerBlobGas != null) {
result.maxFeePerBlobGas = tx.maxFeePerBlobGas;
}
if (tx.data != null) {
result.data = tx.data;
}
@ -693,6 +836,9 @@ class Transaction {
if (tx.accessList != null) {
result.accessList = tx.accessList;
}
if (tx.blobVersionedHashes != null) {
result.blobVersionedHashes = tx.blobVersionedHashes;
}
if (tx.hash != null) {
(0, index_js_3.assertArgument)(result.isSigned(), "unsigned transaction cannot define hash", "tx", tx);
(0, index_js_3.assertArgument)(result.hash === tx.hash, "hash mismatch", "tx", tx);

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
import assert from "assert";
import { hashMessage, namehash, isValidName, solidityPacked, solidityPackedKeccak256, solidityPackedSha256, isError } from "../index.js";
import { loadTests } from "./utils.js";
//import { dnsEncode, isValidName, namehash } from "../index.js";
import { dnsEncode } from "../index.js";
describe("Tests Namehash", function () {
const tests = loadTests("namehash");
for (const test of tests) {
@ -34,94 +34,48 @@ describe("Tests Namehash", function () {
}
}
});
/*
describe("Tests Bad ENS Names", function() {
const badTests: Array<{ ensName: any, prefix: string }> = [
{ ensName: ".", prefix: "missing component" },
{ ensName:"..", prefix: "missing component" },
{ ensName:"ricmoo..eth", prefix: "missing component" },
{ ensName:"ricmoo...eth", prefix: "missing component" },
{ ensName:".foo", prefix: "missing component" },
{ ensName:"foo.", prefix: "missing component" },
{ ensName: 1234, prefix: "not a string" },
{ ensName: true, prefix: "not a string" },
describe("Test dnsEncode", function () {
const tests = [
{ name: "ricmoo.com", result: "0x067269636d6f6f03636f6d00" },
{ name: "ricmoo.com", length: 5, error: "exceeds 5 bytes" },
{
name: "a-very-long-label-without-a-length-override-foo-12345678901234567890",
error: "exceeds 63 bytes"
},
{
name: "a-very-long-label-with-a-length-override-to-255-foo-12345678901234567890",
length: 255, result: "0x48612d766572792d6c6f6e672d6c6162656c2d776974682d612d6c656e6774682d6f766572726964652d746f2d3235352d666f6f2d313233343536373839303132333435363738393000"
},
];
// The empty string is not a valid name, but has a valid namehash
// (the zero hash) as it is the base case for recursion
it("empty ENS name", function() {
assert.ok(!isValidName(""), "!isValidName");
});
for (const { ensName, prefix } of badTests) {
it(`fails on bad ENS name: ${ JSON.stringify(ensName) }`, function() {
assert.ok(!isValidName(ensName), "!isValidName");
assert.throws(() => {
const result = namehash(ensName);
console.log(result);
}, (error) => {
const errorPrefix = `invalid ENS name; ${ prefix }`;
return (error.code === "INVALID_ARGUMENT" &&
error.argument === "name" && error.value === ensName &&
error.message.substring(0, errorPrefix.length) === errorPrefix);
});
for (const test of tests) {
it(`tests dnsEncode: ${test.name}`, function () {
if (test.error) {
assert.throws(() => {
let result;
if (test.length != null) {
result = dnsEncode(test.name, test.length);
}
else {
result = dnsEncode(test.name);
}
console.log("result", result);
}, (error) => {
return (isError(error, "INVALID_ARGUMENT") &&
error.argument === "name" && error.value === test.name &&
error.message.indexOf(test.error || "") >= 0);
});
}
else {
if (test.length != null) {
assert.equal(dnsEncode(test.name, test.length), test.result, "dnsEncode(name, length)");
}
else {
assert.equal(dnsEncode(test.name), test.result, "dnsEncode(name)");
}
}
});
}
});
describe("Tests DNS Encoding", function() {
const tests: Array<{ ensName: string, dnsEncoded: string}> = [
{ ensName: "", dnsEncoded: "0x00" },
{ ensName: "ricmoo.eth", dnsEncoded: "0x067269636d6f6f0365746800" },
];
for (const { ensName, dnsEncoded } of tests) {
it(`computes the DNS Encoding: ${ JSON.stringify(ensName) }`, function() {
assert.equal(dnsEncode(ensName), dnsEncoded, "dnsEncoded");
});
}
});
describe("Tests DNS Names", function() {
const badTests: Array<{ ensName: any, prefix: string}> = [
{ ensName: ".", prefix: "invalid DNS name; missing component" },
{ ensName: "foo..bar", prefix: "invalid DNS name; missing component" },
{ ensName: ".foo", prefix: "invalid DNS name; missing component" },
{ ensName: "foo.", prefix: "invalid DNS name; missing component" },
{ ensName: 1234, prefix: "invalid DNS name; not a string" },
{ ensName: true, prefix: "invalid DNS name; not a string" },
];
for (const { ensName, prefix } of badTests) {
it(`fails on bad DNS name: ${ JSON.stringify(ensName) }`, function() {
assert.throws(() => {
const result = dnsEncode(ensName);
console.log(result);
}, (error) => {
return (error.code === "INVALID_ARGUMENT" &&
error.argument === "name" && error.value === ensName &&
error.message.substring(0, prefix.length) === prefix);
});
});
}
{
const ensName = "foobar012345678901234567890123456789012345678901234567890123456789";
const prefix = "too long";
it(`fails on bad DNS name: ${ JSON.stringify(ensName) }`, function() {
assert.throws(() => {
const result = dnsEncode(ensName);
console.log(result);
}, (error) => {
return (error.code === "INVALID_ARGUMENT" &&
error.argument === "value" && error.value === ensName &&
error.message.substring(0, prefix.length) === prefix);
});
});
}
});
*/
describe("Test EIP-191 Personal Message Hash", function () {
const tests = [
{

@ -1 +1 @@
{"version":3,"file":"test-hash.js","sourceRoot":"","sources":["../../src.ts/_tests/test-hash.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACH,WAAW,EACX,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,uBAAuB,EAAE,oBAAoB,EAC7D,OAAO,EACV,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAKtC,iEAAiE;AAEjE,QAAQ,CAAC,gBAAgB,EAAE;IACvB,MAAM,KAAK,GAAG,SAAS,CAAmB,UAAU,CAAC,CAAC;IAEtD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACb,EAAE,CAAC,oBAAqB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAE,EAAE,EAAE;gBAClD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAEtC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;gBAEhD,2CAA2C;gBAC3C,IAAI,IAAI,CAAC,OAAO,EAAE;oBACd,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;iBACvD;YACL,CAAC,CAAC,CAAC;SACN;KACJ;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACtB,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,EAAE,CAAC,q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AAE,OAAO,CAAE,EAAE,MAAM,EAAE,CAAE,CAAC,CAAE,EAAE;QACrC,EAAE,KAAK,EAAE,CAAE,QAAQ,CAAE,EAAE,MAAM,EAAE,CAAE,IAAI,CAAE,EAAE;QACzC,EAAE,KAAK,EAAE,CAAE,OAAO,CAAE,EAAE,MAAM,EAAE,CAAE,KAAK,CAAE,EAAE;KAC5C,CAAC;IAEF,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,QAAQ,EAAE;QACtC,EAAE,CAAC,iCAAiC,EAAE;YAClC,MAAM,CAAC,MAAM,CAAC;gBACV,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACxB,CAAC,EAAE,UAAU,KAAK;gBACd,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;KACN;AACL,CAAC,CAAC,CAAC"}

@ -202,7 +202,7 @@ describe("Test Provider Transaction operations", function () {
});
describe("Test Networks", function () {
const networks = [
"mainnet", "goerli", "sepolia",
"mainnet", "goerli", "sepolia", "holesky",
"arbitrum", "arbitrum-goerli", "arbitrum-sepolia",
"base", "base-goerli", "base-sepolia",
"bnb", "bnbt",

File diff suppressed because one or more lines are too long

@ -54,6 +54,16 @@ describe("Tests Unsigned Transaction Serializing", function () {
assert.equal(tx.unsignedSerialized, test.unsignedLondon, "unsignedLondon");
});
}
for (const test of tests) {
if (!test.unsignedCancun) {
continue;
}
it(`serialized unsigned cancun transaction: ${test.name}`, function () {
const txData = Object.assign({}, test.transaction, { type: 3 });
const tx = Transaction.from(txData);
assert.equal(tx.unsignedSerialized, test.unsignedCancun, "unsignedCancun");
});
}
});
describe("Tests Signed Transaction Serializing", function () {
const tests = loadTests("transactions");
@ -111,6 +121,19 @@ describe("Tests Signed Transaction Serializing", function () {
assert.equal(tx.serialized, test.signedLondon, "signedLondon");
});
}
for (const test of tests) {
if (!test.signedCancun) {
continue;
}
it(`serialized signed Cancun transaction: ${test.name}`, function () {
const txData = Object.assign({}, test.transaction, {
type: 3,
signature: test.signatureCancun
});
const tx = Transaction.from(txData);
assert.equal(tx.serialized, test.signedCancun, "signedCancun");
});
}
});
function assertTxUint(actual, _expected, name) {
const expected = (_expected != null ? BigInt(_expected) : null);
@ -194,6 +217,17 @@ describe("Tests Unsigned Transaction Parsing", function () {
assertTxEqual(tx, expected);
});
}
for (const test of tests) {
if (!test.unsignedCancun) {
continue;
}
it(`parses unsigned Cancun transaction: ${test.name}`, function () {
const tx = Transaction.from(test.unsignedCancun);
const expected = addDefaults(test.transaction);
expected.gasPrice = null;
assertTxEqual(tx, expected);
});
}
});
describe("Tests Signed Transaction Parsing", function () {
const tests = loadTests("transactions");
@ -235,6 +269,7 @@ describe("Tests Signed Transaction Parsing", function () {
assert.equal(tx.isLegacy(), true, "isLegacy");
assert.equal(tx.isBerlin(), false, "isBerlin");
assert.equal(tx.isLondon(), false, "isLondon");
assert.equal(tx.isCancun(), false, "isCancun");
assert.ok(!!tx.signature, "signature:!null");
assert.equal(tx.signature.r, test.signatureEip155.r, "signature.r");
assert.equal(tx.signature.s, test.signatureEip155.s, "signature.s");
@ -255,6 +290,7 @@ describe("Tests Signed Transaction Parsing", function () {
assert.equal(tx.isLegacy(), false, "isLegacy");
assert.equal(tx.isBerlin(), true, "isBerlin");
assert.equal(tx.isLondon(), false, "isLondon");
assert.equal(tx.isCancun(), false, "isCancun");
assert.ok(!!tx.signature, "signature:!null");
assert.equal(tx.signature.r, test.signatureBerlin.r, "signature.r");
assert.equal(tx.signature.s, test.signatureBerlin.s, "signature.s");
@ -274,6 +310,7 @@ describe("Tests Signed Transaction Parsing", function () {
assert.equal(tx.isLegacy(), false, "isLegacy");
assert.equal(tx.isBerlin(), false, "isBerlin");
assert.equal(tx.isLondon(), true, "isLondon");
assert.equal(tx.isCancun(), false, "isCancun");
assert.ok(!!tx.signature, "signature:!null");
assert.equal(tx.signature.r, test.signatureLondon.r, "signature.r");
assert.equal(tx.signature.s, test.signatureLondon.s, "signature.s");
@ -283,6 +320,30 @@ describe("Tests Signed Transaction Parsing", function () {
}
});
}
for (const test of tests) {
if (!test.signedCancun) {
continue;
}
it(`parses signed Cancun transaction: ${test.name}`, function () {
let tx = Transaction.from(test.signedCancun);
const expected = addDefaults(test.transaction);
expected.gasPrice = null;
for (let i = 0; i < 2; i++) {
assertTxEqual(tx, expected);
assert.equal(tx.typeName, "eip-4844", "typeName");
assert.equal(tx.isLegacy(), false, "isLegacy");
assert.equal(tx.isBerlin(), false, "isBerlin");
assert.equal(tx.isLondon(), false, "isLondon");
assert.equal(tx.isCancun(), true, "isCancun");
assert.ok(!!tx.signature, "signature:!null");
assert.equal(tx.signature.r, test.signatureCancun.r, "signature.r");
assert.equal(tx.signature.s, test.signatureCancun.s, "signature.s");
assert.equal(tx.signature.yParity, parseInt(test.signatureCancun.v), "signature.v");
// Test cloning
tx = tx.clone();
}
});
}
});
describe("Tests Transaction Parameters", function () {
const badData = [

File diff suppressed because one or more lines are too long

@ -173,10 +173,13 @@ export interface TestCaseTransaction {
signedBerlin: string;
unsignedLondon: string;
signedLondon: string;
unsignedCancun: string;
signedCancun: string;
signatureLegacy: TestCaseTransactionSig;
signatureEip155: TestCaseTransactionSig;
signatureBerlin: TestCaseTransactionSig;
signatureLondon: TestCaseTransactionSig;
signatureCancun: TestCaseTransactionSig;
}
export interface TestCaseMnemonicNode {
path: string;

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":"AA4PC,CAAC"}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src.ts/_tests/types.ts"],"names":[],"mappings":"AA+PC,CAAC"}

@ -2,5 +2,5 @@
/**
* The current version of Ethers.
*/
export const version = "6.10.1";
export const version = "6.11.0";
//# sourceMappingURL=_version.js.map

File diff suppressed because one or more lines are too long

@ -18,10 +18,10 @@ function setify(items) {
items.forEach((k) => result.add(k));
return Object.freeze(result);
}
const _kwVisibDeploy = "external public payable";
const _kwVisibDeploy = "external public payable override";
const KwVisibDeploy = setify(_kwVisibDeploy.split(" "));
// Visibility Keywords
const _kwVisib = "constant external internal payable private public pure view";
const _kwVisib = "constant external internal payable private public pure view override";
const KwVisib = setify(_kwVisib.split(" "));
const _kwTypes = "constructor error event fallback function receive struct";
const KwTypes = setify(_kwTypes.split(" "));
@ -75,7 +75,8 @@ class TokenString {
// Pops and returns the value of the next token if it is `type`; throws if out of tokens
popType(type) {
if (this.peek().type !== type) {
throw new Error(`expected ${type}; got ${JSON.stringify(this.peek())}`);
const top = this.peek();
throw new Error(`expected ${type}; got ${top.type} ${JSON.stringify(top.text)}`);
}
return this.pop().text;
}
@ -307,7 +308,7 @@ function consumeGas(tokens) {
}
function consumeEoi(tokens) {
if (tokens.length) {
throw new Error(`unexpected tokens: ${tokens.toString()}`);
throw new Error(`unexpected tokens at offset ${tokens.offset}: ${tokens.toString()}`);
}
}
const regexArrayType = new RegExp(/^(.*)\[([0-9]*)\]$/);

File diff suppressed because one or more lines are too long

@ -361,7 +361,7 @@ export declare class Interface {
* If the matching event cannot be found, returns null.
*/
parseLog(log: {
topics: Array<string>;
topics: ReadonlyArray<string>;
data: string;
}): null | LogDescription;
/**

File diff suppressed because one or more lines are too long

@ -245,7 +245,7 @@ export class Interface {
frags.push(Fragment.from(a));
}
catch (error) {
console.log("EE", error);
console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`, error.message);
}
}
defineProperties(this, {

File diff suppressed because one or more lines are too long

@ -158,7 +158,7 @@ export declare class BaseContract implements Addressable, EventEmitterable<Contr
*/
static from<T = ContractInterface>(target: string, abi: Interface | InterfaceAbi, runner?: null | ContractRunner): BaseContract & Omit<T, keyof BaseContract>;
}
declare const Contract_base: new (target: string, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
declare const Contract_base: new (target: string | Addressable, abi: Interface | InterfaceAbi, runner?: ContractRunner | null | undefined) => BaseContract & Omit<ContractInterface, keyof BaseContract>;
/**
* A [[BaseContract]] with no type guards on its methods or events.
*/

@ -42,7 +42,7 @@ export declare class ContractFactory<A extends Array<any> = Array<any>, I = Base
* Resolves to the Contract deployed by passing %%args%% into the
* constructor.
*
* This will resovle to the Contract before it has been deployed to the
* This will resolve to the Contract before it has been deployed to the
* network, so the [[BaseContract-waitForDeployment]] should be used before
* sending any transactions to it.
*/

@ -70,7 +70,7 @@ export class ContractFactory {
* Resolves to the Contract deployed by passing %%args%% into the
* constructor.
*
* This will resovle to the Contract before it has been deployed to the
* This will resolve to the Contract before it has been deployed to the
* network, so the [[BaseContract-waitForDeployment]] should be used before
* sending any transactions to it.
*/

@ -82,7 +82,7 @@ export declare class ContractTransactionResponse extends TransactionResponse {
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
wait(confirms?: number): Promise<null | ContractTransactionReceipt>;
wait(confirms?: number, timeout?: number): Promise<null | ContractTransactionReceipt>;
}
/**
* A **ContractUnknownEventPayload** is included as the last parameter to

@ -1 +1 @@
{"version":3,"file":"wrappers.d.ts","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,EAAE,GAAG,EAAE,kBAAkB,EAAE,mBAAmB,EACtD,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAoB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EACR,QAAQ,EACX,MAAM,uBAAuB,CAAC;AAE/B,OAAO,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ED;;;GAGG;AACH,qBAAc,2BAA4B,SAAQ,YAAY,CAAC,iBAAiB,CAAC;IAC7E;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAG,GAAG,CAAC;IAEnB;;OAEG;gBACS,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,GAAG;IAKlG;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC;IAIhC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIpD;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAG7D;AAED;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,2BAA2B;IAEjE;;OAEG;IACH,SAAiB,QAAQ,EAAE,aAAa,CAAC;IAEzC;;OAEG;IACH,SAAiB,GAAG,EAAE,QAAQ,CAAC;IAE/B;;OAEG;IACH,SAAiB,IAAI,EAAE,MAAM,CAAC;IAE9B;;OAEG;gBACS,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG;IAM5H;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;CACJ"}

@ -105,8 +105,8 @@ export class ContractTransactionResponse extends TransactionResponse {
* and the transaction has not been mined, otherwise this will
* wait until enough confirmations have completed.
*/
async wait(confirms) {
const receipt = await super.wait(confirms);
async wait(confirms, timeout) {
const receipt = await super.wait(confirms, timeout);
if (receipt == null) {
return null;
}

@ -1 +1 @@
{"version":3,"file":"wrappers.js","sourceRoot":"","sources":["../../src.ts/contract/wrappers.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,yBAAyB;AACzB,OAAO,EACI,GAAG,EAAE,kBAAkB,EA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AI,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACzF,gBAAgB,CAAuB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;CACJ"}

@ -16,5 +16,5 @@ export declare function namehash(name: string): string;
* This is used for various parts of ENS name resolution, such
* as the wildcard resolution.
*/
export declare function dnsEncode(name: string): string;
export declare function dnsEncode(name: string, _maxLength?: number): string;
//# sourceMappingURL=namehash.d.ts.map

@ -1 +1 @@
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAKxD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"}
{"version":3,"file":"namehash.d.ts","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAKxD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAanE"}

@ -70,12 +70,11 @@ export function namehash(name) {
* This is used for various parts of ENS name resolution, such
* as the wildcard resolution.
*/
export function dnsEncode(name) {
export function dnsEncode(name, _maxLength) {
const length = (_maxLength != null) ? _maxLength : 63;
assertArgument(length <= 255, "DNS encoded label cannot exceed 255", "length", length);
return hexlify(concat(ensNameSplit(name).map((comp) => {
// DNS does not allow components over 63 bytes in length
if (comp.length > 63) {
throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");
}
assertArgument(comp.length <= length, `label ${JSON.stringify(name)} exceeds ${length} bytes`, "name", name);
const bytes = new Uint8Array(comp.length + 1);
bytes.set(comp, 1);
bytes[0] = bytes.length - 1;

@ -1 +1 @@
{"version":3,"file":"namehash.js","sourceRoot":"","sources":["../../src.ts/hash/namehash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACH,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,WAAW,EAC/C,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACjC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEd,SAAS,cAAc,CAAC,IAAgB;IACpC,cAAc,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,mCAAmC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACpF,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAsB,EAAG,CAAC;IAErC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EA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GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,UAAmB;IACvD,MAAM,MAAM,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA,CAAC,CAAC,EAAE,CAAC;IAErD,cAAc,CAAC,MAAM,IAAI,GAAG,EAAE,qCAAqC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEvF,OAAO,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAClD,cAAc,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE,SAAU,IAAI,CAAC,SAAS,CAAC,IAAI,CAAE,YAAa,MAAO,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAEjH,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACnB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChB,CAAC"}

@ -44,5 +44,5 @@ import { WebSocketLike } from "./provider-websocket.js";
* exclusive: [ "etherscan", "infura" ]
* });
*/
export declare function getDefaultProvider(network: string | Networkish | WebSocketLike, options?: any): AbstractProvider;
export declare function getDefaultProvider(network?: string | Networkish | WebSocketLike, options?: any): AbstractProvider;
//# sourceMappingURL=default-provider.d.ts.map

@ -1 +1 @@
{"version":3,"file":"default-provider.d.ts","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,gBAAgB,CAkHhH"}
{"version":3,"file":"default-provider.d.ts","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,gBAAgB,CAkHjH"}

@ -1 +1 @@
{"version":3,"file":"default-provider.js","sourceRoot":"","sources":["../../src.ts/providers/default-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,wDAAwD;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBA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AAM,EAAE,CAAC,CAAC;AAClE,CAAC"}

@ -323,6 +323,7 @@ function injectCommonNetworks() {
registerEth("goerli", 5, { ensNetwork: 5 });
registerEth("kovan", 42, { ensNetwork: 42 });
registerEth("sepolia", 11155111, { ensNetwork: 11155111 });
registerEth("holesky", 17000, { ensNetwork: 17000 });
registerEth("classic", 61, {});
registerEth("classicKotti", 6, {});
registerEth("arbitrum", 42161, {

File diff suppressed because one or more lines are too long

@ -1 +1 @@
{"version":3,"file":"provider-browser.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-browser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EACR,YAAY,EAAE,cAAc,EAAE,aAAa,EAC3C,aAAa,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CACjG;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;KAAE,CAAA;CAClD,GAAG;IACA,MAAM,EAAE,sBAAsB,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAA;CACd,GAAG;IACA,MAAM,EAAE,qBAAqB,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAA;CACf,CAAC;AAGF;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,yBAAyB;;IAG1D;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,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;KAAE,CAAA;CAClD,GAAG;IACA,MAAM,EAAE,sBAAsB,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAA;CACd,GAAG;IACA,MAAM,EAAE,qBAAqB,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAA;CACf,CAAC;AAGF;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,yBAAyB;;IAG1D;;;OAGG;gBACS,QAAQ,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,UAAU;IAuBrD,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAM5E,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,YAAY,CAAC,CAAC;IAc1G,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,KAAK;IAkBhE;;OAEG;IACG,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAYrD,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAiBrE"}

@ -13,6 +13,7 @@ export class BrowserProvider extends JsonRpcApiPollingProvider {
* %%network%%.
*/
constructor(ethereum, network) {
assertArgument(ethereum && ethereum.request, "invalid EIP-1193 provider", "ethereum", ethereum);
super(network, { batchMaxCount: 1 });
this.#request = async (method, params) => {
const payload = { method, params };

@ -1 +1 @@
{"version":3,"file":"provider-browser.js","sourceRoot":"","sources":["../../src.ts/providers/provider-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBA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M,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACJ"}

@ -8,8 +8,11 @@
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Sepolia Testnet (``holesky``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
* - Polygon (``matic``)

@ -1 +1 @@
{"version":3,"file":"provider-etherscan.d.ts","sourceRoot":"","sources":["../../src.ts/providers/provider-etherscan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAWhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AASxD;;;;;;GAMG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC,MAAM,EAAE,aAAa,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,GAAG;IACA,MAAM,EAAE,gBAAgB,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,GAAG,CAAA;CACd,GAAG;IACA,MAAM,EAAE,cAAc,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;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