admin: update dist files

This commit is contained in:
Richard Moore 2024-02-03 00:19:51 -05:00
parent 7b4f2c1a74
commit cac1da1f91
43 changed files with 746 additions and 79 deletions

1
.gitignore vendored

@ -1,6 +1,7 @@
node_modules/** node_modules/**
output/** output/**
**/*.save
**/*.swp **/*.swp
**/*.tgz **/*.tgz
dist/*.gz dist/*.gz

@ -3,36 +3,10 @@ Change Log
This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated. This change log is maintained by `src.ts/_admin/update-changelog.ts` but may also be manually updated.
ethers/v6.11.0 (2024-02-02 04:18) ethers/v6.11.0 (2024-02-03 00:18)
---------------------------------
- tests: added test for gasless ENS-DNS resolution ([6bf19c1](https://github.com/ethers-io/ethers.js/commit/6bf19c19370b27271c677de967e5cdef95231b8b)).
- 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)).
- Merge: c6e6c432 9c1e82e1 Merge branch 'wip-4844' into wip-v6.11 ([561f7a0](https://github.com/ethers-io/ethers.js/commit/561f7a0f38151ea4cb8f1183ec5f1449efb28c38)).
- 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)).
- tests: add tests for EIP-712 payload aliases ([a513e40](https://github.com/ethers-io/ethers.js/commit/a513e406ad0f6125acce446ff58367356130a12c)).
- 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)).
- tests: rename test suite to follow naming convention ([ce93cb1](https://github.com/ethers-io/ethers.js/commit/ce93cb1eedc95781ee93c8d2b0de38f04d3780ef)).
- Updated thrid-part provider URLs for QuickNode ([2b4891d](https://github.com/ethers-io/ethers.js/commit/2b4891d86e72e849079cb1dc98b18e158b0c0620)).
- tests: added testing for correct thrid-party URLs ([fed28e4](https://github.com/ethers-io/ethers.js/commit/fed28e4a8ce052b7976a70747aefd5fa13e6ac9d)).
- 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)).
- 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)).
ethers/v6.11.0 (2024-02-02 04:17)
--------------------------------- ---------------------------------
- Added EIP-4844 fields to Provider classes and formatter ([#4570](https://github.com/ethers-io/ethers.js/issues/4570); [7b4f2c1](https://github.com/ethers-io/ethers.js/commit/7b4f2c1a74db411829b5e8ef758bfa2ee21e5890)).
- 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)). - 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)). - 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)). - 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)).

60
dist/ethers.js vendored

@ -13927,6 +13927,16 @@ class Block {
* The total gas used in this block. * The total gas used in this block.
*/ */
gasUsed; gasUsed;
/**
* The total amount of blob gas consumed by the transactions
* within the block. See [[link-eip-4844]].
*/
blobGasUsed;
/**
* The running total of blob gas consumed in excess of the
* target, prior to the block. See [[link-eip-4844]].
*/
excessBlobGas;
/** /**
* The miner coinbase address, wihch receives any subsidies for * The miner coinbase address, wihch receives any subsidies for
* including this block. * including this block.
@ -13968,6 +13978,8 @@ class Block {
difficulty: block.difficulty, difficulty: block.difficulty,
gasLimit: block.gasLimit, gasLimit: block.gasLimit,
gasUsed: block.gasUsed, gasUsed: block.gasUsed,
blobGasUsed: block.blobGasUsed,
excessBlobGas: block.excessBlobGas,
miner: block.miner, miner: block.miner,
extraData: block.extraData, extraData: block.extraData,
baseFeePerGas: getValue(block.baseFeePerGas) baseFeePerGas: getValue(block.baseFeePerGas)
@ -14017,6 +14029,8 @@ class Block {
extraData, extraData,
gasLimit: toJson(gasLimit), gasLimit: toJson(gasLimit),
gasUsed: toJson(gasUsed), gasUsed: toJson(gasUsed),
blobGasUsed: toJson(this.blobGasUsed),
excessBlobGas: toJson(this.excessBlobGas),
hash, miner, nonce, number, parentHash, timestamp, hash, miner, nonce, number, parentHash, timestamp,
transactions, transactions,
}; };
@ -14320,6 +14334,10 @@ class TransactionReceipt {
* entire gas limit. After the transaction, the difference is refunded. * entire gas limit. After the transaction, the difference is refunded.
*/ */
gasUsed; gasUsed;
/**
* The gas used for BLObs. See [[link-eip-4844]].
*/
blobGasUsed;
/** /**
* The amount of gas used by all transactions within the block for this * The amount of gas used by all transactions within the block for this
* and all transactions with a lower ``index``. * and all transactions with a lower ``index``.
@ -14336,6 +14354,10 @@ class TransactionReceipt {
* fee is protocol-enforced. * fee is protocol-enforced.
*/ */
gasPrice; gasPrice;
/**
* The price paid per BLOB in gas. See [[link-eip-4844]].
*/
blobGasPrice;
/** /**
* The [[link-eip-2718]] transaction type. * The [[link-eip-2718]] transaction type.
*/ */
@ -14383,7 +14405,9 @@ class TransactionReceipt {
logsBloom: tx.logsBloom, logsBloom: tx.logsBloom,
gasUsed: tx.gasUsed, gasUsed: tx.gasUsed,
cumulativeGasUsed: tx.cumulativeGasUsed, cumulativeGasUsed: tx.cumulativeGasUsed,
blobGasUsed: tx.blobGasUsed,
gasPrice, gasPrice,
blobGasPrice: tx.blobGasPrice,
type: tx.type, type: tx.type,
//byzantium: tx.byzantium, //byzantium: tx.byzantium,
status: tx.status, status: tx.status,
@ -14408,6 +14432,8 @@ class TransactionReceipt {
cumulativeGasUsed: toJson(this.cumulativeGasUsed), cumulativeGasUsed: toJson(this.cumulativeGasUsed),
from, from,
gasPrice: toJson(this.gasPrice), gasPrice: toJson(this.gasPrice),
blobGasUsed: toJson(this.blobGasUsed),
blobGasPrice: toJson(this.blobGasPrice),
gasUsed: toJson(this.gasUsed), gasUsed: toJson(this.gasUsed),
hash, index, logs, logsBloom, root, status, to hash, index, logs, logsBloom, root, status, to
}; };
@ -14576,6 +14602,10 @@ class TransactionResponse {
* to charge the sender. * to charge the sender.
*/ */
maxFeePerGas; maxFeePerGas;
/**
* The [[link-eip-4844]] max fee per BLOb gas.
*/
maxFeePerBlobGas;
/** /**
* The data. * The data.
*/ */
@ -14598,6 +14628,10 @@ class TransactionResponse {
* support it, otherwise ``null``. * support it, otherwise ``null``.
*/ */
accessList; accessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
blobVersionedHashes;
#startBlock; #startBlock;
/** /**
* @_ignore: * @_ignore:
@ -14618,19 +14652,22 @@ class TransactionResponse {
this.gasPrice = tx.gasPrice; this.gasPrice = tx.gasPrice;
this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null; this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;
this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null; this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;
this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas : null;
this.chainId = tx.chainId; this.chainId = tx.chainId;
this.signature = tx.signature; this.signature = tx.signature;
this.accessList = (tx.accessList != null) ? tx.accessList : null; this.accessList = (tx.accessList != null) ? tx.accessList : null;
this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes : null;
this.#startBlock = -1; this.#startBlock = -1;
} }
/** /**
* Returns a JSON-compatible representation of this transaction. * Returns a JSON-compatible representation of this transaction.
*/ */
toJSON() { toJSON() {
const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList } = this; const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList, blobVersionedHashes } = this;
return { return {
_type: "TransactionReceipt", _type: "TransactionResponse",
accessList, blockNumber, blockHash, accessList, blockNumber, blockHash,
blobVersionedHashes,
chainId: toJson(this.chainId), chainId: toJson(this.chainId),
data, from, data, from,
gasLimit: toJson(this.gasLimit), gasLimit: toJson(this.gasLimit),
@ -14638,6 +14675,7 @@ class TransactionResponse {
hash, hash,
maxFeePerGas: toJson(this.maxFeePerGas), maxFeePerGas: toJson(this.maxFeePerGas),
maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas), maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),
maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),
nonce, signature, to, index, type, nonce, signature, to, index, type,
value: toJson(this.value), value: toJson(this.value),
}; };
@ -14919,6 +14957,13 @@ class TransactionResponse {
isLondon() { isLondon() {
return (this.type === 2); return (this.type === 2);
} }
/**
* Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
* transaction. See [[link-eip-4844]].
*/
isCancun() {
return (this.type === 3);
}
/** /**
* Returns a filter which can be used to listen for orphan events * Returns a filter which can be used to listen for orphan events
* that evict this transaction. * that evict this transaction.
@ -16689,8 +16734,11 @@ function allowNull(format, nullValue) {
return format(value); return format(value);
}); });
} }
function arrayOf(format) { function arrayOf(format, allowNull) {
return ((array) => { return ((array) => {
if (allowNull && array == null) {
return null;
}
if (!Array.isArray(array)) { if (!Array.isArray(array)) {
throw new Error("not an array"); throw new Error("not an array");
} }
@ -16771,6 +16819,8 @@ const _formatBlock = object({
difficulty: getBigInt, difficulty: getBigInt,
gasLimit: getBigInt, gasLimit: getBigInt,
gasUsed: getBigInt, gasUsed: getBigInt,
blobGasUsed: allowNull(getBigInt, null),
excessBlobGas: allowNull(getBigInt, null),
miner: allowNull(getAddress), miner: allowNull(getAddress),
extraData: formatData, extraData: formatData,
baseFeePerGas: allowNull(getBigInt) baseFeePerGas: allowNull(getBigInt)
@ -16808,6 +16858,7 @@ const _formatTransactionReceipt = object({
index: getNumber, index: getNumber,
root: allowNull(hexlify), root: allowNull(hexlify),
gasUsed: getBigInt, gasUsed: getBigInt,
blobGasUsed: allowNull(getBigInt, null),
logsBloom: allowNull(formatData), logsBloom: allowNull(formatData),
blockHash: formatHash, blockHash: formatHash,
hash: formatHash, hash: formatHash,
@ -16816,6 +16867,7 @@ const _formatTransactionReceipt = object({
//confirmations: allowNull(getNumber, null), //confirmations: allowNull(getNumber, null),
cumulativeGasUsed: getBigInt, cumulativeGasUsed: getBigInt,
effectiveGasPrice: allowNull(getBigInt), effectiveGasPrice: allowNull(getBigInt),
blobGasPrice: allowNull(getBigInt, null),
status: allowNull(getNumber), status: allowNull(getNumber),
type: allowNull(getNumber, 0) type: allowNull(getNumber, 0)
}, { }, {
@ -16841,6 +16893,7 @@ function formatTransactionResponse(value) {
return getNumber(value); return getNumber(value);
}, },
accessList: allowNull(accessListify, null), accessList: allowNull(accessListify, null),
blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),
blockHash: allowNull(formatHash, null), blockHash: allowNull(formatHash, null),
blockNumber: allowNull(getNumber, null), blockNumber: allowNull(getNumber, null),
transactionIndex: allowNull(getNumber, null), transactionIndex: allowNull(getNumber, null),
@ -16850,6 +16903,7 @@ function formatTransactionResponse(value) {
gasPrice: allowNull(getBigInt), gasPrice: allowNull(getBigInt),
maxPriorityFeePerGas: allowNull(getBigInt), maxPriorityFeePerGas: allowNull(getBigInt),
maxFeePerGas: allowNull(getBigInt), maxFeePerGas: allowNull(getBigInt),
maxFeePerBlobGas: allowNull(getBigInt, null),
gasLimit: getBigInt, gasLimit: getBigInt,
to: allowNull(getAddress, null), to: allowNull(getAddress, null),
value: getBigInt, value: getBigInt,

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

60
dist/ethers.umd.js vendored

@ -13933,6 +13933,16 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* The total gas used in this block. * The total gas used in this block.
*/ */
gasUsed; gasUsed;
/**
* The total amount of blob gas consumed by the transactions
* within the block. See [[link-eip-4844]].
*/
blobGasUsed;
/**
* The running total of blob gas consumed in excess of the
* target, prior to the block. See [[link-eip-4844]].
*/
excessBlobGas;
/** /**
* The miner coinbase address, wihch receives any subsidies for * The miner coinbase address, wihch receives any subsidies for
* including this block. * including this block.
@ -13974,6 +13984,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
difficulty: block.difficulty, difficulty: block.difficulty,
gasLimit: block.gasLimit, gasLimit: block.gasLimit,
gasUsed: block.gasUsed, gasUsed: block.gasUsed,
blobGasUsed: block.blobGasUsed,
excessBlobGas: block.excessBlobGas,
miner: block.miner, miner: block.miner,
extraData: block.extraData, extraData: block.extraData,
baseFeePerGas: getValue(block.baseFeePerGas) baseFeePerGas: getValue(block.baseFeePerGas)
@ -14023,6 +14035,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
extraData, extraData,
gasLimit: toJson(gasLimit), gasLimit: toJson(gasLimit),
gasUsed: toJson(gasUsed), gasUsed: toJson(gasUsed),
blobGasUsed: toJson(this.blobGasUsed),
excessBlobGas: toJson(this.excessBlobGas),
hash, miner, nonce, number, parentHash, timestamp, hash, miner, nonce, number, parentHash, timestamp,
transactions, transactions,
}; };
@ -14326,6 +14340,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* entire gas limit. After the transaction, the difference is refunded. * entire gas limit. After the transaction, the difference is refunded.
*/ */
gasUsed; gasUsed;
/**
* The gas used for BLObs. See [[link-eip-4844]].
*/
blobGasUsed;
/** /**
* The amount of gas used by all transactions within the block for this * The amount of gas used by all transactions within the block for this
* and all transactions with a lower ``index``. * and all transactions with a lower ``index``.
@ -14342,6 +14360,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* fee is protocol-enforced. * fee is protocol-enforced.
*/ */
gasPrice; gasPrice;
/**
* The price paid per BLOB in gas. See [[link-eip-4844]].
*/
blobGasPrice;
/** /**
* The [[link-eip-2718]] transaction type. * The [[link-eip-2718]] transaction type.
*/ */
@ -14389,7 +14411,9 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
logsBloom: tx.logsBloom, logsBloom: tx.logsBloom,
gasUsed: tx.gasUsed, gasUsed: tx.gasUsed,
cumulativeGasUsed: tx.cumulativeGasUsed, cumulativeGasUsed: tx.cumulativeGasUsed,
blobGasUsed: tx.blobGasUsed,
gasPrice, gasPrice,
blobGasPrice: tx.blobGasPrice,
type: tx.type, type: tx.type,
//byzantium: tx.byzantium, //byzantium: tx.byzantium,
status: tx.status, status: tx.status,
@ -14414,6 +14438,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
cumulativeGasUsed: toJson(this.cumulativeGasUsed), cumulativeGasUsed: toJson(this.cumulativeGasUsed),
from, from,
gasPrice: toJson(this.gasPrice), gasPrice: toJson(this.gasPrice),
blobGasUsed: toJson(this.blobGasUsed),
blobGasPrice: toJson(this.blobGasPrice),
gasUsed: toJson(this.gasUsed), gasUsed: toJson(this.gasUsed),
hash, index, logs, logsBloom, root, status, to hash, index, logs, logsBloom, root, status, to
}; };
@ -14582,6 +14608,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* to charge the sender. * to charge the sender.
*/ */
maxFeePerGas; maxFeePerGas;
/**
* The [[link-eip-4844]] max fee per BLOb gas.
*/
maxFeePerBlobGas;
/** /**
* The data. * The data.
*/ */
@ -14604,6 +14634,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* support it, otherwise ``null``. * support it, otherwise ``null``.
*/ */
accessList; accessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
blobVersionedHashes;
#startBlock; #startBlock;
/** /**
* @_ignore: * @_ignore:
@ -14624,19 +14658,22 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
this.gasPrice = tx.gasPrice; this.gasPrice = tx.gasPrice;
this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null; this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;
this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null; this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;
this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas : null;
this.chainId = tx.chainId; this.chainId = tx.chainId;
this.signature = tx.signature; this.signature = tx.signature;
this.accessList = (tx.accessList != null) ? tx.accessList : null; this.accessList = (tx.accessList != null) ? tx.accessList : null;
this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes : null;
this.#startBlock = -1; this.#startBlock = -1;
} }
/** /**
* Returns a JSON-compatible representation of this transaction. * Returns a JSON-compatible representation of this transaction.
*/ */
toJSON() { toJSON() {
const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList } = this; const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList, blobVersionedHashes } = this;
return { return {
_type: "TransactionReceipt", _type: "TransactionResponse",
accessList, blockNumber, blockHash, accessList, blockNumber, blockHash,
blobVersionedHashes,
chainId: toJson(this.chainId), chainId: toJson(this.chainId),
data, from, data, from,
gasLimit: toJson(this.gasLimit), gasLimit: toJson(this.gasLimit),
@ -14644,6 +14681,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
hash, hash,
maxFeePerGas: toJson(this.maxFeePerGas), maxFeePerGas: toJson(this.maxFeePerGas),
maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas), maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),
maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),
nonce, signature, to, index, type, nonce, signature, to, index, type,
value: toJson(this.value), value: toJson(this.value),
}; };
@ -14925,6 +14963,13 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
isLondon() { isLondon() {
return (this.type === 2); return (this.type === 2);
} }
/**
* Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
* transaction. See [[link-eip-4844]].
*/
isCancun() {
return (this.type === 3);
}
/** /**
* Returns a filter which can be used to listen for orphan events * Returns a filter which can be used to listen for orphan events
* that evict this transaction. * that evict this transaction.
@ -16695,8 +16740,11 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return format(value); return format(value);
}); });
} }
function arrayOf(format) { function arrayOf(format, allowNull) {
return ((array) => { return ((array) => {
if (allowNull && array == null) {
return null;
}
if (!Array.isArray(array)) { if (!Array.isArray(array)) {
throw new Error("not an array"); throw new Error("not an array");
} }
@ -16777,6 +16825,8 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
difficulty: getBigInt, difficulty: getBigInt,
gasLimit: getBigInt, gasLimit: getBigInt,
gasUsed: getBigInt, gasUsed: getBigInt,
blobGasUsed: allowNull(getBigInt, null),
excessBlobGas: allowNull(getBigInt, null),
miner: allowNull(getAddress), miner: allowNull(getAddress),
extraData: formatData, extraData: formatData,
baseFeePerGas: allowNull(getBigInt) baseFeePerGas: allowNull(getBigInt)
@ -16814,6 +16864,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
index: getNumber, index: getNumber,
root: allowNull(hexlify), root: allowNull(hexlify),
gasUsed: getBigInt, gasUsed: getBigInt,
blobGasUsed: allowNull(getBigInt, null),
logsBloom: allowNull(formatData), logsBloom: allowNull(formatData),
blockHash: formatHash, blockHash: formatHash,
hash: formatHash, hash: formatHash,
@ -16822,6 +16873,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
//confirmations: allowNull(getNumber, null), //confirmations: allowNull(getNumber, null),
cumulativeGasUsed: getBigInt, cumulativeGasUsed: getBigInt,
effectiveGasPrice: allowNull(getBigInt), effectiveGasPrice: allowNull(getBigInt),
blobGasPrice: allowNull(getBigInt, null),
status: allowNull(getNumber), status: allowNull(getNumber),
type: allowNull(getNumber, 0) type: allowNull(getNumber, 0)
}, { }, {
@ -16847,6 +16899,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
return getNumber(value); return getNumber(value);
}, },
accessList: allowNull(accessListify, null), accessList: allowNull(accessListify, null),
blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),
blockHash: allowNull(formatHash, null), blockHash: allowNull(formatHash, null),
blockNumber: allowNull(getNumber, null), blockNumber: allowNull(getNumber, null),
transactionIndex: allowNull(getNumber, null), transactionIndex: allowNull(getNumber, null),
@ -16856,6 +16909,7 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
gasPrice: allowNull(getBigInt), gasPrice: allowNull(getBigInt),
maxPriorityFeePerGas: allowNull(getBigInt), maxPriorityFeePerGas: allowNull(getBigInt),
maxFeePerGas: allowNull(getBigInt), maxFeePerGas: allowNull(getBigInt),
maxFeePerBlobGas: allowNull(getBigInt, null),
gasLimit: getBigInt, gasLimit: getBigInt,
to: allowNull(getAddress, null), to: allowNull(getAddress, null),
value: getBigInt, value: getBigInt,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
export type TestBlockchainNetwork = "mainnet" | "goerli"; export type TestBlockchainNetwork = "mainnet" | "goerli" | "sepolia";
export interface TestBlockchainAddress { export interface TestBlockchainAddress {
test: string; test: string;
address: string; address: string;
@ -22,6 +22,8 @@ export interface TestBlockchainBlock {
extraData: string; extraData: string;
transactions: Array<string>; transactions: Array<string>;
baseFeePerGas?: bigint; baseFeePerGas?: bigint;
blobGasUsed?: bigint;
excessBlobGas?: bigint;
} }
export interface TestBlockchainTransaction { export interface TestBlockchainTransaction {
test: string; test: string;
@ -40,7 +42,7 @@ export interface TestBlockchainTransaction {
r: string; r: string;
s: string; s: string;
yParity: 0 | 1; yParity: 0 | 1;
v: number; v?: number;
networkV: null | bigint; networkV: null | bigint;
}; };
creates: null | string; creates: null | string;
@ -48,6 +50,8 @@ export interface TestBlockchainTransaction {
accessList?: Array<Record<string, Array<string>>>; accessList?: Array<Record<string, Array<string>>>;
maxPriorityFeePerGas?: bigint; maxPriorityFeePerGas?: bigint;
maxFeePerGas?: bigint; maxFeePerGas?: bigint;
maxFeePerBlobGas?: bigint;
blobVersionedHashes?: Array<string>;
} }
export interface TestBlockchainReceipt { export interface TestBlockchainReceipt {
test: string; test: string;
@ -75,6 +79,8 @@ export interface TestBlockchainReceipt {
to: string; to: string;
hash: string; hash: string;
index: number; index: number;
blobGasUsed?: bigint;
blobGasPrice?: bigint;
} }
export declare const testAddress: Record<TestBlockchainNetwork, Array<TestBlockchainAddress>>; export declare const testAddress: Record<TestBlockchainNetwork, Array<TestBlockchainAddress>>;
export declare const testBlock: Record<TestBlockchainNetwork, Array<TestBlockchainBlock>>; export declare const testBlock: Record<TestBlockchainNetwork, Array<TestBlockchainBlock>>;

@ -1 +1 @@
{"version":3,"file":"blockchain-data.d.ts","sourceRoot":"","sources":["../../src.ts/_tests/blockchain-data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GAAG,QAAQ,CAAC;AAEzB,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,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AW,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAyBnF,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,mBAAmB,CAAC,CA4J/E,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,yBAAyB,CAAC,CA2F3F,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CA6GnF,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,qBAAqB,CAErD,CAAC;AACF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ7E"}

@ -23,7 +23,8 @@ exports.testAddress = {
name: "ricmoo.firefly.eth" name: "ricmoo.firefly.eth"
}, },
], ],
goerli: [] goerli: [],
sepolia: []
}; };
exports.testBlock = { exports.testBlock = {
mainnet: [ mainnet: [
@ -86,6 +87,101 @@ exports.testBlock = {
} }
], ],
goerli: [], goerli: [],
sepolia: [
{
test: "eip-4844-BLob-block",
hash: "0xa76eb2ed547798d6010f599902788136f0cd289e2c6df5bbf5242e36e356124d",
parentHash: "0x2b579cb7224abdbe7a66c76380d60329bba41d95d225feb80ca1a78cf83a5124",
number: 5198187,
timestamp: 1706801700,
nonce: "0x0000000000000000",
difficulty: BigInt(0),
gasLimit: BigInt("30000000"),
gasUsed: BigInt("5622957"),
baseFeePerGas: BigInt("48793932840"),
miner: "0x008b3b2F992C0E14eDaa6E2c662Bec549CAA8df1",
extraData: "0x",
blobGasUsed: BigInt("524288"),
excessBlobGas: BigInt("79691776"),
transactions: [
"0xe8a096a98cd7b8d783cbb30687c3adc8e59f1e9563c0454623cc8af59f8bcab1",
"0x5aac2d50b15e177e8edaae4819e989650a6cdb335dd8924b5a7a7ed1675d15e7",
"0x21c94c24419f746efd2c1f470c0842df21ab8da14f7db8e30a12c53a4e7d5145",
"0x85b40ce37262a7962487bd37bf36867b344525b425a90a25516ac3c2cb1f6535",
"0x1a674ff3bd6bbe7bc7ada2ae3da893a7b74b4cfaadebc8c3f0fe0c9ad3c1c35b",
"0x48cafe99a7d2284a1664e05c404dd88e4113ffb65bf49846716bd855ffc6835d",
"0x658065003e8952782d121d9b5729845862c2a45ed24e46c634041a77c4577bed",
"0xc5416e0a2383b1a9b3ba030803f88e45faebfb35ad5db022e44a09b15aeae385",
"0x9030f7962f3f638f96bb703f45cdaa8778cf393ead767592aa50bce32230eae3",
"0xce008888308a4c1d51f87a1c2a75b1d0bd15eb096c675ad091dcc9705e4d016d",
"0xcf17c1f09a22c992a469da0023ad3c9bd2c29a8532146bcdf9ce3216609ea50c",
"0x3933e49a215c80b35ec7d48e2741fda50c8cc7b92652e79663e4423c00e8e1e2",
"0x82b2af4ed108880c151ee38cb3ab28e81ba86a2b0e707dd9cee9bf341f895a8a",
"0x51ef5af42d572d6135bec154d5c754928465bad00d1ff7b769a5b65e0054a90e",
"0x87cab3ae3a36d439a539ded7eb57e0ef07c5a1fbe1697c2e5ba8d7c03875fd22",
"0x70371a20dfbff0ee753b52cd9445f431454b929c7375624a96f5dbc25e88afed",
"0x57ee8a4a09875b7720f7d9e75fb93a1cc86d166ad9a1b4c2d7cf2c7c8324fbc0",
"0xf004bd2b0119aca5f364b16421a5b2e7db811568761f5542fdcd74903cd9115d",
"0x5b6635688362651e1cd33c668bd748d964ba93006661e53dc117d1c1e44886a5",
"0xe5893e07bfec18dd206da279a47ee5cc9471930bbb3b85d64ee4945b98137348",
"0x4f0f48032a77a80550f71cbcbe86f7d1b34009910f12dbe153a93cb66965393e",
"0x5420c3f7b5118e0829df31794aa55a1a91e0009600bbff283b553d5ac7a248ff",
"0xece2175e4b06bf6105f5be10a9ed48808a5f96f12f80b3941ee7cb1eeca99e03",
"0x383ea6445cd183e32fbc7b846c00b34c419078fe4055cd078f8692fc02b300c8",
"0x6c4aef4c26410b1fcbf24d0148e3d66a10cb3e9ad4ca10a71782489688cdd45a",
"0xe7e24b8c8182832e7b1113cd07ae68e4ca8618decdc527650f57d25d0b681fde",
"0xef5f520662c133be33209249fbc93afb7c614c06a0b45086d15c33bd7c0ca47a",
"0x4af20dc2e952e381789065f2cd0c88730fea820bcc3db82eaddf63b36e65b3ac",
"0xf99eef2240abc5002c9d71a90ffd463935642aaf81213f37337327c1afcb502c",
"0xf7d1ad53e2435e6d978563e39db89660d1b4de6084a3a3cefe7025d28507017f",
"0xfc21e64a158ac26ea9afc754460e16fefc4316a3fb92ec9a6042b792d7855788",
"0xee60e551bcf518853ef4f5c33551ad07fa95267814940c4203934c79355b1ac0",
"0x2a3c649caf77b942b206b9eb1be4635d950cf9a15fea2b43d3d7cbeddf700739",
"0xbbd7b9c1434eb98d177f2ff8911b0186309534dea942c40a86517d69247cd0ac",
"0xd86daa6d16e2aee4fc6ae831336ada63623685fb998dc5c605284a034604d751",
"0xcfc848dfbbbe76fe0095f04ef35c931799c294eb3623e5cb8c0d81362e8bf125",
"0x71e3ea97c91bd14388d99d69d122314a1cf0d595cbad1e45040277b470c4e67b",
"0xa9b2e44e46d38bb67cbd7a2d47d57e60892dff018f7754b54a221ae3f1b996c4",
"0xd1b8f9d669bd7f5072a095476e94e90510f2a18b434551fb7852b5c38c41471a",
"0xa3858e80680997080fddde083398e857b14cd4e2cfe74629f6a1245df0447efb",
"0x97593f663b07f8a4555202abb691cf7997210284195c24980abee02040c60618",
"0x03387f22b01919486338fbd874dd7059f8df62d5b16052cb0ab855b6a364777e",
"0xf2561f5f487c3d20c42b42e697a49fb5d05e0fb844ca97b2f127b210475f457e",
"0xa67951a1309f1c7ec07ee518ecad831d12c5c78619250681068e7973243f7d9b",
"0x7b007997da62b3ac9e5a7005066941e74f5c14d0bdaf4ac44faa8c3479b3cf45",
"0x74379408aa3518cbbb394886c91f77ba95ccd37f6b10517834f69a8ff5120ca7",
"0xd4843ef02a0d9802d31a89e13e60b6e71870de9124d0b472047012f7a4320f83",
"0xaa50331afeafd8f9e913a9f78e898e299314d0825936724cc31211ebf177a9bf",
"0xf20c83f2e5d199ad84a7b5dc6fda9611772516e07e7fc71b9f7889af4f2a16aa",
"0x89a7c645987dc079ce1af236ed3dd445ad805cc030e5a57766324d4a0a1def9a",
"0xe8e7d1116c2c60afd063b9c1e87624426cf6c9fd8d3fa6befe25666e68459570",
"0x50be079e71cabf80ca27c39a27f9c0759ac272151f4608b9b75ebfac8284a601",
"0xca24f69d47438ebd0b8f304f2f6d7a513d056905f10b164ed6a2cff6da1d4fea",
"0x08d2521e04dfd0decc2f556b11274212e84076ff84a0135e9b4e3434de09d42a",
"0xcc1e01932a627e9aa20d2b72480d13b4826e128efbbe03526504f7cb9facfc1f",
"0x0a3ac907b6d1584cb3d7f9f588ddb4bdd7878db34bc47bd8baf881dd71a98f7d",
"0x487539ee9cc6933e13e75e94935c30faffa826c28460fed6d9c3a07d15e2617f",
"0xad251856762796acc75dc2846def1f6995fe1b5c747bcab51c10f561d22ffd57",
"0x27ca72aa253e009e5e4497dd838986c561e7bea129fec930bc276968525456a8",
"0xe26391de668d3eb6f5a3c2f3e14f911dc683873b7ea60d883116c205610b36ff",
"0x691c3c5583c5f6444dc6c2f26315a127fc72ebd4f3848055cc8abb8a941d065b",
"0x449578293a1dce8d3c147fed564a765515d090e8cd8866209648eb86cd5c1090",
"0xb79c6f59d533663ca4fa3a70e9c8be18a3761edc43923c2ecd0904447f654f90",
"0xc03863ffa85dd15e0d774ea20006dffd01a868dbf3ff2abe04ccdbf4f027d7ec",
"0x28bc1a65696947beb387adbbeabb5328e5f812c435db288688041d9a8c6ab372",
"0x6dca99c2103d3894ba83c75e0fa0d42f722e5e93fe6f7a6a55a80cf2907a1a5e",
"0x75a7c5f00d79f1b30f82855a8b25077182f1abfd5dbccdf18fe1276e6c9e6a1e",
"0x3fc5a320d8c16bcfe2eda847582d34731abc12a3bffbf334a238b47c0bacb90d",
"0x47a61770f0771ba34d8e8ab883a3d588769a8d387eb5531b4befccb7ea23a6d3",
"0xdc8d0b20e8d8b0fbce50d24eaa36bc56467f35459139dda5e42ffebb1060535c",
"0x65bebb9628b5bf5d5e1dbedf00a7e6610fb5615c7ff9d92adaa135bc88f90648",
"0x9d2f5b7858631ee196bc24d14d2ef1ce07af081d8fe27b2be70ab90bd8edf930",
"0xd7724915af54b4d2c896d05c039f5ba508c878d524eb132c09c3abc22f6111ca",
"0xfda6f72dde86c0b8f84ea7c1e157f1d207dd2e974589cc351404bd5a01fe1d9d",
"0x3fae3676e266af80b0cc810b6b491750b64b013da78935a288b93e33215bee32"
]
},
],
}; };
exports.testTransaction = { exports.testTransaction = {
mainnet: [ mainnet: [
@ -141,7 +237,42 @@ exports.testTransaction = {
accessList: [] accessList: []
} }
], ],
goerli: [] goerli: [],
sepolia: [
{
test: "EIP-4844-BLOb-tx",
hash: "0x6c4aef4c26410b1fcbf24d0148e3d66a10cb3e9ad4ca10a71782489688cdd45a",
blockHash: '0xa76eb2ed547798d6010f599902788136f0cd289e2c6df5bbf5242e36e356124d',
blockNumber: 5198187,
// index: 185,
type: 3,
from: '0x1803c760451DC8da8935c7B7E47e1c60910E6986',
to: '0x4f56fFC63c28b72F79b02E91F11a4707bac4043C',
gasLimit: BigInt("21000"),
nonce: 1635,
data: '0x',
value: BigInt("0"),
gasPrice: BigInt("54793932840"),
maxPriorityFeePerGas: BigInt("6000000000"),
maxFeePerGas: BigInt("600000000000"),
maxFeePerBlobGas: BigInt("60000000000"),
chainId: BigInt(11155111),
signature: {
r: "0x56fc10a770e9fa39a30f71a56d13affbdc390a1bfb419ff806e59b54bfc8bab1",
s: "0x35be8b0c774c179520dd43df46925361c4817472441d7dd5162d43efc90679f1",
yParity: 1,
networkV: null
},
creates: null,
accessList: [],
blobVersionedHashes: [
"0x010264a7b018f0edbe5caa5cb309ca50d3d7c6c7c990d21bf30a7f18ffd06cd6",
"0x017fe9ef61e3c501acec804ec15849d977433f4cf87050c098272dd1257f9c68",
"0x019975416c9d7c70ba9cc041464a6e1c3e4f176bdab463573504b55c681364c8",
"0x0123ae55ad7d8e8afec2202bdc6dfb931efc8990acf29afbd0c3c0ef61eae92d"
]
}
]
}; };
exports.testReceipt = { exports.testReceipt = {
mainnet: [ mainnet: [
@ -227,10 +358,33 @@ exports.testReceipt = {
index: 0x1e index: 0x1e
} }
], ],
goerli: [] goerli: [],
sepolia: [
{
test: "eip-4844-BLOb-receipt",
//byzantium: true,
blockHash: "0xa76eb2ed547798d6010f599902788136f0cd289e2c6df5bbf5242e36e356124d",
blockNumber: 5198187,
type: 3,
contractAddress: null,
cumulativeGasUsed: BigInt("930313"),
from: "0x1803c760451DC8da8935c7B7E47e1c60910E6986",
gasUsed: BigInt("21000"),
gasPrice: BigInt("54793932840"),
logs: [],
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
root: null,
status: 1,
to: "0x4f56fFC63c28b72F79b02E91F11a4707bac4043C",
hash: "0x6c4aef4c26410b1fcbf24d0148e3d66a10cb3e9ad4ca10a71782489688cdd45a",
index: 24,
blobGasUsed: BigInt("524288"),
blobGasPrice: BigInt("23276216517"),
}
]
}; };
exports.networkNames = [ exports.networkNames = [
"mainnet", "goerli" "mainnet", "goerli", "sepolia"
]; ];
function networkFeatureAtBlock(feature, block) { function networkFeatureAtBlock(feature, block) {
switch (feature) { switch (feature) {

File diff suppressed because one or more lines are too long

@ -102,12 +102,25 @@ describe("Test Provider Address operations", function () {
}); });
function assertObj(prefix, actual, expected) { function assertObj(prefix, actual, expected) {
assert_1.default.ok(actual != null, `${prefix} is null`); assert_1.default.ok(actual != null, `${prefix} is null`);
if (typeof (expected) !== "object") {
assert_1.default.equal(actual, expected, prefix);
return;
}
for (const key in expected) { for (const key in expected) {
if (expected[key] === undefined) { if (expected[key] === undefined) {
continue; continue;
} }
if (Array.isArray(expected[key])) {
assert_1.default.ok(Array.isArray(actual[key]), `Array.isArray(${prefix}.${key})`);
assert_1.default.equal(actual[key].length, expected[key].length, `${prefix}.${key}.length`);
for (let i = 0; i < expected[key].length; i++) {
assertObj(`${prefix}[${i}]`, actual[key][i], expected[key][i]);
}
}
else {
assert_1.default.equal(actual[key], expected[key], `${prefix}.${key}`); assert_1.default.equal(actual[key], expected[key], `${prefix}.${key}`);
} }
}
} }
function assertBlock(actual, expected) { function assertBlock(actual, expected) {
// Check transactions // Check transactions
@ -226,6 +239,7 @@ describe("Test Networks", function () {
continue; continue;
} }
it(`checks network chainId: ${providerName}/${networkName}`, async function () { it(`checks network chainId: ${providerName}/${networkName}`, async function () {
this.timeout(10000);
const chainId = await provider.send("eth_chainId", []); const chainId = await provider.send("eth_chainId", []);
assert_1.default.equal(parseInt(chainId), network.chainId, "chainId"); assert_1.default.equal(parseInt(chainId), network.chainId, "chainId");
}); });

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
import type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams } from "./formatting.js"; import type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams } from "./formatting.js";
export type FormatFunc = (value: any) => any; export type FormatFunc = (value: any) => any;
export declare function allowNull(format: FormatFunc, nullValue?: any): FormatFunc; export declare function allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
export declare function arrayOf(format: FormatFunc): FormatFunc; export declare function arrayOf(format: FormatFunc, allowNull?: boolean): FormatFunc;
export declare function object(format: Record<string, FormatFunc>, altNames?: Record<string, Array<string>>): FormatFunc; export declare function object(format: Record<string, FormatFunc>, altNames?: Record<string, Array<string>>): FormatFunc;
export declare function formatBoolean(value: any): boolean; export declare function formatBoolean(value: any): boolean;
export declare function formatData(value: string): string; export declare function formatData(value: string): string;

@ -1 +1 @@
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src.ts/providers/format.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,WAAW,EAAE,SAAS,EACtB,wBAAwB,EAAE,yBAAyB,EACtD,MAAM,iBAAiB,CAAC;AAKzB,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE7C,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,GAAG,UAAU,CAKzE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAKtD;AAKD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAwB/G;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAQjD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAG7C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAKhD;AAgBD,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAE/C;AAoBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,WAAW,CAOnD;AAeD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAEtD;AA0BD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,GAAG,GAAG,wBAAwB,CAE7E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,GAAG,GAAG,yBAAyB,CA+G/E"} {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src.ts/providers/format.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,WAAW,EAAE,SAAS,EACtB,wBAAwB,EAAE,yBAAyB,EACtD,MAAM,iBAAiB,CAAC;AAKzB,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE7C,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,GAAG,UAAU,CAKzE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAM3E;AAKD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAwB/G;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAQjD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAG7C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAKhD;AAgBD,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAE/C;AAuBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,WAAW,CAOnD;AAeD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAEtD;AA4BD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,GAAG,GAAG,wBAAwB,CAE7E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,GAAG,GAAG,yBAAyB,CAiH/E"}

@ -18,8 +18,11 @@ function allowNull(format, nullValue) {
}); });
} }
exports.allowNull = allowNull; exports.allowNull = allowNull;
function arrayOf(format) { function arrayOf(format, allowNull) {
return ((array) => { return ((array) => {
if (allowNull && array == null) {
return null;
}
if (!Array.isArray(array)) { if (!Array.isArray(array)) {
throw new Error("not an array"); throw new Error("not an array");
} }
@ -113,6 +116,8 @@ const _formatBlock = object({
difficulty: index_js_4.getBigInt, difficulty: index_js_4.getBigInt,
gasLimit: index_js_4.getBigInt, gasLimit: index_js_4.getBigInt,
gasUsed: index_js_4.getBigInt, gasUsed: index_js_4.getBigInt,
blobGasUsed: allowNull(index_js_4.getBigInt, null),
excessBlobGas: allowNull(index_js_4.getBigInt, null),
miner: allowNull(index_js_1.getAddress), miner: allowNull(index_js_1.getAddress),
extraData: formatData, extraData: formatData,
baseFeePerGas: allowNull(index_js_4.getBigInt) baseFeePerGas: allowNull(index_js_4.getBigInt)
@ -152,6 +157,7 @@ const _formatTransactionReceipt = object({
index: index_js_4.getNumber, index: index_js_4.getNumber,
root: allowNull(index_js_4.hexlify), root: allowNull(index_js_4.hexlify),
gasUsed: index_js_4.getBigInt, gasUsed: index_js_4.getBigInt,
blobGasUsed: allowNull(index_js_4.getBigInt, null),
logsBloom: allowNull(formatData), logsBloom: allowNull(formatData),
blockHash: formatHash, blockHash: formatHash,
hash: formatHash, hash: formatHash,
@ -160,6 +166,7 @@ const _formatTransactionReceipt = object({
//confirmations: allowNull(getNumber, null), //confirmations: allowNull(getNumber, null),
cumulativeGasUsed: index_js_4.getBigInt, cumulativeGasUsed: index_js_4.getBigInt,
effectiveGasPrice: allowNull(index_js_4.getBigInt), effectiveGasPrice: allowNull(index_js_4.getBigInt),
blobGasPrice: allowNull(index_js_4.getBigInt, null),
status: allowNull(index_js_4.getNumber), status: allowNull(index_js_4.getNumber),
type: allowNull(index_js_4.getNumber, 0) type: allowNull(index_js_4.getNumber, 0)
}, { }, {
@ -186,6 +193,7 @@ function formatTransactionResponse(value) {
return (0, index_js_4.getNumber)(value); return (0, index_js_4.getNumber)(value);
}, },
accessList: allowNull(index_js_3.accessListify, null), accessList: allowNull(index_js_3.accessListify, null),
blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),
blockHash: allowNull(formatHash, null), blockHash: allowNull(formatHash, null),
blockNumber: allowNull(index_js_4.getNumber, null), blockNumber: allowNull(index_js_4.getNumber, null),
transactionIndex: allowNull(index_js_4.getNumber, null), transactionIndex: allowNull(index_js_4.getNumber, null),
@ -195,6 +203,7 @@ function formatTransactionResponse(value) {
gasPrice: allowNull(index_js_4.getBigInt), gasPrice: allowNull(index_js_4.getBigInt),
maxPriorityFeePerGas: allowNull(index_js_4.getBigInt), maxPriorityFeePerGas: allowNull(index_js_4.getBigInt),
maxFeePerGas: allowNull(index_js_4.getBigInt), maxFeePerGas: allowNull(index_js_4.getBigInt),
maxFeePerBlobGas: allowNull(index_js_4.getBigInt, null),
gasLimit: index_js_4.getBigInt, gasLimit: index_js_4.getBigInt,
to: allowNull(index_js_1.getAddress, null), to: allowNull(index_js_1.getAddress, null),
value: index_js_4.getBigInt, value: index_js_4.getBigInt,

File diff suppressed because one or more lines are too long

@ -46,6 +46,16 @@ export interface BlockParams {
* The amount of gas a block consumed. * The amount of gas a block consumed.
*/ */
gasUsed: bigint; gasUsed: bigint;
/**
* The total amount of BLOb gas consumed by transactions within
* the block. See [[link-eip4844].
*/
blobGasUsed?: null | bigint;
/**
* The running total of BLOb gas consumed in excess of the target
* prior to the block. See [[link-eip-4844]].
*/
excessBlobGas?: null | bigint;
/** /**
* The miner (or author) of a block. * The miner (or author) of a block.
*/ */
@ -158,6 +168,10 @@ export interface TransactionReceiptParams {
* The amount of gas consumed executing this transaciton. * The amount of gas consumed executing this transaciton.
*/ */
gasUsed: bigint; gasUsed: bigint;
/**
* The amount of BLOb gas used. See [[link-eip-4844]].
*/
blobGasUsed?: null | bigint;
/** /**
* The total amount of gas consumed during the entire block up to * The total amount of gas consumed during the entire block up to
* and including this transaction. * and including this transaction.
@ -167,6 +181,10 @@ export interface TransactionReceiptParams {
* The actual gas price per gas charged for this transaction. * The actual gas price per gas charged for this transaction.
*/ */
gasPrice?: null | bigint; gasPrice?: null | bigint;
/**
* The actual BLOb gas price that was charged. See [[link-eip-4844]].
*/
blobGasPrice?: null | bigint;
/** /**
* The actual gas price per gas charged for this transaction. * The actual gas price per gas charged for this transaction.
*/ */
@ -244,6 +262,11 @@ export interface TransactionResponseParams {
* will be paid. * will be paid.
*/ */
maxFeePerGas: null | bigint; maxFeePerGas: null | bigint;
/**
* For [[link-eip-4844]] transactions, this is the maximum fee that
* will be paid per BLOb.
*/
maxFeePerBlobGas?: null | bigint;
/** /**
* The transaction data. * The transaction data.
*/ */
@ -264,5 +287,9 @@ export interface TransactionResponseParams {
* The transaction access list. * The transaction access list.
*/ */
accessList: null | AccessList; accessList: null | AccessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
blobVersionedHashes?: null | Array<string>;
} }
//# sourceMappingURL=formatting.d.ts.map //# sourceMappingURL=formatting.d.ts.map

@ -1 +1 @@
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAM1D;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAA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AAE,MAAM,CAAC;IAEb;;;OAGG;IACH,EAAE,EAAE,IAAI,GAAG,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,oBAAoB,EAAE,IAAI,GAAG,MAAM,CAAC;IAEpC;;;OAGG;IACH,YAAY,EAAE,IAAI,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAEjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,IAAI,GAAG,UAAU,CAAC;IAE9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9C"}

@ -1 +1 @@
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA8EF,CAAC;AA+QD,CAAC"} {"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA0FF,CAAC;AAoSD,CAAC"}

@ -318,6 +318,16 @@ export declare class Block implements BlockParams, Iterable<string> {
* The total gas used in this block. * The total gas used in this block.
*/ */
readonly gasUsed: bigint; readonly gasUsed: bigint;
/**
* The total amount of blob gas consumed by the transactions
* within the block. See [[link-eip-4844]].
*/
readonly blobGasUsed: null | bigint;
/**
* The running total of blob gas consumed in excess of the
* target, prior to the block. See [[link-eip-4844]].
*/
readonly excessBlobGas: null | bigint;
/** /**
* The miner coinbase address, wihch receives any subsidies for * The miner coinbase address, wihch receives any subsidies for
* including this block. * including this block.
@ -539,6 +549,10 @@ export declare class TransactionReceipt implements TransactionReceiptParams, Ite
* entire gas limit. After the transaction, the difference is refunded. * entire gas limit. After the transaction, the difference is refunded.
*/ */
readonly gasUsed: bigint; readonly gasUsed: bigint;
/**
* The gas used for BLObs. See [[link-eip-4844]].
*/
readonly blobGasUsed: null | bigint;
/** /**
* The amount of gas used by all transactions within the block for this * The amount of gas used by all transactions within the block for this
* and all transactions with a lower ``index``. * and all transactions with a lower ``index``.
@ -555,6 +569,10 @@ export declare class TransactionReceipt implements TransactionReceiptParams, Ite
* fee is protocol-enforced. * fee is protocol-enforced.
*/ */
readonly gasPrice: bigint; readonly gasPrice: bigint;
/**
* The price paid per BLOB in gas. See [[link-eip-4844]].
*/
readonly blobGasPrice: null | bigint;
/** /**
* The [[link-eip-2718]] transaction type. * The [[link-eip-2718]] transaction type.
*/ */
@ -737,6 +755,10 @@ export declare class TransactionResponse implements TransactionLike<string>, Tra
* to charge the sender. * to charge the sender.
*/ */
readonly maxFeePerGas: null | bigint; readonly maxFeePerGas: null | bigint;
/**
* The [[link-eip-4844]] max fee per BLOb gas.
*/
readonly maxFeePerBlobGas: null | bigint;
/** /**
* The data. * The data.
*/ */
@ -759,6 +781,10 @@ export declare class TransactionResponse implements TransactionLike<string>, Tra
* support it, otherwise ``null``. * support it, otherwise ``null``.
*/ */
readonly accessList: null | AccessList; readonly accessList: null | AccessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
readonly blobVersionedHashes: null | Array<string>;
/** /**
* @_ignore: * @_ignore:
*/ */
@ -841,6 +867,17 @@ export declare class TransactionResponse implements TransactionLike<string>, Tra
maxFeePerGas: bigint; maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint; maxPriorityFeePerGas: bigint;
}); });
/**
* Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
* transaction. See [[link-eip-4844]].
*/
isCancun(): this is (TransactionResponse & {
accessList: AccessList;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
maxFeePerBlobGas: bigint;
blobVersionedHashes: Array<string>;
});
/** /**
* Returns a filter which can be used to listen for orphan events * Returns a filter which can be used to listen for orphan events
* that evict this transaction. * that evict this transaction.

File diff suppressed because one or more lines are too long

@ -178,6 +178,16 @@ class Block {
* The total gas used in this block. * The total gas used in this block.
*/ */
gasUsed; gasUsed;
/**
* The total amount of blob gas consumed by the transactions
* within the block. See [[link-eip-4844]].
*/
blobGasUsed;
/**
* The running total of blob gas consumed in excess of the
* target, prior to the block. See [[link-eip-4844]].
*/
excessBlobGas;
/** /**
* The miner coinbase address, wihch receives any subsidies for * The miner coinbase address, wihch receives any subsidies for
* including this block. * including this block.
@ -219,6 +229,8 @@ class Block {
difficulty: block.difficulty, difficulty: block.difficulty,
gasLimit: block.gasLimit, gasLimit: block.gasLimit,
gasUsed: block.gasUsed, gasUsed: block.gasUsed,
blobGasUsed: block.blobGasUsed,
excessBlobGas: block.excessBlobGas,
miner: block.miner, miner: block.miner,
extraData: block.extraData, extraData: block.extraData,
baseFeePerGas: getValue(block.baseFeePerGas) baseFeePerGas: getValue(block.baseFeePerGas)
@ -268,6 +280,8 @@ class Block {
extraData, extraData,
gasLimit: toJson(gasLimit), gasLimit: toJson(gasLimit),
gasUsed: toJson(gasUsed), gasUsed: toJson(gasUsed),
blobGasUsed: toJson(this.blobGasUsed),
excessBlobGas: toJson(this.excessBlobGas),
hash, miner, nonce, number, parentHash, timestamp, hash, miner, nonce, number, parentHash, timestamp,
transactions, transactions,
}; };
@ -573,6 +587,10 @@ class TransactionReceipt {
* entire gas limit. After the transaction, the difference is refunded. * entire gas limit. After the transaction, the difference is refunded.
*/ */
gasUsed; gasUsed;
/**
* The gas used for BLObs. See [[link-eip-4844]].
*/
blobGasUsed;
/** /**
* The amount of gas used by all transactions within the block for this * The amount of gas used by all transactions within the block for this
* and all transactions with a lower ``index``. * and all transactions with a lower ``index``.
@ -589,6 +607,10 @@ class TransactionReceipt {
* fee is protocol-enforced. * fee is protocol-enforced.
*/ */
gasPrice; gasPrice;
/**
* The price paid per BLOB in gas. See [[link-eip-4844]].
*/
blobGasPrice;
/** /**
* The [[link-eip-2718]] transaction type. * The [[link-eip-2718]] transaction type.
*/ */
@ -636,7 +658,9 @@ class TransactionReceipt {
logsBloom: tx.logsBloom, logsBloom: tx.logsBloom,
gasUsed: tx.gasUsed, gasUsed: tx.gasUsed,
cumulativeGasUsed: tx.cumulativeGasUsed, cumulativeGasUsed: tx.cumulativeGasUsed,
blobGasUsed: tx.blobGasUsed,
gasPrice, gasPrice,
blobGasPrice: tx.blobGasPrice,
type: tx.type, type: tx.type,
//byzantium: tx.byzantium, //byzantium: tx.byzantium,
status: tx.status, status: tx.status,
@ -661,6 +685,8 @@ class TransactionReceipt {
cumulativeGasUsed: toJson(this.cumulativeGasUsed), cumulativeGasUsed: toJson(this.cumulativeGasUsed),
from, from,
gasPrice: toJson(this.gasPrice), gasPrice: toJson(this.gasPrice),
blobGasUsed: toJson(this.blobGasUsed),
blobGasPrice: toJson(this.blobGasPrice),
gasUsed: toJson(this.gasUsed), gasUsed: toJson(this.gasUsed),
hash, index, logs, logsBloom, root, status, to hash, index, logs, logsBloom, root, status, to
}; };
@ -830,6 +856,10 @@ class TransactionResponse {
* to charge the sender. * to charge the sender.
*/ */
maxFeePerGas; maxFeePerGas;
/**
* The [[link-eip-4844]] max fee per BLOb gas.
*/
maxFeePerBlobGas;
/** /**
* The data. * The data.
*/ */
@ -852,6 +882,10 @@ class TransactionResponse {
* support it, otherwise ``null``. * support it, otherwise ``null``.
*/ */
accessList; accessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
blobVersionedHashes;
#startBlock; #startBlock;
/** /**
* @_ignore: * @_ignore:
@ -872,19 +906,22 @@ class TransactionResponse {
this.gasPrice = tx.gasPrice; this.gasPrice = tx.gasPrice;
this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null; this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;
this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null; this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;
this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas : null;
this.chainId = tx.chainId; this.chainId = tx.chainId;
this.signature = tx.signature; this.signature = tx.signature;
this.accessList = (tx.accessList != null) ? tx.accessList : null; this.accessList = (tx.accessList != null) ? tx.accessList : null;
this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes : null;
this.#startBlock = -1; this.#startBlock = -1;
} }
/** /**
* Returns a JSON-compatible representation of this transaction. * Returns a JSON-compatible representation of this transaction.
*/ */
toJSON() { toJSON() {
const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList } = this; const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList, blobVersionedHashes } = this;
return { return {
_type: "TransactionReceipt", _type: "TransactionResponse",
accessList, blockNumber, blockHash, accessList, blockNumber, blockHash,
blobVersionedHashes,
chainId: toJson(this.chainId), chainId: toJson(this.chainId),
data, from, data, from,
gasLimit: toJson(this.gasLimit), gasLimit: toJson(this.gasLimit),
@ -892,6 +929,7 @@ class TransactionResponse {
hash, hash,
maxFeePerGas: toJson(this.maxFeePerGas), maxFeePerGas: toJson(this.maxFeePerGas),
maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas), maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),
maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),
nonce, signature, to, index, type, nonce, signature, to, index, type,
value: toJson(this.value), value: toJson(this.value),
}; };
@ -1173,6 +1211,13 @@ class TransactionResponse {
isLondon() { isLondon() {
return (this.type === 2); return (this.type === 2);
} }
/**
* Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
* transaction. See [[link-eip-4844]].
*/
isCancun() {
return (this.type === 3);
}
/** /**
* Returns a filter which can be used to listen for orphan events * Returns a filter which can be used to listen for orphan events
* that evict this transaction. * that evict this transaction.

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
export type TestBlockchainNetwork = "mainnet" | "goerli"; export type TestBlockchainNetwork = "mainnet" | "goerli" | "sepolia";
export interface TestBlockchainAddress { export interface TestBlockchainAddress {
test: string; test: string;
address: string; address: string;
@ -22,6 +22,8 @@ export interface TestBlockchainBlock {
extraData: string; extraData: string;
transactions: Array<string>; transactions: Array<string>;
baseFeePerGas?: bigint; baseFeePerGas?: bigint;
blobGasUsed?: bigint;
excessBlobGas?: bigint;
} }
export interface TestBlockchainTransaction { export interface TestBlockchainTransaction {
test: string; test: string;
@ -40,7 +42,7 @@ export interface TestBlockchainTransaction {
r: string; r: string;
s: string; s: string;
yParity: 0 | 1; yParity: 0 | 1;
v: number; v?: number;
networkV: null | bigint; networkV: null | bigint;
}; };
creates: null | string; creates: null | string;
@ -48,6 +50,8 @@ export interface TestBlockchainTransaction {
accessList?: Array<Record<string, Array<string>>>; accessList?: Array<Record<string, Array<string>>>;
maxPriorityFeePerGas?: bigint; maxPriorityFeePerGas?: bigint;
maxFeePerGas?: bigint; maxFeePerGas?: bigint;
maxFeePerBlobGas?: bigint;
blobVersionedHashes?: Array<string>;
} }
export interface TestBlockchainReceipt { export interface TestBlockchainReceipt {
test: string; test: string;
@ -75,6 +79,8 @@ export interface TestBlockchainReceipt {
to: string; to: string;
hash: string; hash: string;
index: number; index: number;
blobGasUsed?: bigint;
blobGasPrice?: bigint;
} }
export declare const testAddress: Record<TestBlockchainNetwork, Array<TestBlockchainAddress>>; export declare const testAddress: Record<TestBlockchainNetwork, Array<TestBlockchainAddress>>;
export declare const testBlock: Record<TestBlockchainNetwork, Array<TestBlockchainBlock>>; export declare const testBlock: Record<TestBlockchainNetwork, Array<TestBlockchainBlock>>;

@ -1 +1 @@
{"version":3,"file":"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2F3F,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CA6GnF,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,qBAAqB,CAErD,CAAC;AACF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAQ7E"}

@ -20,7 +20,8 @@ export const testAddress = {
name: "ricmoo.firefly.eth" name: "ricmoo.firefly.eth"
}, },
], ],
goerli: [] goerli: [],
sepolia: []
}; };
export const testBlock = { export const testBlock = {
mainnet: [ mainnet: [
@ -83,6 +84,101 @@ export const testBlock = {
} }
], ],
goerli: [], goerli: [],
sepolia: [
{
test: "eip-4844-BLob-block",
hash: "0xa76eb2ed547798d6010f599902788136f0cd289e2c6df5bbf5242e36e356124d",
parentHash: "0x2b579cb7224abdbe7a66c76380d60329bba41d95d225feb80ca1a78cf83a5124",
number: 5198187,
timestamp: 1706801700,
nonce: "0x0000000000000000",
difficulty: BigInt(0),
gasLimit: BigInt("30000000"),
gasUsed: BigInt("5622957"),
baseFeePerGas: BigInt("48793932840"),
miner: "0x008b3b2F992C0E14eDaa6E2c662Bec549CAA8df1",
extraData: "0x",
blobGasUsed: BigInt("524288"),
excessBlobGas: BigInt("79691776"),
transactions: [
"0xe8a096a98cd7b8d783cbb30687c3adc8e59f1e9563c0454623cc8af59f8bcab1",
"0x5aac2d50b15e177e8edaae4819e989650a6cdb335dd8924b5a7a7ed1675d15e7",
"0x21c94c24419f746efd2c1f470c0842df21ab8da14f7db8e30a12c53a4e7d5145",
"0x85b40ce37262a7962487bd37bf36867b344525b425a90a25516ac3c2cb1f6535",
"0x1a674ff3bd6bbe7bc7ada2ae3da893a7b74b4cfaadebc8c3f0fe0c9ad3c1c35b",
"0x48cafe99a7d2284a1664e05c404dd88e4113ffb65bf49846716bd855ffc6835d",
"0x658065003e8952782d121d9b5729845862c2a45ed24e46c634041a77c4577bed",
"0xc5416e0a2383b1a9b3ba030803f88e45faebfb35ad5db022e44a09b15aeae385",
"0x9030f7962f3f638f96bb703f45cdaa8778cf393ead767592aa50bce32230eae3",
"0xce008888308a4c1d51f87a1c2a75b1d0bd15eb096c675ad091dcc9705e4d016d",
"0xcf17c1f09a22c992a469da0023ad3c9bd2c29a8532146bcdf9ce3216609ea50c",
"0x3933e49a215c80b35ec7d48e2741fda50c8cc7b92652e79663e4423c00e8e1e2",
"0x82b2af4ed108880c151ee38cb3ab28e81ba86a2b0e707dd9cee9bf341f895a8a",
"0x51ef5af42d572d6135bec154d5c754928465bad00d1ff7b769a5b65e0054a90e",
"0x87cab3ae3a36d439a539ded7eb57e0ef07c5a1fbe1697c2e5ba8d7c03875fd22",
"0x70371a20dfbff0ee753b52cd9445f431454b929c7375624a96f5dbc25e88afed",
"0x57ee8a4a09875b7720f7d9e75fb93a1cc86d166ad9a1b4c2d7cf2c7c8324fbc0",
"0xf004bd2b0119aca5f364b16421a5b2e7db811568761f5542fdcd74903cd9115d",
"0x5b6635688362651e1cd33c668bd748d964ba93006661e53dc117d1c1e44886a5",
"0xe5893e07bfec18dd206da279a47ee5cc9471930bbb3b85d64ee4945b98137348",
"0x4f0f48032a77a80550f71cbcbe86f7d1b34009910f12dbe153a93cb66965393e",
"0x5420c3f7b5118e0829df31794aa55a1a91e0009600bbff283b553d5ac7a248ff",
"0xece2175e4b06bf6105f5be10a9ed48808a5f96f12f80b3941ee7cb1eeca99e03",
"0x383ea6445cd183e32fbc7b846c00b34c419078fe4055cd078f8692fc02b300c8",
"0x6c4aef4c26410b1fcbf24d0148e3d66a10cb3e9ad4ca10a71782489688cdd45a",
"0xe7e24b8c8182832e7b1113cd07ae68e4ca8618decdc527650f57d25d0b681fde",
"0xef5f520662c133be33209249fbc93afb7c614c06a0b45086d15c33bd7c0ca47a",
"0x4af20dc2e952e381789065f2cd0c88730fea820bcc3db82eaddf63b36e65b3ac",
"0xf99eef2240abc5002c9d71a90ffd463935642aaf81213f37337327c1afcb502c",
"0xf7d1ad53e2435e6d978563e39db89660d1b4de6084a3a3cefe7025d28507017f",
"0xfc21e64a158ac26ea9afc754460e16fefc4316a3fb92ec9a6042b792d7855788",
"0xee60e551bcf518853ef4f5c33551ad07fa95267814940c4203934c79355b1ac0",
"0x2a3c649caf77b942b206b9eb1be4635d950cf9a15fea2b43d3d7cbeddf700739",
"0xbbd7b9c1434eb98d177f2ff8911b0186309534dea942c40a86517d69247cd0ac",
"0xd86daa6d16e2aee4fc6ae831336ada63623685fb998dc5c605284a034604d751",
"0xcfc848dfbbbe76fe0095f04ef35c931799c294eb3623e5cb8c0d81362e8bf125",
"0x71e3ea97c91bd14388d99d69d122314a1cf0d595cbad1e45040277b470c4e67b",
"0xa9b2e44e46d38bb67cbd7a2d47d57e60892dff018f7754b54a221ae3f1b996c4",
"0xd1b8f9d669bd7f5072a095476e94e90510f2a18b434551fb7852b5c38c41471a",
"0xa3858e80680997080fddde083398e857b14cd4e2cfe74629f6a1245df0447efb",
"0x97593f663b07f8a4555202abb691cf7997210284195c24980abee02040c60618",
"0x03387f22b01919486338fbd874dd7059f8df62d5b16052cb0ab855b6a364777e",
"0xf2561f5f487c3d20c42b42e697a49fb5d05e0fb844ca97b2f127b210475f457e",
"0xa67951a1309f1c7ec07ee518ecad831d12c5c78619250681068e7973243f7d9b",
"0x7b007997da62b3ac9e5a7005066941e74f5c14d0bdaf4ac44faa8c3479b3cf45",
"0x74379408aa3518cbbb394886c91f77ba95ccd37f6b10517834f69a8ff5120ca7",
"0xd4843ef02a0d9802d31a89e13e60b6e71870de9124d0b472047012f7a4320f83",
"0xaa50331afeafd8f9e913a9f78e898e299314d0825936724cc31211ebf177a9bf",
"0xf20c83f2e5d199ad84a7b5dc6fda9611772516e07e7fc71b9f7889af4f2a16aa",
"0x89a7c645987dc079ce1af236ed3dd445ad805cc030e5a57766324d4a0a1def9a",
"0xe8e7d1116c2c60afd063b9c1e87624426cf6c9fd8d3fa6befe25666e68459570",
"0x50be079e71cabf80ca27c39a27f9c0759ac272151f4608b9b75ebfac8284a601",
"0xca24f69d47438ebd0b8f304f2f6d7a513d056905f10b164ed6a2cff6da1d4fea",
"0x08d2521e04dfd0decc2f556b11274212e84076ff84a0135e9b4e3434de09d42a",
"0xcc1e01932a627e9aa20d2b72480d13b4826e128efbbe03526504f7cb9facfc1f",
"0x0a3ac907b6d1584cb3d7f9f588ddb4bdd7878db34bc47bd8baf881dd71a98f7d",
"0x487539ee9cc6933e13e75e94935c30faffa826c28460fed6d9c3a07d15e2617f",
"0xad251856762796acc75dc2846def1f6995fe1b5c747bcab51c10f561d22ffd57",
"0x27ca72aa253e009e5e4497dd838986c561e7bea129fec930bc276968525456a8",
"0xe26391de668d3eb6f5a3c2f3e14f911dc683873b7ea60d883116c205610b36ff",
"0x691c3c5583c5f6444dc6c2f26315a127fc72ebd4f3848055cc8abb8a941d065b",
"0x449578293a1dce8d3c147fed564a765515d090e8cd8866209648eb86cd5c1090",
"0xb79c6f59d533663ca4fa3a70e9c8be18a3761edc43923c2ecd0904447f654f90",
"0xc03863ffa85dd15e0d774ea20006dffd01a868dbf3ff2abe04ccdbf4f027d7ec",
"0x28bc1a65696947beb387adbbeabb5328e5f812c435db288688041d9a8c6ab372",
"0x6dca99c2103d3894ba83c75e0fa0d42f722e5e93fe6f7a6a55a80cf2907a1a5e",
"0x75a7c5f00d79f1b30f82855a8b25077182f1abfd5dbccdf18fe1276e6c9e6a1e",
"0x3fc5a320d8c16bcfe2eda847582d34731abc12a3bffbf334a238b47c0bacb90d",
"0x47a61770f0771ba34d8e8ab883a3d588769a8d387eb5531b4befccb7ea23a6d3",
"0xdc8d0b20e8d8b0fbce50d24eaa36bc56467f35459139dda5e42ffebb1060535c",
"0x65bebb9628b5bf5d5e1dbedf00a7e6610fb5615c7ff9d92adaa135bc88f90648",
"0x9d2f5b7858631ee196bc24d14d2ef1ce07af081d8fe27b2be70ab90bd8edf930",
"0xd7724915af54b4d2c896d05c039f5ba508c878d524eb132c09c3abc22f6111ca",
"0xfda6f72dde86c0b8f84ea7c1e157f1d207dd2e974589cc351404bd5a01fe1d9d",
"0x3fae3676e266af80b0cc810b6b491750b64b013da78935a288b93e33215bee32"
]
},
],
}; };
export const testTransaction = { export const testTransaction = {
mainnet: [ mainnet: [
@ -138,7 +234,42 @@ export const testTransaction = {
accessList: [] accessList: []
} }
], ],
goerli: [] goerli: [],
sepolia: [
{
test: "EIP-4844-BLOb-tx",
hash: "0x6c4aef4c26410b1fcbf24d0148e3d66a10cb3e9ad4ca10a71782489688cdd45a",
blockHash: '0xa76eb2ed547798d6010f599902788136f0cd289e2c6df5bbf5242e36e356124d',
blockNumber: 5198187,
// index: 185,
type: 3,
from: '0x1803c760451DC8da8935c7B7E47e1c60910E6986',
to: '0x4f56fFC63c28b72F79b02E91F11a4707bac4043C',
gasLimit: BigInt("21000"),
nonce: 1635,
data: '0x',
value: BigInt("0"),
gasPrice: BigInt("54793932840"),
maxPriorityFeePerGas: BigInt("6000000000"),
maxFeePerGas: BigInt("600000000000"),
maxFeePerBlobGas: BigInt("60000000000"),
chainId: BigInt(11155111),
signature: {
r: "0x56fc10a770e9fa39a30f71a56d13affbdc390a1bfb419ff806e59b54bfc8bab1",
s: "0x35be8b0c774c179520dd43df46925361c4817472441d7dd5162d43efc90679f1",
yParity: 1,
networkV: null
},
creates: null,
accessList: [],
blobVersionedHashes: [
"0x010264a7b018f0edbe5caa5cb309ca50d3d7c6c7c990d21bf30a7f18ffd06cd6",
"0x017fe9ef61e3c501acec804ec15849d977433f4cf87050c098272dd1257f9c68",
"0x019975416c9d7c70ba9cc041464a6e1c3e4f176bdab463573504b55c681364c8",
"0x0123ae55ad7d8e8afec2202bdc6dfb931efc8990acf29afbd0c3c0ef61eae92d"
]
}
]
}; };
export const testReceipt = { export const testReceipt = {
mainnet: [ mainnet: [
@ -224,10 +355,33 @@ export const testReceipt = {
index: 0x1e index: 0x1e
} }
], ],
goerli: [] goerli: [],
sepolia: [
{
test: "eip-4844-BLOb-receipt",
//byzantium: true,
blockHash: "0xa76eb2ed547798d6010f599902788136f0cd289e2c6df5bbf5242e36e356124d",
blockNumber: 5198187,
type: 3,
contractAddress: null,
cumulativeGasUsed: BigInt("930313"),
from: "0x1803c760451DC8da8935c7B7E47e1c60910E6986",
gasUsed: BigInt("21000"),
gasPrice: BigInt("54793932840"),
logs: [],
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
root: null,
status: 1,
to: "0x4f56fFC63c28b72F79b02E91F11a4707bac4043C",
hash: "0x6c4aef4c26410b1fcbf24d0148e3d66a10cb3e9ad4ca10a71782489688cdd45a",
index: 24,
blobGasUsed: BigInt("524288"),
blobGasPrice: BigInt("23276216517"),
}
]
}; };
export const networkNames = [ export const networkNames = [
"mainnet", "goerli" "mainnet", "goerli", "sepolia"
]; ];
export function networkFeatureAtBlock(feature, block) { export function networkFeatureAtBlock(feature, block) {
switch (feature) { switch (feature) {

File diff suppressed because one or more lines are too long

@ -99,12 +99,25 @@ describe("Test Provider Address operations", function () {
}); });
function assertObj(prefix, actual, expected) { function assertObj(prefix, actual, expected) {
assert.ok(actual != null, `${prefix} is null`); assert.ok(actual != null, `${prefix} is null`);
if (typeof (expected) !== "object") {
assert.equal(actual, expected, prefix);
return;
}
for (const key in expected) { for (const key in expected) {
if (expected[key] === undefined) { if (expected[key] === undefined) {
continue; continue;
} }
if (Array.isArray(expected[key])) {
assert.ok(Array.isArray(actual[key]), `Array.isArray(${prefix}.${key})`);
assert.equal(actual[key].length, expected[key].length, `${prefix}.${key}.length`);
for (let i = 0; i < expected[key].length; i++) {
assertObj(`${prefix}[${i}]`, actual[key][i], expected[key][i]);
}
}
else {
assert.equal(actual[key], expected[key], `${prefix}.${key}`); assert.equal(actual[key], expected[key], `${prefix}.${key}`);
} }
}
} }
function assertBlock(actual, expected) { function assertBlock(actual, expected) {
// Check transactions // Check transactions
@ -223,6 +236,7 @@ describe("Test Networks", function () {
continue; continue;
} }
it(`checks network chainId: ${providerName}/${networkName}`, async function () { it(`checks network chainId: ${providerName}/${networkName}`, async function () {
this.timeout(10000);
const chainId = await provider.send("eth_chainId", []); const chainId = await provider.send("eth_chainId", []);
assert.equal(parseInt(chainId), network.chainId, "chainId"); assert.equal(parseInt(chainId), network.chainId, "chainId");
}); });

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
import type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams } from "./formatting.js"; import type { BlockParams, LogParams, TransactionReceiptParams, TransactionResponseParams } from "./formatting.js";
export type FormatFunc = (value: any) => any; export type FormatFunc = (value: any) => any;
export declare function allowNull(format: FormatFunc, nullValue?: any): FormatFunc; export declare function allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
export declare function arrayOf(format: FormatFunc): FormatFunc; export declare function arrayOf(format: FormatFunc, allowNull?: boolean): FormatFunc;
export declare function object(format: Record<string, FormatFunc>, altNames?: Record<string, Array<string>>): FormatFunc; export declare function object(format: Record<string, FormatFunc>, altNames?: Record<string, Array<string>>): FormatFunc;
export declare function formatBoolean(value: any): boolean; export declare function formatBoolean(value: any): boolean;
export declare function formatData(value: string): string; export declare function formatData(value: string): string;

@ -1 +1 @@
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src.ts/providers/format.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACR,WAAW,EAAE,SAAS,EACtB,wBAAwB,EAAE,yBAAyB,EACtD,MAAM,iBAAiB,CAAC;AAKzB,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAE7C,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,GAAG,GAA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,EAAE,OAAO,GAAG,UAAU,CAM3E;AAKD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAwB/G;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAQjD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAG7C;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAKhD;AAgBD,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAE/C;AAuBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,WAAW,CAOnD;AAeD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,SAAS,CAEtD;AA4BD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,GAAG,GAAG,wBAAwB,CAE7E;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,GAAG,GAAG,yBAAyB,CAiH/E"}

@ -14,8 +14,11 @@ export function allowNull(format, nullValue) {
return format(value); return format(value);
}); });
} }
export function arrayOf(format) { export function arrayOf(format, allowNull) {
return ((array) => { return ((array) => {
if (allowNull && array == null) {
return null;
}
if (!Array.isArray(array)) { if (!Array.isArray(array)) {
throw new Error("not an array"); throw new Error("not an array");
} }
@ -102,6 +105,8 @@ const _formatBlock = object({
difficulty: getBigInt, difficulty: getBigInt,
gasLimit: getBigInt, gasLimit: getBigInt,
gasUsed: getBigInt, gasUsed: getBigInt,
blobGasUsed: allowNull(getBigInt, null),
excessBlobGas: allowNull(getBigInt, null),
miner: allowNull(getAddress), miner: allowNull(getAddress),
extraData: formatData, extraData: formatData,
baseFeePerGas: allowNull(getBigInt) baseFeePerGas: allowNull(getBigInt)
@ -139,6 +144,7 @@ const _formatTransactionReceipt = object({
index: getNumber, index: getNumber,
root: allowNull(hexlify), root: allowNull(hexlify),
gasUsed: getBigInt, gasUsed: getBigInt,
blobGasUsed: allowNull(getBigInt, null),
logsBloom: allowNull(formatData), logsBloom: allowNull(formatData),
blockHash: formatHash, blockHash: formatHash,
hash: formatHash, hash: formatHash,
@ -147,6 +153,7 @@ const _formatTransactionReceipt = object({
//confirmations: allowNull(getNumber, null), //confirmations: allowNull(getNumber, null),
cumulativeGasUsed: getBigInt, cumulativeGasUsed: getBigInt,
effectiveGasPrice: allowNull(getBigInt), effectiveGasPrice: allowNull(getBigInt),
blobGasPrice: allowNull(getBigInt, null),
status: allowNull(getNumber), status: allowNull(getNumber),
type: allowNull(getNumber, 0) type: allowNull(getNumber, 0)
}, { }, {
@ -172,6 +179,7 @@ export function formatTransactionResponse(value) {
return getNumber(value); return getNumber(value);
}, },
accessList: allowNull(accessListify, null), accessList: allowNull(accessListify, null),
blobVersionedHashes: allowNull(arrayOf(formatHash, true), null),
blockHash: allowNull(formatHash, null), blockHash: allowNull(formatHash, null),
blockNumber: allowNull(getNumber, null), blockNumber: allowNull(getNumber, null),
transactionIndex: allowNull(getNumber, null), transactionIndex: allowNull(getNumber, null),
@ -181,6 +189,7 @@ export function formatTransactionResponse(value) {
gasPrice: allowNull(getBigInt), gasPrice: allowNull(getBigInt),
maxPriorityFeePerGas: allowNull(getBigInt), maxPriorityFeePerGas: allowNull(getBigInt),
maxFeePerGas: allowNull(getBigInt), maxFeePerGas: allowNull(getBigInt),
maxFeePerBlobGas: allowNull(getBigInt, null),
gasLimit: getBigInt, gasLimit: getBigInt,
to: allowNull(getAddress, null), to: allowNull(getAddress, null),
value: getBigInt, value: getBigInt,

File diff suppressed because one or more lines are too long

@ -46,6 +46,16 @@ export interface BlockParams {
* The amount of gas a block consumed. * The amount of gas a block consumed.
*/ */
gasUsed: bigint; gasUsed: bigint;
/**
* The total amount of BLOb gas consumed by transactions within
* the block. See [[link-eip4844].
*/
blobGasUsed?: null | bigint;
/**
* The running total of BLOb gas consumed in excess of the target
* prior to the block. See [[link-eip-4844]].
*/
excessBlobGas?: null | bigint;
/** /**
* The miner (or author) of a block. * The miner (or author) of a block.
*/ */
@ -158,6 +168,10 @@ export interface TransactionReceiptParams {
* The amount of gas consumed executing this transaciton. * The amount of gas consumed executing this transaciton.
*/ */
gasUsed: bigint; gasUsed: bigint;
/**
* The amount of BLOb gas used. See [[link-eip-4844]].
*/
blobGasUsed?: null | bigint;
/** /**
* The total amount of gas consumed during the entire block up to * The total amount of gas consumed during the entire block up to
* and including this transaction. * and including this transaction.
@ -167,6 +181,10 @@ export interface TransactionReceiptParams {
* The actual gas price per gas charged for this transaction. * The actual gas price per gas charged for this transaction.
*/ */
gasPrice?: null | bigint; gasPrice?: null | bigint;
/**
* The actual BLOb gas price that was charged. See [[link-eip-4844]].
*/
blobGasPrice?: null | bigint;
/** /**
* The actual gas price per gas charged for this transaction. * The actual gas price per gas charged for this transaction.
*/ */
@ -244,6 +262,11 @@ export interface TransactionResponseParams {
* will be paid. * will be paid.
*/ */
maxFeePerGas: null | bigint; maxFeePerGas: null | bigint;
/**
* For [[link-eip-4844]] transactions, this is the maximum fee that
* will be paid per BLOb.
*/
maxFeePerBlobGas?: null | bigint;
/** /**
* The transaction data. * The transaction data.
*/ */
@ -264,5 +287,9 @@ export interface TransactionResponseParams {
* The transaction access list. * The transaction access list.
*/ */
accessList: null | AccessList; accessList: null | AccessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
blobVersionedHashes?: null | Array<string>;
} }
//# sourceMappingURL=formatting.d.ts.map //# sourceMappingURL=formatting.d.ts.map

@ -1 +1 @@
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC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AI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;CAC9C"}

@ -1 +1 @@
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8EF,CAAC;AA+QD,CAAC"} {"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src.ts/providers/formatting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0FF,CAAC;AAoSD,CAAC"}

@ -318,6 +318,16 @@ export declare class Block implements BlockParams, Iterable<string> {
* The total gas used in this block. * The total gas used in this block.
*/ */
readonly gasUsed: bigint; readonly gasUsed: bigint;
/**
* The total amount of blob gas consumed by the transactions
* within the block. See [[link-eip-4844]].
*/
readonly blobGasUsed: null | bigint;
/**
* The running total of blob gas consumed in excess of the
* target, prior to the block. See [[link-eip-4844]].
*/
readonly excessBlobGas: null | bigint;
/** /**
* The miner coinbase address, wihch receives any subsidies for * The miner coinbase address, wihch receives any subsidies for
* including this block. * including this block.
@ -539,6 +549,10 @@ export declare class TransactionReceipt implements TransactionReceiptParams, Ite
* entire gas limit. After the transaction, the difference is refunded. * entire gas limit. After the transaction, the difference is refunded.
*/ */
readonly gasUsed: bigint; readonly gasUsed: bigint;
/**
* The gas used for BLObs. See [[link-eip-4844]].
*/
readonly blobGasUsed: null | bigint;
/** /**
* The amount of gas used by all transactions within the block for this * The amount of gas used by all transactions within the block for this
* and all transactions with a lower ``index``. * and all transactions with a lower ``index``.
@ -555,6 +569,10 @@ export declare class TransactionReceipt implements TransactionReceiptParams, Ite
* fee is protocol-enforced. * fee is protocol-enforced.
*/ */
readonly gasPrice: bigint; readonly gasPrice: bigint;
/**
* The price paid per BLOB in gas. See [[link-eip-4844]].
*/
readonly blobGasPrice: null | bigint;
/** /**
* The [[link-eip-2718]] transaction type. * The [[link-eip-2718]] transaction type.
*/ */
@ -737,6 +755,10 @@ export declare class TransactionResponse implements TransactionLike<string>, Tra
* to charge the sender. * to charge the sender.
*/ */
readonly maxFeePerGas: null | bigint; readonly maxFeePerGas: null | bigint;
/**
* The [[link-eip-4844]] max fee per BLOb gas.
*/
readonly maxFeePerBlobGas: null | bigint;
/** /**
* The data. * The data.
*/ */
@ -759,6 +781,10 @@ export declare class TransactionResponse implements TransactionLike<string>, Tra
* support it, otherwise ``null``. * support it, otherwise ``null``.
*/ */
readonly accessList: null | AccessList; readonly accessList: null | AccessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
readonly blobVersionedHashes: null | Array<string>;
/** /**
* @_ignore: * @_ignore:
*/ */
@ -841,6 +867,17 @@ export declare class TransactionResponse implements TransactionLike<string>, Tra
maxFeePerGas: bigint; maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint; maxPriorityFeePerGas: bigint;
}); });
/**
* Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
* transaction. See [[link-eip-4844]].
*/
isCancun(): this is (TransactionResponse & {
accessList: AccessList;
maxFeePerGas: bigint;
maxPriorityFeePerGas: bigint;
maxFeePerBlobGas: bigint;
blobVersionedHashes: Array<string>;
});
/** /**
* Returns a filter which can be used to listen for orphan events * Returns a filter which can be used to listen for orphan events
* that evict this transaction. * that evict this transaction.

File diff suppressed because one or more lines are too long

@ -173,6 +173,16 @@ export class Block {
* The total gas used in this block. * The total gas used in this block.
*/ */
gasUsed; gasUsed;
/**
* The total amount of blob gas consumed by the transactions
* within the block. See [[link-eip-4844]].
*/
blobGasUsed;
/**
* The running total of blob gas consumed in excess of the
* target, prior to the block. See [[link-eip-4844]].
*/
excessBlobGas;
/** /**
* The miner coinbase address, wihch receives any subsidies for * The miner coinbase address, wihch receives any subsidies for
* including this block. * including this block.
@ -214,6 +224,8 @@ export class Block {
difficulty: block.difficulty, difficulty: block.difficulty,
gasLimit: block.gasLimit, gasLimit: block.gasLimit,
gasUsed: block.gasUsed, gasUsed: block.gasUsed,
blobGasUsed: block.blobGasUsed,
excessBlobGas: block.excessBlobGas,
miner: block.miner, miner: block.miner,
extraData: block.extraData, extraData: block.extraData,
baseFeePerGas: getValue(block.baseFeePerGas) baseFeePerGas: getValue(block.baseFeePerGas)
@ -263,6 +275,8 @@ export class Block {
extraData, extraData,
gasLimit: toJson(gasLimit), gasLimit: toJson(gasLimit),
gasUsed: toJson(gasUsed), gasUsed: toJson(gasUsed),
blobGasUsed: toJson(this.blobGasUsed),
excessBlobGas: toJson(this.excessBlobGas),
hash, miner, nonce, number, parentHash, timestamp, hash, miner, nonce, number, parentHash, timestamp,
transactions, transactions,
}; };
@ -566,6 +580,10 @@ export class TransactionReceipt {
* entire gas limit. After the transaction, the difference is refunded. * entire gas limit. After the transaction, the difference is refunded.
*/ */
gasUsed; gasUsed;
/**
* The gas used for BLObs. See [[link-eip-4844]].
*/
blobGasUsed;
/** /**
* The amount of gas used by all transactions within the block for this * The amount of gas used by all transactions within the block for this
* and all transactions with a lower ``index``. * and all transactions with a lower ``index``.
@ -582,6 +600,10 @@ export class TransactionReceipt {
* fee is protocol-enforced. * fee is protocol-enforced.
*/ */
gasPrice; gasPrice;
/**
* The price paid per BLOB in gas. See [[link-eip-4844]].
*/
blobGasPrice;
/** /**
* The [[link-eip-2718]] transaction type. * The [[link-eip-2718]] transaction type.
*/ */
@ -629,7 +651,9 @@ export class TransactionReceipt {
logsBloom: tx.logsBloom, logsBloom: tx.logsBloom,
gasUsed: tx.gasUsed, gasUsed: tx.gasUsed,
cumulativeGasUsed: tx.cumulativeGasUsed, cumulativeGasUsed: tx.cumulativeGasUsed,
blobGasUsed: tx.blobGasUsed,
gasPrice, gasPrice,
blobGasPrice: tx.blobGasPrice,
type: tx.type, type: tx.type,
//byzantium: tx.byzantium, //byzantium: tx.byzantium,
status: tx.status, status: tx.status,
@ -654,6 +678,8 @@ export class TransactionReceipt {
cumulativeGasUsed: toJson(this.cumulativeGasUsed), cumulativeGasUsed: toJson(this.cumulativeGasUsed),
from, from,
gasPrice: toJson(this.gasPrice), gasPrice: toJson(this.gasPrice),
blobGasUsed: toJson(this.blobGasUsed),
blobGasPrice: toJson(this.blobGasPrice),
gasUsed: toJson(this.gasUsed), gasUsed: toJson(this.gasUsed),
hash, index, logs, logsBloom, root, status, to hash, index, logs, logsBloom, root, status, to
}; };
@ -822,6 +848,10 @@ export class TransactionResponse {
* to charge the sender. * to charge the sender.
*/ */
maxFeePerGas; maxFeePerGas;
/**
* The [[link-eip-4844]] max fee per BLOb gas.
*/
maxFeePerBlobGas;
/** /**
* The data. * The data.
*/ */
@ -844,6 +874,10 @@ export class TransactionResponse {
* support it, otherwise ``null``. * support it, otherwise ``null``.
*/ */
accessList; accessList;
/**
* The [[link-eip-4844]] BLOb versioned hashes.
*/
blobVersionedHashes;
#startBlock; #startBlock;
/** /**
* @_ignore: * @_ignore:
@ -864,19 +898,22 @@ export class TransactionResponse {
this.gasPrice = tx.gasPrice; this.gasPrice = tx.gasPrice;
this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null; this.maxPriorityFeePerGas = (tx.maxPriorityFeePerGas != null) ? tx.maxPriorityFeePerGas : null;
this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null; this.maxFeePerGas = (tx.maxFeePerGas != null) ? tx.maxFeePerGas : null;
this.maxFeePerBlobGas = (tx.maxFeePerBlobGas != null) ? tx.maxFeePerBlobGas : null;
this.chainId = tx.chainId; this.chainId = tx.chainId;
this.signature = tx.signature; this.signature = tx.signature;
this.accessList = (tx.accessList != null) ? tx.accessList : null; this.accessList = (tx.accessList != null) ? tx.accessList : null;
this.blobVersionedHashes = (tx.blobVersionedHashes != null) ? tx.blobVersionedHashes : null;
this.#startBlock = -1; this.#startBlock = -1;
} }
/** /**
* Returns a JSON-compatible representation of this transaction. * Returns a JSON-compatible representation of this transaction.
*/ */
toJSON() { toJSON() {
const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList } = this; const { blockNumber, blockHash, index, hash, type, to, from, nonce, data, signature, accessList, blobVersionedHashes } = this;
return { return {
_type: "TransactionReceipt", _type: "TransactionResponse",
accessList, blockNumber, blockHash, accessList, blockNumber, blockHash,
blobVersionedHashes,
chainId: toJson(this.chainId), chainId: toJson(this.chainId),
data, from, data, from,
gasLimit: toJson(this.gasLimit), gasLimit: toJson(this.gasLimit),
@ -884,6 +921,7 @@ export class TransactionResponse {
hash, hash,
maxFeePerGas: toJson(this.maxFeePerGas), maxFeePerGas: toJson(this.maxFeePerGas),
maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas), maxPriorityFeePerGas: toJson(this.maxPriorityFeePerGas),
maxFeePerBlobGas: toJson(this.maxFeePerBlobGas),
nonce, signature, to, index, type, nonce, signature, to, index, type,
value: toJson(this.value), value: toJson(this.value),
}; };
@ -1165,6 +1203,13 @@ export class TransactionResponse {
isLondon() { isLondon() {
return (this.type === 2); return (this.type === 2);
} }
/**
* Returns true if hte transaction is a Cancun (i.e. ``type == 3``)
* transaction. See [[link-eip-4844]].
*/
isCancun() {
return (this.type === 3);
}
/** /**
* Returns a filter which can be used to listen for orphan events * Returns a filter which can be used to listen for orphan events
* that evict this transaction. * that evict this transaction.

File diff suppressed because one or more lines are too long

@ -93,7 +93,7 @@
"url": "https://www.buymeacoffee.com/ricmoo" "url": "https://www.buymeacoffee.com/ricmoo"
} }
], ],
"gitHead": "b69f43bc6f35da881ca7a0c8ccc5fda92edd076d", "gitHead": "7b4f2c1a74db411829b5e8ef758bfa2ee21e5890",
"homepage": "https://ethers.org", "homepage": "https://ethers.org",
"keywords": [ "keywords": [
"ethereum", "ethereum",