@ethereumjs/vm / BlockBuilder
Defined in: vm/src/buildBlock.ts:56
new BlockBuilder(
vm
,opts
):BlockBuilder
Defined in: vm/src/buildBlock.ts:88
BlockBuilder
blobGasUsed:
bigint
=BIGINT_0
Defined in: vm/src/buildBlock.ts:64
The cumulative blob gas used by the blobs in a block
gasUsed:
bigint
=BIGINT_0
Defined in: vm/src/buildBlock.ts:60
The cumulative gas used by the transactions added to the block.
get minerValue():
bigint
Defined in: vm/src/buildBlock.ts:84
bigint
get transactionReceipts():
TxReceipt
[]
Defined in: vm/src/buildBlock.ts:80
addTransaction(
tx
,__namedParameters
):Promise
<RunTxResult
>
Defined in: vm/src/buildBlock.ts:218
Run and add a transaction to the block being built. Please note that this modifies the state of the VM. Throws if the transaction’s gasLimit is greater than the remaining gas in the block.
TypedTransaction
boolean
boolean
Promise
<RunTxResult
>
build(
sealOpts?
):Promise
<{block
:Block
;requests
:undefined
|CLRequest
<CLRequestType
>[]; }>
Defined in: vm/src/buildBlock.ts:320
This method constructs the finalized block, including withdrawals and any CLRequests. It also:
nonce
and mixHash
,
which is validated along with the block number and difficulty by ethash.
For PoA, please pass blockOption.cliqueSigner
into the buildBlock constructor,
as the signer will be awarded the txs amount spent on gas as they are added.Note: we add CLRequests here because they can be generated at any time during the lifecycle of a pending block so need to be provided only when the block is finalized.
Promise
<{ block
: Block
; requests
: undefined
| CLRequest
<CLRequestType
>[]; }>
getStatus():
BlockStatus
Defined in: vm/src/buildBlock.ts:140
BlockStatus
initState():
Promise
<void
>
Defined in: vm/src/buildBlock.ts:404
Promise
<void
>
logsBloom():
Uint8Array
<ArrayBufferLike
>
Defined in: vm/src/buildBlock.ts:157
Calculates and returns the logs bloom for the block.
Uint8Array
<ArrayBufferLike
>
receiptTrie():
Promise
<Uint8Array
<ArrayBufferLike
>>
Defined in: vm/src/buildBlock.ts:169
Calculates and returns the receiptTrie for the block.
Promise
<Uint8Array
<ArrayBufferLike
>>
revert():
Promise
<void
>
Defined in: vm/src/buildBlock.ts:298
Reverts the checkpoint on the StateManager to reset the state from any transactions that have been run.
Promise
<void
>
transactionsTrie():
Promise
<Uint8Array
<ArrayBufferLike
>>
Defined in: vm/src/buildBlock.ts:147
Calculates and returns the transactionsTrie for the block.
Promise
<Uint8Array
<ArrayBufferLike
>>