MinedBlock
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:269
An Interface to indicate a [[Block]] has been included in the blockchain. This asserts a Type Guard that necessary properties are non-null.
Before a block is included, it is a //pending// block.
Extends
Section titled “Extends”Properties
Section titled “Properties”baseFeePerGas
Section titled “baseFeePerGas”readonly baseFeePerGas: null | bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:394
The base fee per gas that all transactions in this block were charged.
This adjusts after each block, depending on how congested the network is.
Inherited from
Section titled “Inherited from”blobGasUsed
Section titled “blobGasUsed”readonly blobGasUsed: null | bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:367
The total amount of blob gas consumed by the transactions within the block. See [[link-eip-4844]].
Inherited from
Section titled “Inherited from”readonly date: Date;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:285
The block date, created from the [[timestamp]].
Overrides
Section titled “Overrides”difficulty
Section titled “difficulty”readonly difficulty: bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:345
The difficulty target.
On legacy networks, this is the proof-of-work target required for a block to meet the protocol rules to be included.
On modern networks, this is a random number arrived at using randao. @TODO: Find links?
Inherited from
Section titled “Inherited from”excessBlobGas
Section titled “excessBlobGas”readonly excessBlobGas: null | bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:372
The running total of blob gas consumed in excess of the target, prior to the block. See [[link-eip-4844]].
Inherited from
Section titled “Inherited from”extraData
Section titled “extraData”readonly extraData: string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:386
Any extra data the validator wished to include.
Inherited from
Section titled “Inherited from”gasLimit
Section titled “gasLimit”readonly gasLimit: bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:349
The total gas limit for this block.
Inherited from
Section titled “Inherited from”gasUsed
Section titled “gasUsed”readonly gasUsed: bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:353
The total gas used in this block.
Inherited from
Section titled “Inherited from”readonly hash: string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:277
The block hash.
Overrides
Section titled “Overrides”readonly miner: string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:290
The miner of the block, also known as the author
or
block producer
.
Overrides
Section titled “Overrides”readonly nonce: string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:335
The nonce.
On legacy networks, this is the random number inserted which permitted the difficulty target to be reached.
Inherited from
Section titled “Inherited from”number
Section titled “number”readonly number: number;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:273
The block number also known as the block height.
Overrides
Section titled “Overrides”parentBeaconBlockRoot
Section titled “parentBeaconBlockRoot”parentBeaconBlockRoot: null | string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:328
The hash tree root of the parent beacon block for the given execution block. See [[link-eip-4788]].
Inherited from
Section titled “Inherited from”MinedBlock
.parentBeaconBlockRoot
parentHash
Section titled “parentHash”readonly parentHash: string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:323
The block hash of the parent block.
Inherited from
Section titled “Inherited from”prevRandao
Section titled “prevRandao”readonly prevRandao: null | string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:382
The latest RANDAO mix of the post beacon state of the previous block.
Inherited from
Section titled “Inherited from”provider
Section titled “provider”readonly provider: Provider;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:302
The provider connected to the block used to fetch additional details if necessary.
Inherited from
Section titled “Inherited from”receiptsRoot
Section titled “receiptsRoot”readonly receiptsRoot: null | string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:362
The hash of the transaction receipts trie.
Inherited from
Section titled “Inherited from”stateRoot
Section titled “stateRoot”readonly stateRoot: null | string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:358
The root hash for the global state after applying changes in this block.
Inherited from
Section titled “Inherited from”timestamp
Section titled “timestamp”readonly timestamp: number;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:281
The block timestamp, in seconds from epoch.
Overrides
Section titled “Overrides”Accessors
Section titled “Accessors”length
Section titled “length”Get Signature
Section titled “Get Signature”get length(): number;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:424
The number of transactions in this block.
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”prefetchedTransactions
Section titled “prefetchedTransactions”Get Signature
Section titled “Get Signature”get prefetchedTransactions(): TransactionResponse[];
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:415
Returns the complete transactions, in the order they were executed within the block.
This is only available for blocks which prefetched
transactions, by passing true
to %%prefetchTxs%%
into [[Provider-getBlock]].
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”transactions
Section titled “transactions”Get Signature
Section titled “Get Signature”get transactions(): readonly string[];
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:406
Returns the list of transaction hashes, in the order they were executed within the block.
Returns
Section titled “Returns”readonly string
[]
The list of transactions in the block.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”[iterator]()
Section titled “[iterator]()”iterator: Iterator<string>;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:420
Returns
Section titled “Returns”Iterator
<string
>
Inherited from
Section titled “Inherited from”getPrefetchedTransaction()
Section titled “getPrefetchedTransaction()”getPrefetchedTransaction(indexOrHash): TransactionResponse;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:439
If a Block was fetched with a request to include the transactions this will allow synchronous access to those transactions.
If the transactions were not prefetched, this will throw.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
indexOrHash | string | number |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Block
.getPrefetchedTransaction
getTransaction()
Section titled “getTransaction()”getTransaction(indexOrHash): Promise<TransactionResponse>;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:432
Get the transaction at %%indexe%% within this block.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
indexOrHash | string | number |
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”isLondon()
Section titled “isLondon()”isLondon(): this is Block & { baseFeePerGas: bigint };
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:448
Returns true if this block is an [[link-eip-2930]] block.
Returns
Section titled “Returns”this is Block & { baseFeePerGas: bigint }
Inherited from
Section titled “Inherited from”isMined()
Section titled “isMined()”isMined(): this is MinedBlock;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:444
Returns true if this block been mined. This provides a type guard for all properties on a [[MinedBlock]].
Returns
Section titled “Returns”this is MinedBlock
Inherited from
Section titled “Inherited from”orphanedEvent()
Section titled “orphanedEvent()”orphanedEvent(): OrphanFilter;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:454
@_ignore:
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”toJSON()
Section titled “toJSON()”toJSON(): any;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:419
Returns a JSON-friendly value.
Returns
Section titled “Returns”any