diff --git a/package-lock.json b/package-lock.json index 52e668a0a0..541df8edad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17763,14 +17763,14 @@ }, "packages/block": { "name": "@ethereumjs/block", - "version": "4.0.1", + "version": "4.1.0", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "ethereum-cryptography": "^1.1.2", "ethers": "^5.7.1" }, @@ -17783,15 +17783,15 @@ }, "packages/blockchain": { "name": "@ethereumjs/blockchain", - "version": "6.0.2", + "version": "6.1.0", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/ethash": "^2.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/ethash": "^2.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/util": "^8.0.3", "abstract-level": "^1.0.3", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", @@ -17810,23 +17810,23 @@ }, "packages/client": { "name": "@ethereumjs/client", - "version": "0.6.5", + "version": "0.6.6", "hasInstallScript": true, "license": "MPL-2.0", "dependencies": { "@chainsafe/libp2p-noise": "^4.1.1", - "@ethereumjs/block": "4.0.1", - "@ethereumjs/blockchain": "6.0.2", - "@ethereumjs/common": "3.0.1", - "@ethereumjs/devp2p": "5.0.1", - "@ethereumjs/ethash": "2.0.1", - "@ethereumjs/evm": "1.2.2", + "@ethereumjs/block": "4.1.0", + "@ethereumjs/blockchain": "6.1.0", + "@ethereumjs/common": "3.0.2", + "@ethereumjs/devp2p": "5.0.2", + "@ethereumjs/ethash": "2.0.2", + "@ethereumjs/evm": "1.2.3", "@ethereumjs/rlp": "4.0.0", - "@ethereumjs/statemanager": "1.0.1", - "@ethereumjs/trie": "5.0.1", - "@ethereumjs/tx": "4.0.1", - "@ethereumjs/util": "8.0.2", - "@ethereumjs/vm": "6.2.0", + "@ethereumjs/statemanager": "1.0.2", + "@ethereumjs/trie": "5.0.2", + "@ethereumjs/tx": "4.0.2", + "@ethereumjs/util": "8.0.3", + "@ethereumjs/vm": "6.3.0", "abstract-level": "^1.0.3", "body-parser": "^1.19.2", "chalk": "^4.1.2", @@ -17943,21 +17943,21 @@ }, "packages/common": { "name": "@ethereumjs/common", - "version": "3.0.1", + "version": "3.0.2", "license": "MIT", "dependencies": { - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "crc-32": "^1.2.0" } }, "packages/devp2p": { "name": "@ethereumjs/devp2p", - "version": "5.0.1", + "version": "5.0.2", "license": "MIT", "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "@scure/base": "1.1.1", "@types/bl": "^2.1.0", "@types/k-bucket": "^5.0.0", @@ -17974,8 +17974,8 @@ "snappyjs": "^0.6.1" }, "devDependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/tx": "^4.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/tx": "^4.0.2", "@types/chalk": "^2.2.0", "@types/debug": "^4.1.4", "@types/ip": "^1.1.0", @@ -18045,18 +18045,18 @@ }, "packages/ethash": { "name": "@ethereumjs/ethash", - "version": "2.0.1", + "version": "2.0.2", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/block": "^4.0.1", + "@ethereumjs/block": "^4.1.0", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "abstract-level": "^1.0.3", "bigint-crypto-utils": "^3.0.23", "ethereum-cryptography": "^1.1.2" }, "devDependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "memory-level": "^1.0.0" }, "engines": { @@ -18065,11 +18065,11 @@ }, "packages/evm": { "name": "@ethereumjs/evm", - "version": "1.2.2", + "version": "1.2.3", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/util": "^8.0.3", "@ethersproject/providers": "^5.7.1", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", @@ -18077,7 +18077,7 @@ "rustbn.js": "~0.2.0" }, "devDependencies": { - "@ethereumjs/statemanager": "^1.0.1", + "@ethereumjs/statemanager": "^1.0.2", "@ethersproject/abi": "^5.0.12", "@types/benchmark": "^1.0.33", "@types/core-js": "^2.5.0", @@ -18108,10 +18108,10 @@ }, "packages/statemanager": { "name": "@ethereumjs/statemanager", - "version": "1.0.1", + "version": "1.0.2", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", @@ -18119,9 +18119,9 @@ "js-sdsl": "^4.1.4" }, "devDependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/util": "^8.0.3", "@types/node": "^16.11.7", "@types/tape": "^4.13.2", "debug": "^4.3.3", @@ -18142,11 +18142,11 @@ }, "packages/trie": { "name": "@ethereumjs/trie", - "version": "5.0.1", + "version": "5.0.2", "license": "MPL-2.0", "dependencies": { "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "@types/readable-stream": "^2.3.13", "ethereum-cryptography": "^1.1.2", "readable-stream": "^3.6.0" @@ -18181,12 +18181,12 @@ }, "packages/tx": { "name": "@ethereumjs/tx", - "version": "4.0.1", + "version": "4.0.2", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "ethereum-cryptography": "^1.1.2", "ethers": "^5.7.1" }, @@ -18202,7 +18202,7 @@ }, "packages/util": { "name": "@ethereumjs/util", - "version": "8.0.2", + "version": "8.0.3", "license": "MPL-2.0", "dependencies": { "@ethereumjs/rlp": "^4.0.0-beta.2", @@ -18219,18 +18219,18 @@ }, "packages/vm": { "name": "@ethereumjs/vm", - "version": "6.2.0", + "version": "6.3.0", "license": "MPL-2.0", "dependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/blockchain": "^6.0.2", - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/evm": "^1.2.2", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/blockchain": "^6.1.0", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/evm": "^1.2.3", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/statemanager": "^1.0.1", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/statemanager": "^1.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", "mcl-wasm": "^0.7.1", @@ -19441,11 +19441,11 @@ "@ethereumjs/block": { "version": "file:packages/block", "requires": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "@types/lru-cache": "^5.1.0", "ethereum-cryptography": "^1.1.2", "ethers": "^5.7.1" @@ -19454,12 +19454,12 @@ "@ethereumjs/blockchain": { "version": "file:packages/blockchain", "requires": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/ethash": "^2.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/ethash": "^2.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/util": "^8.0.3", "@types/async": "^2.4.1", "@types/level-errors": "^3.0.0", "@types/lru-cache": "^5.1.0", @@ -19475,18 +19475,18 @@ "version": "file:packages/client", "requires": { "@chainsafe/libp2p-noise": "^4.1.1", - "@ethereumjs/block": "4.0.1", - "@ethereumjs/blockchain": "6.0.2", - "@ethereumjs/common": "3.0.1", - "@ethereumjs/devp2p": "5.0.1", - "@ethereumjs/ethash": "2.0.1", - "@ethereumjs/evm": "1.2.2", + "@ethereumjs/block": "4.1.0", + "@ethereumjs/blockchain": "6.1.0", + "@ethereumjs/common": "3.0.2", + "@ethereumjs/devp2p": "5.0.2", + "@ethereumjs/ethash": "2.0.2", + "@ethereumjs/evm": "1.2.3", "@ethereumjs/rlp": "4.0.0", - "@ethereumjs/statemanager": "1.0.1", - "@ethereumjs/trie": "5.0.1", - "@ethereumjs/tx": "4.0.1", - "@ethereumjs/util": "8.0.2", - "@ethereumjs/vm": "6.2.0", + "@ethereumjs/statemanager": "1.0.2", + "@ethereumjs/trie": "5.0.2", + "@ethereumjs/tx": "4.0.2", + "@ethereumjs/util": "8.0.3", + "@ethereumjs/vm": "6.3.0", "@types/body-parser": "^1.19.2", "@types/connect": "^3.4.35", "@types/fs-extra": "^9.0.13", @@ -19577,18 +19577,18 @@ "@ethereumjs/common": { "version": "file:packages/common", "requires": { - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "crc-32": "^1.2.0" } }, "@ethereumjs/devp2p": { "version": "file:packages/devp2p", "requires": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "@scure/base": "1.1.1", "@types/bl": "^2.1.0", "@types/chalk": "^2.2.0", @@ -19654,10 +19654,10 @@ "@ethereumjs/ethash": { "version": "file:packages/ethash", "requires": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "abstract-level": "^1.0.3", "bigint-crypto-utils": "^3.0.23", "ethereum-cryptography": "^1.1.2", @@ -19667,9 +19667,9 @@ "@ethereumjs/evm": { "version": "file:packages/evm", "requires": { - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/statemanager": "^1.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/statemanager": "^1.0.2", + "@ethereumjs/util": "^8.0.3", "@ethersproject/abi": "^5.0.12", "@ethersproject/providers": "^5.7.1", "@types/benchmark": "^1.0.33", @@ -19695,11 +19695,11 @@ "@ethereumjs/statemanager": { "version": "file:packages/statemanager", "requires": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/util": "^8.0.3", "@types/node": "^16.11.7", "@types/tape": "^4.13.2", "debug": "^4.3.3", @@ -19724,7 +19724,7 @@ "version": "file:packages/trie", "requires": { "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "@types/benchmark": "^1.0.33", "@types/readable-stream": "^2.3.13", "0x": "^4.9.1", @@ -19753,9 +19753,9 @@ "@ethereumjs/tx": { "version": "file:packages/tx", "requires": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "@types/minimist": "^1.2.0", "@types/node-dir": "^0.0.34", "ethereum-cryptography": "^1.1.2", @@ -19777,15 +19777,15 @@ "@ethereumjs/vm": { "version": "file:packages/vm", "requires": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/blockchain": "^6.0.2", - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/evm": "^1.2.2", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/blockchain": "^6.1.0", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/evm": "^1.2.3", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/statemanager": "^1.0.1", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/statemanager": "^1.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "@ethersproject/abi": "^5.0.12", "@types/benchmark": "^1.0.33", "@types/core-js": "^2.5.0", diff --git a/packages/block/CHANGELOG.md b/packages/block/CHANGELOG.md index 85b34e2cd6..a60f6c4da1 100644 --- a/packages/block/CHANGELOG.md +++ b/packages/block/CHANGELOG.md @@ -6,6 +6,53 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 4.1.0 - 2022-12-09 + +### Experimental EIP-4895 Beacon Chain Withdrawals Support + +This release comes with experimental [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895) beacon chain withdrawals support, see PR [#2353](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2353) for the plain implementation and PR [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401) for updated calls for the CL/EL engine API. Also note that there is a new helper module in [@ethereumjs/util](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) with a new dedicated `Withdrawal` class together with additional TypeScript types to ease withdrawal handling. + +Withdrawals support can be activated by initializing a respective `Common` object, here is an example for a `Block` object initialization: + +```typescript +import { Block } from '@ethereumjs/block' +import { Common, Chain } from '@ethereumjs/common' +import { Address } from '@ethereumjs/util' +import type { WithdrawalData } from '@ethereumjs/util' + +const common = new Common({ chain: Chain.Mainnet, eips: [4895] }) + +const withdrawal = { + index: BigInt(0), + validatorIndex: BigInt(0), + address: new Address(Buffer.from('20'.repeat(20), 'hex')), + amount: BigInt(1000), +} + +const block = Block.fromBlockData( + { + header: { + withdrawalsRoot: Buffer.from( + '69f28913c562b0d38f8dc81e72eb0d99052444d301bf8158dc1f3f94a4526357', + 'hex' + ), + }, + withdrawals: [withdrawal], + }, + { + common, + } +) +``` + +There is a new data option `withdrawals` to pass in system-level withdrawal operations, the block header also needs to contain a matching `withdrawalsRoot`, which is mandatory to be passed in when `EIP-4895` is activated. + +Validation of the withdrawals trie can be manually triggered with the new async `Block.validateWithdrawalsTrie()` method. + +### Hardfork-By-Time Support + +The Block library is now ready to work with hardforks triggered by timestamp, which will first be applied along the `Shanghai` HF, see PR [#2437](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2437). This is achieved by integrating a new timestamp supporting `@ethereumjs/common` library version. + ## 4.0.1 - 2022-10-18 ### Support for Geth genesis.json Genesis Format diff --git a/packages/block/README.md b/packages/block/README.md index d1d0033372..f12f43747d 100644 --- a/packages/block/README.md +++ b/packages/block/README.md @@ -102,6 +102,43 @@ const blockWithMatchingBaseFee = Block.fromBlockData( EIP-1559 blocks have an extra `baseFeePerGas` field (default: `BigInt(7)`) and can encompass `FeeMarketEIP1559Transaction` txs (type `2`) (supported by `@ethereumjs/tx` `v3.2.0` or higher) as well as `Transaction` legacy txs (internal type `0`) and `AccessListEIP2930Transaction` txs (type `1`). +### EIP-4895 Beacon Chain Withdrawals Blocks (experimental) + +Starting with the `v4.1.0` release there is (experimental) support for [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895) beacon chain withdrawals. Withdrawals support can be activated by initializing a respective `Common` object and then use the `withdrawals` data option to pass in system-level withdrawal operations together with a matching `withdrawalsRoot` (mandatory when `EIP-4895` is activated) along Block creation, see the following example: + +```typescript +import { Block } from '@ethereumjs/block' +import { Common, Chain } from '@ethereumjs/common' +import { Address } from '@ethereumjs/util' +import type { WithdrawalData } from '@ethereumjs/util' + +const common = new Common({ chain: Chain.Mainnet, eips: [4895] }) + +const withdrawal = { + index: BigInt(0), + validatorIndex: BigInt(0), + address: new Address(Buffer.from('20'.repeat(20), 'hex')), + amount: BigInt(1000), +} + +const block = Block.fromBlockData( + { + header: { + withdrawalsRoot: Buffer.from( + '69f28913c562b0d38f8dc81e72eb0d99052444d301bf8158dc1f3f94a4526357', + 'hex' + ), + }, + withdrawals: [withdrawal], + }, + { + common, + } +) +``` + +Validation of the withdrawals trie can be manually triggered with the newly introduced async `Block.validateWithdrawalsTrie()` method. + ### Consensus Types The block library supports the creation as well as consensus format validation of PoW `ethash` and PoA `clique` blocks (so e.g. do specific `extraData` checks on Clique/PoA blocks). diff --git a/packages/block/docs/README.md b/packages/block/docs/README.md index ff5dc87a89..c91a6e3854 100644 --- a/packages/block/docs/README.md +++ b/packages/block/docs/README.md @@ -16,6 +16,7 @@ - [HeaderData](interfaces/HeaderData.md) - [JsonBlock](interfaces/JsonBlock.md) - [JsonHeader](interfaces/JsonHeader.md) +- [JsonRpcBlock](interfaces/JsonRpcBlock.md) ### Type Aliases @@ -24,26 +25,27 @@ - [BlockHeaderBuffer](README.md#blockheaderbuffer) - [TransactionsBuffer](README.md#transactionsbuffer) - [UncleHeadersBuffer](README.md#uncleheadersbuffer) +- [WithdrawalsBuffer](README.md#withdrawalsbuffer) ## Type Aliases ### BlockBodyBuffer -Ƭ **BlockBodyBuffer**: [[`TransactionsBuffer`](README.md#transactionsbuffer), [`UncleHeadersBuffer`](README.md#uncleheadersbuffer)] +Ƭ **BlockBodyBuffer**: [[`TransactionsBuffer`](README.md#transactionsbuffer), [`UncleHeadersBuffer`](README.md#uncleheadersbuffer), WithdrawalsBuffer?] #### Defined in -[types.ts:113](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L113) +[types.ts:128](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L128) ___ ### BlockBuffer -Ƭ **BlockBuffer**: [[`BlockHeaderBuffer`](README.md#blockheaderbuffer), [`TransactionsBuffer`](README.md#transactionsbuffer), [`UncleHeadersBuffer`](README.md#uncleheadersbuffer)] +Ƭ **BlockBuffer**: [[`BlockHeaderBuffer`](README.md#blockheaderbuffer), [`TransactionsBuffer`](README.md#transactionsbuffer), [`UncleHeadersBuffer`](README.md#uncleheadersbuffer)] \| [[`BlockHeaderBuffer`](README.md#blockheaderbuffer), [`TransactionsBuffer`](README.md#transactionsbuffer), [`UncleHeadersBuffer`](README.md#uncleheadersbuffer), [`WithdrawalsBuffer`](README.md#withdrawalsbuffer)] #### Defined in -[types.ts:111](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L111) +[types.ts:124](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L124) ___ @@ -53,7 +55,7 @@ ___ #### Defined in -[types.ts:112](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L112) +[types.ts:127](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L127) ___ @@ -65,7 +67,7 @@ TransactionsBuffer can be an array of serialized txs for Typed Transactions or a #### Defined in -[types.ts:117](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L117) +[types.ts:132](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L132) ___ @@ -75,4 +77,14 @@ ___ #### Defined in -[types.ts:118](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L118) +[types.ts:133](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L133) + +___ + +### WithdrawalsBuffer + +Ƭ **WithdrawalsBuffer**: `WithdrawalBuffer`[] + +#### Defined in + +[types.ts:122](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L122) diff --git a/packages/block/docs/classes/Block.md b/packages/block/docs/classes/Block.md index f567aebfda..ed3ced6443 100644 --- a/packages/block/docs/classes/Block.md +++ b/packages/block/docs/classes/Block.md @@ -17,6 +17,7 @@ An object that represents the block. - [transactions](Block.md#transactions) - [txTrie](Block.md#txtrie) - [uncleHeaders](Block.md#uncleheaders) +- [withdrawals](Block.md#withdrawals) ### Methods @@ -34,15 +35,20 @@ An object that represents the block. - [validateTransactionsTrie](Block.md#validatetransactionstrie) - [validateUncles](Block.md#validateuncles) - [validateUnclesHash](Block.md#validateuncleshash) +- [validateWithdrawalsTrie](Block.md#validatewithdrawalstrie) - [fromBlockData](Block.md#fromblockdata) +- [fromEthersProvider](Block.md#fromethersprovider) - [fromRLPSerializedBlock](Block.md#fromrlpserializedblock) +- [fromRPC](Block.md#fromrpc) - [fromValuesArray](Block.md#fromvaluesarray) +- [genTransactionsTrieRoot](Block.md#gentransactionstrieroot) +- [genWithdrawalsTrieRoot](Block.md#genwithdrawalstrieroot) ## Constructors ### constructor -• **new Block**(`header?`, `transactions?`, `uncleHeaders?`, `opts?`) +• **new Block**(`header?`, `transactions?`, `uncleHeaders?`, `opts?`, `withdrawals?`) This constructor takes the values, validates them, assigns them and freezes the object. Use the static factory methods to assist in creating a Block object from varying data types and options. @@ -55,10 +61,11 @@ Use the static factory methods to assist in creating a Block object from varying | `transactions` | `TypedTransaction`[] | `[]` | | `uncleHeaders` | [`BlockHeader`](BlockHeader.md)[] | `[]` | | `opts` | [`BlockOptions`](../interfaces/BlockOptions.md) | `{}` | +| `withdrawals?` | `Withdrawal`[] | `undefined` | #### Defined in -[block.ts:137](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L137) +[block.ts:255](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L255) ## Properties @@ -68,7 +75,7 @@ Use the static factory methods to assist in creating a Block object from varying #### Defined in -[block.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L27) +[block.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L40) ___ @@ -78,7 +85,7 @@ ___ #### Defined in -[block.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L23) +[block.ts:35](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L35) ___ @@ -88,7 +95,7 @@ ___ #### Defined in -[block.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L24) +[block.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L36) ___ @@ -98,7 +105,7 @@ ___ #### Defined in -[block.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L26) +[block.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L39) ___ @@ -108,7 +115,17 @@ ___ #### Defined in -[block.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L25) +[block.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L37) + +___ + +### withdrawals + +• `Optional` `Readonly` **withdrawals**: `Withdrawal`[] + +#### Defined in + +[block.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L38) ## Methods @@ -124,7 +141,7 @@ Return a compact error string representation of the object #### Defined in -[block.ts:370](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L370) +[block.ts:518](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L518) ___ @@ -146,7 +163,7 @@ Returns the canonical difficulty for this block. #### Defined in -[block.ts:342](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L342) +[block.ts:484](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L484) ___ @@ -162,7 +179,7 @@ Generates transaction trie for validation. #### Defined in -[block.ts:206](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L206) +[block.ts:337](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L337) ___ @@ -178,7 +195,7 @@ Returns the hash of the block. #### Defined in -[block.ts:185](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L185) +[block.ts:316](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L316) ___ @@ -194,7 +211,7 @@ Determines if this block is the genesis block. #### Defined in -[block.ts:192](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L192) +[block.ts:323](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L323) ___ @@ -210,7 +227,7 @@ Returns a Buffer Array of the raw Buffers of this block, in order. #### Defined in -[block.ts:172](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L172) +[block.ts:298](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L298) ___ @@ -226,7 +243,7 @@ Returns the rlp encoding of the block. #### Defined in -[block.ts:199](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L199) +[block.ts:330](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L330) ___ @@ -242,7 +259,7 @@ Returns the block in JSON format. #### Defined in -[block.ts:359](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L359) +[block.ts:501](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L501) ___ @@ -269,7 +286,7 @@ It checks: #### Defined in -[block.ts:277](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L277) +[block.ts:403](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L403) ___ @@ -292,7 +309,7 @@ Throws if invalid #### Defined in -[block.ts:352](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L352) +[block.ts:494](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L494) ___ @@ -308,7 +325,7 @@ Validates transaction signatures and minimum gas requirements. #### Defined in -[block.ts:239](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L239) +[block.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L365) ▸ **validateTransactions**(`stringError`): `boolean` @@ -324,7 +341,7 @@ Validates transaction signatures and minimum gas requirements. #### Defined in -[block.ts:240](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L240) +[block.ts:366](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L366) ▸ **validateTransactions**(`stringError`): `string`[] @@ -340,7 +357,7 @@ Validates transaction signatures and minimum gas requirements. #### Defined in -[block.ts:241](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L241) +[block.ts:367](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L367) ___ @@ -357,7 +374,7 @@ and do a check on the root hash. #### Defined in -[block.ts:220](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L220) +[block.ts:346](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L346) ___ @@ -379,7 +396,7 @@ Header does not count an uncle twice. #### Defined in -[block.ts:318](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L318) +[block.ts:460](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L460) ___ @@ -395,7 +412,23 @@ Validates the uncle's hash. #### Defined in -[block.ts:303](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L303) +[block.ts:434](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L434) + +___ + +### validateWithdrawalsTrie + +▸ **validateWithdrawalsTrie**(): `Promise`<`boolean`\> + +Validates the withdrawal root + +#### Returns + +`Promise`<`boolean`\> + +#### Defined in + +[block.ts:443](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L443) ___ @@ -418,7 +451,33 @@ Static constructor to create a block from a block data dictionary #### Defined in -[block.ts:35](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L35) +[block.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L74) + +___ + +### fromEthersProvider + +▸ `Static` **fromEthersProvider**(`provider`, `blockTag`, `opts`): `Promise`<[`Block`](Block.md)\> + +Method to retrieve a block from the provider and format as a [Block](Block.md) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `provider` | `string` \| `JsonRpcProvider` | an Ethers JsonRPCProvider | +| `blockTag` | `string` \| `bigint` | block hash or block number to be run | +| `opts` | [`BlockOptions`](../interfaces/BlockOptions.md) | [BlockOptions](../interfaces/BlockOptions.md) | + +#### Returns + +`Promise`<[`Block`](Block.md)\> + +the block specified by `blockTag` + +#### Defined in + +[block.ts:212](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L212) ___ @@ -441,7 +500,31 @@ Static constructor to create a block from a RLP-serialized block #### Defined in -[block.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L76) +[block.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L126) + +___ + +### fromRPC + +▸ `Static` **fromRPC**(`blockData`, `uncles?`, `opts?`): [`Block`](Block.md) + +Creates a new block object from Ethereum JSON RPC. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `blockData` | [`JsonRpcBlock`](../interfaces/JsonRpcBlock.md) | - | +| `uncles?` | `any`[] | Optional list of Ethereum JSON RPC of uncles (eth_getUncleByBlockHashAndIndex) | +| `opts?` | [`BlockOptions`](../interfaces/BlockOptions.md) | - | + +#### Returns + +[`Block`](Block.md) + +#### Defined in + +[block.ts:201](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L201) ___ @@ -464,4 +547,50 @@ Static constructor to create a block from an array of Buffer values #### Defined in -[block.ts:92](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L92) +[block.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L142) + +___ + +### genTransactionsTrieRoot + +▸ `Static` **genTransactionsTrieRoot**(`txs`, `emptyTrie?`): `Promise`<`Buffer`\> + +Returns the txs trie root for array of TypedTransaction + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `txs` | `TypedTransaction`[] | array of TypedTransaction to compute the root of | +| `emptyTrie?` | `Trie` | - | + +#### Returns + +`Promise`<`Buffer`\> + +#### Defined in + +[block.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L60) + +___ + +### genWithdrawalsTrieRoot + +▸ `Static` **genWithdrawalsTrieRoot**(`wts`, `emptyTrie?`): `Promise`<`Buffer`\> + +Returns the withdrawals trie root for array of Withdrawal. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `wts` | `Withdrawal`[] | array of Withdrawal to compute the root of | +| `emptyTrie?` | `Trie` | - | + +#### Returns + +`Promise`<`Buffer`\> + +#### Defined in + +[block.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/block.ts#L47) diff --git a/packages/block/docs/classes/BlockHeader.md b/packages/block/docs/classes/BlockHeader.md index 646ce6b14f..1e36a62458 100644 --- a/packages/block/docs/classes/BlockHeader.md +++ b/packages/block/docs/classes/BlockHeader.md @@ -29,6 +29,7 @@ An object that represents the block header. - [timestamp](BlockHeader.md#timestamp) - [transactionsTrie](BlockHeader.md#transactionstrie) - [uncleHash](BlockHeader.md#unclehash) +- [withdrawalsRoot](BlockHeader.md#withdrawalsroot) ### Accessors @@ -80,7 +81,7 @@ varying data types. For a default empty header, use [fromHeaderData](BlockHeader #### Defined in -[header.ts:181](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L181) +[header.ts:125](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L125) ## Properties @@ -100,7 +101,7 @@ ___ #### Defined in -[header.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L54) +[header.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L53) ___ @@ -110,7 +111,7 @@ ___ #### Defined in -[header.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L41) +[header.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L40) ___ @@ -120,7 +121,7 @@ ___ #### Defined in -[header.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L46) +[header.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L45) ___ @@ -130,7 +131,7 @@ ___ #### Defined in -[header.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L51) +[header.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L50) ___ @@ -140,7 +141,7 @@ ___ #### Defined in -[header.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L48) +[header.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L47) ___ @@ -150,7 +151,7 @@ ___ #### Defined in -[header.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L49) +[header.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L48) ___ @@ -160,7 +161,7 @@ ___ #### Defined in -[header.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L45) +[header.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L44) ___ @@ -170,7 +171,7 @@ ___ #### Defined in -[header.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L52) +[header.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L51) ___ @@ -180,7 +181,7 @@ ___ #### Defined in -[header.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L53) +[header.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L52) ___ @@ -190,7 +191,7 @@ ___ #### Defined in -[header.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L47) +[header.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L46) ___ @@ -200,7 +201,7 @@ ___ #### Defined in -[header.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L39) +[header.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L38) ___ @@ -210,7 +211,7 @@ ___ #### Defined in -[header.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L44) +[header.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L43) ___ @@ -220,7 +221,7 @@ ___ #### Defined in -[header.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L42) +[header.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L41) ___ @@ -230,7 +231,7 @@ ___ #### Defined in -[header.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L50) +[header.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L49) ___ @@ -240,7 +241,7 @@ ___ #### Defined in -[header.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L43) +[header.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L42) ___ @@ -250,7 +251,17 @@ ___ #### Defined in -[header.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L40) +[header.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L39) + +___ + +### withdrawalsRoot + +• `Optional` `Readonly` **withdrawalsRoot**: `Buffer` + +#### Defined in + +[header.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L54) ## Accessors @@ -286,7 +297,7 @@ if any check fails #### Defined in -[header.ts:382](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L382) +[header.ts:349](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L349) ___ @@ -302,7 +313,7 @@ Validates correct buffer lengths, throws if invalid. #### Defined in -[header.ts:312](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L312) +[header.ts:272](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L272) ___ @@ -318,7 +329,7 @@ Calculates the base fee for a potential next block #### Defined in -[header.ts:505](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L505) +[header.ts:476](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L476) ___ @@ -339,7 +350,7 @@ in conjunction with [cliqueIsEpochTransition](BlockHeader.md#cliqueisepochtransi #### Defined in -[header.ts:748](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L748) +[header.ts:723](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L723) ___ @@ -356,7 +367,7 @@ Returns extra seal data #### Defined in -[header.ts:715](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L715) +[header.ts:690](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L690) ___ @@ -373,7 +384,7 @@ Returns extra vanity data #### Defined in -[header.ts:706](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L706) +[header.ts:681](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L681) ___ @@ -390,7 +401,7 @@ header (only clique PoA, throws otherwise) #### Defined in -[header.ts:694](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L694) +[header.ts:669](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L669) ___ @@ -406,7 +417,7 @@ PoA clique signature hash without the seal. #### Defined in -[header.ts:683](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L683) +[header.ts:658](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L658) ___ @@ -422,7 +433,7 @@ Returns the signer address #### Defined in -[header.ts:785](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L785) +[header.ts:760](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L760) ___ @@ -447,7 +458,7 @@ Verifies the signature of the block (last 65 bytes of extraData field) #### Defined in -[header.ts:773](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L773) +[header.ts:748](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L748) ___ @@ -463,7 +474,7 @@ Return a compact error string representation of the object #### Defined in -[header.ts:857](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L857) +[header.ts:836](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L836) ___ @@ -485,7 +496,7 @@ Returns the canonical difficulty for this block. #### Defined in -[header.ts:610](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L610) +[header.ts:585](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L585) ___ @@ -501,7 +512,7 @@ Returns the hash of the block header. #### Defined in -[header.ts:578](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L578) +[header.ts:553](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L553) ___ @@ -517,7 +528,7 @@ Checks if the block header is a genesis header. #### Defined in -[header.ts:592](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L592) +[header.ts:567](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L567) ___ @@ -533,7 +544,7 @@ Returns a Buffer Array of the raw Buffers in this header, in order. #### Defined in -[header.ts:549](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L549) +[header.ts:520](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L520) ___ @@ -549,7 +560,7 @@ Returns the rlp encoding of the block header. #### Defined in -[header.ts:802](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L802) +[header.ts:777](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L777) ___ @@ -565,7 +576,7 @@ Returns the block header in JSON format. #### Defined in -[header.ts:809](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L809) +[header.ts:784](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L784) ___ @@ -588,7 +599,7 @@ Throws if out of bounds. #### Defined in -[header.ts:467](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L467) +[header.ts:434](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L434) ___ @@ -657,4 +668,4 @@ Static constructor to create a block header from an array of Buffer values #### Defined in -[header.ts:116](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L116) +[header.ts:105](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/header.ts#L105) diff --git a/packages/block/docs/interfaces/BlockData.md b/packages/block/docs/interfaces/BlockData.md index 65e2b52f82..8367fd900f 100644 --- a/packages/block/docs/interfaces/BlockData.md +++ b/packages/block/docs/interfaces/BlockData.md @@ -11,6 +11,7 @@ A block's data. - [header](BlockData.md#header) - [transactions](BlockData.md#transactions) - [uncleHeaders](BlockData.md#uncleheaders) +- [withdrawals](BlockData.md#withdrawals) ## Properties @@ -22,7 +23,7 @@ Header data for the block #### Defined in -[types.ts:106](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L106) +[types.ts:116](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L116) ___ @@ -32,7 +33,7 @@ ___ #### Defined in -[types.ts:107](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L107) +[types.ts:117](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L117) ___ @@ -42,4 +43,14 @@ ___ #### Defined in -[types.ts:108](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L108) +[types.ts:118](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L118) + +___ + +### withdrawals + +• `Optional` **withdrawals**: `WithdrawalData`[] + +#### Defined in + +[types.ts:119](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L119) diff --git a/packages/block/docs/interfaces/BlockOptions.md b/packages/block/docs/interfaces/BlockOptions.md index 23ab2c6b8b..04c02499e1 100644 --- a/packages/block/docs/interfaces/BlockOptions.md +++ b/packages/block/docs/interfaces/BlockOptions.md @@ -13,10 +13,10 @@ hardfork. - [calcDifficultyFromHeader](BlockOptions.md#calcdifficultyfromheader) - [cliqueSigner](BlockOptions.md#cliquesigner) - [common](BlockOptions.md#common) -- [consensusFormatValidation](BlockOptions.md#consensusformatvalidation) - [freeze](BlockOptions.md#freeze) - [hardforkByBlockNumber](BlockOptions.md#hardforkbyblocknumber) - [hardforkByTTD](BlockOptions.md#hardforkbyttd) +- [skipConsensusFormatValidation](BlockOptions.md#skipconsensusformatvalidation) ## Properties @@ -33,7 +33,7 @@ Note that this option has no effect on networks other than PoW/Ethash networks #### Defined in -[types.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L53) +[types.ts:62](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L62) ___ @@ -46,7 +46,7 @@ Will throw if provided on a non-PoA chain. #### Defined in -[types.ts:70](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L70) +[types.ts:79](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L79) ___ @@ -66,19 +66,7 @@ Current default hardfork: `merge` #### Defined in -[types.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L27) - -___ - -### consensusFormatValidation - -• `Optional` **consensusFormatValidation**: `boolean` - -Perform consensus validation checks on header if set. Defaults to true. - -#### Defined in - -[types.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L74) +[types.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L36) ___ @@ -98,7 +86,7 @@ Default: true #### Defined in -[types.ts:65](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L65) +[types.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L74) ___ @@ -112,7 +100,7 @@ Default: `false` (HF is set to whatever default HF is set by the Common instance #### Defined in -[types.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L33) +[types.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L42) ___ @@ -131,4 +119,16 @@ pointing to a Shanghai block: this will lead to set the HF as Shanghai and not t #### Defined in -[types.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L44) +[types.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L53) + +___ + +### skipConsensusFormatValidation + +• `Optional` **skipConsensusFormatValidation**: `boolean` + +Skip consensus format validation checks on header if set. Defaults to false. + +#### Defined in + +[types.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L83) diff --git a/packages/block/docs/interfaces/HeaderData.md b/packages/block/docs/interfaces/HeaderData.md index 6837624e75..73b0baa070 100644 --- a/packages/block/docs/interfaces/HeaderData.md +++ b/packages/block/docs/interfaces/HeaderData.md @@ -24,6 +24,7 @@ A block header's data. - [timestamp](HeaderData.md#timestamp) - [transactionsTrie](HeaderData.md#transactionstrie) - [uncleHash](HeaderData.md#unclehash) +- [withdrawalsRoot](HeaderData.md#withdrawalsroot) ## Properties @@ -33,7 +34,7 @@ A block header's data. #### Defined in -[types.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L96) +[types.ts:105](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L105) ___ @@ -43,7 +44,7 @@ ___ #### Defined in -[types.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L83) +[types.ts:92](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L92) ___ @@ -53,7 +54,7 @@ ___ #### Defined in -[types.ts:88](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L88) +[types.ts:97](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L97) ___ @@ -63,7 +64,7 @@ ___ #### Defined in -[types.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L93) +[types.ts:102](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L102) ___ @@ -73,7 +74,7 @@ ___ #### Defined in -[types.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L90) +[types.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L99) ___ @@ -83,7 +84,7 @@ ___ #### Defined in -[types.ts:91](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L91) +[types.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L100) ___ @@ -93,7 +94,7 @@ ___ #### Defined in -[types.ts:87](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L87) +[types.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L96) ___ @@ -103,7 +104,7 @@ ___ #### Defined in -[types.ts:94](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L94) +[types.ts:103](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L103) ___ @@ -113,7 +114,7 @@ ___ #### Defined in -[types.ts:95](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L95) +[types.ts:104](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L104) ___ @@ -123,7 +124,7 @@ ___ #### Defined in -[types.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L89) +[types.ts:98](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L98) ___ @@ -133,7 +134,7 @@ ___ #### Defined in -[types.ts:81](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L81) +[types.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L90) ___ @@ -143,7 +144,7 @@ ___ #### Defined in -[types.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L86) +[types.ts:95](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L95) ___ @@ -153,7 +154,7 @@ ___ #### Defined in -[types.ts:84](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L84) +[types.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L93) ___ @@ -163,7 +164,7 @@ ___ #### Defined in -[types.ts:92](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L92) +[types.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L101) ___ @@ -173,7 +174,7 @@ ___ #### Defined in -[types.ts:85](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L85) +[types.ts:94](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L94) ___ @@ -183,4 +184,14 @@ ___ #### Defined in -[types.ts:82](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L82) +[types.ts:91](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L91) + +___ + +### withdrawalsRoot + +• `Optional` **withdrawalsRoot**: `BufferLike` + +#### Defined in + +[types.ts:106](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L106) diff --git a/packages/block/docs/interfaces/JsonBlock.md b/packages/block/docs/interfaces/JsonBlock.md index dee08a270d..836b8b3052 100644 --- a/packages/block/docs/interfaces/JsonBlock.md +++ b/packages/block/docs/interfaces/JsonBlock.md @@ -11,6 +11,7 @@ An object with the block's data represented as strings. - [header](JsonBlock.md#header) - [transactions](JsonBlock.md#transactions) - [uncleHeaders](JsonBlock.md#uncleheaders) +- [withdrawals](JsonBlock.md#withdrawals) ## Properties @@ -22,7 +23,7 @@ Header data for the block #### Defined in -[types.ts:127](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L127) +[types.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L142) ___ @@ -32,7 +33,7 @@ ___ #### Defined in -[types.ts:128](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L128) +[types.ts:143](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L143) ___ @@ -42,4 +43,14 @@ ___ #### Defined in -[types.ts:129](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L129) +[types.ts:144](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L144) + +___ + +### withdrawals + +• `Optional` **withdrawals**: `JsonRpcWithdrawal`[] + +#### Defined in + +[types.ts:145](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L145) diff --git a/packages/block/docs/interfaces/JsonHeader.md b/packages/block/docs/interfaces/JsonHeader.md index eef16f17d3..6306f3edd0 100644 --- a/packages/block/docs/interfaces/JsonHeader.md +++ b/packages/block/docs/interfaces/JsonHeader.md @@ -24,6 +24,7 @@ An object with the block header's data represented as strings. - [timestamp](JsonHeader.md#timestamp) - [transactionsTrie](JsonHeader.md#transactionstrie) - [uncleHash](JsonHeader.md#unclehash) +- [withdrawalsRoot](JsonHeader.md#withdrawalsroot) ## Properties @@ -33,7 +34,7 @@ An object with the block header's data represented as strings. #### Defined in -[types.ts:151](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L151) +[types.ts:167](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L167) ___ @@ -43,7 +44,7 @@ ___ #### Defined in -[types.ts:138](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L138) +[types.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L154) ___ @@ -53,7 +54,7 @@ ___ #### Defined in -[types.ts:143](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L143) +[types.ts:159](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L159) ___ @@ -63,7 +64,7 @@ ___ #### Defined in -[types.ts:148](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L148) +[types.ts:164](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L164) ___ @@ -73,7 +74,7 @@ ___ #### Defined in -[types.ts:145](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L145) +[types.ts:161](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L161) ___ @@ -83,7 +84,7 @@ ___ #### Defined in -[types.ts:146](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L146) +[types.ts:162](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L162) ___ @@ -93,7 +94,7 @@ ___ #### Defined in -[types.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L142) +[types.ts:158](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L158) ___ @@ -103,7 +104,7 @@ ___ #### Defined in -[types.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L149) +[types.ts:165](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L165) ___ @@ -113,7 +114,7 @@ ___ #### Defined in -[types.ts:150](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L150) +[types.ts:166](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L166) ___ @@ -123,7 +124,7 @@ ___ #### Defined in -[types.ts:144](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L144) +[types.ts:160](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L160) ___ @@ -133,7 +134,7 @@ ___ #### Defined in -[types.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L136) +[types.ts:152](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L152) ___ @@ -143,7 +144,7 @@ ___ #### Defined in -[types.ts:141](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L141) +[types.ts:157](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L157) ___ @@ -153,7 +154,7 @@ ___ #### Defined in -[types.ts:139](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L139) +[types.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L155) ___ @@ -163,7 +164,7 @@ ___ #### Defined in -[types.ts:147](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L147) +[types.ts:163](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L163) ___ @@ -173,7 +174,7 @@ ___ #### Defined in -[types.ts:140](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L140) +[types.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L156) ___ @@ -183,4 +184,14 @@ ___ #### Defined in -[types.ts:137](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L137) +[types.ts:153](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L153) + +___ + +### withdrawalsRoot + +• `Optional` **withdrawalsRoot**: `string` + +#### Defined in + +[types.ts:168](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L168) diff --git a/packages/block/docs/interfaces/JsonRpcBlock.md b/packages/block/docs/interfaces/JsonRpcBlock.md new file mode 100644 index 0000000000..65c4f5135c --- /dev/null +++ b/packages/block/docs/interfaces/JsonRpcBlock.md @@ -0,0 +1,250 @@ +[@ethereumjs/block](../README.md) / JsonRpcBlock + +# Interface: JsonRpcBlock + +## Table of contents + +### Properties + +- [baseFeePerGas](JsonRpcBlock.md#basefeepergas) +- [difficulty](JsonRpcBlock.md#difficulty) +- [extraData](JsonRpcBlock.md#extradata) +- [gasLimit](JsonRpcBlock.md#gaslimit) +- [gasUsed](JsonRpcBlock.md#gasused) +- [hash](JsonRpcBlock.md#hash) +- [logsBloom](JsonRpcBlock.md#logsbloom) +- [miner](JsonRpcBlock.md#miner) +- [mixHash](JsonRpcBlock.md#mixhash) +- [nonce](JsonRpcBlock.md#nonce) +- [number](JsonRpcBlock.md#number) +- [parentHash](JsonRpcBlock.md#parenthash) +- [receiptsRoot](JsonRpcBlock.md#receiptsroot) +- [sha3Uncles](JsonRpcBlock.md#sha3uncles) +- [size](JsonRpcBlock.md#size) +- [stateRoot](JsonRpcBlock.md#stateroot) +- [timestamp](JsonRpcBlock.md#timestamp) +- [totalDifficulty](JsonRpcBlock.md#totaldifficulty) +- [transactions](JsonRpcBlock.md#transactions) +- [transactionsRoot](JsonRpcBlock.md#transactionsroot) +- [uncles](JsonRpcBlock.md#uncles) +- [withdrawals](JsonRpcBlock.md#withdrawals) + +## Properties + +### baseFeePerGas + +• `Optional` **baseFeePerGas**: `string` + +#### Defined in + +[types.ts:195](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L195) + +___ + +### difficulty + +• **difficulty**: `string` + +#### Defined in + +[types.ts:186](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L186) + +___ + +### extraData + +• **extraData**: `string` + +#### Defined in + +[types.ts:188](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L188) + +___ + +### gasLimit + +• **gasLimit**: `string` + +#### Defined in + +[types.ts:190](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L190) + +___ + +### gasUsed + +• **gasUsed**: `string` + +#### Defined in + +[types.ts:191](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L191) + +___ + +### hash + +• **hash**: `string` + +#### Defined in + +[types.ts:176](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L176) + +___ + +### logsBloom + +• **logsBloom**: `string` + +#### Defined in + +[types.ts:181](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L181) + +___ + +### miner + +• **miner**: `string` + +#### Defined in + +[types.ts:185](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L185) + +___ + +### mixHash + +• `Optional` **mixHash**: `string` + +#### Defined in + +[types.ts:178](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L178) + +___ + +### nonce + +• **nonce**: `string` + +#### Defined in + +[types.ts:179](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L179) + +___ + +### number + +• **number**: `string` + +#### Defined in + +[types.ts:175](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L175) + +___ + +### parentHash + +• **parentHash**: `string` + +#### Defined in + +[types.ts:177](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L177) + +___ + +### receiptsRoot + +• **receiptsRoot**: `string` + +#### Defined in + +[types.ts:184](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L184) + +___ + +### sha3Uncles + +• **sha3Uncles**: `string` + +#### Defined in + +[types.ts:180](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L180) + +___ + +### size + +• **size**: `string` + +#### Defined in + +[types.ts:189](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L189) + +___ + +### stateRoot + +• **stateRoot**: `string` + +#### Defined in + +[types.ts:183](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L183) + +___ + +### timestamp + +• **timestamp**: `string` + +#### Defined in + +[types.ts:192](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L192) + +___ + +### totalDifficulty + +• **totalDifficulty**: `string` + +#### Defined in + +[types.ts:187](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L187) + +___ + +### transactions + +• **transactions**: (`string` \| `JsonRpcTx`)[] + +#### Defined in + +[types.ts:193](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L193) + +___ + +### transactionsRoot + +• **transactionsRoot**: `string` + +#### Defined in + +[types.ts:182](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L182) + +___ + +### uncles + +• **uncles**: `string`[] + +#### Defined in + +[types.ts:194](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L194) + +___ + +### withdrawals + +• `Optional` **withdrawals**: `JsonRpcWithdrawal`[] + +#### Defined in + +[types.ts:196](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/src/types.ts#L196) diff --git a/packages/block/package.json b/packages/block/package.json index 95c12ac2f7..d6a4afa168 100644 --- a/packages/block/package.json +++ b/packages/block/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/block", - "version": "4.0.1", + "version": "4.1.0", "description": "Provides Block serialization and help functions", "keywords": [ "ethereum", @@ -38,11 +38,11 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "ethereum-cryptography": "^1.1.2", "ethers": "^5.7.1" }, diff --git a/packages/blockchain/CHANGELOG.md b/packages/blockchain/CHANGELOG.md index a6824d7502..df73b45153 100644 --- a/packages/blockchain/CHANGELOG.md +++ b/packages/blockchain/CHANGELOG.md @@ -6,6 +6,24 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 6.1.0 - 2022-12-09 + +### Experimental EIP-4895 Beacon Chain Withdrawals Support + +This release comes with experimental [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895) beacon chain withdrawals support, see PR [#2353](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2353) for the plain implementation and PR [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401) for updated calls for the CL/EL engine API. Also note that there is a new helper module in [@ethereumjs/util](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) with a new dedicated `Withdrawal` class together with additional TypeScript types to ease withdrawal handling. + +Withdrawals support can be activated by initializing a respective `Common` object, see [@ethereumjs/block](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/block) library README for an example how to create an Ethereum Block containing withdrawal operations. + +```typescript +import { Common, Chain } from '@ethereumjs/common' +``` + +The Blockchain class now fully supports including/adding withdrawal blocks as well as directly start with a genesis block including withdrawal operations. + +### Hardfork-By-Time Support + +The Blockchain library is now ready to work with hardforks triggered by timestamp, which will first be applied along the `Shanghai` HF, see PR [#2437](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2437). This is achieved by integrating a new timestamp supporting `@ethereumjs/common` library version. + ## 6.0.2 - 2022-10-25 - Updated `@ethereumjs/util` minimal package version to `v8.0.2` to ensure functioning of the library (otherwise the newly exported `Lock` functionality might be missing) diff --git a/packages/blockchain/docs/README.md b/packages/blockchain/docs/README.md index 1e777129e9..96ef1efbd5 100644 --- a/packages/blockchain/docs/README.md +++ b/packages/blockchain/docs/README.md @@ -16,3 +16,29 @@ - [BlockchainInterface](interfaces/BlockchainInterface.md) - [BlockchainOptions](interfaces/BlockchainOptions.md) - [Consensus](interfaces/Consensus.md) + +### Functions + +- [parseGethGenesisState](README.md#parsegethgenesisstate) + +## Functions + +### parseGethGenesisState + +▸ **parseGethGenesisState**(`json`): `GenesisState` + +Parses the geth genesis state into Blockchain GenesisState + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `json` | `any` | representing the `alloc` key in a Geth genesis file | + +#### Returns + +`GenesisState` + +#### Defined in + +[utils.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/utils.ts#L8) diff --git a/packages/blockchain/docs/classes/Blockchain.md b/packages/blockchain/docs/classes/Blockchain.md index b6ed98b408..58cd12c7c3 100644 --- a/packages/blockchain/docs/classes/Blockchain.md +++ b/packages/blockchain/docs/classes/Blockchain.md @@ -56,7 +56,7 @@ This class stores and interacts with blocks. #### Defined in -[blockchain.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L53) +[blockchain.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L52) ___ @@ -70,7 +70,7 @@ ___ #### Defined in -[blockchain.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L25) +[blockchain.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L24) ___ @@ -80,7 +80,7 @@ ___ #### Defined in -[blockchain.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L26) +[blockchain.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L25) ___ @@ -90,7 +90,7 @@ ___ #### Defined in -[blockchain.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L27) +[blockchain.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L26) ## Accessors @@ -106,7 +106,7 @@ The genesis Block for the blockchain. #### Defined in -[blockchain.ts:1230](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1230) +[blockchain.ts:1232](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1232) ## Methods @@ -134,7 +134,7 @@ the original. #### Defined in -[blockchain.ts:173](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L173) +[blockchain.ts:172](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L172) ___ @@ -156,7 +156,7 @@ Creates a genesis Block for the blockchain with params from Common.genesis #### Defined in -[blockchain.ts:1239](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1239) +[blockchain.ts:1241](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1241) ___ @@ -189,7 +189,7 @@ we can be sure it is correct). #### Defined in -[blockchain.ts:821](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L821) +[blockchain.ts:810](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L810) ___ @@ -210,7 +210,7 @@ All values are provided as hex-prefixed strings. #### Defined in -[blockchain.ts:1264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1264) +[blockchain.ts:1270](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1270) ___ @@ -218,7 +218,8 @@ ___ ▸ **getBlock**(`blockId`): `Promise`<`Block`\> -Gets a block by its hash. +Gets a block by its hash or number. If a number is provided, the returned +block will be the canonical block at that number in the chain #### Parameters @@ -236,7 +237,7 @@ Gets a block by its hash. #### Defined in -[blockchain.ts:705](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L705) +[blockchain.ts:701](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L701) ___ @@ -262,7 +263,7 @@ Looks up many blocks relative to blockId Note: due to `GetBlockHeaders #### Defined in -[blockchain.ts:739](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L739) +[blockchain.ts:728](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L728) ___ @@ -282,7 +283,7 @@ Returns the latest full block in the canonical chain. #### Defined in -[blockchain.ts:356](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L356) +[blockchain.ts:355](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L355) ___ @@ -298,7 +299,7 @@ Returns the latest header in the canonical chain. #### Defined in -[blockchain.ts:345](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L345) +[blockchain.ts:344](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L344) ___ @@ -320,7 +321,7 @@ Gets a header by number. Header must be in the canonical chain #### Defined in -[blockchain.ts:1204](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1204) +[blockchain.ts:1206](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1206) ___ @@ -350,7 +351,7 @@ on a first run) #### Defined in -[blockchain.ts:332](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L332) +[blockchain.ts:331](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L331) ___ @@ -381,7 +382,7 @@ has not been run. This matches the behavior of [iterator](Blockchain.md#iterator #### Defined in -[blockchain.ts:312](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L312) +[blockchain.ts:311](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L311) ___ @@ -408,13 +409,13 @@ Gets total difficulty for a block specified by hash and number #### Defined in -[blockchain.ts:724](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L724) +[blockchain.ts:713](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L713) ___ ### iterator -▸ **iterator**(`name`, `onBlock`, `maxBlocks?`): `Promise`<`number`\> +▸ **iterator**(`name`, `onBlock`, `maxBlocks?`, `releaseLockOnCallback?`): `Promise`<`number`\> Iterates through blocks starting at the specified iterator head and calls the onBlock function on each block. The current location of an iterator @@ -427,6 +428,7 @@ head can be retrieved using [getIteratorHead](Blockchain.md#getiteratorhead). | `name` | `string` | Name of the state root head | | `onBlock` | `OnBlock` | Function called on each block with params (block, reorg) | | `maxBlocks?` | `number` | How many blocks to run. By default, run all unprocessed blocks in the canonical chain. | +| `releaseLockOnCallback?` | `boolean` | Do not lock the blockchain for running the callback (default: `false`) | #### Returns @@ -440,7 +442,7 @@ number of blocks actually iterated #### Defined in -[blockchain.ts:918](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L918) +[blockchain.ts:908](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L908) ___ @@ -470,7 +472,7 @@ heads/hashes are overwritten. #### Defined in -[blockchain.ts:387](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L387) +[blockchain.ts:385](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L385) ___ @@ -497,7 +499,7 @@ chain is rebuilt and any stale heads/hashes are overwritten. #### Defined in -[blockchain.ts:373](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L373) +[blockchain.ts:371](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L371) ___ @@ -523,7 +525,7 @@ heads/hashes are overwritten. #### Defined in -[blockchain.ts:414](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L414) +[blockchain.ts:412](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L412) ___ @@ -550,7 +552,7 @@ chain is rebuilt and any stale heads/hashes are overwritten. #### Defined in -[blockchain.ts:400](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L400) +[blockchain.ts:398](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L398) ___ @@ -574,7 +576,7 @@ any other error, this function throws. #### Defined in -[blockchain.ts:1215](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1215) +[blockchain.ts:1217](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L1217) ___ @@ -598,7 +600,7 @@ Therefore, the array needs to be ordered upon number. #### Defined in -[blockchain.ts:781](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L781) +[blockchain.ts:770](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L770) ___ @@ -622,7 +624,7 @@ When calling the iterator, the iterator will start running the first child block #### Defined in -[blockchain.ts:967](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L967) +[blockchain.ts:971](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L971) ___ @@ -645,7 +647,7 @@ whether the block is internally consistent #### Defined in -[blockchain.ts:609](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L609) +[blockchain.ts:604](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L604) ___ @@ -683,7 +685,7 @@ It verifies the current block against the `parentHash`: #### Defined in -[blockchain.ts:546](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L546) +[blockchain.ts:544](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L544) ___ @@ -706,7 +708,7 @@ encouraged method to use when creating a blockchain object. #### Defined in -[blockchain.ts:65](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L65) +[blockchain.ts:64](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L64) ___ @@ -730,4 +732,4 @@ objects must be readable by Block.fromBlockData #### Defined in -[blockchain.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L78) +[blockchain.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/blockchain.ts#L77) diff --git a/packages/blockchain/docs/interfaces/blockchaininterface.md b/packages/blockchain/docs/interfaces/blockchaininterface.md index 79b25bfdf4..6b127925fb 100644 --- a/packages/blockchain/docs/interfaces/blockchaininterface.md +++ b/packages/blockchain/docs/interfaces/blockchaininterface.md @@ -49,7 +49,7 @@ Returns a copy of the blockchain #### Defined in -[types.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L45) +[types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L50) ___ @@ -89,7 +89,7 @@ All values are provided as hex-prefixed strings. #### Defined in -[types.ts:70](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L70) +[types.ts:75](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L75) ___ @@ -127,7 +127,7 @@ Returns the latest full block in the canonical chain. #### Defined in -[types.ts:75](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L75) +[types.ts:80](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L80) ___ @@ -149,7 +149,7 @@ Returns the specified iterator head. #### Defined in -[types.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L59) +[types.ts:64](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L64) ___ @@ -172,13 +172,13 @@ Gets total difficulty for a block specified by hash and number #### Defined in -[types.ts:64](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L64) +[types.ts:69](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L69) ___ ### iterator -▸ **iterator**(`name`, `onBlock`, `maxBlocks?`): `Promise`<`number`\> +▸ **iterator**(`name`, `onBlock`, `maxBlocks?`, `releaseLockOnCallback?`): `Promise`<`number`\> Iterates through blocks starting at the specified iterator head and calls the onBlock function on each block. @@ -190,6 +190,7 @@ the onBlock function on each block. | `name` | `string` | Name of the state root head | | `onBlock` | `OnBlock` | Function called on each block with params (block: Block, | | `maxBlocks?` | `number` | optional maximum number of blocks to iterate through reorg: boolean) | +| `releaseLockOnCallback?` | `boolean` | - | #### Returns @@ -242,4 +243,4 @@ Validates a block header, throwing if invalid. It is being validated against the #### Defined in -[types.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L52) +[types.ts:57](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L57) diff --git a/packages/blockchain/docs/interfaces/blockchainoptions.md b/packages/blockchain/docs/interfaces/blockchainoptions.md index 56242ac917..bbada7f0a2 100644 --- a/packages/blockchain/docs/interfaces/blockchainoptions.md +++ b/packages/blockchain/docs/interfaces/blockchainoptions.md @@ -29,7 +29,7 @@ If not provided this defaults to chain `mainnet` and hardfork `chainstart` #### Defined in -[types.ts:88](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L88) +[types.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L93) ___ @@ -41,7 +41,7 @@ Optional custom consensus that implements the [Consensus](Consensus.md) class #### Defined in -[types.ts:169](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L169) +[types.ts:174](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L174) ___ @@ -59,7 +59,7 @@ or use the `level` convenience package: #### Defined in -[types.ts:110](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L110) +[types.ts:115](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L115) ___ @@ -75,7 +75,7 @@ provided from the `common` will be used. #### Defined in -[types.ts:138](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L138) +[types.ts:143](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L143) ___ @@ -108,7 +108,7 @@ A complex genesis state with Contract and EoA states would have the following fo #### Defined in -[types.ts:164](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L164) +[types.ts:169](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L169) ___ @@ -126,7 +126,7 @@ Default: `false` (HF is set to whatever default HF is set by the Common instance #### Defined in -[types.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L99) +[types.ts:104](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L104) ___ @@ -140,7 +140,7 @@ see Block#validate for details. #### Defined in -[types.ts:129](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L129) +[types.ts:134](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L134) ___ @@ -158,4 +158,4 @@ Default: `true`. #### Defined in -[types.ts:121](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L121) +[types.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/types.ts#L126) diff --git a/packages/blockchain/package.json b/packages/blockchain/package.json index 221b2c7227..19e1ead0df 100644 --- a/packages/blockchain/package.json +++ b/packages/blockchain/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/blockchain", - "version": "6.0.2", + "version": "6.1.0", "description": "A module to store and interact with blocks", "keywords": [ "ethereum", @@ -38,12 +38,12 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/ethash": "^2.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/ethash": "^2.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/util": "^8.0.3", "abstract-level": "^1.0.3", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index 45513889a2..eba29f3fed 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -6,6 +6,37 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.6.6 - 2022-12-09 + +This releases includes various bug fixes and optimizations discovered and applied along the run of the [Shandong](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2316) Pre-Shanghai testnet (https://github.com/ethereumjs/ethereumjs-monorepo/pull/2316) (now being deprecated) as well as new RPC methods implemented along the way. + +Furthermore this client release can now run chain including blocks with `EIP-4895` beacon chain withdrawals respectively execute on EIP-4895 activating hardforks, see PRs [#2353](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2353) and [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401). + +### New RPC Methods + +- `eth_getBlockTransactionCountByNumber`, PR [#2379](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2379) +- `eth_getTransactionByBlockHashAndIndex`, PR [#2443](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2443) +- `eth_gasPrice`, PR [#2396](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2396) +- `txpool_content`, PR [#2410](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2410) +- `debug_traceTransaction`, PR [#2444](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2444) +- Miscellaneous tx related fixes, PR [#2411](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2411) + +### Hardfork-By-Time Support + +The Client is now ready to work with hardforks triggered by timestamp, which will first be applied along the `Shanghai` HF, see PR [#2437](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2437). This is achieved by integrating a new timestamp supporting `@ethereumjs/common` library version. + +### Other Changes and Bug Fixes + +- Enhanced skeleton sync to process batches of new payloads and fcUs, PR [#2309](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2309) +- Various tx pool fixes, PR [#2382](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2382) +- Fixed skeleton reset scenario when head announced before subchain 0 tail, PR [#2408](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2408) +- Handle genesis and genesis extention properly for skeleton, PR [#2420](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2420) +- Fixed enode to ip4 and write the same to disk, PR [#2407](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2407) +- Fixed sendTransactions peer loop and enchance txpool logs, PR [#2412](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2412) +- Used unpadded int/bigint to buffer in net protocols (bug), PR [#2409](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2409) +- Fixed handling of post-merge genesis blocks, PR [#2427](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2427) +- Fixed logic bug in txPool.validate, PR [#2441](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2441) + ## 0.6.5 - 2022-10-19 - Fixes broken release v0.6.4 (wrong @ethereumjs/util dependency) diff --git a/packages/client/package.json b/packages/client/package.json index b680d28192..2fb3beb1e5 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/client", - "version": "0.6.5", + "version": "0.6.6", "description": "EthereumJS client implementation", "keywords": [ "ethereum", @@ -56,18 +56,18 @@ }, "dependencies": { "@chainsafe/libp2p-noise": "^4.1.1", - "@ethereumjs/block": "4.0.1", - "@ethereumjs/blockchain": "6.0.2", - "@ethereumjs/common": "3.0.1", - "@ethereumjs/devp2p": "5.0.1", - "@ethereumjs/ethash": "2.0.1", - "@ethereumjs/evm": "1.2.2", + "@ethereumjs/block": "4.1.0", + "@ethereumjs/blockchain": "6.1.0", + "@ethereumjs/common": "3.0.2", + "@ethereumjs/devp2p": "5.0.2", + "@ethereumjs/ethash": "2.0.2", + "@ethereumjs/evm": "1.2.3", "@ethereumjs/rlp": "4.0.0", - "@ethereumjs/statemanager": "1.0.1", - "@ethereumjs/trie": "5.0.1", - "@ethereumjs/tx": "4.0.1", - "@ethereumjs/util": "8.0.2", - "@ethereumjs/vm": "6.2.0", + "@ethereumjs/statemanager": "1.0.2", + "@ethereumjs/trie": "5.0.2", + "@ethereumjs/tx": "4.0.2", + "@ethereumjs/util": "8.0.3", + "@ethereumjs/vm": "6.3.0", "abstract-level": "^1.0.3", "body-parser": "^1.19.2", "chalk": "^4.1.2", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index d3b63a54ea..07bbdc2663 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 3.0.2 - 2022-12-09 + +### Experimental EIP-4895 Beacon Chain Withdrawals Support + +This release comes with experimental [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895) beacon chain withdrawals support, see PR [#2353](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2353) for the plain implementation and PR [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401) for updated calls for the CL/EL engine API. Also note that there is a new helper module in [@ethereumjs/util](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) with a new dedicated `Withdrawal` class together with additional TypeScript types to ease withdrawal handling. + +Withdrawals support can be activated by initializing a respective `Common` object: + +```typescript +import { Common, Chain } from '@ethereumjs/common' +const common = new Common({ chain: Chain.Mainnet, eips: [4895] }) +``` + +### Hardfork-By-Time Support + +The Common library now supports setting and retrieving hardforks which are triggered by timestamp instead of a specific block number, see PR [#2437](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2437). This mechanism will be first applied for the upcoming `Shanghai` HF. The methods `getHardforkByBlockNumber()`, `setHardforkByBlockNumber()` and `paramByBlock()` have been altered to take in an additional `timestamp` value, method naming remains for now for backwards compatibility. There are two new utility methods `hardforkTimestamp()` and `nextHardforkBlockOrTimestamp()`. + +### Other Changes + +- Support for initialization with Arbitrum One Chain ID, PR [#2426](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2426) +- Post-Merge hardfork fix in `Common.fromGethGenesis()` static constructor, PR [#2427](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2427) +- Fixed minor custom chain bugs, PR [#2448](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2448) + ## 3.0.1 - 2022-10-18 ### Support for Geth genesis.json Genesis Format diff --git a/packages/common/docs/README.md b/packages/common/docs/README.md index 4e8e07c330..42085de0b0 100644 --- a/packages/common/docs/README.md +++ b/packages/common/docs/README.md @@ -25,6 +25,7 @@ - [CommonOpts](interfaces/CommonOpts.md) - [CustomCommonOpts](interfaces/CustomCommonOpts.md) - [GenesisBlockConfig](interfaces/GenesisBlockConfig.md) +- [GethConfigOpts](interfaces/GethConfigOpts.md) - [HardforkConfig](interfaces/HardforkConfig.md) ### Type Aliases @@ -33,6 +34,10 @@ - [CliqueConfig](README.md#cliqueconfig) - [EthashConfig](README.md#ethashconfig) +### Functions + +- [parseGethGenesis](README.md#parsegethgenesis) + ## Type Aliases ### CasperConfig @@ -69,3 +74,29 @@ ___ #### Defined in [packages/common/src/types.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/types.ts#L15) + +## Functions + +### parseGethGenesis + +▸ **parseGethGenesis**(`json`, `name?`, `mergeForkIdPostMerge?`): `any` + +Parses a genesis.json exported from Geth into parameters for Common instance + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `json` | `any` | representing the Geth genesis file | +| `name?` | `string` | optional chain name | +| `mergeForkIdPostMerge?` | `boolean` | - | + +#### Returns + +`any` + +parsed params + +#### Defined in + +[packages/common/src/utils.ts:167](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/utils.ts#L167) diff --git a/packages/common/docs/classes/Common.md b/packages/common/docs/classes/Common.md index b0ef18911c..a84c7724be 100644 --- a/packages/common/docs/classes/Common.md +++ b/packages/common/docs/classes/Common.md @@ -80,11 +80,13 @@ can be created via the main constructor and the [customChains](../interfaces/Com - [removeListener](Common.md#removelistener) - [setChain](Common.md#setchain) - [setEIPs](Common.md#seteips) +- [setForkHashes](Common.md#setforkhashes) - [setHardfork](Common.md#sethardfork) - [setHardforkByBlockNumber](Common.md#sethardforkbyblocknumber) - [setMaxListeners](Common.md#setmaxlisteners) - [\_getInitializedChains](Common.md#_getinitializedchains) - [custom](Common.md#custom) +- [fromGethGenesis](Common.md#fromgethgenesis) - [getEventListeners](Common.md#geteventlisteners) - [isSupportedChainId](Common.md#issupportedchainid) - [listenerCount](Common.md#listenercount-1) @@ -110,7 +112,7 @@ EventEmitter.constructor #### Defined in -[packages/common/src/common.ts:189](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L189) +[packages/common/src/common.ts:226](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L226) ## Properties @@ -120,7 +122,7 @@ EventEmitter.constructor #### Defined in -[packages/common/src/common.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L40) +[packages/common/src/common.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L43) ___ @@ -211,7 +213,7 @@ Fork hash as hex string #### Defined in -[packages/common/src/common.ts:641](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L641) +[packages/common/src/common.ts:708](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L708) ___ @@ -235,7 +237,7 @@ Dictionary with hardfork params or null if hardfork not on chain #### Defined in -[packages/common/src/common.ts:336](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L336) +[packages/common/src/common.ts:389](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L389) ___ @@ -259,7 +261,7 @@ True if HF is active on block number #### Defined in -[packages/common/src/common.ts:505](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L505) +[packages/common/src/common.ts:558](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L558) ___ @@ -308,7 +310,7 @@ Dict with bootstrap nodes #### Defined in -[packages/common/src/common.ts:718](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L718) +[packages/common/src/common.ts:808](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L808) ___ @@ -326,7 +328,7 @@ chain Id #### Defined in -[packages/common/src/common.ts:742](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L742) +[packages/common/src/common.ts:832](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L832) ___ @@ -344,7 +346,7 @@ chain name (lower case) #### Defined in -[packages/common/src/common.ts:750](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L750) +[packages/common/src/common.ts:840](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L840) ___ @@ -366,7 +368,7 @@ Note: This value can update along a Hardfork. #### Defined in -[packages/common/src/common.ts:798](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L798) +[packages/common/src/common.ts:888](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L888) ___ @@ -393,7 +395,7 @@ Note: This value can update along a Hardfork. #### Defined in -[packages/common/src/common.ts:827](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L827) +[packages/common/src/common.ts:915](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L915) ___ @@ -412,7 +414,7 @@ Note: This value can update along a Hardfork. #### Defined in -[packages/common/src/common.ts:776](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L776) +[packages/common/src/common.ts:866](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L866) ___ @@ -428,7 +430,7 @@ Returns a deep copy of this [Common](Common.md) instance. #### Defined in -[packages/common/src/common.ts:846](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L846) +[packages/common/src/common.ts:932](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L932) ___ @@ -446,7 +448,7 @@ Array of DNS ENR urls #### Defined in -[packages/common/src/common.ts:726](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L726) +[packages/common/src/common.ts:816](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L816) ___ @@ -470,7 +472,7 @@ Block number or null if unscheduled #### Defined in -[packages/common/src/common.ts:559](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L559) +[packages/common/src/common.ts:612](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L612) ___ @@ -488,7 +490,7 @@ List of EIPs #### Defined in -[packages/common/src/common.ts:766](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L766) +[packages/common/src/common.ts:856](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L856) ___ @@ -616,7 +618,7 @@ Returns an eth/64 compliant fork hash (EIP-2124) #### Defined in -[packages/common/src/common.ts:672](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L672) +[packages/common/src/common.ts:745](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L745) ___ @@ -634,7 +636,7 @@ Genesis dictionary #### Defined in -[packages/common/src/common.ts:702](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L702) +[packages/common/src/common.ts:792](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L792) ___ @@ -651,10 +653,10 @@ will be thrown). #### Parameters -| Name | Type | -| :------ | :------ | -| `blockNumber` | `BigIntLike` | -| `td?` | `BigIntLike` | +| Name | Type | Description | +| :------ | :------ | :------ | +| `blockNumber` | `BigIntLike` | | +| `td?` | `BigIntLike` | : total difficulty of the parent block (for block hf) OR of the the chain latest (for chain hf) | #### Returns @@ -664,7 +666,7 @@ The name of the HF #### Defined in -[packages/common/src/common.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L263) +[packages/common/src/common.ts:310](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L310) ___ @@ -713,7 +715,7 @@ True if hardfork set is greater than hardfork provided #### Defined in -[packages/common/src/common.ts:536](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L536) +[packages/common/src/common.ts:589](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L589) ___ @@ -731,7 +733,7 @@ Hardfork name #### Defined in -[packages/common/src/common.ts:734](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L734) +[packages/common/src/common.ts:824](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L824) ___ @@ -755,7 +757,7 @@ Block number or null if unscheduled #### Defined in -[packages/common/src/common.ts:545](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L545) +[packages/common/src/common.ts:598](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L598) ___ @@ -777,7 +779,7 @@ Array with hardfork data (name, block, forkHash) #### Defined in -[packages/common/src/common.ts:691](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L691) +[packages/common/src/common.ts:764](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L764) ___ @@ -802,7 +804,7 @@ True if HF1 gte HF2 #### Defined in -[packages/common/src/common.ts:516](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L516) +[packages/common/src/common.ts:569](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L569) ___ @@ -827,7 +829,7 @@ True if HF is active on block number #### Defined in -[packages/common/src/common.ts:490](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L490) +[packages/common/src/common.ts:543](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L543) ___ @@ -851,7 +853,7 @@ Total difficulty or null if no set #### Defined in -[packages/common/src/common.ts:577](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L577) +[packages/common/src/common.ts:630](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L630) ___ @@ -869,7 +871,7 @@ Array with arrays of hardforks #### Defined in -[packages/common/src/common.ts:710](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L710) +[packages/common/src/common.ts:800](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L800) ___ @@ -896,7 +898,7 @@ by the [eips](../interfaces/CommonOpts.md#eips) constructor option #### Defined in -[packages/common/src/common.ts:469](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L469) +[packages/common/src/common.ts:522](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L522) ___ @@ -921,7 +923,7 @@ True if blockNumber is HF block #### Defined in -[packages/common/src/common.ts:592](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L592) +[packages/common/src/common.ts:645](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L645) ___ @@ -946,7 +948,7 @@ True if blockNumber is HF block #### Defined in -[packages/common/src/common.ts:627](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L627) +[packages/common/src/common.ts:694](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L694) ___ @@ -1032,7 +1034,7 @@ network Id #### Defined in -[packages/common/src/common.ts:758](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L758) +[packages/common/src/common.ts:848](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L848) ___ @@ -1056,7 +1058,7 @@ Block number or null if not available #### Defined in -[packages/common/src/common.ts:604](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L604) +[packages/common/src/common.ts:657](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L657) ___ @@ -1224,7 +1226,7 @@ The value requested or `BigInt(0)` if not found #### Defined in -[packages/common/src/common.ts:381](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L381) +[packages/common/src/common.ts:434](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L434) ___ @@ -1252,7 +1254,7 @@ The value requested or `BigInt(0)` if not found #### Defined in -[packages/common/src/common.ts:455](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L455) +[packages/common/src/common.ts:508](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L508) ___ @@ -1278,7 +1280,7 @@ The value requested or `undefined` if not found #### Defined in -[packages/common/src/common.ts:430](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L430) +[packages/common/src/common.ts:483](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L483) ___ @@ -1304,7 +1306,7 @@ The value requested or `BigInt(0)` if not found #### Defined in -[packages/common/src/common.ts:399](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L399) +[packages/common/src/common.ts:452](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L452) ___ @@ -1607,7 +1609,7 @@ The dictionary with parameters set as chain #### Defined in -[packages/common/src/common.ts:209](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L209) +[packages/common/src/common.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L251) ___ @@ -1629,7 +1631,29 @@ Sets the active EIPs #### Defined in -[packages/common/src/common.ts:348](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L348) +[packages/common/src/common.ts:401](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L401) + +___ + +### setForkHashes + +▸ **setForkHashes**(`genesisHash`): `void` + +Sets any missing forkHashes on the passed-in [Common](Common.md) instance + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `genesisHash` | `Buffer` | The genesis block hash | + +#### Returns + +`void` + +#### Defined in + +[packages/common/src/common.ts:776](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L776) ___ @@ -1651,7 +1675,7 @@ Sets the hardfork to get params for #### Defined in -[packages/common/src/common.ts:235](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L235) +[packages/common/src/common.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L282) ___ @@ -1681,7 +1705,7 @@ The name of the HF set #### Defined in -[packages/common/src/common.ts:325](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L325) +[packages/common/src/common.ts:378](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L378) ___ @@ -1736,7 +1760,7 @@ ___ #### Defined in -[packages/common/src/common.ts:852](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L852) +[packages/common/src/common.ts:938](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L938) ___ @@ -1777,7 +1801,32 @@ the `@ethereumjs/tx` library to a Layer-2 chain). #### Defined in -[packages/common/src/common.ts:71](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L71) +[packages/common/src/common.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L76) + +___ + +### fromGethGenesis + +▸ `Static` **fromGethGenesis**(`genesisJson`, `to`): [`Common`](Common.md) + +Static method to load and set common from a geth genesis json + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `genesisJson` | `any` | json of geth configuration | +| `to` | [`GethConfigOpts`](../interfaces/GethConfigOpts.md) | futher configure the common instance | + +#### Returns + +[`Common`](Common.md) + +Common + +#### Defined in + +[packages/common/src/common.ts:177](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L177) ___ @@ -1855,7 +1904,7 @@ boolean #### Defined in -[packages/common/src/common.ts:161](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L161) +[packages/common/src/common.ts:198](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/common.ts#L198) ___ diff --git a/packages/common/docs/enums/Chain.md b/packages/common/docs/enums/Chain.md index f629015df7..c63c543dc4 100644 --- a/packages/common/docs/enums/Chain.md +++ b/packages/common/docs/enums/Chain.md @@ -7,7 +7,6 @@ ### Enumeration Members - [Goerli](Chain.md#goerli) -- [Kovan](Chain.md#kovan) - [Mainnet](Chain.md#mainnet) - [Rinkeby](Chain.md#rinkeby) - [Ropsten](Chain.md#ropsten) @@ -21,16 +20,6 @@ #### Defined in -[packages/common/src/enums.ts:6](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L6) - -___ - -### Kovan - -• **Kovan** = ``42`` - -#### Defined in - [packages/common/src/enums.ts:5](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L5) ___ @@ -71,4 +60,4 @@ ___ #### Defined in -[packages/common/src/enums.ts:7](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L7) +[packages/common/src/enums.ts:6](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L6) diff --git a/packages/common/docs/enums/CustomChain.md b/packages/common/docs/enums/CustomChain.md index 65bf47b8d7..addbf16f4f 100644 --- a/packages/common/docs/enums/CustomChain.md +++ b/packages/common/docs/enums/CustomChain.md @@ -6,6 +6,7 @@ ### Enumeration Members +- [ArbitrumOne](CustomChain.md#arbitrumone) - [ArbitrumRinkebyTestnet](CustomChain.md#arbitrumrinkebytestnet) - [OptimisticEthereum](CustomChain.md#optimisticethereum) - [OptimisticKovan](CustomChain.md#optimistickovan) @@ -15,6 +16,20 @@ ## Enumeration Members +### ArbitrumOne + +• **ArbitrumOne** = ``"arbitrum-one"`` + +Arbitrum One - mainnet for Arbitrum roll-up + +- [Documentation](https://developer.offchainlabs.com/public-chains) + +#### Defined in + +[packages/common/src/enums.ts:69](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L69) + +___ + ### ArbitrumRinkebyTestnet • **ArbitrumRinkebyTestnet** = ``"arbitrum-rinkeby-testnet"`` @@ -39,7 +54,7 @@ Optimistic Ethereum - mainnet for Optimism roll-up #### Defined in -[packages/common/src/enums.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L83) +[packages/common/src/enums.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L90) ___ @@ -53,7 +68,7 @@ Optimistic Kovan - testnet for Optimism roll-up #### Defined in -[packages/common/src/enums.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L76) +[packages/common/src/enums.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L83) ___ @@ -95,4 +110,4 @@ xDai EVM sidechain with a native stable token #### Defined in -[packages/common/src/enums.ts:69](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L69) +[packages/common/src/enums.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L76) diff --git a/packages/common/docs/enums/Hardfork.md b/packages/common/docs/enums/Hardfork.md index aa8b48eccd..3b7e04fad5 100644 --- a/packages/common/docs/enums/Hardfork.md +++ b/packages/common/docs/enums/Hardfork.md @@ -12,6 +12,7 @@ - [Chainstart](Hardfork.md#chainstart) - [Constantinople](Hardfork.md#constantinople) - [Dao](Hardfork.md#dao) +- [Eof](Hardfork.md#eof) - [GrayGlacier](Hardfork.md#grayglacier) - [Homestead](Hardfork.md#homestead) - [Istanbul](Hardfork.md#istanbul) @@ -32,7 +33,7 @@ #### Defined in -[packages/common/src/enums.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L23) +[packages/common/src/enums.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L22) ___ @@ -42,7 +43,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L21) +[packages/common/src/enums.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L20) ___ @@ -52,7 +53,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L16) +[packages/common/src/enums.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L15) ___ @@ -62,7 +63,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L11) +[packages/common/src/enums.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L10) ___ @@ -72,7 +73,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L17) +[packages/common/src/enums.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L16) ___ @@ -82,7 +83,17 @@ ___ #### Defined in -[packages/common/src/enums.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L13) +[packages/common/src/enums.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L12) + +___ + +### Eof + +• **Eof** = ``"eof"`` + +#### Defined in + +[packages/common/src/enums.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L26) ___ @@ -92,7 +103,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L24) +[packages/common/src/enums.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L23) ___ @@ -102,7 +113,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L12) +[packages/common/src/enums.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L11) ___ @@ -112,7 +123,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L19) +[packages/common/src/enums.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L18) ___ @@ -122,7 +133,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L22) +[packages/common/src/enums.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L21) ___ @@ -132,7 +143,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L26) +[packages/common/src/enums.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L25) ___ @@ -142,7 +153,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L25) +[packages/common/src/enums.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L24) ___ @@ -152,7 +163,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L20) +[packages/common/src/enums.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L19) ___ @@ -162,7 +173,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L18) +[packages/common/src/enums.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L17) ___ @@ -182,7 +193,7 @@ ___ #### Defined in -[packages/common/src/enums.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L15) +[packages/common/src/enums.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L14) ___ @@ -192,4 +203,4 @@ ___ #### Defined in -[packages/common/src/enums.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L14) +[packages/common/src/enums.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/enums.ts#L13) diff --git a/packages/common/docs/interfaces/GethConfigOpts.md b/packages/common/docs/interfaces/GethConfigOpts.md new file mode 100644 index 0000000000..6e7649866c --- /dev/null +++ b/packages/common/docs/interfaces/GethConfigOpts.md @@ -0,0 +1,52 @@ +[@ethereumjs/common](../README.md) / GethConfigOpts + +# Interface: GethConfigOpts + +## Table of contents + +### Properties + +- [chain](GethConfigOpts.md#chain) +- [genesisHash](GethConfigOpts.md#genesishash) +- [hardfork](GethConfigOpts.md#hardfork) +- [mergeForkIdPostMerge](GethConfigOpts.md#mergeforkidpostmerge) + +## Properties + +### chain + +• `Optional` **chain**: `string` + +#### Defined in + +[packages/common/src/types.ts:118](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/types.ts#L118) + +___ + +### genesisHash + +• `Optional` **genesisHash**: `Buffer` + +#### Defined in + +[packages/common/src/types.ts:120](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/types.ts#L120) + +___ + +### hardfork + +• `Optional` **hardfork**: `string` + +#### Defined in + +[packages/common/src/types.ts:119](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/types.ts#L119) + +___ + +### mergeForkIdPostMerge + +• `Optional` **mergeForkIdPostMerge**: `boolean` + +#### Defined in + +[packages/common/src/types.ts:121](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/common/src/types.ts#L121) diff --git a/packages/common/package.json b/packages/common/package.json index 6ced690a17..eaf22a34c3 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/common", - "version": "3.0.1", + "version": "3.0.2", "description": "Resources common to all Ethereum implementations", "keywords": [ "ethereum", @@ -48,7 +48,7 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "crc-32": "^1.2.0" } } diff --git a/packages/common/src/enums.ts b/packages/common/src/enums.ts index e313f01fe3..c96b781a01 100644 --- a/packages/common/src/enums.ts +++ b/packages/common/src/enums.ts @@ -23,9 +23,7 @@ export enum Hardfork { GrayGlacier = 'grayGlacier', MergeForkIdTransition = 'mergeForkIdTransition', Merge = 'merge', - Eof_INTERNAL = 'eof', Shanghai = 'shanghai', - ShardingFork_INTERNAL = 'shardingFork', } export enum ConsensusType { diff --git a/packages/common/src/hardforks/eof.json b/packages/common/src/hardforks/eof.json deleted file mode 100644 index e3dede8bd2..0000000000 --- a/packages/common/src/hardforks/eof.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "eof", - "comment": "Pre shanghai ephemeral hardfork for eof testnet", - "url": "https://github.com/ethereumjs/ethereumjs-monorepo/issues/2298", - "status": "Experimental", - "eips": [3540, 3651, 3670, 3855, 3860] -} diff --git a/packages/common/src/hardforks/index.ts b/packages/common/src/hardforks/index.ts index 59aec26e17..0547f04c92 100644 --- a/packages/common/src/hardforks/index.ts +++ b/packages/common/src/hardforks/index.ts @@ -11,11 +11,6 @@ export const hardforks = { muirGlacier: require('./muirGlacier.json'), berlin: require('./berlin.json'), london: require('./london.json'), - // TODO CLEANUP: - // Eof is a dummy hardfork for testing and running shandong testnet/eof testnet - // However its harmless as it never will get scheduled in real and would be cleaned - // up post eof testnets are no longer needed - eof: require('./eof.json'), shanghai: require('./shanghai.json'), arrowGlacier: require('./arrowGlacier.json'), grayGlacier: require('./grayGlacier.json'), diff --git a/packages/common/src/hardforks/shardingFork.json b/packages/common/src/hardforks/shardingFork.json deleted file mode 100644 index d7f6a78599..0000000000 --- a/packages/common/src/hardforks/shardingFork.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "shardingFork", - "comment": "Hardfork to activate eip-4844", - "url": "", - "status": "Pre-Draft", - "eips": [4844] -} diff --git a/packages/common/src/utils.ts b/packages/common/src/utils.ts index 1620730d64..1c85f9c522 100644 --- a/packages/common/src/utils.ts +++ b/packages/common/src/utils.ts @@ -103,13 +103,7 @@ function parseGethParams(json: any, mergeForkIdPostMerge: boolean = true) { [Hardfork.Berlin]: { name: 'berlinBlock' }, [Hardfork.London]: { name: 'londonBlock' }, [Hardfork.MergeForkIdTransition]: { name: 'mergeForkBlock', postMerge: mergeForkIdPostMerge }, - [Hardfork.Eof_INTERNAL]: { name: 'eofBlock', postMerge: true }, [Hardfork.Shanghai]: { name: 'shanghaiTime', postMerge: true, isTimestamp: true }, - [Hardfork.ShardingFork_INTERNAL]: { - name: 'shardingForkTime', - postMerge: true, - isTimestamp: true, - }, } // forkMapRev is the map from config field name to Hardfork diff --git a/packages/common/test/timestamp.spec.ts b/packages/common/test/timestamp.spec.ts index 88f0749cfb..e804eb873d 100644 --- a/packages/common/test/timestamp.spec.ts +++ b/packages/common/test/timestamp.spec.ts @@ -40,18 +40,6 @@ tape('[Common]: Timestamp Hardfork logic', function (t: tape.Test) { Hardfork.MergeForkIdTransition, 'should match the HF' ) - // If two hardforks are schedule on same block/timestamp, should pick the last - // one - st.equal( - c.getHardforkByBlockNumber(1, undefined, 1668699476), - Hardfork.ShardingFork_INTERNAL, - 'should match the HF' - ) - st.equal( - c.getHardforkByBlockNumber(1, undefined, 1668699576), - Hardfork.ShardingFork_INTERNAL, - 'should match the HF' - ) st.equal( c.nextHardforkBlockOrTimestamp(Hardfork.Shanghai), null, @@ -85,12 +73,6 @@ tape('[Common]: Timestamp Hardfork logic', function (t: tape.Test) { Hardfork.Shanghai, 'should match the HF' ) - - st.equal( - c.nextHardforkBlockOrTimestamp(Hardfork.Shanghai), - BigInt(1668700476), - 'should give correct next Hardfork block/time' - ) st.end() }) }) diff --git a/packages/devp2p/CHANGELOG.md b/packages/devp2p/CHANGELOG.md index a14d12db67..b62fee0982 100644 --- a/packages/devp2p/CHANGELOG.md +++ b/packages/devp2p/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 5.0.2 - 2022-12-09 + +### Hardfork-By-Time Support + +The devp2p library is now ready to work with hardforks triggered by timestamp, which will first be applied along the `Shanghai` HF, see PR [#2437](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2437). This is achieved by integrating a new timestamp supporting `@ethereumjs/common` library version. + +One specific devp2p change is that the forkid is now calculated based on timestamps for timestamp-based HFs, see [EIP-6122](https://github.com/ethereum/EIPs/pull/6122). + ## 5.0.1 - 2022-10-18 ### Support for Geth genesis.json Genesis Format diff --git a/packages/devp2p/docs/README.md b/packages/devp2p/docs/README.md index f6f6c4cf27..2e2ce59c44 100644 --- a/packages/devp2p/docs/README.md +++ b/packages/devp2p/docs/README.md @@ -91,7 +91,7 @@ #### Defined in -[packages/devp2p/src/dns/dns.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L23) +[packages/devp2p/src/dns/dns.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L22) ___ diff --git a/packages/devp2p/docs/classes/DNS.md b/packages/devp2p/docs/classes/DNS.md index 5e8817f530..0715e5244d 100644 --- a/packages/devp2p/docs/classes/DNS.md +++ b/packages/devp2p/docs/classes/DNS.md @@ -27,7 +27,7 @@ #### Defined in -[packages/devp2p/src/dns/dns.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L37) +[packages/devp2p/src/dns/dns.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L36) ## Methods @@ -50,7 +50,7 @@ TestDouble mocking of the native `dns` module. #### Defined in -[packages/devp2p/src/dns/dns.ts:217](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L217) +[packages/devp2p/src/dns/dns.ts:216](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L216) ___ @@ -76,4 +76,4 @@ search exceeds `maxQuantity` plus the `errorTolerance` factor. #### Defined in -[packages/devp2p/src/dns/dns.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L55) +[packages/devp2p/src/dns/dns.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dns/dns.ts#L54) diff --git a/packages/devp2p/docs/classes/ETH-1.md b/packages/devp2p/docs/classes/ETH-1.md index f668e44d5c..bbf49fb13a 100644 --- a/packages/devp2p/docs/classes/ETH-1.md +++ b/packages/devp2p/docs/classes/ETH-1.md @@ -16,6 +16,7 @@ ### Properties +- [DEBUG](ETH-1.md#debug) - [\_forkHash](ETH-1.md#_forkhash) - [\_hardfork](ETH-1.md#_hardfork) - [\_latestBlock](ETH-1.md#_latestblock) @@ -89,6 +90,16 @@ Protocol.constructor ## Properties +### DEBUG + +• **DEBUG**: `boolean` = `false` + +#### Defined in + +[packages/devp2p/src/protocol/eth.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L21) + +___ + ### \_forkHash • **\_forkHash**: `string` = `''` @@ -135,7 +146,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L21) +[packages/devp2p/src/protocol/eth.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L20) ___ @@ -145,7 +156,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L20) +[packages/devp2p/src/protocol/eth.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L19) ___ @@ -230,7 +241,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L45) +[packages/devp2p/src/protocol/eth.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L48) ___ @@ -249,7 +260,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L46) +[packages/devp2p/src/protocol/eth.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L49) ___ @@ -268,7 +279,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L47) +[packages/devp2p/src/protocol/eth.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L50) ___ @@ -287,7 +298,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L48) +[packages/devp2p/src/protocol/eth.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L51) ___ @@ -306,7 +317,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L49) +[packages/devp2p/src/protocol/eth.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L52) ## Methods @@ -326,7 +337,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:204](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L204) +[packages/devp2p/src/protocol/eth.ts:217](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L217) ___ @@ -346,7 +357,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:212](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L212) +[packages/devp2p/src/protocol/eth.ts:225](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L225) ___ @@ -367,7 +378,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L51) +[packages/devp2p/src/protocol/eth.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L54) ___ @@ -381,7 +392,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L149) +[packages/devp2p/src/protocol/eth.ts:162](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L162) ___ @@ -401,7 +412,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:208](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L208) +[packages/devp2p/src/protocol/eth.ts:221](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L221) ___ @@ -423,7 +434,7 @@ Eth 64 Fork ID validation (EIP-2124) #### Defined in -[packages/devp2p/src/protocol/eth.ts:112](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L112) +[packages/devp2p/src/protocol/eth.ts:119](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L119) ___ @@ -604,7 +615,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:338](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L338) +[packages/devp2p/src/protocol/eth.ts:347](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L347) ___ @@ -618,7 +629,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:200](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L200) +[packages/devp2p/src/protocol/eth.ts:213](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L213) ___ @@ -1125,7 +1136,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:283](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L283) +[packages/devp2p/src/protocol/eth.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L294) ___ @@ -1145,7 +1156,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:232](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L232) +[packages/devp2p/src/protocol/eth.ts:245](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L245) ___ diff --git a/packages/devp2p/docs/classes/KBucket.md b/packages/devp2p/docs/classes/KBucket.md index a80c270c62..fdea94de9f 100644 --- a/packages/devp2p/docs/classes/KBucket.md +++ b/packages/devp2p/docs/classes/KBucket.md @@ -70,7 +70,7 @@ EventEmitter.constructor #### Defined in -[packages/devp2p/src/dpt/kbucket.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L18) +[packages/devp2p/src/dpt/kbucket.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L17) ## Properties @@ -80,7 +80,7 @@ EventEmitter.constructor #### Defined in -[packages/devp2p/src/dpt/kbucket.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L17) +[packages/devp2p/src/dpt/kbucket.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L16) ___ @@ -90,7 +90,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/kbucket.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L16) +[packages/devp2p/src/dpt/kbucket.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L15) ___ @@ -1006,7 +1006,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/kbucket.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L46) +[packages/devp2p/src/dpt/kbucket.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L45) ___ diff --git a/packages/devp2p/docs/classes/LES-1.md b/packages/devp2p/docs/classes/LES-1.md index 5d678a1395..66a8432187 100644 --- a/packages/devp2p/docs/classes/LES-1.md +++ b/packages/devp2p/docs/classes/LES-1.md @@ -455,7 +455,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:262](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L262) +[packages/devp2p/src/protocol/les.ts:254](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L254) ___ @@ -976,7 +976,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:201](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L201) +[packages/devp2p/src/protocol/les.ts:197](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L197) ___ diff --git a/packages/devp2p/docs/classes/Peer.md b/packages/devp2p/docs/classes/Peer.md index 613608cfa5..4118fa0fbc 100644 --- a/packages/devp2p/docs/classes/Peer.md +++ b/packages/devp2p/docs/classes/Peer.md @@ -118,7 +118,7 @@ EventEmitter.constructor ### \_EIP8 -• **\_EIP8**: `Buffer` +• **\_EIP8**: `boolean` \| `Buffer` #### Defined in @@ -188,7 +188,7 @@ ___ ### \_disconnectWe -• **\_disconnectWe**: `any` +• **\_disconnectWe**: ``null`` \| `boolean` #### Defined in @@ -440,7 +440,7 @@ Can be used together with the `devp2p:FIRST_PEER` debugger. #### Defined in -[packages/devp2p/src/rlpx/peer.ts:703](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L703) +[packages/devp2p/src/rlpx/peer.ts:692](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L692) ___ @@ -464,7 +464,7 @@ reference to this Peer instance or to a subprotocol instance (e.g. `ETH`) #### Defined in -[packages/devp2p/src/rlpx/peer.ts:665](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L665) +[packages/devp2p/src/rlpx/peer.ts:654](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L654) ___ @@ -480,7 +480,7 @@ ACK message received #### Defined in -[packages/devp2p/src/rlpx/peer.ts:347](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L347) +[packages/devp2p/src/rlpx/peer.ts:340](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L340) ___ @@ -496,7 +496,7 @@ AUTH message received #### Defined in -[packages/devp2p/src/rlpx/peer.ts:324](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L324) +[packages/devp2p/src/rlpx/peer.ts:317](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L317) ___ @@ -512,7 +512,7 @@ Handle message body #### Defined in -[packages/devp2p/src/rlpx/peer.ts:526](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L526) +[packages/devp2p/src/rlpx/peer.ts:519](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L519) ___ @@ -534,7 +534,7 @@ DISCONNECT message received #### Defined in -[packages/devp2p/src/rlpx/peer.ts:455](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L455) +[packages/devp2p/src/rlpx/peer.ts:448](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L448) ___ @@ -550,7 +550,7 @@ Handle message header #### Defined in -[packages/devp2p/src/rlpx/peer.ts:507](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L507) +[packages/devp2p/src/rlpx/peer.ts:500](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L500) ___ @@ -572,7 +572,7 @@ HELLO message received #### Defined in -[packages/devp2p/src/rlpx/peer.ts:376](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L376) +[packages/devp2p/src/rlpx/peer.ts:369](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L369) ___ @@ -595,7 +595,7 @@ Message handling, called from a SubProtocol context #### Defined in -[packages/devp2p/src/rlpx/peer.ts:487](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L487) +[packages/devp2p/src/rlpx/peer.ts:480](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L480) ___ @@ -611,7 +611,7 @@ PING message received #### Defined in -[packages/devp2p/src/rlpx/peer.ts:471](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L471) +[packages/devp2p/src/rlpx/peer.ts:464](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L464) ___ @@ -627,7 +627,7 @@ PONG message received #### Defined in -[packages/devp2p/src/rlpx/peer.ts:478](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L478) +[packages/devp2p/src/rlpx/peer.ts:471](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L471) ___ @@ -643,7 +643,7 @@ React to socket being closed #### Defined in -[packages/devp2p/src/rlpx/peer.ts:652](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L652) +[packages/devp2p/src/rlpx/peer.ts:641](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L641) ___ @@ -665,7 +665,7 @@ Process socket data #### Defined in -[packages/devp2p/src/rlpx/peer.ts:622](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L622) +[packages/devp2p/src/rlpx/peer.ts:611](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L611) ___ @@ -681,7 +681,7 @@ Send ACK message #### Defined in -[packages/devp2p/src/rlpx/peer.ts:185](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L185) +[packages/devp2p/src/rlpx/peer.ts:186](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L186) ___ @@ -697,7 +697,7 @@ Send AUTH message #### Defined in -[packages/devp2p/src/rlpx/peer.ts:164](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L164) +[packages/devp2p/src/rlpx/peer.ts:165](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L165) ___ @@ -719,7 +719,7 @@ Send DISCONNECT message #### Defined in -[packages/devp2p/src/rlpx/peer.ts:267](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L267) +[packages/devp2p/src/rlpx/peer.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L268) ___ @@ -735,7 +735,7 @@ Send HELLO message #### Defined in -[packages/devp2p/src/rlpx/peer.ts:230](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L230) +[packages/devp2p/src/rlpx/peer.ts:231](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L231) ___ @@ -759,7 +759,7 @@ Also called from SubProtocol context #### Defined in -[packages/devp2p/src/rlpx/peer.ts:210](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L210) +[packages/devp2p/src/rlpx/peer.ts:211](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L211) ___ @@ -775,7 +775,7 @@ Send PING message #### Defined in -[packages/devp2p/src/rlpx/peer.ts:283](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L283) +[packages/devp2p/src/rlpx/peer.ts:284](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L284) ___ @@ -791,7 +791,7 @@ Send PONG message #### Defined in -[packages/devp2p/src/rlpx/peer.ts:306](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L306) +[packages/devp2p/src/rlpx/peer.ts:303](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L303) ___ @@ -842,7 +842,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/peer.ts:693](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L693) +[packages/devp2p/src/rlpx/peer.ts:682](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L682) ___ @@ -967,7 +967,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/peer.ts:689](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L689) +[packages/devp2p/src/rlpx/peer.ts:678](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L678) ___ @@ -981,7 +981,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/peer.ts:677](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L677) +[packages/devp2p/src/rlpx/peer.ts:666](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L666) ___ @@ -995,7 +995,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/peer.ts:672](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L672) +[packages/devp2p/src/rlpx/peer.ts:661](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L661) ___ @@ -1040,7 +1040,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/peer.ts:685](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L685) +[packages/devp2p/src/rlpx/peer.ts:674](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L674) ___ @@ -1060,7 +1060,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/peer.ts:681](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L681) +[packages/devp2p/src/rlpx/peer.ts:670](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/peer.ts#L670) ___ diff --git a/packages/devp2p/docs/classes/RLPx.md b/packages/devp2p/docs/classes/RLPx.md index 4508601a78..0a0bd76607 100644 --- a/packages/devp2p/docs/classes/RLPx.md +++ b/packages/devp2p/docs/classes/RLPx.md @@ -92,7 +92,7 @@ EventEmitter.constructor #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L59) +[packages/devp2p/src/rlpx/rlpx.ts:58](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L58) ## Properties @@ -102,7 +102,7 @@ EventEmitter.constructor #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L46) +[packages/devp2p/src/rlpx/rlpx.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L45) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L44) +[packages/devp2p/src/rlpx/rlpx.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L43) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L47) +[packages/devp2p/src/rlpx/rlpx.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L46) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L41) +[packages/devp2p/src/rlpx/rlpx.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L40) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L49) +[packages/devp2p/src/rlpx/rlpx.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L48) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L40) +[packages/devp2p/src/rlpx/rlpx.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L39) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L48) +[packages/devp2p/src/rlpx/rlpx.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L47) ___ @@ -172,7 +172,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L43) +[packages/devp2p/src/rlpx/rlpx.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L42) ___ @@ -182,7 +182,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L54) +[packages/devp2p/src/rlpx/rlpx.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L53) ___ @@ -192,7 +192,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L51) +[packages/devp2p/src/rlpx/rlpx.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L50) ___ @@ -202,7 +202,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L52) +[packages/devp2p/src/rlpx/rlpx.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L51) ___ @@ -212,7 +212,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L39) +[packages/devp2p/src/rlpx/rlpx.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L38) ___ @@ -222,7 +222,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L56) +[packages/devp2p/src/rlpx/rlpx.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L55) ___ @@ -232,7 +232,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:57](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L57) +[packages/devp2p/src/rlpx/rlpx.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L56) ___ @@ -242,7 +242,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L45) +[packages/devp2p/src/rlpx/rlpx.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L44) ___ @@ -252,7 +252,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L53) +[packages/devp2p/src/rlpx/rlpx.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L52) ___ @@ -262,7 +262,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L42) +[packages/devp2p/src/rlpx/rlpx.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L41) ___ diff --git a/packages/devp2p/docs/classes/SNAP-1.md b/packages/devp2p/docs/classes/SNAP-1.md index 799dc48864..b4c1c4f005 100644 --- a/packages/devp2p/docs/classes/SNAP-1.md +++ b/packages/devp2p/docs/classes/SNAP-1.md @@ -70,7 +70,7 @@ Protocol.constructor #### Defined in -[packages/devp2p/src/protocol/snap.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L13) +[packages/devp2p/src/protocol/snap.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L12) ## Properties @@ -155,7 +155,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L17) +[packages/devp2p/src/protocol/snap.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L16) ## Methods @@ -176,7 +176,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L19) +[packages/devp2p/src/protocol/snap.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L18) ___ @@ -357,7 +357,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L86) +[packages/devp2p/src/protocol/snap.ts:85](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L85) ___ @@ -371,7 +371,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L90) +[packages/devp2p/src/protocol/snap.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L89) ___ @@ -878,7 +878,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L54) +[packages/devp2p/src/protocol/snap.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L53) ___ @@ -892,7 +892,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L45) +[packages/devp2p/src/protocol/snap.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L44) ___ diff --git a/packages/devp2p/docs/classes/Server.md b/packages/devp2p/docs/classes/Server.md index 0912673693..20b7907c6c 100644 --- a/packages/devp2p/docs/classes/Server.md +++ b/packages/devp2p/docs/classes/Server.md @@ -80,7 +80,7 @@ EventEmitter.constructor #### Defined in -[packages/devp2p/src/dpt/server.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L55) +[packages/devp2p/src/dpt/server.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L54) ## Properties @@ -90,7 +90,7 @@ EventEmitter.constructor #### Defined in -[packages/devp2p/src/dpt/server.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L53) +[packages/devp2p/src/dpt/server.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L52) ___ @@ -100,7 +100,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L45) +[packages/devp2p/src/dpt/server.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L44) ___ @@ -110,7 +110,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L48) +[packages/devp2p/src/dpt/server.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L47) ___ @@ -120,7 +120,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L50) +[packages/devp2p/src/dpt/server.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L49) ___ @@ -130,7 +130,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L46) +[packages/devp2p/src/dpt/server.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L45) ___ @@ -140,7 +140,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L49) +[packages/devp2p/src/dpt/server.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L48) ___ @@ -150,7 +150,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L51) +[packages/devp2p/src/dpt/server.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L50) ___ @@ -160,7 +160,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L52) +[packages/devp2p/src/dpt/server.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L51) ___ @@ -170,7 +170,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L47) +[packages/devp2p/src/dpt/server.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L46) ___ @@ -257,7 +257,7 @@ node_modules/@types/node/events.d.ts:290 #### Defined in -[packages/devp2p/src/dpt/server.ts:172](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L172) +[packages/devp2p/src/dpt/server.ts:171](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L171) ___ @@ -271,7 +271,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L142) +[packages/devp2p/src/dpt/server.ts:141](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L141) ___ @@ -293,7 +293,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:146](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L146) +[packages/devp2p/src/dpt/server.ts:145](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L145) ___ @@ -344,7 +344,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:84](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L84) +[packages/devp2p/src/dpt/server.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L83) ___ @@ -364,7 +364,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:91](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L91) +[packages/devp2p/src/dpt/server.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L90) ___ @@ -490,7 +490,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:137](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L137) +[packages/devp2p/src/dpt/server.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L136) ___ @@ -742,7 +742,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/server.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L101) +[packages/devp2p/src/dpt/server.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L100) ___ diff --git a/packages/devp2p/docs/enums/ETH.MESSAGE_CODES.md b/packages/devp2p/docs/enums/ETH.MESSAGE_CODES.md index d5b68f5385..7ce52bc754 100644 --- a/packages/devp2p/docs/enums/ETH.MESSAGE_CODES.md +++ b/packages/devp2p/docs/enums/ETH.MESSAGE_CODES.md @@ -32,7 +32,7 @@ #### Defined in -[packages/devp2p/src/protocol/eth.ts:361](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L361) +[packages/devp2p/src/protocol/eth.ts:370](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L370) ___ @@ -42,7 +42,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:359](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L359) +[packages/devp2p/src/protocol/eth.ts:368](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L368) ___ @@ -52,7 +52,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:360](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L360) +[packages/devp2p/src/protocol/eth.ts:369](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L369) ___ @@ -62,7 +62,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:358](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L358) +[packages/devp2p/src/protocol/eth.ts:367](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L367) ___ @@ -72,7 +72,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L365) +[packages/devp2p/src/protocol/eth.ts:374](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L374) ___ @@ -82,7 +82,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:372](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L372) +[packages/devp2p/src/protocol/eth.ts:381](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L381) ___ @@ -92,7 +92,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:367](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L367) +[packages/devp2p/src/protocol/eth.ts:376](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L376) ___ @@ -102,7 +102,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:362](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L362) +[packages/devp2p/src/protocol/eth.ts:371](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L371) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:356](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L356) +[packages/devp2p/src/protocol/eth.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L365) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:371](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L371) +[packages/devp2p/src/protocol/eth.ts:380](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L380) ___ @@ -132,7 +132,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:366](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L366) +[packages/devp2p/src/protocol/eth.ts:375](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L375) ___ @@ -142,7 +142,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:373](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L373) +[packages/devp2p/src/protocol/eth.ts:382](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L382) ___ @@ -152,7 +152,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:368](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L368) +[packages/devp2p/src/protocol/eth.ts:377](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L377) ___ @@ -162,7 +162,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:355](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L355) +[packages/devp2p/src/protocol/eth.ts:364](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L364) ___ @@ -172,4 +172,4 @@ ___ #### Defined in -[packages/devp2p/src/protocol/eth.ts:357](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L357) +[packages/devp2p/src/protocol/eth.ts:366](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L366) diff --git a/packages/devp2p/docs/enums/LES.MESSAGE_CODES.md b/packages/devp2p/docs/enums/LES.MESSAGE_CODES.md index 27ac24246a..8be034bfcc 100644 --- a/packages/devp2p/docs/enums/LES.MESSAGE_CODES.md +++ b/packages/devp2p/docs/enums/LES.MESSAGE_CODES.md @@ -41,7 +41,7 @@ #### Defined in -[packages/devp2p/src/protocol/les.ts:291](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L291) +[packages/devp2p/src/protocol/les.ts:283](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L283) ___ @@ -51,7 +51,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:295](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L295) +[packages/devp2p/src/protocol/les.ts:287](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L287) ___ @@ -61,7 +61,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:293](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L293) +[packages/devp2p/src/protocol/les.ts:285](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L285) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:301](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L301) +[packages/devp2p/src/protocol/les.ts:293](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L293) ___ @@ -81,7 +81,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L294) +[packages/devp2p/src/protocol/les.ts:286](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L286) ___ @@ -91,7 +91,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:292](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L292) +[packages/devp2p/src/protocol/les.ts:284](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L284) ___ @@ -101,7 +101,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:300](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L300) +[packages/devp2p/src/protocol/les.ts:292](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L292) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:302](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L302) +[packages/devp2p/src/protocol/les.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L294) ___ @@ -121,7 +121,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:309](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L309) +[packages/devp2p/src/protocol/les.ts:301](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L301) ___ @@ -131,7 +131,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:298](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L298) +[packages/devp2p/src/protocol/les.ts:290](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L290) ___ @@ -141,7 +141,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:307](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L307) +[packages/devp2p/src/protocol/les.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L299) ___ @@ -151,7 +151,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:296](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L296) +[packages/devp2p/src/protocol/les.ts:288](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L288) ___ @@ -161,7 +161,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:312](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L312) +[packages/devp2p/src/protocol/les.ts:304](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L304) ___ @@ -171,7 +171,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:303](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L303) +[packages/devp2p/src/protocol/les.ts:295](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L295) ___ @@ -181,7 +181,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:310](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L310) +[packages/devp2p/src/protocol/les.ts:302](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L302) ___ @@ -191,7 +191,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L299) +[packages/devp2p/src/protocol/les.ts:291](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L291) ___ @@ -201,7 +201,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:308](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L308) +[packages/devp2p/src/protocol/les.ts:300](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L300) ___ @@ -211,7 +211,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:297](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L297) +[packages/devp2p/src/protocol/les.ts:289](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L289) ___ @@ -221,7 +221,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:317](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L317) +[packages/devp2p/src/protocol/les.ts:309](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L309) ___ @@ -231,7 +231,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:304](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L304) +[packages/devp2p/src/protocol/les.ts:296](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L296) ___ @@ -241,7 +241,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:311](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L311) +[packages/devp2p/src/protocol/les.ts:303](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L303) ___ @@ -251,7 +251,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:290](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L290) +[packages/devp2p/src/protocol/les.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L282) ___ @@ -261,7 +261,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:316](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L316) +[packages/devp2p/src/protocol/les.ts:308](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L308) ___ @@ -271,4 +271,4 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:313](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L313) +[packages/devp2p/src/protocol/les.ts:305](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L305) diff --git a/packages/devp2p/docs/enums/SNAP.MESSAGE_CODES.md b/packages/devp2p/docs/enums/SNAP.MESSAGE_CODES.md index 8eaa81a4bf..32962e8f77 100644 --- a/packages/devp2p/docs/enums/SNAP.MESSAGE_CODES.md +++ b/packages/devp2p/docs/enums/SNAP.MESSAGE_CODES.md @@ -25,7 +25,7 @@ #### Defined in -[packages/devp2p/src/protocol/snap.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L99) +[packages/devp2p/src/protocol/snap.ts:98](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L98) ___ @@ -35,7 +35,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:103](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L103) +[packages/devp2p/src/protocol/snap.ts:102](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L102) ___ @@ -45,7 +45,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:98](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L98) +[packages/devp2p/src/protocol/snap.ts:97](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L97) ___ @@ -55,7 +55,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:102](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L102) +[packages/devp2p/src/protocol/snap.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L101) ___ @@ -65,7 +65,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L100) +[packages/devp2p/src/protocol/snap.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L99) ___ @@ -75,7 +75,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:104](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L104) +[packages/devp2p/src/protocol/snap.ts:103](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L103) ___ @@ -85,7 +85,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L101) +[packages/devp2p/src/protocol/snap.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L100) ___ @@ -95,4 +95,4 @@ ___ #### Defined in -[packages/devp2p/src/protocol/snap.ts:105](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L105) +[packages/devp2p/src/protocol/snap.ts:104](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/snap.ts#L104) diff --git a/packages/devp2p/docs/interfaces/CustomContact.md b/packages/devp2p/docs/interfaces/CustomContact.md index 969923fb07..89cc17cf9e 100644 --- a/packages/devp2p/docs/interfaces/CustomContact.md +++ b/packages/devp2p/docs/interfaces/CustomContact.md @@ -44,7 +44,7 @@ ___ #### Defined in -[packages/devp2p/src/dpt/kbucket.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L11) +[packages/devp2p/src/dpt/kbucket.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L10) ___ @@ -82,4 +82,4 @@ ___ #### Defined in -[packages/devp2p/src/dpt/kbucket.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L12) +[packages/devp2p/src/dpt/kbucket.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/kbucket.ts#L11) diff --git a/packages/devp2p/docs/interfaces/DPTServerOptions.md b/packages/devp2p/docs/interfaces/DPTServerOptions.md index 818fd14de6..9a299dba3e 100644 --- a/packages/devp2p/docs/interfaces/DPTServerOptions.md +++ b/packages/devp2p/docs/interfaces/DPTServerOptions.md @@ -22,7 +22,7 @@ Default: dgram-created socket #### Defined in -[packages/devp2p/src/dpt/server.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L41) +[packages/devp2p/src/dpt/server.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L40) ___ @@ -36,7 +36,7 @@ Default: 0.0.0.0, no UDP or TCP port provided #### Defined in -[packages/devp2p/src/dpt/server.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L34) +[packages/devp2p/src/dpt/server.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L33) ___ @@ -50,4 +50,4 @@ Default: 10s #### Defined in -[packages/devp2p/src/dpt/server.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L27) +[packages/devp2p/src/dpt/server.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/dpt/server.ts#L26) diff --git a/packages/devp2p/docs/interfaces/LES.Status.md b/packages/devp2p/docs/interfaces/LES.Status.md index 35e5496083..5498413d93 100644 --- a/packages/devp2p/docs/interfaces/LES.Status.md +++ b/packages/devp2p/docs/interfaces/LES.Status.md @@ -37,7 +37,7 @@ #### Defined in -[packages/devp2p/src/protocol/les.ts:283](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L283) +[packages/devp2p/src/protocol/les.ts:275](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L275) ___ @@ -47,7 +47,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:280](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L280) +[packages/devp2p/src/protocol/les.ts:272](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L272) ___ @@ -57,7 +57,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L282) +[packages/devp2p/src/protocol/les.ts:274](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L274) ___ @@ -67,7 +67,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L281) +[packages/devp2p/src/protocol/les.ts:273](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L273) ___ @@ -77,7 +77,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:284](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L284) +[packages/devp2p/src/protocol/les.ts:276](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L276) ___ @@ -87,7 +87,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:275](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L275) +[packages/devp2p/src/protocol/les.ts:267](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L267) ___ @@ -97,7 +97,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:273](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L273) +[packages/devp2p/src/protocol/les.ts:265](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L265) ___ @@ -107,7 +107,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:274](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L274) +[packages/devp2p/src/protocol/les.ts:266](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L266) ___ @@ -117,7 +117,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:272](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L272) +[packages/devp2p/src/protocol/les.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L264) ___ @@ -127,7 +127,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:271](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L271) +[packages/devp2p/src/protocol/les.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L263) ___ @@ -137,7 +137,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:270](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L270) +[packages/devp2p/src/protocol/les.ts:262](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L262) ___ @@ -147,7 +147,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:285](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L285) +[packages/devp2p/src/protocol/les.ts:277](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L277) ___ @@ -157,7 +157,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:277](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L277) +[packages/devp2p/src/protocol/les.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L269) ___ @@ -167,7 +167,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:276](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L276) +[packages/devp2p/src/protocol/les.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L268) ___ @@ -177,7 +177,7 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:278](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L278) +[packages/devp2p/src/protocol/les.ts:270](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L270) ___ @@ -187,4 +187,4 @@ ___ #### Defined in -[packages/devp2p/src/protocol/les.ts:279](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L279) +[packages/devp2p/src/protocol/les.ts:271](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/les.ts#L271) diff --git a/packages/devp2p/docs/interfaces/RLPxOptions.md b/packages/devp2p/docs/interfaces/RLPxOptions.md index c4ecaf6da4..8ef59c9736 100644 --- a/packages/devp2p/docs/interfaces/RLPxOptions.md +++ b/packages/devp2p/docs/interfaces/RLPxOptions.md @@ -23,7 +23,7 @@ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L33) +[packages/devp2p/src/rlpx/rlpx.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L32) ___ @@ -33,7 +33,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L26) +[packages/devp2p/src/rlpx/rlpx.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L25) ___ @@ -43,7 +43,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L34) +[packages/devp2p/src/rlpx/rlpx.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L33) ___ @@ -53,7 +53,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:29](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L29) +[packages/devp2p/src/rlpx/rlpx.ts:28](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L28) ___ @@ -63,7 +63,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:35](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L35) +[packages/devp2p/src/rlpx/rlpx.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L34) ___ @@ -73,7 +73,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L31) +[packages/devp2p/src/rlpx/rlpx.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L30) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L32) +[packages/devp2p/src/rlpx/rlpx.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L31) ___ @@ -93,4 +93,4 @@ ___ #### Defined in -[packages/devp2p/src/rlpx/rlpx.ts:28](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L28) +[packages/devp2p/src/rlpx/rlpx.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/rlpx/rlpx.ts#L27) diff --git a/packages/devp2p/docs/modules/eth.md b/packages/devp2p/docs/modules/eth.md index 2dfd973cd4..0549241e20 100644 --- a/packages/devp2p/docs/modules/eth.md +++ b/packages/devp2p/docs/modules/eth.md @@ -33,4 +33,4 @@ #### Defined in -[packages/devp2p/src/protocol/eth.ts:346](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L346) +[packages/devp2p/src/protocol/eth.ts:355](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/devp2p/src/protocol/eth.ts#L355) diff --git a/packages/devp2p/package.json b/packages/devp2p/package.json index d97a53566c..1dca3b97c2 100644 --- a/packages/devp2p/package.json +++ b/packages/devp2p/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/devp2p", - "version": "5.0.1", + "version": "5.0.2", "description": "A JavaScript implementation of ÐΞVp2p", "keywords": [ "ethereum", @@ -49,9 +49,9 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "@scure/base": "1.1.1", "@types/bl": "^2.1.0", "@types/k-bucket": "^5.0.0", @@ -68,8 +68,8 @@ "snappyjs": "^0.6.1" }, "devDependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/tx": "^4.0.1", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/tx": "^4.0.2", "@types/chalk": "^2.2.0", "@types/debug": "^4.1.4", "@types/ip": "^1.1.0", diff --git a/packages/ethash/CHANGELOG.md b/packages/ethash/CHANGELOG.md index 96f6562873..64e865edf2 100644 --- a/packages/ethash/CHANGELOG.md +++ b/packages/ethash/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 2.0.2 - 2022-12-09 + +Maintenance release with dependency updates, PR [#2445](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2445) + ## 2.0.1 - 2022-10-18 - Updated `@ethereumjs/block` dependency version to `v4.0.1` diff --git a/packages/ethash/package.json b/packages/ethash/package.json index 6127eaf3e2..6d5ab66113 100644 --- a/packages/ethash/package.json +++ b/packages/ethash/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/ethash", - "version": "2.0.1", + "version": "2.0.2", "description": "An ethash implementation in JavaScript", "keywords": [ "ethash", @@ -36,15 +36,15 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/block": "^4.0.1", + "@ethereumjs/block": "^4.1.0", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "abstract-level": "^1.0.3", "bigint-crypto-utils": "^3.0.23", "ethereum-cryptography": "^1.1.2" }, "devDependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "memory-level": "^1.0.0" }, "engines": { diff --git a/packages/evm/CHANGELOG.md b/packages/evm/CHANGELOG.md index 4221e459b2..74760fa6a4 100644 --- a/packages/evm/CHANGELOG.md +++ b/packages/evm/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 1.2.3 - 2022-12-09 + +### Bug Fixes and Other Changes + +- Gas cost fixes for `EIP-3860` (experimental), PR [#2397](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2397) +- More correctly timed `nonce` updates to avoid certain consensus-critical `nonce`/`account` update constallations. PR [#2404](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2404) +- Fixed chainstart/Frontier mainnet bug, PR [#2439](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2439) +- EVM memory expansion performance optimizations, PR [#2405](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2405) +- `EIP-4895` beacon chain withdrawals support (see `@ethereumjs/vm` for full documentation), PRs [#2353](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2353) and [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401) + ## 1.2.2 - 2022-10-26 - Fixed `EIP-3540` bug where EOF header validation was incorrectly applied to legacy contract code in EVM calls, PR [#2381](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2381) diff --git a/packages/evm/README.md b/packages/evm/README.md index 933c275d2d..48bb044a77 100644 --- a/packages/evm/README.md +++ b/packages/evm/README.md @@ -154,6 +154,7 @@ const vm = new VM({ common }) Currently supported EIPs: +- [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) - Transient Storage Opcodes (`experimental`) - [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) - Fee Market (`london` EIP) - [EIP-2315](https://eips.ethereum.org/EIPS/eip-2315) - Simple subroutines (`experimental`) - [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537) - BLS precompiles (`experimental`) @@ -169,6 +170,8 @@ Currently supported EIPs: - [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855) - PUSH0 instruction (`experimental`) - [EIP-3860](https://eips.ethereum.org/EIPS/eip-3860) - Limit and meter initcode (`experimental`) - [EIP-4399](https://eips.ethereum.org/EIPS/eip-4399) - Supplant DIFFICULTY opcode with PREVRANDAO (Merge) (`experimental`) +- [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895) - Beacon chain push withdrawals as operations (`experimental`) +- [EIP-5133](https://eips.ethereum.org/EIPS/eip-5133) - Delaying Difficulty Bomb to mid-September 2022 ### Tracing Events diff --git a/packages/evm/docs/README.md b/packages/evm/docs/README.md index 32492750d9..35f0e9d4f1 100644 --- a/packages/evm/docs/README.md +++ b/packages/evm/docs/README.md @@ -40,7 +40,7 @@ Log that the contract emits. #### Defined in -[packages/evm/src/types.ts:224](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L224) +[types.ts:226](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L226) ## Functions @@ -61,4 +61,4 @@ Log that the contract emits. #### Defined in -[packages/evm/src/precompiles/index.ts:177](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/precompiles/index.ts#L177) +[precompiles/index.ts:177](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/precompiles/index.ts#L177) diff --git a/packages/evm/docs/classes/EvmError.md b/packages/evm/docs/classes/EvmError.md index 54467e6ddb..a63866d62e 100644 --- a/packages/evm/docs/classes/EvmError.md +++ b/packages/evm/docs/classes/EvmError.md @@ -27,7 +27,7 @@ #### Defined in -[packages/evm/src/exceptions.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L39) +[exceptions.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L40) ## Properties @@ -37,7 +37,7 @@ #### Defined in -[packages/evm/src/exceptions.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L36) +[exceptions.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L37) ___ @@ -47,4 +47,4 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L37) +[exceptions.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L38) diff --git a/packages/evm/docs/classes/Message.md b/packages/evm/docs/classes/Message.md index 13f867cb4f..06183f337b 100644 --- a/packages/evm/docs/classes/Message.md +++ b/packages/evm/docs/classes/Message.md @@ -14,6 +14,7 @@ - [authcallOrigin](Message.md#authcallorigin) - [caller](Message.md#caller) - [code](Message.md#code) +- [containerCode](Message.md#containercode) - [data](Message.md#data) - [delegatecall](Message.md#delegatecall) - [depth](Message.md#depth) @@ -44,7 +45,7 @@ #### Defined in -[packages/evm/src/message.ts:62](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L62) +[message.ts:63](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L63) ## Properties @@ -54,7 +55,7 @@ #### Defined in -[packages/evm/src/message.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L45) +[message.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L45) ___ @@ -67,7 +68,7 @@ the purpose is to figure out where `value` should be taken from (not from `calle #### Defined in -[packages/evm/src/message.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L59) +[message.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L60) ___ @@ -77,7 +78,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L40) +[message.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L40) ___ @@ -87,7 +88,17 @@ ___ #### Defined in -[packages/evm/src/message.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L44) +[message.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L44) + +___ + +### containerCode + +• `Optional` **containerCode**: `Buffer` + +#### Defined in + +[message.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L49) ___ @@ -97,7 +108,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L42) +[message.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L42) ___ @@ -107,7 +118,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L54) +[message.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L55) ___ @@ -117,7 +128,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L43) +[message.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L43) ___ @@ -127,7 +138,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L41) +[message.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L41) ___ @@ -137,7 +148,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L60) +[message.ts:61](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L61) ___ @@ -147,7 +158,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L47) +[message.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L47) ___ @@ -157,7 +168,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L46) +[message.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L46) ___ @@ -167,7 +178,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L48) +[message.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L48) ___ @@ -180,7 +191,7 @@ Value is a boolean when marked for destruction and replaced with a Buffer contai #### Defined in -[packages/evm/src/message.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L53) +[message.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L54) ___ @@ -190,7 +201,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L38) +[message.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L38) ___ @@ -200,7 +211,7 @@ ___ #### Defined in -[packages/evm/src/message.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L39) +[message.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L39) ## Accessors @@ -216,4 +227,4 @@ Note: should only be called in instances where `_codeAddress` or `to` is defined #### Defined in -[packages/evm/src/message.ts:87](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L87) +[message.ts:88](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/message.ts#L88) diff --git a/packages/evm/docs/enums/EvmErrorMessage.md b/packages/evm/docs/enums/EvmErrorMessage.md index 4198cca9d3..5986a5e74c 100644 --- a/packages/evm/docs/enums/EvmErrorMessage.md +++ b/packages/evm/docs/enums/EvmErrorMessage.md @@ -13,6 +13,7 @@ - [BLS\_12\_381\_INPUT\_EMPTY](EvmErrorMessage.md#bls_12_381_input_empty) - [BLS\_12\_381\_INVALID\_INPUT\_LENGTH](EvmErrorMessage.md#bls_12_381_invalid_input_length) - [BLS\_12\_381\_POINT\_NOT\_ON\_CURVE](EvmErrorMessage.md#bls_12_381_point_not_on_curve) +- [CODESIZE\_EXCEEDS\_MAXIMUM](EvmErrorMessage.md#codesize_exceeds_maximum) - [CODESTORE\_OUT\_OF\_GAS](EvmErrorMessage.md#codestore_out_of_gas) - [CREATE\_COLLISION](EvmErrorMessage.md#create_collision) - [INITCODE\_SIZE\_VIOLATION](EvmErrorMessage.md#initcode_size_violation) @@ -43,7 +44,7 @@ #### Defined in -[packages/evm/src/exceptions.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L25) +[exceptions.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L26) ___ @@ -53,7 +54,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L24) +[exceptions.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L25) ___ @@ -63,7 +64,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L26) +[exceptions.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L27) ___ @@ -73,7 +74,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L32) +[exceptions.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L33) ___ @@ -83,7 +84,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L31) +[exceptions.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L32) ___ @@ -93,7 +94,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:29](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L29) +[exceptions.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L30) ___ @@ -103,7 +104,17 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L30) +[exceptions.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L31) + +___ + +### CODESIZE\_EXCEEDS\_MAXIMUM + +• **CODESIZE\_EXCEEDS\_MAXIMUM** = ``"code size to deposit exceeds maximum code size"`` + +#### Defined in + +[exceptions.ts:4](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L4) ___ @@ -113,7 +124,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:3](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L3) +[exceptions.ts:3](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L3) ___ @@ -123,7 +134,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L12) +[exceptions.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L13) ___ @@ -133,7 +144,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L22) +[exceptions.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L23) ___ @@ -143,7 +154,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L16) +[exceptions.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L17) ___ @@ -153,7 +164,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L11) +[exceptions.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L12) ___ @@ -163,7 +174,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L17) +[exceptions.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L18) ___ @@ -173,7 +184,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L20) +[exceptions.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L21) ___ @@ -183,7 +194,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L21) +[exceptions.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L22) ___ @@ -193,7 +204,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:6](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L6) +[exceptions.ts:7](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L7) ___ @@ -203,7 +214,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L19) +[exceptions.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L20) ___ @@ -213,7 +224,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:7](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L7) +[exceptions.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L8) ___ @@ -223,7 +234,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L18) +[exceptions.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L19) ___ @@ -233,7 +244,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:2](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L2) +[exceptions.ts:2](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L2) ___ @@ -243,7 +254,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L8) +[exceptions.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L9) ___ @@ -253,7 +264,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L14) +[exceptions.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L15) ___ @@ -263,7 +274,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L9) +[exceptions.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L10) ___ @@ -273,7 +284,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:5](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L5) +[exceptions.ts:6](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L6) ___ @@ -283,7 +294,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:4](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L4) +[exceptions.ts:5](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L5) ___ @@ -293,7 +304,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L10) +[exceptions.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L11) ___ @@ -303,7 +314,7 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L13) +[exceptions.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L14) ___ @@ -313,4 +324,4 @@ ___ #### Defined in -[packages/evm/src/exceptions.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L15) +[exceptions.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/exceptions.ts#L16) diff --git a/packages/evm/docs/interfaces/EEIInterface.md b/packages/evm/docs/interfaces/EEIInterface.md index 868b833187..fd7aad9110 100644 --- a/packages/evm/docs/interfaces/EEIInterface.md +++ b/packages/evm/docs/interfaces/EEIInterface.md @@ -74,7 +74,7 @@ environment (`mainnet`, `sepolia`,...) can be found in the #### Defined in -[packages/evm/src/types.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L251) +[types.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L253) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:254](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L254) +[types.ts:256](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L256) ___ @@ -122,7 +122,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L42) +[types.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L44) ___ @@ -147,7 +147,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L44) +[types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L46) ___ @@ -165,7 +165,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:262](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L262) +[types.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L264) ___ @@ -183,7 +183,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L49) +[types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L51) ___ @@ -207,7 +207,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:261](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L261) +[types.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L263) ___ @@ -225,7 +225,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L48) +[types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L50) ___ @@ -243,7 +243,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L46) +[types.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L48) ___ @@ -261,7 +261,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L263) +[types.ts:265](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L265) ___ @@ -275,7 +275,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L31) +[types.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L33) ___ @@ -299,7 +299,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:255](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L255) +[types.ts:257](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L257) ___ @@ -324,7 +324,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L47) +[types.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L49) ___ @@ -348,7 +348,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L50) +[types.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L52) ___ @@ -372,7 +372,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:252](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L252) +[types.ts:254](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L254) ___ @@ -392,7 +392,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:28](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L28) +[types.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L30) ___ @@ -416,7 +416,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:258](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L258) +[types.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L260) ___ @@ -441,7 +441,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:259](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L259) +[types.ts:261](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L261) ___ @@ -466,7 +466,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:267](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L267) +[types.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L269) ___ @@ -484,7 +484,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:265](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L265) +[types.ts:267](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L267) ___ @@ -508,7 +508,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L269) +[types.ts:271](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L271) ___ @@ -532,7 +532,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L43) +[types.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L45) ___ @@ -557,7 +557,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L45) +[types.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L47) ___ @@ -582,7 +582,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:256](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L256) +[types.ts:258](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L258) ___ @@ -607,7 +607,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L253) +[types.ts:255](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L255) ___ @@ -632,7 +632,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:257](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L257) +[types.ts:259](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L259) ___ @@ -658,7 +658,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L260) +[types.ts:262](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L262) ___ @@ -676,7 +676,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L264) +[types.ts:266](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L266) ___ @@ -700,7 +700,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:266](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L266) +[types.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L268) ___ @@ -722,7 +722,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L30) +[types.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L32) ___ @@ -744,7 +744,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:29](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L29) +[types.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L31) ___ @@ -768,4 +768,4 @@ ___ #### Defined in -[packages/evm/src/types.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L268) +[types.ts:270](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L270) diff --git a/packages/evm/docs/interfaces/EVMInterface.md b/packages/evm/docs/interfaces/EVMInterface.md index 9c42717a00..d86e262e5f 100644 --- a/packages/evm/docs/interfaces/EVMInterface.md +++ b/packages/evm/docs/interfaces/EVMInterface.md @@ -9,11 +9,13 @@ API of the EVM ### Properties - [eei](EVMInterface.md#eei) +- [events](EVMInterface.md#events) - [precompiles](EVMInterface.md#precompiles) ### Methods - [copy](EVMInterface.md#copy) +- [getActiveOpcodes](EVMInterface.md#getactiveopcodes) - [runCall](EVMInterface.md#runcall) - [runCode](EVMInterface.md#runcode) @@ -25,7 +27,17 @@ API of the EVM #### Defined in -[packages/evm/src/types.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L16) +[types.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L17) + +___ + +### events + +• `Optional` **events**: `AsyncEventEmitter`<`EVMEvents`\> + +#### Defined in + +[types.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L18) ___ @@ -35,7 +47,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L14) +[types.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L15) ## Methods @@ -49,7 +61,21 @@ ___ #### Defined in -[packages/evm/src/types.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L15) +[types.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L16) + +___ + +### getActiveOpcodes + +▸ `Optional` **getActiveOpcodes**(): `OpcodeList` + +#### Returns + +`OpcodeList` + +#### Defined in + +[types.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L14) ___ @@ -69,7 +95,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L12) +[types.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L12) ___ @@ -89,4 +115,4 @@ ___ #### Defined in -[packages/evm/src/types.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L13) +[types.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L13) diff --git a/packages/evm/docs/interfaces/EVMResult.md b/packages/evm/docs/interfaces/EVMResult.md index 7633a5f52d..7f894daf38 100644 --- a/packages/evm/docs/interfaces/EVMResult.md +++ b/packages/evm/docs/interfaces/EVMResult.md @@ -21,7 +21,7 @@ Address of created account during transaction, if any #### Defined in -[packages/evm/src/evm.ts:948](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L948) +[evm.ts:963](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L963) ___ @@ -33,4 +33,4 @@ Contains the results from running the code, if any, as described in runCode #### Defined in -[packages/evm/src/evm.ts:952](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L952) +[evm.ts:967](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L967) diff --git a/packages/evm/docs/interfaces/EVMStateAccess.md b/packages/evm/docs/interfaces/EVMStateAccess.md index 1f5b82179b..86228d2167 100644 --- a/packages/evm/docs/interfaces/EVMStateAccess.md +++ b/packages/evm/docs/interfaces/EVMStateAccess.md @@ -71,7 +71,7 @@ StateAccess.accountExists #### Defined in -[packages/evm/src/types.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L251) +[types.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L253) ___ @@ -95,7 +95,7 @@ StateAccess.accountIsEmpty #### Defined in -[packages/evm/src/types.ts:254](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L254) +[types.ts:256](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L256) ___ @@ -115,7 +115,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L42) +[types.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L44) ___ @@ -136,7 +136,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L44) +[types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L46) ___ @@ -154,7 +154,7 @@ StateAccess.checkpoint #### Defined in -[packages/evm/src/types.ts:262](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L262) +[types.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L264) ___ @@ -168,7 +168,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L49) +[types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L51) ___ @@ -192,7 +192,7 @@ StateAccess.clearContractStorage #### Defined in -[packages/evm/src/types.ts:261](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L261) +[types.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L263) ___ @@ -206,7 +206,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L48) +[types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L50) ___ @@ -220,7 +220,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L46) +[types.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L48) ___ @@ -238,7 +238,7 @@ StateAccess.commit #### Defined in -[packages/evm/src/types.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L263) +[types.ts:265](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L265) ___ @@ -262,7 +262,7 @@ StateAccess.deleteAccount #### Defined in -[packages/evm/src/types.ts:255](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L255) +[types.ts:257](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L257) ___ @@ -283,7 +283,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L47) +[types.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L49) ___ @@ -303,7 +303,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L50) +[types.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L52) ___ @@ -327,7 +327,7 @@ StateAccess.getAccount #### Defined in -[packages/evm/src/types.ts:252](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L252) +[types.ts:254](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L254) ___ @@ -351,7 +351,7 @@ StateAccess.getContractCode #### Defined in -[packages/evm/src/types.ts:258](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L258) +[types.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L260) ___ @@ -376,7 +376,7 @@ StateAccess.getContractStorage #### Defined in -[packages/evm/src/types.ts:259](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L259) +[types.ts:261](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L261) ___ @@ -401,7 +401,7 @@ StateAccess.getProof #### Defined in -[packages/evm/src/types.ts:267](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L267) +[types.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L269) ___ @@ -419,7 +419,7 @@ StateAccess.getStateRoot #### Defined in -[packages/evm/src/types.ts:265](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L265) +[types.ts:267](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L267) ___ @@ -443,7 +443,7 @@ StateAccess.hasStateRoot #### Defined in -[packages/evm/src/types.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L269) +[types.ts:271](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L271) ___ @@ -463,7 +463,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L43) +[types.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L45) ___ @@ -484,7 +484,7 @@ ___ #### Defined in -[packages/evm/src/types.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L45) +[types.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L47) ___ @@ -509,7 +509,7 @@ StateAccess.modifyAccountFields #### Defined in -[packages/evm/src/types.ts:256](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L256) +[types.ts:258](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L258) ___ @@ -534,7 +534,7 @@ StateAccess.putAccount #### Defined in -[packages/evm/src/types.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L253) +[types.ts:255](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L255) ___ @@ -559,7 +559,7 @@ StateAccess.putContractCode #### Defined in -[packages/evm/src/types.ts:257](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L257) +[types.ts:259](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L259) ___ @@ -585,7 +585,7 @@ StateAccess.putContractStorage #### Defined in -[packages/evm/src/types.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L260) +[types.ts:262](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L262) ___ @@ -603,7 +603,7 @@ StateAccess.revert #### Defined in -[packages/evm/src/types.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L264) +[types.ts:266](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L266) ___ @@ -627,7 +627,7 @@ StateAccess.setStateRoot #### Defined in -[packages/evm/src/types.ts:266](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L266) +[types.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L268) ___ @@ -651,4 +651,4 @@ StateAccess.verifyProof #### Defined in -[packages/evm/src/types.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L268) +[types.ts:270](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/types.ts#L270) diff --git a/packages/evm/docs/interfaces/ExecResult.md b/packages/evm/docs/interfaces/ExecResult.md index 9aea648404..01fa5aecbc 100644 --- a/packages/evm/docs/interfaces/ExecResult.md +++ b/packages/evm/docs/interfaces/ExecResult.md @@ -27,7 +27,7 @@ Description of the exception, if any occurred #### Defined in -[packages/evm/src/evm.ts:963](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L963) +[evm.ts:978](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L978) ___ @@ -39,7 +39,7 @@ Amount of gas the code used to run #### Defined in -[packages/evm/src/evm.ts:971](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L971) +[evm.ts:986](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L986) ___ @@ -51,7 +51,7 @@ Amount of gas left #### Defined in -[packages/evm/src/evm.ts:967](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L967) +[evm.ts:982](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L982) ___ @@ -63,7 +63,7 @@ The gas refund counter #### Defined in -[packages/evm/src/evm.ts:987](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L987) +[evm.ts:1002](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L1002) ___ @@ -75,7 +75,7 @@ Array of logs that the contract emitted #### Defined in -[packages/evm/src/evm.ts:979](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L979) +[evm.ts:994](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L994) ___ @@ -87,7 +87,7 @@ Return value from the contract #### Defined in -[packages/evm/src/evm.ts:975](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L975) +[evm.ts:990](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L990) ___ @@ -97,7 +97,7 @@ ___ #### Defined in -[packages/evm/src/evm.ts:959](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L959) +[evm.ts:974](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L974) ___ @@ -113,4 +113,4 @@ A map from the accounts that have self-destructed to the addresses to send their #### Defined in -[packages/evm/src/evm.ts:983](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L983) +[evm.ts:998](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/evm.ts#L998) diff --git a/packages/evm/docs/interfaces/InterpreterStep.md b/packages/evm/docs/interfaces/InterpreterStep.md index 8e0d573b11..070a5bb92d 100644 --- a/packages/evm/docs/interfaces/InterpreterStep.md +++ b/packages/evm/docs/interfaces/InterpreterStep.md @@ -28,7 +28,7 @@ #### Defined in -[packages/evm/src/interpreter.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L99) +[interpreter.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L93) ___ @@ -38,7 +38,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L100) +[interpreter.ts:94](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L94) ___ @@ -48,7 +48,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:103](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L103) +[interpreter.ts:97](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L97) ___ @@ -58,7 +58,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:92](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L92) +[interpreter.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L86) ___ @@ -68,7 +68,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:88](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L88) +[interpreter.ts:82](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L82) ___ @@ -78,7 +78,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L86) +[interpreter.ts:80](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L80) ___ @@ -88,7 +88,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:87](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L87) +[interpreter.ts:81](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L81) ___ @@ -98,7 +98,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L101) +[interpreter.ts:95](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L95) ___ @@ -108,7 +108,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:102](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L102) +[interpreter.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L96) ___ @@ -127,7 +127,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L93) +[interpreter.ts:87](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L87) ___ @@ -137,7 +137,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:91](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L91) +[interpreter.ts:85](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L85) ___ @@ -147,7 +147,7 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L90) +[interpreter.ts:84](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L84) ___ @@ -157,4 +157,4 @@ ___ #### Defined in -[packages/evm/src/interpreter.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L89) +[interpreter.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/evm/src/interpreter.ts#L83) diff --git a/packages/evm/package.json b/packages/evm/package.json index 3eebbce19d..6443dfc88c 100644 --- a/packages/evm/package.json +++ b/packages/evm/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/evm", - "version": "1.2.2", + "version": "1.2.3", "description": "JavaScript Ethereum Virtual Machine (EVM) implementation", "keywords": [ "ethereum", @@ -46,8 +46,8 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/util": "^8.0.3", "@ethersproject/providers": "^5.7.1", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", @@ -55,7 +55,7 @@ "rustbn.js": "~0.2.0" }, "devDependencies": { - "@ethereumjs/statemanager": "^1.0.1", + "@ethereumjs/statemanager": "^1.0.2", "@ethersproject/abi": "^5.0.12", "@types/benchmark": "^1.0.33", "@types/core-js": "^2.5.0", diff --git a/packages/statemanager/CHANGELOG.md b/packages/statemanager/CHANGELOG.md index b8a903fdd2..61ebf8ea03 100644 --- a/packages/statemanager/CHANGELOG.md +++ b/packages/statemanager/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 1.0.2 - 2022-12-09 + +Added `EthersStateManager` to direct exports (if you use please fix our deep imports), see PR [#2419](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2419). + +Import is now simplified to: + +```typescript +import { EthersStateManager } from '@ethereumjs/statemanager' +``` + ## 1.0.1 - 2022-10-18 ### New EthersStateManager (experimental) diff --git a/packages/statemanager/docs/README.md b/packages/statemanager/docs/README.md index f2d7d967c6..70a10a1d64 100644 --- a/packages/statemanager/docs/README.md +++ b/packages/statemanager/docs/README.md @@ -8,9 +8,11 @@ - [BaseStateManager](classes/BaseStateManager.md) - [DefaultStateManager](classes/DefaultStateManager.md) +- [EthersStateManager](classes/EthersStateManager.md) ### Interfaces +- [EthersStateManagerOpts](interfaces/EthersStateManagerOpts.md) - [StateAccess](interfaces/StateAccess.md) - [StateManager](interfaces/StateManager.md) @@ -49,4 +51,4 @@ ___ #### Defined in -[stateManager.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L32) +[stateManager.ts:29](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L29) diff --git a/packages/statemanager/docs/classes/BaseStateManager.md b/packages/statemanager/docs/classes/BaseStateManager.md index 459ec504e2..36836144c9 100644 --- a/packages/statemanager/docs/classes/BaseStateManager.md +++ b/packages/statemanager/docs/classes/BaseStateManager.md @@ -17,6 +17,8 @@ and we cannot guarantee a stable interface yet. - **`BaseStateManager`** + ↳ [`EthersStateManager`](EthersStateManager.md) + ↳ [`DefaultStateManager`](DefaultStateManager.md) ## Table of contents @@ -28,7 +30,6 @@ and we cannot guarantee a stable interface yet. ### Properties - [\_cache](BaseStateManager.md#_cache) -- [\_common](BaseStateManager.md#_common) - [\_debug](BaseStateManager.md#_debug) ### Methods @@ -50,7 +51,7 @@ and we cannot guarantee a stable interface yet. ### constructor -• **new BaseStateManager**(`opts`) +• **new BaseStateManager**(`_opts`) Needs to be called from the subclass constructor @@ -58,11 +59,11 @@ Needs to be called from the subclass constructor | Name | Type | | :------ | :------ | -| `opts` | `DefaultStateManagerOpts` | +| `_opts` | `DefaultStateManagerOpts` | #### Defined in -[baseStateManager.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L40) +[baseStateManager.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L38) ## Properties @@ -72,16 +73,6 @@ Needs to be called from the subclass constructor #### Defined in -[baseStateManager.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L25) - -___ - -### \_common - -• **\_common**: `Common` - -#### Defined in - [baseStateManager.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L23) ___ @@ -92,7 +83,7 @@ ___ #### Defined in -[baseStateManager.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L24) +[baseStateManager.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L22) ## Methods @@ -112,7 +103,7 @@ ___ #### Defined in -[baseStateManager.ts:106](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L106) +[baseStateManager.ts:97](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L97) ___ @@ -132,7 +123,7 @@ Partial implementation, called from the subclass. #### Defined in -[baseStateManager.ts:122](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L122) +[baseStateManager.ts:113](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L113) ___ @@ -151,7 +142,7 @@ Partial implementation, called from the subclass. #### Defined in -[baseStateManager.ts:132](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L132) +[baseStateManager.ts:123](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L123) ___ @@ -173,7 +164,7 @@ Deletes an account from state under the provided `address`. The account will als #### Defined in -[baseStateManager.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L99) +[baseStateManager.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L90) ___ @@ -187,7 +178,7 @@ ___ #### Defined in -[baseStateManager.ts:148](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L148) +[baseStateManager.ts:139](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L139) ___ @@ -209,7 +200,7 @@ Gets the account associated with `address`. Returns an empty account if the acco #### Defined in -[baseStateManager.ts:58](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L58) +[baseStateManager.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L49) ___ @@ -230,7 +221,7 @@ ___ #### Defined in -[baseStateManager.ts:112](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L112) +[baseStateManager.ts:103](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L103) ___ @@ -255,7 +246,7 @@ fields, then saves the account into state. Account fields can include #### Defined in -[baseStateManager.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L86) +[baseStateManager.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L77) ___ @@ -278,7 +269,7 @@ Saves an account into state under the provided `address`. #### Defined in -[baseStateManager.ts:68](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L68) +[baseStateManager.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L59) ___ @@ -299,7 +290,7 @@ ___ #### Defined in -[baseStateManager.ts:111](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L111) +[baseStateManager.ts:102](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L102) ___ @@ -321,7 +312,7 @@ ___ #### Defined in -[baseStateManager.ts:113](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L113) +[baseStateManager.ts:104](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L104) ___ @@ -340,4 +331,4 @@ Partial implementation , called from the subclass. #### Defined in -[baseStateManager.ts:143](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L143) +[baseStateManager.ts:134](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L134) diff --git a/packages/statemanager/docs/classes/DefaultStateManager.md b/packages/statemanager/docs/classes/DefaultStateManager.md index 4bc5e30110..7d5d6e9a2a 100644 --- a/packages/statemanager/docs/classes/DefaultStateManager.md +++ b/packages/statemanager/docs/classes/DefaultStateManager.md @@ -30,7 +30,6 @@ The default state manager implementation uses a ### Properties - [\_cache](DefaultStateManager.md#_cache) -- [\_common](DefaultStateManager.md#_common) - [\_debug](DefaultStateManager.md#_debug) - [\_storageTries](DefaultStateManager.md#_storagetries) - [\_trie](DefaultStateManager.md#_trie) @@ -80,7 +79,7 @@ Instantiate the StateManager interface. #### Defined in -[stateManager.ts:92](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L92) +[stateManager.ts:85](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L85) ## Properties @@ -94,20 +93,6 @@ Instantiate the StateManager interface. #### Defined in -[baseStateManager.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L25) - -___ - -### \_common - -• **\_common**: `Common` - -#### Inherited from - -[BaseStateManager](BaseStateManager.md).[_common](BaseStateManager.md#_common) - -#### Defined in - [baseStateManager.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L23) ___ @@ -122,7 +107,7 @@ ___ #### Defined in -[baseStateManager.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L24) +[baseStateManager.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L22) ___ @@ -136,17 +121,17 @@ ___ #### Defined in -[stateManager.ts:85](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L85) +[stateManager.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L78) ___ ### \_trie -• **\_trie**: `SecureTrie` +• **\_trie**: `Trie` #### Defined in -[stateManager.ts:84](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L84) +[stateManager.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L77) ## Methods @@ -173,7 +158,7 @@ exists #### Defined in -[stateManager.ts:514](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L514) +[stateManager.ts:511](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L511) ___ @@ -201,7 +186,7 @@ ___ #### Defined in -[baseStateManager.ts:106](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L106) +[baseStateManager.ts:97](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L97) ___ @@ -227,7 +212,7 @@ State changes that follow can then be committed by calling #### Defined in -[stateManager.ts:305](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L305) +[stateManager.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L299) ___ @@ -253,7 +238,7 @@ Clears all storage entries for the account corresponding to `address`. #### Defined in -[stateManager.ts:293](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L293) +[stateManager.ts:287](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L287) ___ @@ -278,7 +263,7 @@ last call to checkpoint. #### Defined in -[stateManager.ts:314](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L314) +[stateManager.ts:308](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L308) ___ @@ -300,7 +285,7 @@ checkpoints were reverted. #### Defined in -[stateManager.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L126) +[stateManager.ts:119](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L119) ___ @@ -330,7 +315,7 @@ Deletes an account from state under the provided `address`. The account will als #### Defined in -[baseStateManager.ts:99](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L99) +[baseStateManager.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L90) ___ @@ -360,7 +345,7 @@ Both are represented as hex strings without the `0x` prefix. #### Defined in -[stateManager.ts:482](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L482) +[stateManager.ts:479](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L479) ___ @@ -382,7 +367,7 @@ ___ #### Defined in -[baseStateManager.ts:148](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L148) +[baseStateManager.ts:139](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L139) ___ @@ -412,7 +397,7 @@ Gets the account associated with `address`. Returns an empty account if the acco #### Defined in -[baseStateManager.ts:58](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L58) +[baseStateManager.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L49) ___ @@ -441,7 +426,7 @@ Returns an empty `Buffer` if the account has no associated code. #### Defined in -[stateManager.ts:161](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L161) +[stateManager.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L154) ___ @@ -477,7 +462,7 @@ If this does not exist an empty `Buffer` is returned. #### Defined in -[stateManager.ts:212](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L212) +[stateManager.ts:206](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L206) ___ @@ -504,7 +489,7 @@ Get an EIP-1186 proof #### Defined in -[stateManager.ts:336](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L336) +[stateManager.ts:330](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L330) ___ @@ -528,7 +513,7 @@ checkpoints on the instance. #### Defined in -[stateManager.ts:447](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L447) +[stateManager.ts:445](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L445) ___ @@ -554,7 +539,7 @@ Checks whether there is a state corresponding to a stateRoot #### Defined in -[stateManager.ts:505](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L505) +[stateManager.ts:502](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L502) ___ @@ -587,7 +572,7 @@ fields, then saves the account into state. Account fields can include #### Defined in -[baseStateManager.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L86) +[baseStateManager.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L77) ___ @@ -618,7 +603,7 @@ Saves an account into state under the provided `address`. #### Defined in -[baseStateManager.ts:68](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L68) +[baseStateManager.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L59) ___ @@ -650,7 +635,7 @@ corresponding to `address` to reference this. #### Defined in -[stateManager.ts:139](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L139) +[stateManager.ts:131](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L131) ___ @@ -683,7 +668,7 @@ corresponding to `address` at the provided `key`. #### Defined in -[stateManager.ts:259](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L259) +[stateManager.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L253) ___ @@ -708,7 +693,7 @@ last call to checkpoint. #### Defined in -[stateManager.ts:324](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L324) +[stateManager.ts:318](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L318) ___ @@ -737,7 +722,7 @@ the state trie. #### Defined in -[stateManager.ts:460](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L460) +[stateManager.ts:457](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L457) ___ @@ -763,4 +748,4 @@ Verify an EIP-1186 proof. Throws if proof is invalid, otherwise returns true. #### Defined in -[stateManager.ts:374](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L374) +[stateManager.ts:368](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/stateManager.ts#L368) diff --git a/packages/statemanager/docs/classes/EthersStateManager.md b/packages/statemanager/docs/classes/EthersStateManager.md new file mode 100644 index 0000000000..79bc0e6b10 --- /dev/null +++ b/packages/statemanager/docs/classes/EthersStateManager.md @@ -0,0 +1,739 @@ +[@ethereumjs/statemanager](../README.md) / EthersStateManager + +# Class: EthersStateManager + +Abstract BaseStateManager class for the non-storage-backend +related functionality parts of a StateManager like keeping +track of accessed storage (`EIP-2929`) or touched accounts +(`EIP-158`). + +This is not a full StateManager implementation in itself but +can be used to ease implementing an own StateManager. + +Note that the implementation is pretty new (October 2021) +and we cannot guarantee a stable interface yet. + +## Hierarchy + +- [`BaseStateManager`](BaseStateManager.md) + + ↳ **`EthersStateManager`** + +## Implements + +- [`StateManager`](../interfaces/StateManager.md) + +## Table of contents + +### Constructors + +- [constructor](EthersStateManager.md#constructor) + +### Properties + +- [\_cache](EthersStateManager.md#_cache) +- [\_debug](EthersStateManager.md#_debug) + +### Methods + +- [accountExists](EthersStateManager.md#accountexists) +- [accountIsEmpty](EthersStateManager.md#accountisempty) +- [checkpoint](EthersStateManager.md#checkpoint) +- [clearCache](EthersStateManager.md#clearcache) +- [clearContractStorage](EthersStateManager.md#clearcontractstorage) +- [commit](EthersStateManager.md#commit) +- [copy](EthersStateManager.md#copy) +- [deleteAccount](EthersStateManager.md#deleteaccount) +- [dumpStorage](EthersStateManager.md#dumpstorage) +- [flush](EthersStateManager.md#flush) +- [getAccount](EthersStateManager.md#getaccount) +- [getContractCode](EthersStateManager.md#getcontractcode) +- [getContractStorage](EthersStateManager.md#getcontractstorage) +- [getProof](EthersStateManager.md#getproof) +- [getStateRoot](EthersStateManager.md#getstateroot) +- [hasStateRoot](EthersStateManager.md#hasstateroot) +- [modifyAccountFields](EthersStateManager.md#modifyaccountfields) +- [putAccount](EthersStateManager.md#putaccount) +- [putContractCode](EthersStateManager.md#putcontractcode) +- [putContractStorage](EthersStateManager.md#putcontractstorage) +- [revert](EthersStateManager.md#revert) +- [setBlockTag](EthersStateManager.md#setblocktag) +- [setStateRoot](EthersStateManager.md#setstateroot) + +## Constructors + +### constructor + +• **new EthersStateManager**(`opts`) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `opts` | [`EthersStateManagerOpts`](../interfaces/EthersStateManagerOpts.md) | + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[constructor](BaseStateManager.md#constructor) + +#### Defined in + +[ethersStateManager.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L37) + +## Properties + +### \_cache + +• **\_cache**: `Cache` + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[_cache](BaseStateManager.md#_cache) + +#### Defined in + +[ethersStateManager.ts:35](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L35) + +___ + +### \_debug + +• **\_debug**: `Debugger` + +#### Inherited from + +[BaseStateManager](BaseStateManager.md).[_debug](BaseStateManager.md#_debug) + +#### Defined in + +[baseStateManager.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L22) + +## Methods + +### accountExists + +▸ **accountExists**(`address`): `Promise`<`boolean`\> + +Checks if an `account` exists at `address` + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address of the `account` to check | + +#### Returns + +`Promise`<`boolean`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[accountExists](../interfaces/StateManager.md#accountexists) + +#### Defined in + +[ethersStateManager.ts:203](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L203) + +___ + +### accountIsEmpty + +▸ **accountIsEmpty**(`address`): `Promise`<`boolean`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `address` | `Address` | + +#### Returns + +`Promise`<`boolean`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[accountIsEmpty](../interfaces/StateManager.md#accountisempty) + +#### Inherited from + +[BaseStateManager](BaseStateManager.md).[accountIsEmpty](BaseStateManager.md#accountisempty) + +#### Defined in + +[baseStateManager.ts:97](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L97) + +___ + +### checkpoint + +▸ **checkpoint**(): `Promise`<`void`\> + +Checkpoints the current state of the StateManager instance. +State changes that follow can then be committed by calling +`commit` or `reverted` by calling rollback. + +Partial implementation, called from the subclass. + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[checkpoint](../interfaces/StateManager.md#checkpoint) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[checkpoint](BaseStateManager.md#checkpoint) + +#### Defined in + +[ethersStateManager.ts:287](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L287) + +___ + +### clearCache + +▸ **clearCache**(): `void` + +Clears the internal cache so all accounts, contract code, and storage slots will +initially be retrieved from the provider + +#### Returns + +`void` + +#### Defined in + +[ethersStateManager.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L89) + +___ + +### clearContractStorage + +▸ **clearContractStorage**(`address`): `Promise`<`void`\> + +Clears all storage entries for the account corresponding to `address`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address to clear the storage of | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[clearContractStorage](../interfaces/StateManager.md#clearcontractstorage) + +#### Defined in + +[ethersStateManager.ts:177](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L177) + +___ + +### commit + +▸ **commit**(): `Promise`<`void`\> + +Commits the current change-set to the instance since the +last call to checkpoint. + +Partial implementation, called from the subclass. + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[commit](../interfaces/StateManager.md#commit) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[commit](BaseStateManager.md#commit) + +#### Defined in + +[ethersStateManager.ts:297](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L297) + +___ + +### copy + +▸ **copy**(): [`EthersStateManager`](EthersStateManager.md) + +#### Returns + +[`EthersStateManager`](EthersStateManager.md) + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[copy](../interfaces/StateManager.md#copy) + +#### Defined in + +[ethersStateManager.ts:64](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L64) + +___ + +### deleteAccount + +▸ **deleteAccount**(`address`): `Promise`<`void`\> + +Deletes an account from state under the provided `address`. The account will also be removed from the state trie. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address of the account which should be deleted | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[deleteAccount](../interfaces/StateManager.md#deleteaccount) + +#### Inherited from + +[BaseStateManager](BaseStateManager.md).[deleteAccount](BaseStateManager.md#deleteaccount) + +#### Defined in + +[baseStateManager.ts:90](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L90) + +___ + +### dumpStorage + +▸ **dumpStorage**(`address`): `Promise`<`StorageDump`\> + +Dumps the RLP-encoded storage values for an `account` specified by `address`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | The address of the `account` to return storage for | + +#### Returns + +`Promise`<`StorageDump`\> + +- The state of the account as an `Object` map. +Keys are the storage keys, values are the storage values as strings. +Both are represented as `0x` prefixed hex strings. + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[dumpStorage](../interfaces/StateManager.md#dumpstorage) + +#### Defined in + +[ethersStateManager.ts:188](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L188) + +___ + +### flush + +▸ **flush**(): `Promise`<`void`\> + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[flush](../interfaces/StateManager.md#flush) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[flush](BaseStateManager.md#flush) + +#### Defined in + +[ethersStateManager.ts:313](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L313) + +___ + +### getAccount + +▸ **getAccount**(`address`): `Promise`<`Account`\> + +Gets the code corresponding to the provided `address`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address to get the `code` for | + +#### Returns + +`Promise`<`Account`\> + +- Resolves with the code corresponding to the provided address. +Returns an empty `Buffer` if the account has no associated code. + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[getAccount](../interfaces/StateManager.md#getaccount) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[getAccount](BaseStateManager.md#getaccount) + +#### Defined in + +[ethersStateManager.ts:229](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L229) + +___ + +### getContractCode + +▸ **getContractCode**(`address`): `Promise`<`Buffer`\> + +Gets the code corresponding to the provided `address`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address to get the `code` for | + +#### Returns + +`Promise`<`Buffer`\> + +- Resolves with the code corresponding to the provided address. +Returns an empty `Buffer` if the account has no associated code. + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[getContractCode](../interfaces/StateManager.md#getcontractcode) + +#### Defined in + +[ethersStateManager.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L101) + +___ + +### getContractStorage + +▸ **getContractStorage**(`address`, `key`): `Promise`<`Buffer`\> + +Gets the storage value associated with the provided `address` and `key`. This method returns +the shortest representation of the stored value. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address of the account to get the storage for | +| `key` | `Buffer` | Key in the account's storage to get the value for. Must be 32 bytes long. | + +#### Returns + +`Promise`<`Buffer`\> + +- The storage value for the account +corresponding to the provided address at the provided key. +If this does not exist an empty `Buffer` is returned. + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[getContractStorage](../interfaces/StateManager.md#getcontractstorage) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[getContractStorage](BaseStateManager.md#getcontractstorage) + +#### Defined in + +[ethersStateManager.ts:130](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L130) + +___ + +### getProof + +▸ **getProof**(`address`, `storageSlots?`): `Promise`<[`Proof`](../README.md#proof)\> + +Get an EIP-1186 proof from the provider + +#### Parameters + +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `address` | `Address` | `undefined` | address to get proof of | +| `storageSlots` | `Buffer`[] | `[]` | storage slots to get proof of | + +#### Returns + +`Promise`<[`Proof`](../README.md#proof)\> + +an EIP-1186 formatted proof + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[getProof](../interfaces/StateManager.md#getproof) + +#### Defined in + +[ethersStateManager.ts:270](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L270) + +___ + +### getStateRoot + +▸ **getStateRoot**(): `Promise`<`Buffer`\> + +**`Deprecated`** + +This method is not used by the Ethers State Manager and is a stub required by the State Manager interface + +#### Returns + +`Promise`<`Buffer`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[getStateRoot](../interfaces/StateManager.md#getstateroot) + +#### Defined in + +[ethersStateManager.ts:320](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L320) + +___ + +### hasStateRoot + +▸ **hasStateRoot**(): `never` + +**`Deprecated`** + +This method is not used by the Ethers State Manager and is a stub required by the State Manager interface + +#### Returns + +`never` + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[hasStateRoot](../interfaces/StateManager.md#hasstateroot) + +#### Defined in + +[ethersStateManager.ts:332](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L332) + +___ + +### modifyAccountFields + +▸ **modifyAccountFields**(`address`, `accountFields`): `Promise`<`void`\> + +Gets the account associated with `address`, modifies the given account +fields, then saves the account into state. Account fields can include +`nonce`, `balance`, `storageRoot`, and `codeHash`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address of the account to modify | +| `accountFields` | `Partial`<`Pick`<`Account`, ``"nonce"`` \| ``"balance"`` \| ``"storageRoot"`` \| ``"codeHash"``\>\> | Object containing account fields and values to modify | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[modifyAccountFields](../interfaces/StateManager.md#modifyaccountfields) + +#### Inherited from + +[BaseStateManager](BaseStateManager.md).[modifyAccountFields](BaseStateManager.md#modifyaccountfields) + +#### Defined in + +[baseStateManager.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/baseStateManager.ts#L77) + +___ + +### putAccount + +▸ **putAccount**(`address`, `account`): `Promise`<`void`\> + +Saves an account into state under the provided `address`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address under which to store `account` | +| `account` | `Account` | The account to store | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[putAccount](../interfaces/StateManager.md#putaccount) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[putAccount](BaseStateManager.md#putaccount) + +#### Defined in + +[ethersStateManager.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L260) + +___ + +### putContractCode + +▸ **putContractCode**(`address`, `value`): `Promise`<`void`\> + +Adds `value` to the state trie as code, and sets `codeHash` on the account +corresponding to `address` to reference this. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address of the `account` to add the `code` for | +| `value` | `Buffer` | The value of the `code` | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[putContractCode](../interfaces/StateManager.md#putcontractcode) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[putContractCode](BaseStateManager.md#putcontractcode) + +#### Defined in + +[ethersStateManager.ts:116](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L116) + +___ + +### putContractStorage + +▸ **putContractStorage**(`address`, `key`, `value`): `Promise`<`void`\> + +Adds value to the cache for the `account` +corresponding to `address` at the provided `key`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `address` | `Address` | Address to set a storage value for | +| `key` | `Buffer` | Key to set the value at. Must be 32 bytes long. | +| `value` | `Buffer` | Value to set at `key` for account corresponding to `address`. Cannot be more than 32 bytes. Leading zeros are stripped. If it is empty or filled with zeros, deletes the value. | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[putContractStorage](../interfaces/StateManager.md#putcontractstorage) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[putContractStorage](BaseStateManager.md#putcontractstorage) + +#### Defined in + +[ethersStateManager.ts:164](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L164) + +___ + +### revert + +▸ **revert**(): `Promise`<`void`\> + +Reverts the current change-set to the instance since the +last call to checkpoint. + +Partial implementation , called from the subclass. + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[revert](../interfaces/StateManager.md#revert) + +#### Overrides + +[BaseStateManager](BaseStateManager.md).[revert](BaseStateManager.md#revert) + +#### Defined in + +[ethersStateManager.ts:308](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L308) + +___ + +### setBlockTag + +▸ **setBlockTag**(`blockTag`): `void` + +Sets the new block tag used when querying the provider and clears the +internal cache. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `blockTag` | `bigint` \| ``"earliest"`` | the new block tag to use when querying the provider | + +#### Returns + +`void` + +#### Defined in + +[ethersStateManager.ts:80](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L80) + +___ + +### setStateRoot + +▸ **setStateRoot**(`_root`): `Promise`<`void`\> + +**`Deprecated`** + +This method is not used by the Ethers State Manager and is a stub required by the State Manager interface + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `_root` | `Buffer` | + +#### Returns + +`Promise`<`void`\> + +#### Implementation of + +[StateManager](../interfaces/StateManager.md).[setStateRoot](../interfaces/StateManager.md#setstateroot) + +#### Defined in + +[ethersStateManager.ts:327](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L327) diff --git a/packages/statemanager/docs/interfaces/EthersStateManagerOpts.md b/packages/statemanager/docs/interfaces/EthersStateManagerOpts.md new file mode 100644 index 0000000000..1771c5e713 --- /dev/null +++ b/packages/statemanager/docs/interfaces/EthersStateManagerOpts.md @@ -0,0 +1,30 @@ +[@ethereumjs/statemanager](../README.md) / EthersStateManagerOpts + +# Interface: EthersStateManagerOpts + +## Table of contents + +### Properties + +- [blockTag](EthersStateManagerOpts.md#blocktag) +- [provider](EthersStateManagerOpts.md#provider) + +## Properties + +### blockTag + +• **blockTag**: `bigint` \| ``"earliest"`` + +#### Defined in + +[ethersStateManager.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L27) + +___ + +### provider + +• **provider**: `string` \| `JsonRpcProvider` \| `StaticJsonRpcProvider` + +#### Defined in + +[ethersStateManager.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/statemanager/src/ethersStateManager.ts#L26) diff --git a/packages/statemanager/docs/interfaces/StateManager.md b/packages/statemanager/docs/interfaces/StateManager.md index 2a1492aba0..3734c25ece 100644 --- a/packages/statemanager/docs/interfaces/StateManager.md +++ b/packages/statemanager/docs/interfaces/StateManager.md @@ -10,7 +10,8 @@ ## Implemented by -- [`DefaultStateManager`](../classes/DefaultStateManager.md) +- [`DefaultStateManager`](../classes/DefaultStateManager.md) +- [`EthersStateManager`](../classes/EthersStateManager.md) ## Table of contents diff --git a/packages/statemanager/package.json b/packages/statemanager/package.json index c5033e6c66..ed27e56162 100644 --- a/packages/statemanager/package.json +++ b/packages/statemanager/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/statemanager", - "version": "1.0.1", + "version": "1.0.2", "description": "An Ethereum statemanager implementation", "keywords": [ "ethereum", @@ -41,7 +41,7 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", @@ -49,9 +49,9 @@ "js-sdsl": "^4.1.4" }, "devDependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/util": "^8.0.3", "@types/node": "^16.11.7", "@types/tape": "^4.13.2", "debug": "^4.3.3", diff --git a/packages/trie/CHANGELOG.md b/packages/trie/CHANGELOG.md index c10346d3d0..6f7a2e49cc 100644 --- a/packages/trie/CHANGELOG.md +++ b/packages/trie/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 5.0.2 - 2022-12-09 + +Maintenance release with dependency updates, PR [#2445](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2445) + ## 5.0.1 - 2022-10-18 - Fixed a dependency issue when using `TrieReadStream`, PR [#2318](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2318) diff --git a/packages/trie/docs/README.md b/packages/trie/docs/README.md index 78a85ad230..aebf27d0b9 100644 --- a/packages/trie/docs/README.md +++ b/packages/trie/docs/README.md @@ -8,7 +8,6 @@ - [BranchNode](classes/BranchNode.md) - [CheckpointDB](classes/CheckpointDB.md) -- [CheckpointTrie](classes/CheckpointTrie.md) - [ExtensionNode](classes/ExtensionNode.md) - [LeafNode](classes/LeafNode.md) - [MapDB](classes/MapDB.md) @@ -34,6 +33,7 @@ - [Nibbles](README.md#nibbles) - [Proof](README.md#proof) - [TrieNode](README.md#trienode) +- [TrieOptsWithDefaults](README.md#trieoptswithdefaults) ### Variables @@ -54,7 +54,7 @@ #### Defined in -[packages/trie/src/types.ts:63](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L63) +[packages/trie/src/types.ts:72](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L72) ___ @@ -71,7 +71,7 @@ ___ #### Defined in -[packages/trie/src/types.ts:110](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L110) +[packages/trie/src/types.ts:119](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L119) ___ @@ -164,6 +164,16 @@ ___ [packages/trie/src/types.ts:4](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L4) +___ + +### TrieOptsWithDefaults + +Ƭ **TrieOptsWithDefaults**: [`TrieOpts`](interfaces/TrieOpts.md) & { `useKeyHashing`: `boolean` ; `useKeyHashingFunction`: [`HashKeysFunction`](README.md#hashkeysfunction) ; `useNodePruning`: `boolean` ; `useRootPersistence`: `boolean` } + +#### Defined in + +[packages/trie/src/types.ts:65](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L65) + ## Variables ### ROOT\_DB\_KEY @@ -172,7 +182,7 @@ ___ #### Defined in -[packages/trie/src/types.ts:117](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L117) +[packages/trie/src/types.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L126) ## Functions @@ -238,7 +248,7 @@ ___ ### verifyRangeProof -▸ **verifyRangeProof**(`rootHash`, `firstKey`, `lastKey`, `keys`, `values`, `proof`, `useHashedKeysFunction`): `Promise`<`boolean`\> +▸ **verifyRangeProof**(`rootHash`, `firstKey`, `lastKey`, `keys`, `values`, `proof`, `useKeyHashingFunction`): `Promise`<`boolean`\> verifyRangeProof checks whether the given leaf nodes and edge proof can prove the given trie leaves range is matched with the specific root. @@ -269,7 +279,7 @@ NOTE: Currently only supports verification when the length of firstKey and lastK | `keys` | [`Nibbles`](README.md#nibbles)[] | key list. | | `values` | `Buffer`[] | value list, one-to-one correspondence with keys. | | `proof` | ``null`` \| `Buffer`[] | proof node list, if proof is null, both `firstKey` and `lastKey` must be null | -| `useHashedKeysFunction` | [`HashKeysFunction`](README.md#hashkeysfunction) | - | +| `useKeyHashingFunction` | [`HashKeysFunction`](README.md#hashkeysfunction) | - | #### Returns diff --git a/packages/trie/docs/classes/BranchNode.md b/packages/trie/docs/classes/BranchNode.md index ca78704517..7ee2879484 100644 --- a/packages/trie/docs/classes/BranchNode.md +++ b/packages/trie/docs/classes/BranchNode.md @@ -13,10 +13,6 @@ - [\_branches](BranchNode.md#_branches) - [\_value](BranchNode.md#_value) -### Accessors - -- [value](BranchNode.md#value) - ### Methods - [getBranch](BranchNode.md#getbranch) @@ -24,6 +20,7 @@ - [raw](BranchNode.md#raw) - [serialize](BranchNode.md#serialize) - [setBranch](BranchNode.md#setbranch) +- [value](BranchNode.md#value) - [fromArray](BranchNode.md#fromarray) ## Constructors @@ -56,36 +53,6 @@ ___ [packages/trie/src/trie/node/branch.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/branch.ts#L8) -## Accessors - -### value - -• `get` **value**(): ``null`` \| `Buffer` - -#### Returns - -``null`` \| `Buffer` - -#### Defined in - -[packages/trie/src/trie/node/branch.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/branch.ts#L22) - -• `set` **value**(`v`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `v` | ``null`` \| `Buffer` | - -#### Returns - -`void` - -#### Defined in - -[packages/trie/src/trie/node/branch.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/branch.ts#L26) - ## Methods ### getBranch @@ -171,6 +138,26 @@ ___ ___ +### value + +▸ **value**(`v?`): ``null`` \| `Buffer` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `v?` | ``null`` \| `Buffer` | + +#### Returns + +``null`` \| `Buffer` + +#### Defined in + +[packages/trie/src/trie/node/branch.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/branch.ts#L22) + +___ + ### fromArray ▸ `Static` **fromArray**(`arr`): [`BranchNode`](BranchNode.md) diff --git a/packages/trie/docs/classes/CheckpointDB.md b/packages/trie/docs/classes/CheckpointDB.md index b0adfffcd7..0b545250de 100644 --- a/packages/trie/docs/classes/CheckpointDB.md +++ b/packages/trie/docs/classes/CheckpointDB.md @@ -20,10 +20,6 @@ which validates inputs and sets encoding type. - [checkpoints](CheckpointDB.md#checkpoints) - [db](CheckpointDB.md#db) -### Accessors - -- [isCheckpoint](CheckpointDB.md#ischeckpoint) - ### Methods - [batch](CheckpointDB.md#batch) @@ -32,8 +28,10 @@ which validates inputs and sets encoding type. - [copy](CheckpointDB.md#copy) - [del](CheckpointDB.md#del) - [get](CheckpointDB.md#get) +- [hasCheckpoints](CheckpointDB.md#hascheckpoints) - [put](CheckpointDB.md#put) - [revert](CheckpointDB.md#revert) +- [setCheckpoints](CheckpointDB.md#setcheckpoints) ## Constructors @@ -73,22 +71,6 @@ ___ [packages/trie/src/db/checkpoint.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L9) -## Accessors - -### isCheckpoint - -• `get` **isCheckpoint**(): `boolean` - -Is the DB during a checkpoint phase? - -#### Returns - -`boolean` - -#### Defined in - -[packages/trie/src/db/checkpoint.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L23) - ## Methods ### batch @@ -113,7 +95,7 @@ Performs a batch operation on db. #### Defined in -[packages/trie/src/db/checkpoint.ts:125](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L125) +[packages/trie/src/db/checkpoint.ts:140](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L140) ___ @@ -135,7 +117,7 @@ Adds a new checkpoint to the stack #### Defined in -[packages/trie/src/db/checkpoint.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L31) +[packages/trie/src/db/checkpoint.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L46) ___ @@ -151,7 +133,7 @@ Commits the latest checkpoint #### Defined in -[packages/trie/src/db/checkpoint.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L38) +[packages/trie/src/db/checkpoint.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L53) ___ @@ -172,7 +154,7 @@ to the **same** underlying leveldb instance. #### Defined in -[packages/trie/src/db/checkpoint.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L142) +[packages/trie/src/db/checkpoint.ts:157](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L157) ___ @@ -198,7 +180,7 @@ Removes a raw value in the underlying leveldb. #### Defined in -[packages/trie/src/db/checkpoint.ts:112](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L112) +[packages/trie/src/db/checkpoint.ts:127](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L127) ___ @@ -226,7 +208,23 @@ A Promise that resolves to `Buffer` if a value is found or `null` if no value is #### Defined in -[packages/trie/src/db/checkpoint.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L78) +[packages/trie/src/db/checkpoint.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L93) + +___ + +### hasCheckpoints + +▸ **hasCheckpoints**(): `boolean` + +Is the DB during a checkpoint phase? + +#### Returns + +`boolean` + +#### Defined in + +[packages/trie/src/db/checkpoint.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L38) ___ @@ -253,7 +251,7 @@ Writes a value directly to leveldb. #### Defined in -[packages/trie/src/db/checkpoint.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L100) +[packages/trie/src/db/checkpoint.ts:115](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L115) ___ @@ -269,4 +267,26 @@ Reverts the latest checkpoint #### Defined in -[packages/trie/src/db/checkpoint.ts:70](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L70) +[packages/trie/src/db/checkpoint.ts:85](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L85) + +___ + +### setCheckpoints + +▸ **setCheckpoints**(`checkpoints`): `void` + +Flush the checkpoints and use the given checkpoints instead. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `checkpoints` | [`Checkpoint`](../README.md#checkpoint)[] | + +#### Returns + +`void` + +#### Defined in + +[packages/trie/src/db/checkpoint.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/db/checkpoint.ts#L24) diff --git a/packages/trie/docs/classes/CheckpointTrie.md b/packages/trie/docs/classes/CheckpointTrie.md deleted file mode 100644 index 29167c6af9..0000000000 --- a/packages/trie/docs/classes/CheckpointTrie.md +++ /dev/null @@ -1,676 +0,0 @@ -[@ethereumjs/trie](../README.md) / CheckpointTrie - -# Class: CheckpointTrie - -Adds checkpointing to the [Trie](Trie.md) - -## Hierarchy - -- [`Trie`](Trie.md) - - ↳ **`CheckpointTrie`** - -## Table of contents - -### Constructors - -- [constructor](CheckpointTrie.md#constructor) - -### Properties - -- [EMPTY\_TRIE\_ROOT](CheckpointTrie.md#empty_trie_root) -- [db](CheckpointTrie.md#db) -- [dbStorage](CheckpointTrie.md#dbstorage) - -### Accessors - -- [isCheckpoint](CheckpointTrie.md#ischeckpoint) -- [root](CheckpointTrie.md#root) - -### Methods - -- [batch](CheckpointTrie.md#batch) -- [checkRoot](CheckpointTrie.md#checkroot) -- [checkpoint](CheckpointTrie.md#checkpoint) -- [commit](CheckpointTrie.md#commit) -- [copy](CheckpointTrie.md#copy) -- [createProof](CheckpointTrie.md#createproof) -- [createReadStream](CheckpointTrie.md#createreadstream) -- [del](CheckpointTrie.md#del) -- [findPath](CheckpointTrie.md#findpath) -- [fromProof](CheckpointTrie.md#fromproof) -- [get](CheckpointTrie.md#get) -- [lookupNode](CheckpointTrie.md#lookupnode) -- [persistRoot](CheckpointTrie.md#persistroot) -- [put](CheckpointTrie.md#put) -- [revert](CheckpointTrie.md#revert) -- [verifyProof](CheckpointTrie.md#verifyproof) -- [verifyRangeProof](CheckpointTrie.md#verifyrangeproof) -- [walkTrie](CheckpointTrie.md#walktrie) -- [create](CheckpointTrie.md#create) - -## Constructors - -### constructor - -• **new CheckpointTrie**(`opts?`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts?` | [`TrieOpts`](../interfaces/TrieOpts.md) | - -#### Overrides - -[Trie](Trie.md).[constructor](Trie.md#constructor) - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L15) - -## Properties - -### EMPTY\_TRIE\_ROOT - -• **EMPTY\_TRIE\_ROOT**: `Buffer` - -The root for an empty trie - -#### Inherited from - -[Trie](Trie.md).[EMPTY_TRIE_ROOT](Trie.md#empty_trie_root) - -#### Defined in - -[packages/trie/src/trie/trie.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L41) - -___ - -### db - -• **db**: [`CheckpointDB`](CheckpointDB.md) - -The backend DB - -#### Overrides - -[Trie](Trie.md).[db](Trie.md#db) - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L12) - -___ - -### dbStorage - -• **dbStorage**: [`DB`](../interfaces/DB.md) - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L13) - -## Accessors - -### isCheckpoint - -• `get` **isCheckpoint**(): `boolean` - -Is the trie during a checkpoint phase? - -#### Returns - -`boolean` - -#### Overrides - -Trie.isCheckpoint - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:28](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L28) - -___ - -### root - -• `get` **root**(): `Buffer` - -Gets the current root of the `trie` - -#### Returns - -`Buffer` - -#### Inherited from - -Trie.root - -#### Defined in - -[packages/trie/src/trie/trie.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L93) - -• `set` **root**(`value`): `void` - -Sets the current root of the `trie` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `Buffer` | - -#### Returns - -`void` - -#### Inherited from - -Trie.root - -#### Defined in - -[packages/trie/src/trie/trie.ts:81](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L81) - -## Methods - -### batch - -▸ **batch**(`ops`): `Promise`<`void`\> - -The given hash of operations (key additions or deletions) are executed on the trie -(delete operations are only executed on DB with `deleteFromDB` set to `true`) - -**`Example`** - -```ts -const ops = [ - { type: 'del', key: Buffer.from('father') } - , { type: 'put', key: Buffer.from('name'), value: Buffer.from('Yuri Irsenovich Kim') } - , { type: 'put', key: Buffer.from('dob'), value: Buffer.from('16 February 1941') } - , { type: 'put', key: Buffer.from('spouse'), value: Buffer.from('Kim Young-sook') } - , { type: 'put', key: Buffer.from('occupation'), value: Buffer.from('Clown') } -] -await trie.batch(ops) -``` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `ops` | [`BatchDBOp`](../README.md#batchdbop)[] | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[Trie](Trie.md).[batch](Trie.md#batch) - -#### Defined in - -[packages/trie/src/trie/trie.ts:621](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L621) - -___ - -### checkRoot - -▸ **checkRoot**(`root`): `Promise`<`boolean`\> - -Checks if a given root exists. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `root` | `Buffer` | - -#### Returns - -`Promise`<`boolean`\> - -#### Inherited from - -[Trie](Trie.md).[checkRoot](Trie.md#checkroot) - -#### Defined in - -[packages/trie/src/trie/trie.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L100) - -___ - -### checkpoint - -▸ **checkpoint**(): `void` - -Creates a checkpoint that can later be reverted to or committed. -After this is called, all changes can be reverted until `commit` is called. - -#### Returns - -`void` - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L36) - -___ - -### commit - -▸ **commit**(): `Promise`<`void`\> - -Commits a checkpoint to disk, if current checkpoint is not nested. -If nested, only sets the parent checkpoint as current checkpoint. - -**`Throws`** - -If not during a checkpoint phase - -#### Returns - -`Promise`<`void`\> - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L45) - -___ - -### copy - -▸ **copy**(`includeCheckpoints?`): [`CheckpointTrie`](CheckpointTrie.md) - -Returns a copy of the underlying trie with the interface of CheckpointTrie. - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `includeCheckpoints` | `boolean` | `true` | If true and during a checkpoint, the copy will contain the checkpointing metadata and will use the same scratch as underlying db. | - -#### Returns - -[`CheckpointTrie`](CheckpointTrie.md) - -#### Overrides - -[Trie](Trie.md).[copy](Trie.md#copy) - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L76) - -___ - -### createProof - -▸ **createProof**(`key`): `Promise`<[`Proof`](../README.md#proof)\> - -Creates a proof from a trie and key that can be verified using [verifyProof](Trie.md#verifyproof). - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `key` | `Buffer` | - -#### Returns - -`Promise`<[`Proof`](../README.md#proof)\> - -#### Inherited from - -[Trie](Trie.md).[createProof](Trie.md#createproof) - -#### Defined in - -[packages/trie/src/trie/trie.ts:661](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L661) - -___ - -### createReadStream - -▸ **createReadStream**(): [`TrieReadStream`](TrieReadStream.md) - -The `data` event is given an `Object` that has two properties; the `key` and the `value`. Both should be Buffers. - -#### Returns - -[`TrieReadStream`](TrieReadStream.md) - -Returns a [stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_class_stream_readable) of the contents of the `trie` - -#### Inherited from - -[Trie](Trie.md).[createReadStream](Trie.md#createreadstream) - -#### Defined in - -[packages/trie/src/trie/trie.ts:725](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L725) - -___ - -### del - -▸ **del**(`key`): `Promise`<`void`\> - -Deletes a value given a `key` from the trie -(delete operations are only executed on DB with `deleteFromDB` set to `true`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `key` | `Buffer` | - -#### Returns - -`Promise`<`void`\> - -A Promise that resolves once value is deleted. - -#### Inherited from - -[Trie](Trie.md).[del](Trie.md#del) - -#### Defined in - -[packages/trie/src/trie/trie.ts:173](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L173) - -___ - -### findPath - -▸ **findPath**(`key`, `throwIfMissing?`): `Promise`<`Path`\> - -Tries to find a path to the node for the given key. -It returns a `stack` of nodes to the closest node. - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `key` | `Buffer` | `undefined` | the search key | -| `throwIfMissing` | `boolean` | `false` | if true, throws if any nodes are missing. Used for verifying proofs. (default: false) | - -#### Returns - -`Promise`<`Path`\> - -#### Inherited from - -[Trie](Trie.md).[findPath](Trie.md#findpath) - -#### Defined in - -[packages/trie/src/trie/trie.ts:190](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L190) - -___ - -### fromProof - -▸ **fromProof**(`proof`): `Promise`<`void`\> - -Saves the nodes from a proof into the trie. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `proof` | [`Proof`](../README.md#proof) | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[Trie](Trie.md).[fromProof](Trie.md#fromproof) - -#### Defined in - -[packages/trie/src/trie/trie.ts:639](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L639) - -___ - -### get - -▸ **get**(`key`, `throwIfMissing?`): `Promise`<``null`` \| `Buffer`\> - -Gets a value given a `key` - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `key` | `Buffer` | `undefined` | the key to search for | -| `throwIfMissing` | `boolean` | `false` | if true, throws if any nodes are missing. Used for verifying proofs. (default: false) | - -#### Returns - -`Promise`<``null`` \| `Buffer`\> - -A Promise that resolves to `Buffer` if a value was found or `null` if no value was found. - -#### Inherited from - -[Trie](Trie.md).[get](Trie.md#get) - -#### Defined in - -[packages/trie/src/trie/trie.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L126) - -___ - -### lookupNode - -▸ **lookupNode**(`node`): `Promise`<``null`` \| [`TrieNode`](../README.md#trienode)\> - -Retrieves a node from db by hash. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `node` | `Buffer` \| `Buffer`[] | - -#### Returns - -`Promise`<``null`` \| [`TrieNode`](../README.md#trienode)\> - -#### Inherited from - -[Trie](Trie.md).[lookupNode](Trie.md#lookupnode) - -#### Defined in - -[packages/trie/src/trie/trie.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L281) - -___ - -### persistRoot - -▸ **persistRoot**(): `Promise`<`void`\> - -Persists the root hash in the underlying database - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[Trie](Trie.md).[persistRoot](Trie.md#persistroot) - -#### Defined in - -[packages/trie/src/trie/trie.ts:746](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L746) - -___ - -### put - -▸ **put**(`key`, `value`): `Promise`<`void`\> - -Stores a given `value` at the given `key` or do a delete if `value` is empty -(delete operations are only executed on DB with `deleteFromDB` set to `true`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `key` | `Buffer` | -| `value` | `Buffer` | - -#### Returns - -`Promise`<`void`\> - -A Promise that resolves once value is stored. - -#### Inherited from - -[Trie](Trie.md).[put](Trie.md#put) - -#### Defined in - -[packages/trie/src/trie/trie.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L142) - -___ - -### revert - -▸ **revert**(): `Promise`<`void`\> - -Reverts the trie to the state it was at when `checkpoint` was first called. -If during a nested checkpoint, sets root to most recent checkpoint, and sets -parent checkpoint as current. - -#### Returns - -`Promise`<`void`\> - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:61](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L61) - -___ - -### verifyProof - -▸ **verifyProof**(`rootHash`, `key`, `proof`): `Promise`<``null`` \| `Buffer`\> - -Verifies a proof. - -**`Throws`** - -If proof is found to be invalid. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `rootHash` | `Buffer` | -| `key` | `Buffer` | -| `proof` | [`Proof`](../README.md#proof) | - -#### Returns - -`Promise`<``null`` \| `Buffer`\> - -The value from the key, or null if valid proof of non-existence. - -#### Inherited from - -[Trie](Trie.md).[verifyProof](Trie.md#verifyproof) - -#### Defined in - -[packages/trie/src/trie/trie.ts:677](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L677) - -___ - -### verifyRangeProof - -▸ **verifyRangeProof**(`rootHash`, `firstKey`, `lastKey`, `keys`, `values`, `proof`): `Promise`<`boolean`\> - -[verifyRangeProof](../README.md#verifyrangeproof) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `rootHash` | `Buffer` | -| `firstKey` | ``null`` \| `Buffer` | -| `lastKey` | ``null`` \| `Buffer` | -| `keys` | `Buffer`[] | -| `values` | `Buffer`[] | -| `proof` | ``null`` \| `Buffer`[] | - -#### Returns - -`Promise`<`boolean`\> - -#### Inherited from - -[Trie](Trie.md).[verifyRangeProof](Trie.md#verifyrangeproof) - -#### Defined in - -[packages/trie/src/trie/trie.ts:702](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L702) - -___ - -### walkTrie - -▸ **walkTrie**(`root`, `onFound`): `Promise`<`void`\> - -Walks a trie until finished. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `root` | `Buffer` | | -| `onFound` | [`FoundNodeFunction`](../README.md#foundnodefunction) | callback to call when a node is found. This schedules new tasks. If no tasks are available, the Promise resolves. | - -#### Returns - -`Promise`<`void`\> - -Resolves when finished walking trie. - -#### Inherited from - -[Trie](Trie.md).[walkTrie](Trie.md#walktrie) - -#### Defined in - -[packages/trie/src/trie/trie.ts:261](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L261) - -___ - -### create - -▸ `Static` **create**(`opts?`): `Promise`<[`CheckpointTrie`](CheckpointTrie.md)\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts?` | [`TrieOpts`](../interfaces/TrieOpts.md) | - -#### Returns - -`Promise`<[`CheckpointTrie`](CheckpointTrie.md)\> - -#### Overrides - -[Trie](Trie.md).[create](Trie.md#create) - -#### Defined in - -[packages/trie/src/trie/checkpoint.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/checkpoint.ts#L21) diff --git a/packages/trie/docs/classes/ExtensionNode.md b/packages/trie/docs/classes/ExtensionNode.md index d7009193d8..402ba9e225 100644 --- a/packages/trie/docs/classes/ExtensionNode.md +++ b/packages/trie/docs/classes/ExtensionNode.md @@ -2,6 +2,12 @@ # Class: ExtensionNode +## Hierarchy + +- `Node` + + ↳ **`ExtensionNode`** + ## Table of contents ### Constructors @@ -11,19 +17,17 @@ ### Properties - [\_nibbles](ExtensionNode.md#_nibbles) +- [\_terminator](ExtensionNode.md#_terminator) - [\_value](ExtensionNode.md#_value) -### Accessors - -- [key](ExtensionNode.md#key) -- [keyLength](ExtensionNode.md#keylength) -- [value](ExtensionNode.md#value) - ### Methods - [encodedKey](ExtensionNode.md#encodedkey) +- [key](ExtensionNode.md#key) +- [keyLength](ExtensionNode.md#keylength) - [raw](ExtensionNode.md#raw) - [serialize](ExtensionNode.md#serialize) +- [value](ExtensionNode.md#value) - [decodeKey](ExtensionNode.md#decodekey) - [encodeKey](ExtensionNode.md#encodekey) @@ -40,9 +44,13 @@ | `nibbles` | [`Nibbles`](../README.md#nibbles) | | `value` | `Buffer` | +#### Overrides + +Node.constructor + #### Defined in -[packages/trie/src/trie/node/extension.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L13) +[packages/trie/src/trie/node/extension.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L8) ## Properties @@ -50,107 +58,101 @@ • **\_nibbles**: [`Nibbles`](../README.md#nibbles) -#### Defined in - -[packages/trie/src/trie/node/extension.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L10) +#### Inherited from -___ - -### \_value - -• **\_value**: `Buffer` +Node.\_nibbles #### Defined in -[packages/trie/src/trie/node/extension.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L11) +[packages/trie/src/trie/node/node.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L10) -## Accessors +___ -### key +### \_terminator -• `get` **key**(): [`Nibbles`](../README.md#nibbles) +• **\_terminator**: `boolean` -#### Returns +#### Inherited from -[`Nibbles`](../README.md#nibbles) +Node.\_terminator #### Defined in -[packages/trie/src/trie/node/extension.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L26) +[packages/trie/src/trie/node/node.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L12) -• `set` **key**(`k`): `void` +___ -#### Parameters +### \_value -| Name | Type | -| :------ | :------ | -| `k` | [`Nibbles`](../README.md#nibbles) | +• **\_value**: `Buffer` -#### Returns +#### Inherited from -`void` +Node.\_value #### Defined in -[packages/trie/src/trie/node/extension.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L30) +[packages/trie/src/trie/node/node.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L11) -___ +## Methods -### keyLength +### encodedKey -• `get` **keyLength**(): `number` +▸ **encodedKey**(): [`Nibbles`](../README.md#nibbles) #### Returns -`number` - -#### Defined in - -[packages/trie/src/trie/node/extension.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L34) - -___ +[`Nibbles`](../README.md#nibbles) -### value +#### Inherited from -• `get` **value**(): `Buffer` +Node.encodedKey -#### Returns +#### Defined in -`Buffer` +[packages/trie/src/trie/node/node.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L44) -#### Defined in +___ -[packages/trie/src/trie/node/extension.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L38) +### key -• `set` **value**(`v`): `void` +▸ **key**(`k?`): [`Nibbles`](../README.md#nibbles) #### Parameters | Name | Type | | :------ | :------ | -| `v` | `Buffer` | +| `k?` | [`Nibbles`](../README.md#nibbles) | #### Returns -`void` +[`Nibbles`](../README.md#nibbles) + +#### Inherited from + +Node.key #### Defined in -[packages/trie/src/trie/node/extension.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L42) +[packages/trie/src/trie/node/node.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L24) -## Methods +___ -### encodedKey +### keyLength -▸ **encodedKey**(): [`Nibbles`](../README.md#nibbles) +▸ **keyLength**(): `number` #### Returns -[`Nibbles`](../README.md#nibbles) +`number` + +#### Inherited from + +Node.keyLength #### Defined in -[packages/trie/src/trie/node/extension.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L46) +[packages/trie/src/trie/node/node.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L32) ___ @@ -162,9 +164,13 @@ ___ [`Buffer`, `Buffer`] +#### Inherited from + +Node.raw + #### Defined in -[packages/trie/src/trie/node/extension.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L50) +[packages/trie/src/trie/node/node.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L48) ___ @@ -176,9 +182,37 @@ ___ `Buffer` +#### Inherited from + +Node.serialize + #### Defined in -[packages/trie/src/trie/node/extension.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L54) +[packages/trie/src/trie/node/node.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L52) + +___ + +### value + +▸ **value**(`v?`): `Buffer` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `v?` | `Buffer` | + +#### Returns + +`Buffer` + +#### Inherited from + +Node.value + +#### Defined in + +[packages/trie/src/trie/node/node.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L36) ___ @@ -196,9 +230,13 @@ ___ [`Nibbles`](../README.md#nibbles) +#### Inherited from + +Node.decodeKey + #### Defined in -[packages/trie/src/trie/node/extension.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L22) +[packages/trie/src/trie/node/node.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L20) ___ @@ -218,4 +256,4 @@ ___ #### Defined in -[packages/trie/src/trie/node/extension.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L18) +[packages/trie/src/trie/node/extension.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/extension.ts#L12) diff --git a/packages/trie/docs/classes/LeafNode.md b/packages/trie/docs/classes/LeafNode.md index ddaab86d88..822a9d7934 100644 --- a/packages/trie/docs/classes/LeafNode.md +++ b/packages/trie/docs/classes/LeafNode.md @@ -2,6 +2,12 @@ # Class: LeafNode +## Hierarchy + +- `Node` + + ↳ **`LeafNode`** + ## Table of contents ### Constructors @@ -11,19 +17,17 @@ ### Properties - [\_nibbles](LeafNode.md#_nibbles) +- [\_terminator](LeafNode.md#_terminator) - [\_value](LeafNode.md#_value) -### Accessors - -- [key](LeafNode.md#key) -- [keyLength](LeafNode.md#keylength) -- [value](LeafNode.md#value) - ### Methods - [encodedKey](LeafNode.md#encodedkey) +- [key](LeafNode.md#key) +- [keyLength](LeafNode.md#keylength) - [raw](LeafNode.md#raw) - [serialize](LeafNode.md#serialize) +- [value](LeafNode.md#value) - [decodeKey](LeafNode.md#decodekey) - [encodeKey](LeafNode.md#encodekey) @@ -40,9 +44,13 @@ | `nibbles` | [`Nibbles`](../README.md#nibbles) | | `value` | `Buffer` | +#### Overrides + +Node.constructor + #### Defined in -[packages/trie/src/trie/node/leaf.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L13) +[packages/trie/src/trie/node/leaf.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L8) ## Properties @@ -50,107 +58,101 @@ • **\_nibbles**: [`Nibbles`](../README.md#nibbles) -#### Defined in - -[packages/trie/src/trie/node/leaf.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L10) +#### Inherited from -___ - -### \_value - -• **\_value**: `Buffer` +Node.\_nibbles #### Defined in -[packages/trie/src/trie/node/leaf.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L11) +[packages/trie/src/trie/node/node.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L10) -## Accessors +___ -### key +### \_terminator -• `get` **key**(): [`Nibbles`](../README.md#nibbles) +• **\_terminator**: `boolean` -#### Returns +#### Inherited from -[`Nibbles`](../README.md#nibbles) +Node.\_terminator #### Defined in -[packages/trie/src/trie/node/leaf.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L26) +[packages/trie/src/trie/node/node.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L12) -• `set` **key**(`k`): `void` +___ -#### Parameters +### \_value -| Name | Type | -| :------ | :------ | -| `k` | [`Nibbles`](../README.md#nibbles) | +• **\_value**: `Buffer` -#### Returns +#### Inherited from -`void` +Node.\_value #### Defined in -[packages/trie/src/trie/node/leaf.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L30) +[packages/trie/src/trie/node/node.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L11) -___ +## Methods -### keyLength +### encodedKey -• `get` **keyLength**(): `number` +▸ **encodedKey**(): [`Nibbles`](../README.md#nibbles) #### Returns -`number` - -#### Defined in - -[packages/trie/src/trie/node/leaf.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L34) - -___ +[`Nibbles`](../README.md#nibbles) -### value +#### Inherited from -• `get` **value**(): `Buffer` +Node.encodedKey -#### Returns +#### Defined in -`Buffer` +[packages/trie/src/trie/node/node.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L44) -#### Defined in +___ -[packages/trie/src/trie/node/leaf.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L38) +### key -• `set` **value**(`v`): `void` +▸ **key**(`k?`): [`Nibbles`](../README.md#nibbles) #### Parameters | Name | Type | | :------ | :------ | -| `v` | `Buffer` | +| `k?` | [`Nibbles`](../README.md#nibbles) | #### Returns -`void` +[`Nibbles`](../README.md#nibbles) + +#### Inherited from + +Node.key #### Defined in -[packages/trie/src/trie/node/leaf.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L42) +[packages/trie/src/trie/node/node.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L24) -## Methods +___ -### encodedKey +### keyLength -▸ **encodedKey**(): [`Nibbles`](../README.md#nibbles) +▸ **keyLength**(): `number` #### Returns -[`Nibbles`](../README.md#nibbles) +`number` + +#### Inherited from + +Node.keyLength #### Defined in -[packages/trie/src/trie/node/leaf.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L46) +[packages/trie/src/trie/node/node.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L32) ___ @@ -162,9 +164,13 @@ ___ [`Buffer`, `Buffer`] +#### Inherited from + +Node.raw + #### Defined in -[packages/trie/src/trie/node/leaf.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L50) +[packages/trie/src/trie/node/node.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L48) ___ @@ -176,29 +182,61 @@ ___ `Buffer` +#### Inherited from + +Node.serialize + +#### Defined in + +[packages/trie/src/trie/node/node.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L52) + +___ + +### value + +▸ **value**(`v?`): `Buffer` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `v?` | `Buffer` | + +#### Returns + +`Buffer` + +#### Inherited from + +Node.value + #### Defined in -[packages/trie/src/trie/node/leaf.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L54) +[packages/trie/src/trie/node/node.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L36) ___ ### decodeKey -▸ `Static` **decodeKey**(`encodedKey`): [`Nibbles`](../README.md#nibbles) +▸ `Static` **decodeKey**(`key`): [`Nibbles`](../README.md#nibbles) #### Parameters | Name | Type | | :------ | :------ | -| `encodedKey` | [`Nibbles`](../README.md#nibbles) | +| `key` | [`Nibbles`](../README.md#nibbles) | #### Returns [`Nibbles`](../README.md#nibbles) +#### Inherited from + +Node.decodeKey + #### Defined in -[packages/trie/src/trie/node/leaf.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L22) +[packages/trie/src/trie/node/node.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/node.ts#L20) ___ @@ -218,4 +256,4 @@ ___ #### Defined in -[packages/trie/src/trie/node/leaf.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L18) +[packages/trie/src/trie/node/leaf.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/node/leaf.ts#L12) diff --git a/packages/trie/docs/classes/Trie.md b/packages/trie/docs/classes/Trie.md index 6691089e5e..d24a76bdc4 100644 --- a/packages/trie/docs/classes/Trie.md +++ b/packages/trie/docs/classes/Trie.md @@ -6,12 +6,6 @@ The basic trie interface, use with `import { Trie } from '@ethereumjs/trie'`. In Ethereum applications stick with the SecureTrie overlay. The API for the base and the secure interface are about the same. -## Hierarchy - -- **`Trie`** - - ↳ [`CheckpointTrie`](CheckpointTrie.md) - ## Table of contents ### Constructors @@ -21,28 +15,30 @@ The API for the base and the secure interface are about the same. ### Properties - [EMPTY\_TRIE\_ROOT](Trie.md#empty_trie_root) -- [db](Trie.md#db) - -### Accessors - -- [isCheckpoint](Trie.md#ischeckpoint) -- [root](Trie.md#root) ### Methods - [batch](Trie.md#batch) - [checkRoot](Trie.md#checkroot) +- [checkpoint](Trie.md#checkpoint) +- [commit](Trie.md#commit) - [copy](Trie.md#copy) - [createProof](Trie.md#createproof) - [createReadStream](Trie.md#createreadstream) +- [database](Trie.md#database) - [del](Trie.md#del) - [findPath](Trie.md#findpath) +- [flushCheckpoints](Trie.md#flushcheckpoints) - [fromProof](Trie.md#fromproof) - [get](Trie.md#get) +- [hasCheckpoints](Trie.md#hascheckpoints) - [lookupNode](Trie.md#lookupnode) - [persistRoot](Trie.md#persistroot) - [put](Trie.md#put) +- [revert](Trie.md#revert) +- [root](Trie.md#root) - [verifyProof](Trie.md#verifyproof) +- [verifyPrunedIntegrity](Trie.md#verifyprunedintegrity) - [verifyRangeProof](Trie.md#verifyrangeproof) - [walkTrie](Trie.md#walktrie) - [create](Trie.md#create) @@ -63,7 +59,7 @@ Create a new trie #### Defined in -[packages/trie/src/trie/trie.ts:57](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L57) +[packages/trie/src/trie/trie.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L59) ## Properties @@ -75,69 +71,7 @@ The root for an empty trie #### Defined in -[packages/trie/src/trie/trie.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L41) - -___ - -### db - -• **db**: [`DB`](../interfaces/DB.md) - -The backend DB - -#### Defined in - -[packages/trie/src/trie/trie.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L45) - -## Accessors - -### isCheckpoint - -• `get` **isCheckpoint**(): `boolean` - -Trie has no checkpointing so return false - -#### Returns - -`boolean` - -#### Defined in - -[packages/trie/src/trie/trie.ts:116](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L116) - -___ - -### root - -• `get` **root**(): `Buffer` - -Gets the current root of the `trie` - -#### Returns - -`Buffer` - -#### Defined in - -[packages/trie/src/trie/trie.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L93) - -• `set` **root**(`value`): `void` - -Sets the current root of the `trie` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `Buffer` | - -#### Returns - -`void` - -#### Defined in - -[packages/trie/src/trie/trie.ts:81](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L81) +[packages/trie/src/trie/trie.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L47) ## Methods @@ -173,7 +107,7 @@ await trie.batch(ops) #### Defined in -[packages/trie/src/trie/trie.ts:621](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L621) +[packages/trie/src/trie/trie.ts:697](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L697) ___ @@ -195,15 +129,59 @@ Checks if a given root exists. #### Defined in -[packages/trie/src/trie/trie.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L100) +[packages/trie/src/trie/trie.ts:129](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L129) + +___ + +### checkpoint + +▸ **checkpoint**(): `void` + +Creates a checkpoint that can later be reverted to or committed. +After this is called, all changes can be reverted until `commit` is called. + +#### Returns + +`void` + +#### Defined in + +[packages/trie/src/trie/trie.ts:927](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L927) + +___ + +### commit + +▸ **commit**(): `Promise`<`void`\> + +Commits a checkpoint to disk, if current checkpoint is not nested. +If nested, only sets the parent checkpoint as current checkpoint. + +**`Throws`** + +If not during a checkpoint phase + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[packages/trie/src/trie/trie.ts:936](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L936) ___ ### copy -▸ **copy**(): [`Trie`](Trie.md) +▸ **copy**(`includeCheckpoints?`): [`Trie`](Trie.md) + +Returns a copy of the underlying trie. + +#### Parameters -Creates a new trie backed by the same db. +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `includeCheckpoints` | `boolean` | `true` | If true and during a checkpoint, the copy will contain the checkpointing metadata and will use the same scratch as underlying db. | #### Returns @@ -211,7 +189,7 @@ Creates a new trie backed by the same db. #### Defined in -[packages/trie/src/trie/trie.ts:732](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L732) +[packages/trie/src/trie/trie.ts:860](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L860) ___ @@ -233,7 +211,7 @@ Creates a proof from a trie and key that can be verified using [verifyProof](Tri #### Defined in -[packages/trie/src/trie/trie.ts:661](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L661) +[packages/trie/src/trie/trie.ts:737](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L737) ___ @@ -251,7 +229,27 @@ Returns a [stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#str #### Defined in -[packages/trie/src/trie/trie.ts:725](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L725) +[packages/trie/src/trie/trie.ts:852](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L852) + +___ + +### database + +▸ **database**(`db?`): [`CheckpointDB`](CheckpointDB.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `db?` | [`DB`](../interfaces/DB.md) | + +#### Returns + +[`CheckpointDB`](CheckpointDB.md) + +#### Defined in + +[packages/trie/src/trie/trie.ts:95](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L95) ___ @@ -276,7 +274,7 @@ A Promise that resolves once value is deleted. #### Defined in -[packages/trie/src/trie/trie.ts:173](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L173) +[packages/trie/src/trie/trie.ts:218](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L218) ___ @@ -300,7 +298,23 @@ It returns a `stack` of nodes to the closest node. #### Defined in -[packages/trie/src/trie/trie.ts:190](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L190) +[packages/trie/src/trie/trie.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L253) + +___ + +### flushCheckpoints + +▸ **flushCheckpoints**(): `void` + +Flushes all checkpoints, restoring the initial checkpoint state. + +#### Returns + +`void` + +#### Defined in + +[packages/trie/src/trie/trie.ts:966](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L966) ___ @@ -322,7 +336,7 @@ Saves the nodes from a proof into the trie. #### Defined in -[packages/trie/src/trie/trie.ts:639](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L639) +[packages/trie/src/trie/trie.ts:715](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L715) ___ @@ -347,7 +361,23 @@ A Promise that resolves to `Buffer` if a value was found or `null` if no value w #### Defined in -[packages/trie/src/trie/trie.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L126) +[packages/trie/src/trie/trie.ts:148](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L148) + +___ + +### hasCheckpoints + +▸ **hasCheckpoints**(): `boolean` + +Is the trie during a checkpoint phase? + +#### Returns + +`boolean` + +#### Defined in + +[packages/trie/src/trie/trie.ts:919](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L919) ___ @@ -369,7 +399,7 @@ Retrieves a node from db by hash. #### Defined in -[packages/trie/src/trie/trie.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L281) +[packages/trie/src/trie/trie.ts:344](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L344) ___ @@ -385,7 +415,7 @@ Persists the root hash in the underlying database #### Defined in -[packages/trie/src/trie/trie.ts:746](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L746) +[packages/trie/src/trie/trie.ts:875](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L875) ___ @@ -411,7 +441,47 @@ A Promise that resolves once value is stored. #### Defined in -[packages/trie/src/trie/trie.ts:142](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L142) +[packages/trie/src/trie/trie.ts:164](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L164) + +___ + +### revert + +▸ **revert**(): `Promise`<`void`\> + +Reverts the trie to the state it was at when `checkpoint` was first called. +If during a nested checkpoint, sets root to most recent checkpoint, and sets +parent checkpoint as current. + +#### Returns + +`Promise`<`void`\> + +#### Defined in + +[packages/trie/src/trie/trie.ts:952](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L952) + +___ + +### root + +▸ **root**(`value?`): `Buffer` + +Gets and/or Sets the current root of the `trie` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value?` | ``null`` \| `Buffer` | + +#### Returns + +`Buffer` + +#### Defined in + +[packages/trie/src/trie/trie.ts:110](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L110) ___ @@ -441,7 +511,21 @@ The value from the key, or null if valid proof of non-existence. #### Defined in -[packages/trie/src/trie/trie.ts:677](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L677) +[packages/trie/src/trie/trie.ts:753](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L753) + +___ + +### verifyPrunedIntegrity + +▸ **verifyPrunedIntegrity**(): `Promise`<`boolean`\> + +#### Returns + +`Promise`<`boolean`\> + +#### Defined in + +[packages/trie/src/trie/trie.ts:801](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L801) ___ @@ -468,7 +552,7 @@ ___ #### Defined in -[packages/trie/src/trie/trie.ts:702](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L702) +[packages/trie/src/trie/trie.ts:778](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L778) ___ @@ -493,7 +577,7 @@ Resolves when finished walking trie. #### Defined in -[packages/trie/src/trie/trie.ts:261](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L261) +[packages/trie/src/trie/trie.ts:324](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L324) ___ @@ -513,4 +597,4 @@ ___ #### Defined in -[packages/trie/src/trie/trie.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L74) +[packages/trie/src/trie/trie.ts:75](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/trie/trie.ts#L75) diff --git a/packages/trie/docs/interfaces/DB.md b/packages/trie/docs/interfaces/DB.md index c42a76fb5d..c91e478d3d 100644 --- a/packages/trie/docs/interfaces/DB.md +++ b/packages/trie/docs/interfaces/DB.md @@ -37,7 +37,7 @@ Performs a batch operation on db. #### Defined in -[packages/trie/src/types.ts:101](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L101) +[packages/trie/src/types.ts:110](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L110) ___ @@ -54,7 +54,7 @@ to the **same** underlying leveldb instance. #### Defined in -[packages/trie/src/types.ts:107](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L107) +[packages/trie/src/types.ts:116](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L116) ___ @@ -76,7 +76,7 @@ Removes a raw value in the underlying leveldb. #### Defined in -[packages/trie/src/types.ts:95](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L95) +[packages/trie/src/types.ts:104](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L104) ___ @@ -100,7 +100,7 @@ A Promise that resolves to `Buffer` if a value is found or `null` if no value is #### Defined in -[packages/trie/src/types.ts:82](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L82) +[packages/trie/src/types.ts:91](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L91) ___ @@ -123,4 +123,4 @@ Writes a value directly to leveldb. #### Defined in -[packages/trie/src/types.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L89) +[packages/trie/src/types.ts:98](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L98) diff --git a/packages/trie/docs/interfaces/DelBatch.md b/packages/trie/docs/interfaces/DelBatch.md index 63beccea23..fec31e45fe 100644 --- a/packages/trie/docs/interfaces/DelBatch.md +++ b/packages/trie/docs/interfaces/DelBatch.md @@ -17,7 +17,7 @@ #### Defined in -[packages/trie/src/types.ts:73](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L73) +[packages/trie/src/types.ts:82](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L82) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[packages/trie/src/types.ts:72](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L72) +[packages/trie/src/types.ts:81](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L81) diff --git a/packages/trie/docs/interfaces/PutBatch.md b/packages/trie/docs/interfaces/PutBatch.md index 96c4833029..eda80e3153 100644 --- a/packages/trie/docs/interfaces/PutBatch.md +++ b/packages/trie/docs/interfaces/PutBatch.md @@ -18,7 +18,7 @@ #### Defined in -[packages/trie/src/types.ts:67](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L67) +[packages/trie/src/types.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L76) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[packages/trie/src/types.ts:66](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L66) +[packages/trie/src/types.ts:75](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L75) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[packages/trie/src/types.ts:68](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L68) +[packages/trie/src/types.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L77) diff --git a/packages/trie/docs/interfaces/TrieOpts.md b/packages/trie/docs/interfaces/TrieOpts.md index 4f790b8dd3..71d3c97aa6 100644 --- a/packages/trie/docs/interfaces/TrieOpts.md +++ b/packages/trie/docs/interfaces/TrieOpts.md @@ -7,11 +7,11 @@ ### Properties - [db](TrieOpts.md#db) -- [deleteFromDB](TrieOpts.md#deletefromdb) -- [persistRoot](TrieOpts.md#persistroot) - [root](TrieOpts.md#root) -- [useHashedKeys](TrieOpts.md#usehashedkeys) -- [useHashedKeysFunction](TrieOpts.md#usehashedkeysfunction) +- [useKeyHashing](TrieOpts.md#usekeyhashing) +- [useKeyHashingFunction](TrieOpts.md#usekeyhashingfunction) +- [useNodePruning](TrieOpts.md#usenodepruning) +- [useRootPersistence](TrieOpts.md#userootpersistence) ## Properties @@ -27,70 +27,70 @@ A database instance. ___ -### deleteFromDB +### root -• `Optional` **deleteFromDB**: `boolean` +• `Optional` **root**: `Buffer` -Delete nodes from DB on delete operations (disallows switching to an older state root) -Default: `false` +A `Buffer` for the root of a previously stored trie #### Defined in -[packages/trie/src/types.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L36) +[packages/trie/src/types.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L32) ___ -### persistRoot +### useKeyHashing -• `Optional` **persistRoot**: `boolean` +• `Optional` **useKeyHashing**: `boolean` -Store the root inside the database after every `write` operation +Create as a secure Trie where the keys are automatically hashed using the +**keccak256** hash function or alternatively the custom hash function provided. +Default: `false` + +This is the flavor of the Trie which is used in production Ethereum networks +like Ethereum Mainnet. + +Note: This functionality has been refactored along the v5 release and was before +provided as a separate inherited class `SecureTrie`. Just replace with `Trie` +instantiation with `useKeyHashing` set to `true`. #### Defined in -[packages/trie/src/types.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L60) +[packages/trie/src/types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L46) ___ -### root +### useKeyHashingFunction -• `Optional` **root**: `Buffer` +• `Optional` **useKeyHashingFunction**: [`HashKeysFunction`](../README.md#hashkeysfunction) -A `Buffer` for the root of a previously stored trie +Hash function used for hashing trie node and securing key. #### Defined in -[packages/trie/src/types.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L31) +[packages/trie/src/types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L51) ___ -### useHashedKeys - -• `Optional` **useHashedKeys**: `boolean` - -Create as a secure Trie where the keys are automatically hashed using the -**keccak256** hash function or alternatively the custom hash function provided. -Default: `false` +### useNodePruning -This is the flavor of the Trie which is used in production Ethereum networks -like Ethereum Mainnet. +• `Optional` **useNodePruning**: `boolean` -Note: This functionality has been refactored along the v5 release and was before -provided as a separate inherited class `SecureTrie`. Just replace with `Trie` -instantiation with `useHashedKeys` set to `true`. +Flag to prune the trie. When set to `true`, each time a value is overridden, +unreachable nodes will be pruned (deleted) from the trie #### Defined in -[packages/trie/src/types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L50) +[packages/trie/src/types.ts:62](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L62) ___ -### useHashedKeysFunction +### useRootPersistence -• `Optional` **useHashedKeysFunction**: [`HashKeysFunction`](../README.md#hashkeysfunction) +• `Optional` **useRootPersistence**: `boolean` -Hash function used for hashing trie node and securing key. +Store the root inside the database after every `write` operation #### Defined in -[packages/trie/src/types.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L55) +[packages/trie/src/types.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/trie/src/types.ts#L56) diff --git a/packages/trie/package.json b/packages/trie/package.json index 31f24b2c68..cb585ea4cc 100644 --- a/packages/trie/package.json +++ b/packages/trie/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/trie", - "version": "5.0.1", + "version": "5.0.2", "description": "This is an implementation of the modified merkle patricia tree as specified in Ethereum's yellow paper.", "keywords": [ "merkle", @@ -46,7 +46,7 @@ }, "dependencies": { "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "@types/readable-stream": "^2.3.13", "ethereum-cryptography": "^1.1.2", "readable-stream": "^3.6.0" diff --git a/packages/tx/CHANGELOG.md b/packages/tx/CHANGELOG.md index cca2003dcd..7048ba8c19 100644 --- a/packages/tx/CHANGELOG.md +++ b/packages/tx/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 4.0.2 - 2022-12-09 + +Maintenance release with dependency updates, PR [#2445](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2445) + ## 4.0.1 - 2022-10-18 ### Support for Geth genesis.json Genesis Format diff --git a/packages/tx/docs/README.md b/packages/tx/docs/README.md index 39b53ced0b..b2b7e7d160 100644 --- a/packages/tx/docs/README.md +++ b/packages/tx/docs/README.md @@ -19,6 +19,7 @@ - [AccessListEIP2930TxData](interfaces/AccessListEIP2930TxData.md) - [FeeMarketEIP1559TxData](interfaces/FeeMarketEIP1559TxData.md) +- [JsonRpcTx](interfaces/JsonRpcTx.md) - [JsonTx](interfaces/JsonTx.md) - [TxOptions](interfaces/TxOptions.md) diff --git a/packages/tx/docs/classes/AccessListEIP2930Transaction.md b/packages/tx/docs/classes/AccessListEIP2930Transaction.md index b98fdff194..15c88c847d 100644 --- a/packages/tx/docs/classes/AccessListEIP2930Transaction.md +++ b/packages/tx/docs/classes/AccessListEIP2930Transaction.md @@ -89,7 +89,7 @@ BaseTransaction<AccessListEIP2930Transaction\>.constructor #### Defined in -[eip2930Transaction.ts:135](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L135) +[eip2930Transaction.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L136) ## Properties @@ -147,7 +147,7 @@ BaseTransaction.data #### Defined in -[baseTransaction.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L52) +[baseTransaction.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L51) ___ @@ -161,7 +161,7 @@ BaseTransaction.gasLimit #### Defined in -[baseTransaction.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L49) +[baseTransaction.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L48) ___ @@ -185,7 +185,7 @@ BaseTransaction.nonce #### Defined in -[baseTransaction.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L48) +[baseTransaction.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L47) ___ @@ -199,7 +199,7 @@ BaseTransaction.r #### Defined in -[baseTransaction.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L55) +[baseTransaction.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L54) ___ @@ -213,7 +213,7 @@ BaseTransaction.s #### Defined in -[baseTransaction.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L56) +[baseTransaction.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L55) ___ @@ -227,7 +227,7 @@ BaseTransaction.to #### Defined in -[baseTransaction.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L50) +[baseTransaction.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L49) ___ @@ -241,7 +241,7 @@ BaseTransaction.v #### Defined in -[baseTransaction.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L54) +[baseTransaction.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L53) ___ @@ -255,7 +255,7 @@ BaseTransaction.value #### Defined in -[baseTransaction.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L51) +[baseTransaction.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L50) ## Accessors @@ -277,7 +277,7 @@ BaseTransaction.type #### Defined in -[baseTransaction.ts:127](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L127) +[baseTransaction.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L126) ## Methods @@ -303,7 +303,7 @@ BaseTransaction.\_processSignature #### Defined in -[eip2930Transaction.ts:335](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L335) +[eip2930Transaction.ts:338](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L338) ___ @@ -323,7 +323,7 @@ BaseTransaction.errorStr #### Defined in -[eip2930Transaction.ts:380](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L380) +[eip2930Transaction.ts:383](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L383) ___ @@ -343,7 +343,7 @@ BaseTransaction.getBaseFee #### Defined in -[baseTransaction.ts:197](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L197) +[baseTransaction.ts:196](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L196) ___ @@ -363,7 +363,7 @@ BaseTransaction.getDataFee #### Defined in -[eip2930Transaction.ts:181](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L181) +[eip2930Transaction.ts:184](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L184) ___ @@ -397,7 +397,7 @@ BaseTransaction.getMessageToSign #### Defined in -[eip2930Transaction.ts:266](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L266) +[eip2930Transaction.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L269) ___ @@ -417,7 +417,7 @@ BaseTransaction.getMessageToVerifySignature #### Defined in -[eip2930Transaction.ts:304](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L304) +[eip2930Transaction.ts:307](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L307) ___ @@ -437,7 +437,7 @@ BaseTransaction.getSenderAddress #### Defined in -[baseTransaction.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L294) +[baseTransaction.ts:293](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L293) ___ @@ -457,7 +457,7 @@ BaseTransaction.getSenderPublicKey #### Defined in -[eip2930Transaction.ts:311](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L311) +[eip2930Transaction.ts:314](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L314) ___ @@ -477,7 +477,7 @@ BaseTransaction.getUpfrontCost #### Defined in -[eip2930Transaction.ts:202](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L202) +[eip2930Transaction.ts:205](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L205) ___ @@ -500,7 +500,7 @@ BaseTransaction.hash #### Defined in -[eip2930Transaction.ts:285](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L285) +[eip2930Transaction.ts:288](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L288) ___ @@ -518,7 +518,7 @@ BaseTransaction.isSigned #### Defined in -[baseTransaction.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L269) +[baseTransaction.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L268) ___ @@ -548,7 +548,7 @@ BaseTransaction.raw #### Defined in -[eip2930Transaction.ts:219](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L219) +[eip2930Transaction.ts:222](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L222) ___ @@ -575,7 +575,7 @@ BaseTransaction.serialize #### Defined in -[eip2930Transaction.ts:245](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L245) +[eip2930Transaction.ts:248](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L248) ___ @@ -607,7 +607,7 @@ BaseTransaction.sign #### Defined in -[baseTransaction.ts:312](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L312) +[baseTransaction.ts:311](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L311) ___ @@ -646,7 +646,7 @@ BaseTransaction.supports #### Defined in -[baseTransaction.ts:147](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L147) +[baseTransaction.ts:146](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L146) ___ @@ -666,7 +666,7 @@ BaseTransaction.toCreationAddress #### Defined in -[baseTransaction.ts:237](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L237) +[baseTransaction.ts:236](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L236) ___ @@ -686,7 +686,7 @@ BaseTransaction.toJSON #### Defined in -[eip2930Transaction.ts:359](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L359) +[eip2930Transaction.ts:362](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip2930Transaction.ts#L362) ___ @@ -707,7 +707,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L155) +[baseTransaction.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L154) ▸ **validate**(`stringError`): `boolean` @@ -727,7 +727,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L156) +[baseTransaction.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L155) ▸ **validate**(`stringError`): `string`[] @@ -747,7 +747,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:157](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L157) +[baseTransaction.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L156) ___ @@ -767,7 +767,7 @@ BaseTransaction.verifySignature #### Defined in -[baseTransaction.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L281) +[baseTransaction.ts:280](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L280) ___ diff --git a/packages/tx/docs/classes/FeeMarketEIP1559Transaction.md b/packages/tx/docs/classes/FeeMarketEIP1559Transaction.md index 32680443c0..8223c607a7 100644 --- a/packages/tx/docs/classes/FeeMarketEIP1559Transaction.md +++ b/packages/tx/docs/classes/FeeMarketEIP1559Transaction.md @@ -90,7 +90,7 @@ BaseTransaction<FeeMarketEIP1559Transaction\>.constructor #### Defined in -[eip1559Transaction.ts:148](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L148) +[eip1559Transaction.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L149) ## Properties @@ -148,7 +148,7 @@ BaseTransaction.data #### Defined in -[baseTransaction.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L52) +[baseTransaction.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L51) ___ @@ -162,7 +162,7 @@ BaseTransaction.gasLimit #### Defined in -[baseTransaction.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L49) +[baseTransaction.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L48) ___ @@ -196,7 +196,7 @@ BaseTransaction.nonce #### Defined in -[baseTransaction.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L48) +[baseTransaction.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L47) ___ @@ -210,7 +210,7 @@ BaseTransaction.r #### Defined in -[baseTransaction.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L55) +[baseTransaction.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L54) ___ @@ -224,7 +224,7 @@ BaseTransaction.s #### Defined in -[baseTransaction.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L56) +[baseTransaction.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L55) ___ @@ -238,7 +238,7 @@ BaseTransaction.to #### Defined in -[baseTransaction.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L50) +[baseTransaction.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L49) ___ @@ -252,7 +252,7 @@ BaseTransaction.v #### Defined in -[baseTransaction.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L54) +[baseTransaction.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L53) ___ @@ -266,7 +266,7 @@ BaseTransaction.value #### Defined in -[baseTransaction.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L51) +[baseTransaction.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L50) ## Accessors @@ -288,7 +288,7 @@ BaseTransaction.type #### Defined in -[baseTransaction.ts:127](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L127) +[baseTransaction.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L126) ## Methods @@ -314,7 +314,7 @@ BaseTransaction.\_processSignature #### Defined in -[eip1559Transaction.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L365) +[eip1559Transaction.ts:368](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L368) ___ @@ -334,7 +334,7 @@ BaseTransaction.errorStr #### Defined in -[eip1559Transaction.ts:412](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L412) +[eip1559Transaction.ts:415](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L415) ___ @@ -354,7 +354,7 @@ BaseTransaction.getBaseFee #### Defined in -[baseTransaction.ts:197](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L197) +[baseTransaction.ts:196](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L196) ___ @@ -374,7 +374,7 @@ BaseTransaction.getDataFee #### Defined in -[eip1559Transaction.ts:205](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L205) +[eip1559Transaction.ts:208](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L208) ___ @@ -408,7 +408,7 @@ BaseTransaction.getMessageToSign #### Defined in -[eip1559Transaction.ts:296](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L296) +[eip1559Transaction.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L299) ___ @@ -428,7 +428,7 @@ BaseTransaction.getMessageToVerifySignature #### Defined in -[eip1559Transaction.ts:334](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L334) +[eip1559Transaction.ts:337](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L337) ___ @@ -448,7 +448,7 @@ BaseTransaction.getSenderAddress #### Defined in -[baseTransaction.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L294) +[baseTransaction.ts:293](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L293) ___ @@ -468,7 +468,7 @@ BaseTransaction.getSenderPublicKey #### Defined in -[eip1559Transaction.ts:341](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L341) +[eip1559Transaction.ts:344](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L344) ___ @@ -494,7 +494,7 @@ BaseTransaction.getUpfrontCost #### Defined in -[eip1559Transaction.ts:227](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L227) +[eip1559Transaction.ts:230](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L230) ___ @@ -517,7 +517,7 @@ BaseTransaction.hash #### Defined in -[eip1559Transaction.ts:315](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L315) +[eip1559Transaction.ts:318](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L318) ___ @@ -535,7 +535,7 @@ BaseTransaction.isSigned #### Defined in -[baseTransaction.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L269) +[baseTransaction.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L268) ___ @@ -565,7 +565,7 @@ BaseTransaction.raw #### Defined in -[eip1559Transaction.ts:248](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L248) +[eip1559Transaction.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L251) ___ @@ -592,7 +592,7 @@ BaseTransaction.serialize #### Defined in -[eip1559Transaction.ts:275](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L275) +[eip1559Transaction.ts:278](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L278) ___ @@ -624,7 +624,7 @@ BaseTransaction.sign #### Defined in -[baseTransaction.ts:312](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L312) +[baseTransaction.ts:311](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L311) ___ @@ -663,7 +663,7 @@ BaseTransaction.supports #### Defined in -[baseTransaction.ts:147](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L147) +[baseTransaction.ts:146](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L146) ___ @@ -683,7 +683,7 @@ BaseTransaction.toCreationAddress #### Defined in -[baseTransaction.ts:237](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L237) +[baseTransaction.ts:236](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L236) ___ @@ -703,7 +703,7 @@ BaseTransaction.toJSON #### Defined in -[eip1559Transaction.ts:390](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L390) +[eip1559Transaction.ts:393](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/eip1559Transaction.ts#L393) ___ @@ -724,7 +724,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L155) +[baseTransaction.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L154) ▸ **validate**(`stringError`): `boolean` @@ -744,7 +744,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L156) +[baseTransaction.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L155) ▸ **validate**(`stringError`): `string`[] @@ -764,7 +764,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:157](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L157) +[baseTransaction.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L156) ___ @@ -784,7 +784,7 @@ BaseTransaction.verifySignature #### Defined in -[baseTransaction.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L281) +[baseTransaction.ts:280](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L280) ___ diff --git a/packages/tx/docs/classes/Transaction.md b/packages/tx/docs/classes/Transaction.md index 522a247ae2..4ff42c88a0 100644 --- a/packages/tx/docs/classes/Transaction.md +++ b/packages/tx/docs/classes/Transaction.md @@ -110,7 +110,7 @@ BaseTransaction.data #### Defined in -[baseTransaction.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L52) +[baseTransaction.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L51) ___ @@ -124,7 +124,7 @@ BaseTransaction.gasLimit #### Defined in -[baseTransaction.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L49) +[baseTransaction.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L48) ___ @@ -148,7 +148,7 @@ BaseTransaction.nonce #### Defined in -[baseTransaction.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L48) +[baseTransaction.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L47) ___ @@ -162,7 +162,7 @@ BaseTransaction.r #### Defined in -[baseTransaction.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L55) +[baseTransaction.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L54) ___ @@ -176,7 +176,7 @@ BaseTransaction.s #### Defined in -[baseTransaction.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L56) +[baseTransaction.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L55) ___ @@ -190,7 +190,7 @@ BaseTransaction.to #### Defined in -[baseTransaction.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L50) +[baseTransaction.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L49) ___ @@ -204,7 +204,7 @@ BaseTransaction.v #### Defined in -[baseTransaction.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L54) +[baseTransaction.ts:53](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L53) ___ @@ -218,7 +218,7 @@ BaseTransaction.value #### Defined in -[baseTransaction.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L51) +[baseTransaction.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L50) ## Accessors @@ -240,7 +240,7 @@ BaseTransaction.type #### Defined in -[baseTransaction.ts:127](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L127) +[baseTransaction.ts:126](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L126) ## Methods @@ -260,7 +260,7 @@ BaseTransaction.errorStr #### Defined in -[legacyTransaction.ts:407](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L407) +[legacyTransaction.ts:408](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L408) ___ @@ -280,7 +280,7 @@ BaseTransaction.getBaseFee #### Defined in -[baseTransaction.ts:197](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L197) +[baseTransaction.ts:196](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L196) ___ @@ -300,7 +300,7 @@ BaseTransaction.getDataFee #### Defined in -[legacyTransaction.ts:235](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L235) +[legacyTransaction.ts:236](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L236) ___ @@ -337,7 +337,7 @@ BaseTransaction.getMessageToSign #### Defined in -[legacyTransaction.ts:221](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L221) +[legacyTransaction.ts:222](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L222) ▸ **getMessageToSign**(`hashMessage?`): `Buffer` @@ -357,7 +357,7 @@ BaseTransaction.getMessageToSign #### Defined in -[legacyTransaction.ts:222](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L222) +[legacyTransaction.ts:223](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L223) ___ @@ -377,7 +377,7 @@ BaseTransaction.getMessageToVerifySignature #### Defined in -[legacyTransaction.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L282) +[legacyTransaction.ts:283](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L283) ___ @@ -397,7 +397,7 @@ BaseTransaction.getSenderAddress #### Defined in -[baseTransaction.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L294) +[baseTransaction.ts:293](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L293) ___ @@ -417,7 +417,7 @@ BaseTransaction.getSenderPublicKey #### Defined in -[legacyTransaction.ts:294](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L294) +[legacyTransaction.ts:295](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L295) ___ @@ -437,7 +437,7 @@ BaseTransaction.getUpfrontCost #### Defined in -[legacyTransaction.ts:253](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L253) +[legacyTransaction.ts:254](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L254) ___ @@ -460,7 +460,7 @@ BaseTransaction.hash #### Defined in -[legacyTransaction.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L263) +[legacyTransaction.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L264) ___ @@ -478,7 +478,7 @@ BaseTransaction.isSigned #### Defined in -[baseTransaction.ts:269](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L269) +[baseTransaction.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L268) ___ @@ -508,7 +508,7 @@ BaseTransaction.raw #### Defined in -[legacyTransaction.ts:159](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L159) +[legacyTransaction.ts:160](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L160) ___ @@ -534,7 +534,7 @@ BaseTransaction.serialize #### Defined in -[legacyTransaction.ts:182](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L182) +[legacyTransaction.ts:183](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L183) ___ @@ -566,7 +566,7 @@ BaseTransaction.sign #### Defined in -[baseTransaction.ts:312](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L312) +[baseTransaction.ts:311](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L311) ___ @@ -605,7 +605,7 @@ BaseTransaction.supports #### Defined in -[baseTransaction.ts:147](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L147) +[baseTransaction.ts:146](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L146) ___ @@ -625,7 +625,7 @@ BaseTransaction.toCreationAddress #### Defined in -[baseTransaction.ts:237](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L237) +[baseTransaction.ts:236](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L236) ___ @@ -645,7 +645,7 @@ BaseTransaction.toJSON #### Defined in -[legacyTransaction.ts:344](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L344) +[legacyTransaction.ts:345](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/legacyTransaction.ts#L345) ___ @@ -666,7 +666,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L155) +[baseTransaction.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L154) ▸ **validate**(`stringError`): `boolean` @@ -686,7 +686,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L156) +[baseTransaction.ts:155](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L155) ▸ **validate**(`stringError`): `string`[] @@ -706,7 +706,7 @@ BaseTransaction.validate #### Defined in -[baseTransaction.ts:157](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L157) +[baseTransaction.ts:156](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L156) ___ @@ -726,7 +726,7 @@ BaseTransaction.verifySignature #### Defined in -[baseTransaction.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L281) +[baseTransaction.ts:280](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/baseTransaction.ts#L280) ___ diff --git a/packages/tx/docs/classes/TransactionFactory.md b/packages/tx/docs/classes/TransactionFactory.md index 5d4b1406c2..525f96b56c 100644 --- a/packages/tx/docs/classes/TransactionFactory.md +++ b/packages/tx/docs/classes/TransactionFactory.md @@ -7,6 +7,7 @@ ### Methods - [fromBlockBodyData](TransactionFactory.md#fromblockbodydata) +- [fromEthersProvider](TransactionFactory.md#fromethersprovider) - [fromSerializedData](TransactionFactory.md#fromserializeddata) - [fromTxData](TransactionFactory.md#fromtxdata) @@ -34,7 +35,33 @@ This method returns the right transaction. #### Defined in -[transactionFactory.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L86) +[transactionFactory.ts:88](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L88) + +___ + +### fromEthersProvider + +▸ `Static` **fromEthersProvider**(`provider`, `txHash`, `txOptions?`): `Promise`<[`TypedTransaction`](../README.md#typedtransaction)\> + +Method to retrieve a transaction from the provider + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `provider` | `string` \| `JsonRpcProvider` | An Ethers JsonRPCProvider | +| `txHash` | `string` | Transaction hash | +| `txOptions?` | [`TxOptions`](../interfaces/TxOptions.md) | The transaction options | + +#### Returns + +`Promise`<[`TypedTransaction`](../README.md#typedtransaction)\> + +the transaction specified by `txHash` + +#### Defined in + +[transactionFactory.ts:106](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L106) ___ @@ -57,7 +84,7 @@ This method tries to decode serialized data. #### Defined in -[transactionFactory.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L52) +[transactionFactory.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L54) ___ @@ -80,4 +107,4 @@ Create a transaction from a `txData` object #### Defined in -[transactionFactory.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L25) +[transactionFactory.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/transactionFactory.ts#L27) diff --git a/packages/tx/docs/enums/Capability.md b/packages/tx/docs/enums/Capability.md index 17799717bb..02ec3c8a5c 100644 --- a/packages/tx/docs/enums/Capability.md +++ b/packages/tx/docs/enums/Capability.md @@ -20,7 +20,7 @@ to query on tx capabilities • **EIP1559FeeMarket** = ``1559`` -Tx supports EIP-1559 gas fee market mechansim +Tx supports EIP-1559 gas fee market mechanism See: [1559](https://eips.ethereum.org/EIPS/eip-1559) Fee Market EIP #### Defined in diff --git a/packages/tx/docs/interfaces/JsonRpcTx.md b/packages/tx/docs/interfaces/JsonRpcTx.md new file mode 100644 index 0000000000..aa053de216 --- /dev/null +++ b/packages/tx/docs/interfaces/JsonRpcTx.md @@ -0,0 +1,217 @@ +[@ethereumjs/tx](../README.md) / JsonRpcTx + +# Interface: JsonRpcTx + +## Table of contents + +### Properties + +- [accessList](JsonRpcTx.md#accesslist) +- [blockHash](JsonRpcTx.md#blockhash) +- [blockNumber](JsonRpcTx.md#blocknumber) +- [chainId](JsonRpcTx.md#chainid) +- [from](JsonRpcTx.md#from) +- [gas](JsonRpcTx.md#gas) +- [gasPrice](JsonRpcTx.md#gasprice) +- [hash](JsonRpcTx.md#hash) +- [input](JsonRpcTx.md#input) +- [maxFeePerGas](JsonRpcTx.md#maxfeepergas) +- [maxPriorityFeePerGas](JsonRpcTx.md#maxpriorityfeepergas) +- [nonce](JsonRpcTx.md#nonce) +- [r](JsonRpcTx.md#r) +- [s](JsonRpcTx.md#s) +- [to](JsonRpcTx.md#to) +- [transactionIndex](JsonRpcTx.md#transactionindex) +- [type](JsonRpcTx.md#type) +- [v](JsonRpcTx.md#v) +- [value](JsonRpcTx.md#value) + +## Properties + +### accessList + +• `Optional` **accessList**: `JsonAccessListItem`[] + +#### Defined in + +[types.ts:279](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L279) + +___ + +### blockHash + +• **blockHash**: ``null`` \| `string` + +#### Defined in + +[types.ts:271](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L271) + +___ + +### blockNumber + +• **blockNumber**: ``null`` \| `string` + +#### Defined in + +[types.ts:272](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L272) + +___ + +### chainId + +• `Optional` **chainId**: `string` + +#### Defined in + +[types.ts:280](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L280) + +___ + +### from + +• **from**: `string` + +#### Defined in + +[types.ts:273](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L273) + +___ + +### gas + +• **gas**: `string` + +#### Defined in + +[types.ts:274](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L274) + +___ + +### gasPrice + +• **gasPrice**: `string` + +#### Defined in + +[types.ts:275](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L275) + +___ + +### hash + +• **hash**: `string` + +#### Defined in + +[types.ts:281](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L281) + +___ + +### input + +• **input**: `string` + +#### Defined in + +[types.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L282) + +___ + +### maxFeePerGas + +• `Optional` **maxFeePerGas**: `string` + +#### Defined in + +[types.ts:276](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L276) + +___ + +### maxPriorityFeePerGas + +• `Optional` **maxPriorityFeePerGas**: `string` + +#### Defined in + +[types.ts:277](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L277) + +___ + +### nonce + +• **nonce**: `string` + +#### Defined in + +[types.ts:283](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L283) + +___ + +### r + +• **r**: `string` + +#### Defined in + +[types.ts:288](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L288) + +___ + +### s + +• **s**: `string` + +#### Defined in + +[types.ts:289](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L289) + +___ + +### to + +• **to**: ``null`` \| `string` + +#### Defined in + +[types.ts:284](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L284) + +___ + +### transactionIndex + +• **transactionIndex**: ``null`` \| `string` + +#### Defined in + +[types.ts:285](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L285) + +___ + +### type + +• **type**: `string` + +#### Defined in + +[types.ts:278](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L278) + +___ + +### v + +• **v**: `string` + +#### Defined in + +[types.ts:287](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L287) + +___ + +### value + +• **value**: `string` + +#### Defined in + +[types.ts:286](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/types.ts#L286) diff --git a/packages/tx/package.json b/packages/tx/package.json index f0209fec4b..47db161945 100644 --- a/packages/tx/package.json +++ b/packages/tx/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/tx", - "version": "4.0.1", + "version": "4.0.2", "description": "A simple module for creating, manipulating and signing Ethereum transactions", "keywords": [ "ethereum", @@ -51,9 +51,9 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/common": "^3.0.1", + "@ethereumjs/common": "^3.0.2", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/util": "^8.0.3", "ethereum-cryptography": "^1.1.2", "ethers": "^5.7.1" }, diff --git a/packages/util/CHANGELOG.md b/packages/util/CHANGELOG.md index baf267e19c..004bd19b63 100644 --- a/packages/util/CHANGELOG.md +++ b/packages/util/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 8.0.3 - 2022-12-09 + +- New `withdrawal` module exposing an `EIP-4895` `Withdrawal`-representing class and other withdrawal helpers (input type, JSON RPC interface), PR [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401) + ## 8.0.2 - 2022-10-21 - Added internalized and reexported modernized version of the [async-eventemitter](https://www.google.com/search?client=firefox-b-d&q=async-eventemitter+github) library, PR [#2376](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2376) diff --git a/packages/util/docs/README.md b/packages/util/docs/README.md index c10602ec25..dd1e5e5c55 100644 --- a/packages/util/docs/README.md +++ b/packages/util/docs/README.md @@ -12,11 +12,16 @@ - [Account](classes/Account.md) - [Address](classes/Address.md) +- [AsyncEventEmitter](classes/AsyncEventEmitter.md) +- [Lock](classes/Lock.md) +- [Withdrawal](classes/Withdrawal.md) ### Interfaces - [AccountData](interfaces/AccountData.md) - [ECDSASignature](interfaces/ECDSASignature.md) +- [EventMap](interfaces/EventMap.md) +- [JsonRpcWithdrawal](interfaces/JsonRpcWithdrawal.md) - [TransformableToArray](interfaces/TransformableToArray.md) - [TransformableToBuffer](interfaces/TransformableToBuffer.md) @@ -31,6 +36,8 @@ - [PrefixedHexString](README.md#prefixedhexstring) - [ToBufferInputTypes](README.md#tobufferinputtypes) - [TypeOutputReturnType](README.md#typeoutputreturntype) +- [WithdrawalBuffer](README.md#withdrawalbuffer) +- [WithdrawalData](README.md#withdrawaldata) ### Variables @@ -78,6 +85,7 @@ - [importPublic](README.md#importpublic) - [intToBuffer](README.md#inttobuffer) - [intToHex](README.md#inttohex) +- [intToUnpaddedBuffer](README.md#inttounpaddedbuffer) - [isHexPrefixed](README.md#ishexprefixed) - [isHexString](README.md#ishexstring) - [isValidAddress](README.md#isvalidaddress) @@ -118,7 +126,7 @@ #### Defined in -[account.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L30) +[packages/util/src/account.ts:30](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L30) ___ @@ -130,7 +138,7 @@ A type that represents an input that can be converted to an Address. #### Defined in -[types.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L32) +[packages/util/src/types.ts:32](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L32) ___ @@ -140,7 +148,7 @@ ___ #### Defined in -[types.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L10) +[packages/util/src/types.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L10) ___ @@ -150,7 +158,7 @@ ___ #### Defined in -[types.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L15) +[packages/util/src/types.ts:15](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L15) ___ @@ -160,7 +168,7 @@ ___ #### Defined in -[types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L51) +[packages/util/src/types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L51) ___ @@ -170,7 +178,7 @@ ___ #### Defined in -[types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L50) +[packages/util/src/types.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L50) ___ @@ -180,7 +188,7 @@ ___ #### Defined in -[types.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L27) +[packages/util/src/types.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L27) ___ @@ -190,7 +198,7 @@ ___ #### Defined in -[bytes.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L136) +[packages/util/src/bytes.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L136) ___ @@ -209,7 +217,38 @@ ___ #### Defined in -[types.ts:63](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L63) +[packages/util/src/types.ts:63](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L63) + +___ + +### WithdrawalBuffer + +Ƭ **WithdrawalBuffer**: [`Buffer`, `Buffer`, `Buffer`, `Buffer`] + +#### Defined in + +[packages/util/src/withdrawal.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L27) + +___ + +### WithdrawalData + +Ƭ **WithdrawalData**: `Object` + +Flexible input data type for EIP-4895 withdrawal data + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `address` | [`AddressLike`](README.md#addresslike) | +| `amount` | [`BigIntLike`](README.md#bigintlike) | +| `index` | [`BigIntLike`](README.md#bigintlike) | +| `validatorIndex` | [`BigIntLike`](README.md#bigintlike) | + +#### Defined in + +[packages/util/src/withdrawal.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L10) ## Variables @@ -221,7 +260,7 @@ Keccak-256 hash of null #### Defined in -[constants.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L39) +[packages/util/src/constants.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L39) ___ @@ -233,7 +272,7 @@ Keccak-256 hash of null #### Defined in -[constants.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L34) +[packages/util/src/constants.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L34) ___ @@ -245,7 +284,7 @@ Keccak-256 hash of the RLP of null #### Defined in -[constants.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L60) +[packages/util/src/constants.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L60) ___ @@ -257,7 +296,7 @@ Keccak-256 of an RLP of an empty array #### Defined in -[constants.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L50) +[packages/util/src/constants.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L50) ___ @@ -269,7 +308,7 @@ Keccak-256 of an RLP of an empty array #### Defined in -[constants.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L44) +[packages/util/src/constants.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L44) ___ @@ -281,7 +320,7 @@ Keccak-256 hash of the RLP of null #### Defined in -[constants.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L55) +[packages/util/src/constants.ts:55](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L55) ___ @@ -293,7 +332,7 @@ The max integer that the evm can handle (2^256-1) #### Defined in -[constants.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L12) +[packages/util/src/constants.ts:12](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L12) ___ @@ -305,7 +344,7 @@ The max integer that the evm can handle (2^256-1) as a bigint #### Defined in -[constants.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L19) +[packages/util/src/constants.ts:19](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L19) ___ @@ -317,7 +356,7 @@ ___ #### Defined in -[constants.ts:7](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L7) +[packages/util/src/constants.ts:7](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L7) ___ @@ -329,7 +368,7 @@ RLP encoded empty string #### Defined in -[constants.ts:65](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L65) +[packages/util/src/constants.ts:65](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L65) ___ @@ -339,7 +378,7 @@ ___ #### Defined in -[constants.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L21) +[packages/util/src/constants.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L21) ___ @@ -349,7 +388,7 @@ ___ #### Defined in -[constants.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L22) +[packages/util/src/constants.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L22) ___ @@ -361,7 +400,7 @@ ___ #### Defined in -[constants.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L27) +[packages/util/src/constants.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/constants.ts#L27) ## Functions @@ -381,7 +420,7 @@ ___ #### Defined in -[account.ts:347](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L347) +[packages/util/src/account.ts:347](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L347) ___ @@ -404,7 +443,7 @@ Converts a slim account RLP to a normal account RLP #### Defined in -[account.ts:371](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L371) +[packages/util/src/account.ts:371](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L371) ___ @@ -424,7 +463,7 @@ ___ #### Defined in -[account.ts:358](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L358) +[packages/util/src/account.ts:358](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L358) ___ @@ -446,7 +485,7 @@ Adds "0x" to a given `String` if it does not already start with "0x". #### Defined in -[bytes.ts:258](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L258) +[packages/util/src/bytes.ts:258](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L258) ___ @@ -468,7 +507,7 @@ Converts a Uint8Array or [NestedUint8Array](README.md#nesteduint8array) to Buffe #### Defined in -[bytes.ts:351](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L351) +[packages/util/src/bytes.ts:351](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L351) ▸ **arrToBufArr**(`arr`): [`NestedBufferArray`](README.md#nestedbufferarray) @@ -484,7 +523,7 @@ Converts a Uint8Array or [NestedUint8Array](README.md#nesteduint8array) to Buffe #### Defined in -[bytes.ts:352](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L352) +[packages/util/src/bytes.ts:352](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L352) ▸ **arrToBufArr**(`arr`): `Buffer` \| [`NestedBufferArray`](README.md#nestedbufferarray) @@ -500,7 +539,7 @@ Converts a Uint8Array or [NestedUint8Array](README.md#nesteduint8array) to Buffe #### Defined in -[bytes.ts:353](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L353) +[packages/util/src/bytes.ts:353](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L353) ___ @@ -525,7 +564,7 @@ from the second one. FALSE otherwise. #### Defined in -[internal.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L89) +[packages/util/src/internal.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L89) ___ @@ -549,7 +588,7 @@ Converts a `Buffer` or `Array` to JSON. #### Defined in -[bytes.ts:315](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L315) +[packages/util/src/bytes.ts:315](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L315) ___ @@ -571,7 +610,7 @@ Converts a bigint to a Buffer #### Defined in -[bytes.ts:224](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L224) +[packages/util/src/bytes.ts:224](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L224) ___ @@ -593,7 +632,7 @@ Converts a bigint to a `0x` prefixed hex string #### Defined in -[bytes.ts:377](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L377) +[packages/util/src/bytes.ts:377](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L377) ___ @@ -616,7 +655,7 @@ Convert value from bigint to an unpadded Buffer #### Defined in -[bytes.ts:386](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L386) +[packages/util/src/bytes.ts:386](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L386) ___ @@ -638,7 +677,7 @@ Converts a Buffer or [NestedBufferArray](README.md#nestedbufferarray) to Uint8Ar #### Defined in -[bytes.ts:364](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L364) +[packages/util/src/bytes.ts:364](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L364) ▸ **bufArrToArr**(`arr`): [`NestedUint8Array`](README.md#nesteduint8array) @@ -654,7 +693,7 @@ Converts a Buffer or [NestedBufferArray](README.md#nestedbufferarray) to Uint8Ar #### Defined in -[bytes.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L365) +[packages/util/src/bytes.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L365) ▸ **bufArrToArr**(`arr`): `Uint8Array` \| [`NestedUint8Array`](README.md#nesteduint8array) @@ -670,7 +709,7 @@ Converts a Buffer or [NestedBufferArray](README.md#nestedbufferarray) to Uint8Ar #### Defined in -[bytes.ts:366](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L366) +[packages/util/src/bytes.ts:366](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L366) ___ @@ -692,7 +731,7 @@ Converts a Buffer to a bigint #### Defined in -[bytes.ts:213](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L213) +[packages/util/src/bytes.ts:213](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L213) ___ @@ -714,7 +753,7 @@ Converts a `Buffer` into a `0x`-prefixed hex `String`. #### Defined in -[bytes.ts:205](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L205) +[packages/util/src/bytes.ts:205](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L205) ___ @@ -740,7 +779,7 @@ If the input number exceeds 53 bits. #### Defined in -[bytes.ts:233](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L233) +[packages/util/src/bytes.ts:233](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L233) ___ @@ -769,7 +808,7 @@ Recovered public key #### Defined in -[signature.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L52) +[packages/util/src/signature.ts:52](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L52) ___ @@ -796,7 +835,7 @@ accordingly, otherwise return a "static" `v` just derived from the `recovery` bi #### Defined in -[signature.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L20) +[packages/util/src/signature.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L20) ___ @@ -820,7 +859,7 @@ hex representation of input string #### Defined in -[internal.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L149) +[packages/util/src/internal.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L149) ___ @@ -847,7 +886,7 @@ it's a signed message (EIP-191 or EIP-712) adding `27` at the end. Remove if nee #### Defined in -[signature.ts:112](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L112) +[packages/util/src/signature.ts:112](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L112) ___ @@ -869,7 +908,7 @@ Interprets a `Buffer` as a signed integer and returns a `BigInt`. Assumes 256-bi #### Defined in -[bytes.ts:243](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L243) +[packages/util/src/bytes.ts:243](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L243) ___ @@ -893,7 +932,7 @@ hex representation of input string #### Defined in -[internal.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L136) +[packages/util/src/internal.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L136) ___ @@ -916,7 +955,7 @@ Generates an address of a newly created contract. #### Defined in -[account.ts:199](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L199) +[packages/util/src/account.ts:199](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L199) ___ @@ -940,7 +979,7 @@ Generates an address for a contract created using CREATE2. #### Defined in -[account.ts:219](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L219) +[packages/util/src/account.ts:219](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L219) ___ @@ -964,7 +1003,7 @@ the number of bytes contained within the string #### Defined in -[internal.ts:73](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L73) +[packages/util/src/internal.ts:73](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L73) ___ @@ -998,7 +1037,7 @@ getKeys([{a: '1', b: '2'}, {a: '3', b: '4'}], 'a') => ['1', '3'] #### Defined in -[internal.ts:171](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L171) +[packages/util/src/internal.ts:171](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L171) ___ @@ -1023,7 +1062,7 @@ used to produce the signature. #### Defined in -[signature.ts:189](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L189) +[packages/util/src/signature.ts:189](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L189) ___ @@ -1045,7 +1084,7 @@ Converts a public key to the Ethereum format. #### Defined in -[account.ts:316](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L316) +[packages/util/src/account.ts:316](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L316) ___ @@ -1067,7 +1106,7 @@ Converts an `Number` to a `Buffer` #### Defined in -[bytes.ts:29](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L29) +[packages/util/src/bytes.ts:29](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L29) ___ @@ -1089,7 +1128,27 @@ Converts a `Number` into a hex `String` #### Defined in -[bytes.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L17) +[packages/util/src/bytes.ts:17](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L17) + +___ + +### intToUnpaddedBuffer + +▸ **intToUnpaddedBuffer**(`value`): `Buffer` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `number` | + +#### Returns + +`Buffer` + +#### Defined in + +[packages/util/src/bytes.ts:390](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L390) ___ @@ -1117,7 +1176,7 @@ a boolean if it is or is not hex prefixed #### Defined in -[internal.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L31) +[packages/util/src/internal.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L31) ___ @@ -1142,7 +1201,7 @@ output the string is a hex string #### Defined in -[internal.ts:203](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L203) +[packages/util/src/internal.ts:203](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L203) ___ @@ -1164,7 +1223,7 @@ Checks if the address is a valid. Accepts checksummed addresses too. #### Defined in -[account.ts:132](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L132) +[packages/util/src/account.ts:132](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L132) ___ @@ -1189,7 +1248,7 @@ See toChecksumAddress' documentation for details about the eip1191ChainId parame #### Defined in -[account.ts:187](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L187) +[packages/util/src/account.ts:187](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L187) ___ @@ -1211,7 +1270,7 @@ Checks if the private key satisfies the rules of the curve secp256k1. #### Defined in -[account.ts:241](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L241) +[packages/util/src/account.ts:241](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L241) ___ @@ -1235,7 +1294,7 @@ and the requirements of Ethereum. #### Defined in -[account.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L251) +[packages/util/src/account.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L251) ___ @@ -1262,7 +1321,7 @@ NOTE: Accepts `v === 0 | v === 1` for EIP1559 transactions #### Defined in -[signature.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L149) +[packages/util/src/signature.ts:149](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L149) ___ @@ -1284,7 +1343,7 @@ Checks if a given address is the zero address. #### Defined in -[account.ts:336](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L336) +[packages/util/src/account.ts:336](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L336) ___ @@ -1308,7 +1367,7 @@ output #### Defined in -[internal.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L56) +[packages/util/src/internal.ts:56](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L56) ___ @@ -1330,7 +1389,7 @@ Returns the ethereum address of a given private key. #### Defined in -[account.ts:309](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L309) +[packages/util/src/account.ts:309](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L309) ___ @@ -1352,7 +1411,7 @@ Returns the ethereum public key of a given private key. #### Defined in -[account.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L299) +[packages/util/src/account.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L299) ___ @@ -1376,7 +1435,7 @@ Accepts "Ethereum public keys" and SEC1 encoded keys. #### Defined in -[account.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L282) +[packages/util/src/account.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L282) ___ @@ -1400,7 +1459,7 @@ Accepts "Ethereum public keys" and SEC1 encoded keys. #### Defined in -[account.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L282) +[packages/util/src/account.ts:282](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L282) ___ @@ -1426,7 +1485,7 @@ Or it truncates the beginning if it exceeds. #### Defined in -[bytes.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L74) +[packages/util/src/bytes.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L74) ___ @@ -1452,7 +1511,7 @@ it truncates the end if it exceeds. #### Defined in -[bytes.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L86) +[packages/util/src/bytes.ts:86](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L86) ___ @@ -1480,7 +1539,7 @@ Output: '657468657265756d0000000000000000000000000000000000…' #### Defined in -[bytes.ts:274](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L274) +[packages/util/src/bytes.ts:274](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L274) ___ @@ -1504,7 +1563,7 @@ the string without 0x prefix #### Defined in -[internal.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L44) +[packages/util/src/internal.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L44) ___ @@ -1528,7 +1587,7 @@ ascii string representation of hex value #### Defined in -[internal.ts:114](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L114) +[packages/util/src/internal.ts:114](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/internal.ts#L114) ___ @@ -1552,7 +1611,7 @@ with a `toArray()` or `toBuffer()` method. #### Defined in -[bytes.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L154) +[packages/util/src/bytes.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L154) ___ @@ -1584,7 +1643,7 @@ Usage of this EIP is therefore discouraged unless you have a very targeted use c #### Defined in -[account.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L154) +[packages/util/src/account.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L154) ___ @@ -1612,7 +1671,7 @@ Signature #### Defined in -[signature.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L89) +[packages/util/src/signature.ts:89](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L89) ___ @@ -1640,7 +1699,7 @@ Signature #### Defined in -[signature.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L74) +[packages/util/src/signature.ts:74](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L74) ___ @@ -1670,7 +1729,7 @@ Input of null/undefined returns null/undefined regardless of the output type. #### Defined in -[types.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L76) +[packages/util/src/types.ts:76](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L76) ▸ **toType**<`T`\>(`input`, `outputType`): `undefined` @@ -1693,7 +1752,7 @@ Input of null/undefined returns null/undefined regardless of the output type. #### Defined in -[types.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L77) +[packages/util/src/types.ts:77](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L77) ▸ **toType**<`T`\>(`input`, `outputType`): [`TypeOutputReturnType`](README.md#typeoutputreturntype)[`T`] @@ -1716,7 +1775,7 @@ Input of null/undefined returns null/undefined regardless of the output type. #### Defined in -[types.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L78) +[packages/util/src/types.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L78) ___ @@ -1738,7 +1797,7 @@ Converts a `BigInt` to an unsigned integer and returns it as a `Buffer`. Assumes #### Defined in -[bytes.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L251) +[packages/util/src/bytes.ts:251](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L251) ___ @@ -1773,7 +1832,7 @@ Utf8 string #### Defined in -[bytes.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L299) +[packages/util/src/bytes.ts:299](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L299) ___ @@ -1797,7 +1856,7 @@ Trims leading zeros from an `Array` (of numbers). #### Defined in -[bytes.ts:120](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L120) +[packages/util/src/bytes.ts:120](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L120) ___ @@ -1821,7 +1880,7 @@ Trims leading zeros from a `Buffer`. #### Defined in -[bytes.ts:110](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L110) +[packages/util/src/bytes.ts:110](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L110) ___ @@ -1845,7 +1904,7 @@ Trims leading zeros from a hex-prefixed `String`. #### Defined in -[bytes.ts:130](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L130) +[packages/util/src/bytes.ts:130](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L130) ___ @@ -1879,7 +1938,7 @@ if any provided value is found to have leading zero bytes #### Defined in -[bytes.ts:340](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L340) +[packages/util/src/bytes.ts:340](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L340) ___ @@ -1895,7 +1954,7 @@ Returns the zero address. #### Defined in -[account.ts:327](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L327) +[packages/util/src/account.ts:327](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L327) ___ @@ -1917,4 +1976,4 @@ Returns a buffer filled with 0s. #### Defined in -[bytes.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L38) +[packages/util/src/bytes.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/bytes.ts#L38) diff --git a/packages/util/docs/classes/Account.md b/packages/util/docs/classes/Account.md index f5dc1e6585..f7dda72ccf 100644 --- a/packages/util/docs/classes/Account.md +++ b/packages/util/docs/classes/Account.md @@ -45,7 +45,7 @@ Use the static factory methods to assist in creating an Account from varying dat #### Defined in -[account.ts:69](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L69) +[packages/util/src/account.ts:69](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L69) ## Properties @@ -55,7 +55,7 @@ Use the static factory methods to assist in creating an Account from varying dat #### Defined in -[account.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L34) +[packages/util/src/account.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L34) ___ @@ -65,7 +65,7 @@ ___ #### Defined in -[account.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L36) +[packages/util/src/account.ts:36](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L36) ___ @@ -75,7 +75,7 @@ ___ #### Defined in -[account.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L33) +[packages/util/src/account.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L33) ___ @@ -85,7 +85,7 @@ ___ #### Defined in -[account.ts:35](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L35) +[packages/util/src/account.ts:35](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L35) ## Methods @@ -101,7 +101,7 @@ Returns a `Boolean` determining if the account is a contract. #### Defined in -[account.ts:115](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L115) +[packages/util/src/account.ts:115](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L115) ___ @@ -119,7 +119,7 @@ account emptiness in [EIP-161](https://eips.ethereum.org/EIPS/eip-161): #### Defined in -[account.ts:124](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L124) +[packages/util/src/account.ts:124](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L124) ___ @@ -135,7 +135,7 @@ Returns a Buffer Array of the raw Buffers for the account, in order. #### Defined in -[account.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L96) +[packages/util/src/account.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L96) ___ @@ -151,7 +151,7 @@ Returns the RLP serialization of the account as a `Buffer`. #### Defined in -[account.ts:108](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L108) +[packages/util/src/account.ts:108](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L108) ___ @@ -171,7 +171,7 @@ ___ #### Defined in -[account.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L38) +[packages/util/src/account.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L38) ___ @@ -191,7 +191,7 @@ ___ #### Defined in -[account.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L49) +[packages/util/src/account.ts:49](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L49) ___ @@ -211,4 +211,4 @@ ___ #### Defined in -[account.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L59) +[packages/util/src/account.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L59) diff --git a/packages/util/docs/classes/Address.md b/packages/util/docs/classes/Address.md index d2890a7630..d9363d9dc0 100644 --- a/packages/util/docs/classes/Address.md +++ b/packages/util/docs/classes/Address.md @@ -2,6 +2,8 @@ # Class: Address +Handling and generating Ethereum addresses + ## Table of contents ### Constructors @@ -40,7 +42,7 @@ #### Defined in -[address.ts:13](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L13) +[packages/util/src/address.ts:16](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L16) ## Properties @@ -50,7 +52,7 @@ #### Defined in -[address.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L11) +[packages/util/src/address.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L14) ## Methods @@ -72,7 +74,7 @@ Is address equal to another. #### Defined in -[address.ts:93](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L93) +[packages/util/src/address.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L96) ___ @@ -89,7 +91,7 @@ by EIP-1352 #### Defined in -[address.ts:108](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L108) +[packages/util/src/address.ts:111](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L111) ___ @@ -105,7 +107,7 @@ Is address zero. #### Defined in -[address.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L100) +[packages/util/src/address.ts:103](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L103) ___ @@ -121,7 +123,7 @@ Returns Buffer representation of address. #### Defined in -[address.ts:125](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L125) +[packages/util/src/address.ts:128](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L128) ___ @@ -137,7 +139,7 @@ Returns hex encoding of address. #### Defined in -[address.ts:118](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L118) +[packages/util/src/address.ts:121](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L121) ___ @@ -159,7 +161,7 @@ Returns an address for a given private key. #### Defined in -[address.ts:54](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L54) +[packages/util/src/address.ts:57](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L57) ___ @@ -181,7 +183,7 @@ Returns an address for a given public key. #### Defined in -[address.ts:42](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L42) +[packages/util/src/address.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L45) ___ @@ -203,7 +205,7 @@ Returns an Address object from a hex-encoded string. #### Defined in -[address.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L31) +[packages/util/src/address.ts:34](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L34) ___ @@ -226,7 +228,7 @@ Generates an address for a newly created contract. #### Defined in -[address.ts:67](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L67) +[packages/util/src/address.ts:70](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L70) ___ @@ -250,7 +252,7 @@ Generates an address for a contract created using CREATE2. #### Defined in -[address.ts:80](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L80) +[packages/util/src/address.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L83) ___ @@ -266,4 +268,4 @@ Returns the zero address. #### Defined in -[address.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L23) +[packages/util/src/address.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/address.ts#L26) diff --git a/packages/util/docs/classes/AsyncEventEmitter.md b/packages/util/docs/classes/AsyncEventEmitter.md new file mode 100644 index 0000000000..01e9bc2c32 --- /dev/null +++ b/packages/util/docs/classes/AsyncEventEmitter.md @@ -0,0 +1,1027 @@ +[@ethereumjs/util](../README.md) / AsyncEventEmitter + +# Class: AsyncEventEmitter + +## Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends [`EventMap`](../interfaces/EventMap.md) | + +## Hierarchy + +- `EventEmitter` + + ↳ **`AsyncEventEmitter`** + +## Table of contents + +### Constructors + +- [constructor](AsyncEventEmitter.md#constructor) + +### Properties + +- [captureRejectionSymbol](AsyncEventEmitter.md#capturerejectionsymbol) +- [captureRejections](AsyncEventEmitter.md#capturerejections) +- [defaultMaxListeners](AsyncEventEmitter.md#defaultmaxlisteners) +- [errorMonitor](AsyncEventEmitter.md#errormonitor) + +### Methods + +- [addListener](AsyncEventEmitter.md#addlistener) +- [after](AsyncEventEmitter.md#after) +- [before](AsyncEventEmitter.md#before) +- [emit](AsyncEventEmitter.md#emit) +- [eventNames](AsyncEventEmitter.md#eventnames) +- [first](AsyncEventEmitter.md#first) +- [getMaxListeners](AsyncEventEmitter.md#getmaxlisteners) +- [listenerCount](AsyncEventEmitter.md#listenercount) +- [listeners](AsyncEventEmitter.md#listeners) +- [off](AsyncEventEmitter.md#off) +- [on](AsyncEventEmitter.md#on) +- [once](AsyncEventEmitter.md#once) +- [prependListener](AsyncEventEmitter.md#prependlistener) +- [prependOnceListener](AsyncEventEmitter.md#prependoncelistener) +- [rawListeners](AsyncEventEmitter.md#rawlisteners) +- [removeAllListeners](AsyncEventEmitter.md#removealllisteners) +- [removeListener](AsyncEventEmitter.md#removelistener) +- [setMaxListeners](AsyncEventEmitter.md#setmaxlisteners) +- [getEventListeners](AsyncEventEmitter.md#geteventlisteners) +- [listenerCount](AsyncEventEmitter.md#listenercount-1) +- [on](AsyncEventEmitter.md#on-1) +- [once](AsyncEventEmitter.md#once-1) +- [setMaxListeners](AsyncEventEmitter.md#setmaxlisteners-1) + +## Constructors + +### constructor + +• **new AsyncEventEmitter**<`T`\>(`options?`) + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `T` | extends [`EventMap`](../interfaces/EventMap.md) | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `options?` | `EventEmitterOptions` | + +#### Inherited from + +EventEmitter.constructor + +#### Defined in + +node_modules/@types/node/events.d.ts:74 + +## Properties + +### captureRejectionSymbol + +▪ `Static` `Readonly` **captureRejectionSymbol**: typeof [`captureRejectionSymbol`](AsyncEventEmitter.md#capturerejectionsymbol) + +#### Inherited from + +EventEmitter.captureRejectionSymbol + +#### Defined in + +node_modules/@types/node/events.d.ts:291 + +___ + +### captureRejections + +▪ `Static` **captureRejections**: `boolean` + +Sets or gets the default captureRejection value for all emitters. + +#### Inherited from + +EventEmitter.captureRejections + +#### Defined in + +node_modules/@types/node/events.d.ts:296 + +___ + +### defaultMaxListeners + +▪ `Static` **defaultMaxListeners**: `number` + +#### Inherited from + +EventEmitter.defaultMaxListeners + +#### Defined in + +node_modules/@types/node/events.d.ts:297 + +___ + +### errorMonitor + +▪ `Static` `Readonly` **errorMonitor**: typeof [`errorMonitor`](AsyncEventEmitter.md#errormonitor) + +This symbol shall be used to install a listener for only monitoring `'error'` +events. Listeners installed using this symbol are called before the regular +`'error'` listeners are called. + +Installing a listener using this symbol does not change the behavior once an +`'error'` event is emitted, therefore the process will still crash if no +regular `'error'` listener is installed. + +#### Inherited from + +EventEmitter.errorMonitor + +#### Defined in + +node_modules/@types/node/events.d.ts:290 + +## Methods + +### addListener + +▸ **addListener**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.addListener + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:164](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L164) + +___ + +### after + +▸ **after**<`E`\>(`event`, `target`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `target` | `T`[`E`] | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:118](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L118) + +___ + +### before + +▸ **before**<`E`\>(`event`, `target`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `target` | `T`[`E`] | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:114](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L114) + +___ + +### emit + +▸ **emit**<`E`\>(`event`, ...`args`): `boolean` + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `...args` | `Parameters`<`T`[`E`]\> | + +#### Returns + +`boolean` + +#### Overrides + +EventEmitter.emit + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:20](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L20) + +___ + +### eventNames + +▸ **eventNames**(): keyof `T` & `string`[] + +#### Returns + +keyof `T` & `string`[] + +#### Overrides + +EventEmitter.eventNames + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:184](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L184) + +___ + +### first + +▸ **first**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L96) + +___ + +### getMaxListeners + +▸ **getMaxListeners**(): `number` + +#### Returns + +`number` + +#### Overrides + +EventEmitter.getMaxListeners + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:196](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L196) + +___ + +### listenerCount + +▸ **listenerCount**(`event`): `number` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | keyof `T` & `string` | + +#### Returns + +`number` + +#### Overrides + +EventEmitter.listenerCount + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:192](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L192) + +___ + +### listeners + +▸ **listeners**<`E`\>(`event`): `T`[`E`][] + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | + +#### Returns + +`T`[`E`][] + +#### Overrides + +EventEmitter.listeners + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:188](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L188) + +___ + +### off + +▸ **off**(`eventName`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +Alias for `emitter.removeListener()`. + +**`Since`** + +v10.0.0 + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `eventName` | `string` \| `symbol` | +| `listener` | (...`args`: `any`[]) => `void` | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Inherited from + +EventEmitter.off + +#### Defined in + +node_modules/@types/node/events.d.ts:462 + +___ + +### on + +▸ **on**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.on + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:160](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L160) + +___ + +### once + +▸ **once**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.once + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:70](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L70) + +___ + +### prependListener + +▸ **prependListener**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.prependListener + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:168](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L168) + +___ + +### prependOnceListener + +▸ **prependOnceListener**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.prependOnceListener + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:172](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L172) + +___ + +### rawListeners + +▸ **rawListeners**(`eventName`): `Function`[] + +Returns a copy of the array of listeners for the event named `eventName`, +including any wrappers (such as those created by `.once()`). + +```js +const emitter = new EventEmitter(); +emitter.once('log', () => console.log('log once')); + +// Returns a new Array with a function `onceWrapper` which has a property +// `listener` which contains the original listener bound above +const listeners = emitter.rawListeners('log'); +const logFnWrapper = listeners[0]; + +// Logs "log once" to the console and does not unbind the `once` event +logFnWrapper.listener(); + +// Logs "log once" to the console and removes the listener +logFnWrapper(); + +emitter.on('log', () => console.log('log persistently')); +// Will return a new Array with a single function bound by `.on()` above +const newListeners = emitter.rawListeners('log'); + +// Logs "log persistently" twice +newListeners[0](); +emitter.emit('log'); +``` + +**`Since`** + +v9.4.0 + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `eventName` | `string` \| `symbol` | + +#### Returns + +`Function`[] + +#### Inherited from + +EventEmitter.rawListeners + +#### Defined in + +node_modules/@types/node/events.d.ts:532 + +___ + +### removeAllListeners + +▸ **removeAllListeners**(`event?`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event?` | keyof `T` & `string` | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.removeAllListeners + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:176](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L176) + +___ + +### removeListener + +▸ **removeListener**<`E`\>(`event`, `listener`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Type parameters + +| Name | Type | +| :------ | :------ | +| `E` | extends `string` \| `number` \| `symbol` | + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `event` | `E` & `string` | +| `listener` | `T`[`E`] | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.removeListener + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:180](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L180) + +___ + +### setMaxListeners + +▸ **setMaxListeners**(`maxListeners`): [`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `maxListeners` | `number` | + +#### Returns + +[`AsyncEventEmitter`](AsyncEventEmitter.md)<`T`\> + +#### Overrides + +EventEmitter.setMaxListeners + +#### Defined in + +[packages/util/src/asyncEventEmitter.ts:200](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/asyncEventEmitter.ts#L200) + +___ + +### getEventListeners + +▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[] + +Returns a copy of the array of listeners for the event named `eventName`. + +For `EventEmitter`s this behaves exactly the same as calling `.listeners` on +the emitter. + +For `EventTarget`s this is the only way to get the event listeners for the +event target. This is useful for debugging and diagnostic purposes. + +```js +const { getEventListeners, EventEmitter } = require('events'); + +{ + const ee = new EventEmitter(); + const listener = () => console.log('Events are fun'); + ee.on('foo', listener); + getEventListeners(ee, 'foo'); // [listener] +} +{ + const et = new EventTarget(); + const listener = () => console.log('Events are fun'); + et.addEventListener('foo', listener); + getEventListeners(et, 'foo'); // [listener] +} +``` + +**`Since`** + +v15.2.0 + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `emitter` | `EventEmitter` \| `DOMEventTarget` | +| `name` | `string` \| `symbol` | + +#### Returns + +`Function`[] + +#### Inherited from + +EventEmitter.getEventListeners + +#### Defined in + +node_modules/@types/node/events.d.ts:262 + +___ + +### listenerCount + +▸ `Static` **listenerCount**(`emitter`, `eventName`): `number` + +A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`. + +```js +const { EventEmitter, listenerCount } = require('events'); +const myEmitter = new EventEmitter(); +myEmitter.on('event', () => {}); +myEmitter.on('event', () => {}); +console.log(listenerCount(myEmitter, 'event')); +// Prints: 2 +``` + +**`Since`** + +v0.9.12 + +**`Deprecated`** + +Since v3.2.0 - Use `listenerCount` instead. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `emitter` | `EventEmitter` | The emitter to query | +| `eventName` | `string` \| `symbol` | The event name | + +#### Returns + +`number` + +#### Inherited from + +EventEmitter.listenerCount + +#### Defined in + +node_modules/@types/node/events.d.ts:234 + +___ + +### on + +▸ `Static` **on**(`emitter`, `eventName`, `options?`): `AsyncIterableIterator`<`any`\> + +```js +const { on, EventEmitter } = require('events'); + +(async () => { + const ee = new EventEmitter(); + + // Emit later on + process.nextTick(() => { + ee.emit('foo', 'bar'); + ee.emit('foo', 42); + }); + + for await (const event of on(ee, 'foo')) { + // The execution of this inner block is synchronous and it + // processes one event at a time (even with await). Do not use + // if concurrent execution is required. + console.log(event); // prints ['bar'] [42] + } + // Unreachable here +})(); +``` + +Returns an `AsyncIterator` that iterates `eventName` events. It will throw +if the `EventEmitter` emits `'error'`. It removes all listeners when +exiting the loop. The `value` returned by each iteration is an array +composed of the emitted event arguments. + +An `AbortSignal` can be used to cancel waiting on events: + +```js +const { on, EventEmitter } = require('events'); +const ac = new AbortController(); + +(async () => { + const ee = new EventEmitter(); + + // Emit later on + process.nextTick(() => { + ee.emit('foo', 'bar'); + ee.emit('foo', 42); + }); + + for await (const event of on(ee, 'foo', { signal: ac.signal })) { + // The execution of this inner block is synchronous and it + // processes one event at a time (even with await). Do not use + // if concurrent execution is required. + console.log(event); // prints ['bar'] [42] + } + // Unreachable here +})(); + +process.nextTick(() => ac.abort()); +``` + +**`Since`** + +v13.6.0, v12.16.0 + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `emitter` | `EventEmitter` | - | +| `eventName` | `string` | The name of the event being listened for | +| `options?` | `StaticEventEmitterOptions` | - | + +#### Returns + +`AsyncIterableIterator`<`any`\> + +that iterates `eventName` events emitted by the `emitter` + +#### Inherited from + +EventEmitter.on + +#### Defined in + +node_modules/@types/node/events.d.ts:217 + +___ + +### once + +▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\> + +Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given +event or that is rejected if the `EventEmitter` emits `'error'` while waiting. +The `Promise` will resolve with an array of all the arguments emitted to the +given event. + +This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event +semantics and does not listen to the `'error'` event. + +```js +const { once, EventEmitter } = require('events'); + +async function run() { + const ee = new EventEmitter(); + + process.nextTick(() => { + ee.emit('myevent', 42); + }); + + const [value] = await once(ee, 'myevent'); + console.log(value); + + const err = new Error('kaboom'); + process.nextTick(() => { + ee.emit('error', err); + }); + + try { + await once(ee, 'myevent'); + } catch (err) { + console.log('error happened', err); + } +} + +run(); +``` + +The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the +'`error'` event itself, then it is treated as any other kind of event without +special handling: + +```js +const { EventEmitter, once } = require('events'); + +const ee = new EventEmitter(); + +once(ee, 'error') + .then(([err]) => console.log('ok', err.message)) + .catch((err) => console.log('error', err.message)); + +ee.emit('error', new Error('boom')); + +// Prints: ok boom +``` + +An `AbortSignal` can be used to cancel waiting for the event: + +```js +const { EventEmitter, once } = require('events'); + +const ee = new EventEmitter(); +const ac = new AbortController(); + +async function foo(emitter, event, signal) { + try { + await once(emitter, event, { signal }); + console.log('event emitted!'); + } catch (error) { + if (error.name === 'AbortError') { + console.error('Waiting for the event was canceled!'); + } else { + console.error('There was an error', error.message); + } + } +} + +foo(ee, 'foo', ac.signal); +ac.abort(); // Abort waiting for the event +ee.emit('foo'); // Prints: Waiting for the event was canceled! +``` + +**`Since`** + +v11.13.0, v10.16.0 + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `emitter` | `NodeEventTarget` | +| `eventName` | `string` \| `symbol` | +| `options?` | `StaticEventEmitterOptions` | + +#### Returns + +`Promise`<`any`[]\> + +#### Inherited from + +EventEmitter.once + +#### Defined in + +node_modules/@types/node/events.d.ts:157 + +▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `emitter` | `DOMEventTarget` | +| `eventName` | `string` | +| `options?` | `StaticEventEmitterOptions` | + +#### Returns + +`Promise`<`any`[]\> + +#### Inherited from + +EventEmitter.once + +#### Defined in + +node_modules/@types/node/events.d.ts:158 + +___ + +### setMaxListeners + +▸ `Static` **setMaxListeners**(`n?`, ...`eventTargets`): `void` + +```js +const { + setMaxListeners, + EventEmitter +} = require('events'); + +const target = new EventTarget(); +const emitter = new EventEmitter(); + +setMaxListeners(5, target, emitter); +``` + +**`Since`** + +v15.4.0 + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `n?` | `number` | A non-negative number. The maximum number of listeners per `EventTarget` event. | +| `...eventTargets` | (`EventEmitter` \| `DOMEventTarget`)[] | - | + +#### Returns + +`void` + +#### Inherited from + +EventEmitter.setMaxListeners + +#### Defined in + +node_modules/@types/node/events.d.ts:280 diff --git a/packages/util/docs/classes/Lock.md b/packages/util/docs/classes/Lock.md new file mode 100644 index 0000000000..430e2d89bc --- /dev/null +++ b/packages/util/docs/classes/Lock.md @@ -0,0 +1,55 @@ +[@ethereumjs/util](../README.md) / Lock + +# Class: Lock + +## Table of contents + +### Constructors + +- [constructor](Lock.md#constructor) + +### Methods + +- [acquire](Lock.md#acquire) +- [release](Lock.md#release) + +## Constructors + +### constructor + +• **new Lock**() + +## Methods + +### acquire + +▸ **acquire**(): `Promise`<`boolean`\> + +Returns a promise used to wait for a permit to become available. This method should be awaited on. + +#### Returns + +`Promise`<`boolean`\> + +A promise that gets resolved when execution is allowed to proceed. + +#### Defined in + +[packages/util/src/lock.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/lock.ts#L10) + +___ + +### release + +▸ **release**(): `void` + +Increases the number of permits by one. If there are other functions waiting, one of them will +continue to execute in a future iteration of the event loop. + +#### Returns + +`void` + +#### Defined in + +[packages/util/src/lock.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/lock.ts#L25) diff --git a/packages/util/docs/classes/Withdrawal.md b/packages/util/docs/classes/Withdrawal.md new file mode 100644 index 0000000000..feca48d555 --- /dev/null +++ b/packages/util/docs/classes/Withdrawal.md @@ -0,0 +1,187 @@ +[@ethereumjs/util](../README.md) / Withdrawal + +# Class: Withdrawal + +Representation of EIP-4895 withdrawal data + +## Table of contents + +### Constructors + +- [constructor](Withdrawal.md#constructor) + +### Properties + +- [address](Withdrawal.md#address) +- [amount](Withdrawal.md#amount) +- [index](Withdrawal.md#index) +- [validatorIndex](Withdrawal.md#validatorindex) + +### Methods + +- [raw](Withdrawal.md#raw) +- [toJSON](Withdrawal.md#tojson) +- [fromValuesArray](Withdrawal.md#fromvaluesarray) +- [fromWithdrawalData](Withdrawal.md#fromwithdrawaldata) +- [toBufferArray](Withdrawal.md#tobufferarray) + +## Constructors + +### constructor + +• **new Withdrawal**(`index`, `validatorIndex`, `address`, `amount`) + +This constructor assigns and validates the values. +Use the static factory methods to assist in creating a Withdrawal object from varying data types. + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `index` | `bigint` | +| `validatorIndex` | `bigint` | +| `address` | [`Address`](Address.md) | +| `amount` | `bigint` | + +#### Defined in + +[packages/util/src/withdrawal.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L37) + +## Properties + +### address + +• `Readonly` **address**: [`Address`](Address.md) + +#### Defined in + +[packages/util/src/withdrawal.ts:40](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L40) + +___ + +### amount + +• `Readonly` **amount**: `bigint` + +#### Defined in + +[packages/util/src/withdrawal.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L41) + +___ + +### index + +• `Readonly` **index**: `bigint` + +#### Defined in + +[packages/util/src/withdrawal.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L38) + +___ + +### validatorIndex + +• `Readonly` **validatorIndex**: `bigint` + +#### Defined in + +[packages/util/src/withdrawal.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L39) + +## Methods + +### raw + +▸ **raw**(): [`WithdrawalBuffer`](../README.md#withdrawalbuffer) + +#### Returns + +[`WithdrawalBuffer`](../README.md#withdrawalbuffer) + +#### Defined in + +[packages/util/src/withdrawal.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L96) + +___ + +### toJSON + +▸ **toJSON**(): `Object` + +#### Returns + +`Object` + +| Name | Type | +| :------ | :------ | +| `address` | `string` | +| `amount` | `string` | +| `index` | `string` | +| `validatorIndex` | `string` | + +#### Defined in + +[packages/util/src/withdrawal.ts:100](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L100) + +___ + +### fromValuesArray + +▸ `Static` **fromValuesArray**(`withdrawalArray`): [`Withdrawal`](Withdrawal.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `withdrawalArray` | [`WithdrawalBuffer`](../README.md#withdrawalbuffer) | + +#### Returns + +[`Withdrawal`](Withdrawal.md) + +#### Defined in + +[packages/util/src/withdrawal.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L59) + +___ + +### fromWithdrawalData + +▸ `Static` **fromWithdrawalData**(`withdrawalData`): [`Withdrawal`](Withdrawal.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `withdrawalData` | [`WithdrawalData`](../README.md#withdrawaldata) | + +#### Returns + +[`Withdrawal`](Withdrawal.md) + +#### Defined in + +[packages/util/src/withdrawal.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L44) + +___ + +### toBufferArray + +▸ `Static` **toBufferArray**(`withdrawal`): [`WithdrawalBuffer`](../README.md#withdrawalbuffer) + +Convert a withdrawal to a buffer array + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `withdrawal` | [`WithdrawalData`](../README.md#withdrawaldata) \| [`Withdrawal`](Withdrawal.md) | the withdrawal to convert | + +#### Returns + +[`WithdrawalBuffer`](../README.md#withdrawalbuffer) + +buffer array of the withdrawal + +#### Defined in + +[packages/util/src/withdrawal.ts:72](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L72) diff --git a/packages/util/docs/enums/TypeOutput.md b/packages/util/docs/enums/TypeOutput.md index e95cffb5ce..ee1234f8e8 100644 --- a/packages/util/docs/enums/TypeOutput.md +++ b/packages/util/docs/enums/TypeOutput.md @@ -21,7 +21,7 @@ Type output options #### Defined in -[types.ts:58](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L58) +[packages/util/src/types.ts:58](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L58) ___ @@ -31,7 +31,7 @@ ___ #### Defined in -[types.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L59) +[packages/util/src/types.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L59) ___ @@ -41,7 +41,7 @@ ___ #### Defined in -[types.ts:57](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L57) +[packages/util/src/types.ts:57](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L57) ___ @@ -51,4 +51,4 @@ ___ #### Defined in -[types.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L60) +[packages/util/src/types.ts:60](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L60) diff --git a/packages/util/docs/interfaces/AccountData.md b/packages/util/docs/interfaces/AccountData.md index ea28926fce..3fd4cae41e 100644 --- a/packages/util/docs/interfaces/AccountData.md +++ b/packages/util/docs/interfaces/AccountData.md @@ -19,7 +19,7 @@ #### Defined in -[account.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L25) +[packages/util/src/account.ts:25](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L25) ___ @@ -29,7 +29,7 @@ ___ #### Defined in -[account.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L27) +[packages/util/src/account.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L27) ___ @@ -39,7 +39,7 @@ ___ #### Defined in -[account.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L24) +[packages/util/src/account.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L24) ___ @@ -49,4 +49,4 @@ ___ #### Defined in -[account.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L26) +[packages/util/src/account.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/account.ts#L26) diff --git a/packages/util/docs/interfaces/ECDSASignature.md b/packages/util/docs/interfaces/ECDSASignature.md index df0de8bf40..cdb6a82fb9 100644 --- a/packages/util/docs/interfaces/ECDSASignature.md +++ b/packages/util/docs/interfaces/ECDSASignature.md @@ -18,7 +18,7 @@ #### Defined in -[signature.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L10) +[packages/util/src/signature.ts:10](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L10) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[signature.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L11) +[packages/util/src/signature.ts:11](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L11) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[signature.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L9) +[packages/util/src/signature.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/signature.ts#L9) diff --git a/packages/util/docs/interfaces/EventMap.md b/packages/util/docs/interfaces/EventMap.md new file mode 100644 index 0000000000..5bd6f71d29 --- /dev/null +++ b/packages/util/docs/interfaces/EventMap.md @@ -0,0 +1,7 @@ +[@ethereumjs/util](../README.md) / EventMap + +# Interface: EventMap + +## Indexable + +▪ [event: `string`]: `AsyncListener`<`any`, `any`\> diff --git a/packages/util/docs/interfaces/JsonRpcWithdrawal.md b/packages/util/docs/interfaces/JsonRpcWithdrawal.md new file mode 100644 index 0000000000..1d9b1769cb --- /dev/null +++ b/packages/util/docs/interfaces/JsonRpcWithdrawal.md @@ -0,0 +1,54 @@ +[@ethereumjs/util](../README.md) / JsonRpcWithdrawal + +# Interface: JsonRpcWithdrawal + +JSON RPC interface for EIP-4895 withdrawal data + +## Table of contents + +### Properties + +- [address](JsonRpcWithdrawal.md#address) +- [amount](JsonRpcWithdrawal.md#amount) +- [index](JsonRpcWithdrawal.md#index) +- [validatorIndex](JsonRpcWithdrawal.md#validatorindex) + +## Properties + +### address + +• **address**: `string` + +#### Defined in + +[packages/util/src/withdrawal.ts:23](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L23) + +___ + +### amount + +• **amount**: `string` + +#### Defined in + +[packages/util/src/withdrawal.ts:24](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L24) + +___ + +### index + +• **index**: `string` + +#### Defined in + +[packages/util/src/withdrawal.ts:21](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L21) + +___ + +### validatorIndex + +• **validatorIndex**: `string` + +#### Defined in + +[packages/util/src/withdrawal.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/withdrawal.ts#L22) diff --git a/packages/util/docs/interfaces/TransformableToArray.md b/packages/util/docs/interfaces/TransformableToArray.md index 7a3b13c6e1..4aa72b0a9c 100644 --- a/packages/util/docs/interfaces/TransformableToArray.md +++ b/packages/util/docs/interfaces/TransformableToArray.md @@ -21,7 +21,7 @@ #### Defined in -[types.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L38) +[packages/util/src/types.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L38) ___ @@ -35,4 +35,4 @@ ___ #### Defined in -[types.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L39) +[packages/util/src/types.ts:39](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L39) diff --git a/packages/util/docs/interfaces/TransformableToBuffer.md b/packages/util/docs/interfaces/TransformableToBuffer.md index 76c9539810..4172cd4712 100644 --- a/packages/util/docs/interfaces/TransformableToBuffer.md +++ b/packages/util/docs/interfaces/TransformableToBuffer.md @@ -21,7 +21,7 @@ #### Defined in -[types.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L47) +[packages/util/src/types.ts:47](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L47) ___ @@ -35,4 +35,4 @@ ___ #### Defined in -[types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L46) +[packages/util/src/types.ts:46](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/util/src/types.ts#L46) diff --git a/packages/util/package.json b/packages/util/package.json index f99e26a67d..73d7e21779 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/util", - "version": "8.0.2", + "version": "8.0.3", "description": "A collection of utility functions for Ethereum", "keywords": [ "ethereum", diff --git a/packages/util/src/address.ts b/packages/util/src/address.ts index a70532e875..eaa26c4222 100644 --- a/packages/util/src/address.ts +++ b/packages/util/src/address.ts @@ -7,6 +7,9 @@ import { } from './account' import { bigIntToBuffer, bufferToBigInt, toBuffer, zeros } from './bytes' +/** + * Handling and generating Ethereum addresses + */ export class Address { public readonly buf: Buffer diff --git a/packages/util/src/withdrawal.ts b/packages/util/src/withdrawal.ts index a8d10e0314..6ad5a301cc 100644 --- a/packages/util/src/withdrawal.ts +++ b/packages/util/src/withdrawal.ts @@ -4,6 +4,9 @@ import { TypeOutput, toType } from './types' import type { AddressLike, BigIntLike } from './types' +/** + * Flexible input data type for EIP-4895 withdrawal data + */ export type WithdrawalData = { index: BigIntLike validatorIndex: BigIntLike @@ -11,6 +14,9 @@ export type WithdrawalData = { amount: BigIntLike } +/** + * JSON RPC interface for EIP-4895 withdrawal data + */ export interface JsonRpcWithdrawal { index: string // QUANTITY - bigint 8 bytes validatorIndex: string // QUANTITY - bigint 8 bytes @@ -20,7 +26,14 @@ export interface JsonRpcWithdrawal { export type WithdrawalBuffer = [Buffer, Buffer, Buffer, Buffer] +/** + * Representation of EIP-4895 withdrawal data + */ export class Withdrawal { + /** + * This constructor assigns and validates the values. + * Use the static factory methods to assist in creating a Withdrawal object from varying data types. + */ constructor( public readonly index: bigint, public readonly validatorIndex: bigint, diff --git a/packages/vm/CHANGELOG.md b/packages/vm/CHANGELOG.md index 02f977e8fa..e8e2402d39 100644 --- a/packages/vm/CHANGELOG.md +++ b/packages/vm/CHANGELOG.md @@ -6,6 +6,31 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) (modification: no type change headlines) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 6.3.0 - 2022-12-09 + +### Experimental EIP-4895 Beacon Chain Withdrawals Support + +This release comes with experimental [EIP-4895](https://eips.ethereum.org/EIPS/eip-4895) beacon chain withdrawals support, see PR [#2353](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2353) for the plain implementation and PR [#2401](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2401) for updated calls for the CL/EL engine API. Also note that there is a new helper module in [@ethereumjs/util](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) with a new dedicated `Withdrawal` class together with additional TypeScript types to ease withdrawal handling. + +Withdrawals support can be activated by initializing a respective `Common` object, see [@ethereumjs/block](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/block) library README for an example on how to instantiate a withdrawals block: + +```typescript +import { Common, Chain } from '@ethereumjs/common' +const common = new Common({ chain: Chain.Mainnet, eips: [4895] }) +``` + +In the VM withdrawals blocks can now both be executed with `VM.runBlock()` and build with `VM.buildBlock()` (for a more complex example you can have a look at the EIP tests in `test/api/EIPs/eip-4895-withdrawals.spec.ts`). + +### Hardfork-By-Time Support + +The VM library is now ready to work with hardforks triggered by timestamp, which will first be applied along the `Shanghai` HF, see PR [#2437](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2437). This is achieved by integrating a new timestamp supporting `@ethereumjs/common` library version. + +### Bug Fixes and Other Changes + +- More correctly timed `nonce` updates in `VM.runTx()` to avoid certain consensus-critical `nonce`/`account` update constallations. PR [#2404](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2404) + +A reminder: This package does not contain the core EVM code any more. For EVM related bugfixes see the associated [@ethereumjs/evm](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/evm) `v1.2.3` release. + ## 6.2.0 - 2022-10-21 This release replaces the `v6.1.0` release from a couple of days ago which now becomes deprecated. The async event emitter library switch from the `async-eventemitter` package to the `eventemitter2` package turned out to be breaking along parts of the functionality. diff --git a/packages/vm/docs/README.md b/packages/vm/docs/README.md index e138885c11..7c70a10156 100644 --- a/packages/vm/docs/README.md +++ b/packages/vm/docs/README.md @@ -6,39 +6,189 @@ ### Classes -- [EEI](classes/EEI.md) -- [VM](classes/VM.md) +- [EEI](undefined) +- [VM](undefined) ### Interfaces -- [AfterBlockEvent](interfaces/AfterBlockEvent.md) -- [AfterTxEvent](interfaces/AfterTxEvent.md) -- [BaseTxReceipt](interfaces/BaseTxReceipt.md) -- [BuildBlockOpts](interfaces/BuildBlockOpts.md) -- [BuilderOpts](interfaces/BuilderOpts.md) -- [PostByzantiumTxReceipt](interfaces/PostByzantiumTxReceipt.md) -- [PreByzantiumTxReceipt](interfaces/PreByzantiumTxReceipt.md) -- [RunBlockOpts](interfaces/RunBlockOpts.md) -- [RunBlockResult](interfaces/RunBlockResult.md) -- [RunTxOpts](interfaces/RunTxOpts.md) -- [RunTxResult](interfaces/RunTxResult.md) -- [SealBlockOpts](interfaces/SealBlockOpts.md) -- [VMOpts](interfaces/VMOpts.md) +- [AfterBlockEvent](undefined) +- [AfterTxEvent](undefined) +- [BaseTxReceipt](undefined) +- [BuildBlockOpts](undefined) +- [BuilderOpts](undefined) +- [PostByzantiumTxReceipt](undefined) +- [PreByzantiumTxReceipt](undefined) +- [RunBlockOpts](undefined) +- [RunBlockResult](undefined) +- [RunTxOpts](undefined) +- [RunTxResult](undefined) +- [SealBlockOpts](undefined) +- [VMOpts](undefined) ### Type Aliases -- [TxReceipt](README.md#txreceipt) -- [VMEvents](README.md#vmevents) +- [TxReceipt](undefined) +- [VMEvents](undefined) + +## Classes + +### EEI + +• **EEI**: Class EEI + +#### Defined in + +[vm/src/eei/eei.ts:27](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L27) + +___ + +### VM + +• **VM**: Class VM + +#### Defined in + +[vm/src/vm.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L33) + +## Interfaces + +### AfterBlockEvent + +• **AfterBlockEvent**: Interface AfterBlockEvent + +#### Defined in + +[vm/src/types.ts:276](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L276) + +___ + +### AfterTxEvent + +• **AfterTxEvent**: Interface AfterTxEvent + +#### Defined in + +[vm/src/types.ts:364](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L364) + +___ + +### BaseTxReceipt + +• **BaseTxReceipt**: Interface BaseTxReceipt + +#### Defined in + +[vm/src/types.ts:14](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L14) + +___ + +### BuildBlockOpts + +• **BuildBlockOpts**: Interface BuildBlockOpts + +#### Defined in + +[vm/src/types.ts:163](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L163) + +___ + +### BuilderOpts + +• **BuilderOpts**: Interface BuilderOpts + +#### Defined in + +[vm/src/types.ts:147](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L147) + +___ + +### PostByzantiumTxReceipt + +• **PostByzantiumTxReceipt**: Interface PostByzantiumTxReceipt + +#### Defined in + +[vm/src/types.ts:44](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L44) + +___ + +### PreByzantiumTxReceipt + +• **PreByzantiumTxReceipt**: Interface PreByzantiumTxReceipt + +#### Defined in + +[vm/src/types.ts:33](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L33) + +___ + +### RunBlockOpts + +• **RunBlockOpts**: Interface RunBlockOpts + +#### Defined in + +[vm/src/types.ts:202](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L202) + +___ + +### RunBlockResult + +• **RunBlockResult**: Interface RunBlockResult + +#### Defined in + +[vm/src/types.ts:249](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L249) + +___ + +### RunTxOpts + +• **RunTxOpts**: Interface RunTxOpts + +#### Defined in + +[vm/src/types.ts:284](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L284) + +___ + +### RunTxResult + +• **RunTxResult**: Interface RunTxResult + +#### Defined in + +[vm/src/types.ts:330](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L330) + +___ + +### SealBlockOpts + +• **SealBlockOpts**: Interface SealBlockOpts + +#### Defined in + +[vm/src/types.ts:185](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L185) + +___ + +### VMOpts + +• **VMOpts**: Interface VMOpts + +#### Defined in + +[vm/src/types.ts:61](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L61) ## Type Aliases ### TxReceipt -Ƭ **TxReceipt**: [`PreByzantiumTxReceipt`](interfaces/PreByzantiumTxReceipt.md) \| [`PostByzantiumTxReceipt`](interfaces/PostByzantiumTxReceipt.md) +Ƭ **TxReceipt**: PreByzantiumTxReceipt \| PostByzantiumTxReceipt #### Defined in -[packages/vm/src/types.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L9) +[vm/src/types.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L9) ___ @@ -50,11 +200,11 @@ ___ | Name | Type | | :------ | :------ | -| `afterBlock` | (`data`: [`AfterBlockEvent`](interfaces/AfterBlockEvent.md), `resolve?`: (`result?`: `any`) => `void`) => `void` | -| `afterTx` | (`data`: [`AfterTxEvent`](interfaces/AfterTxEvent.md), `resolve?`: (`result?`: `any`) => `void`) => `void` | -| `beforeBlock` | (`data`: `Block`, `resolve?`: (`result?`: `any`) => `void`) => `void` | -| `beforeTx` | (`data`: `TypedTransaction`, `resolve?`: (`result?`: `any`) => `void`) => `void` | +| `afterBlock` | Method afterBlock | +| `afterTx` | Method afterTx | +| `beforeBlock` | Method beforeBlock | +| `beforeTx` | Method beforeTx | #### Defined in -[packages/vm/src/types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L51) +[vm/src/types.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L51) diff --git a/packages/vm/docs/classes/EEI.md b/packages/vm/docs/classes/EEI.md deleted file mode 100644 index 59946ff84c..0000000000 --- a/packages/vm/docs/classes/EEI.md +++ /dev/null @@ -1,1047 +0,0 @@ -[@ethereumjs/vm](../README.md) / EEI - -# Class: EEI - -External interface made available to EVM bytecode. Modeled after -the ewasm EEI [spec](https://github.com/ewasm/design/blob/master/eth_interface.md). -It includes methods for accessing/modifying state, calling or creating contracts, access -to environment data among other things. -The EEI instance also keeps artifacts produced by the bytecode such as logs -and to-be-selfdestructed addresses. - -## Hierarchy - -- `VmState` - - ↳ **`EEI`** - -## Implements - -- `EEIInterface` - -## Table of contents - -### Constructors - -- [constructor](EEI.md#constructor) - -### Methods - -- [\_clearOriginalStorageCache](EEI.md#_clearoriginalstoragecache) -- [accountExists](EEI.md#accountexists) -- [accountIsEmpty](EEI.md#accountisempty) -- [addWarmedAddress](EEI.md#addwarmedaddress) -- [addWarmedStorage](EEI.md#addwarmedstorage) -- [checkpoint](EEI.md#checkpoint) -- [cleanupTouchedAccounts](EEI.md#cleanuptouchedaccounts) -- [clearContractStorage](EEI.md#clearcontractstorage) -- [clearOriginalStorageCache](EEI.md#clearoriginalstoragecache) -- [clearWarmedAccounts](EEI.md#clearwarmedaccounts) -- [commit](EEI.md#commit) -- [copy](EEI.md#copy) -- [deleteAccount](EEI.md#deleteaccount) -- [generateAccessList](EEI.md#generateaccesslist) -- [generateCanonicalGenesis](EEI.md#generatecanonicalgenesis) -- [getAccount](EEI.md#getaccount) -- [getBlockHash](EEI.md#getblockhash) -- [getContractCode](EEI.md#getcontractcode) -- [getContractStorage](EEI.md#getcontractstorage) -- [getExternalBalance](EEI.md#getexternalbalance) -- [getExternalCode](EEI.md#getexternalcode) -- [getExternalCodeSize](EEI.md#getexternalcodesize) -- [getStateRoot](EEI.md#getstateroot) -- [hasStateRoot](EEI.md#hasstateroot) -- [isWarmedAddress](EEI.md#iswarmedaddress) -- [isWarmedStorage](EEI.md#iswarmedstorage) -- [modifyAccountFields](EEI.md#modifyaccountfields) -- [putAccount](EEI.md#putaccount) -- [putContractCode](EEI.md#putcontractcode) -- [putContractStorage](EEI.md#putcontractstorage) -- [revert](EEI.md#revert) -- [setStateRoot](EEI.md#setstateroot) -- [storageLoad](EEI.md#storageload) -- [storageStore](EEI.md#storagestore) -- [touchAccount](EEI.md#touchaccount) - -## Constructors - -### constructor - -• **new EEI**(`stateManager`, `common`, `blockchain`) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `stateManager` | `StateManager` | -| `common` | `Common` | -| `blockchain` | `Blockchain` | - -#### Overrides - -VmState.constructor - -#### Defined in - -[packages/vm/src/eei/eei.ts:31](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L31) - -## Methods - -### \_clearOriginalStorageCache - -▸ **_clearOriginalStorageCache**(): `void` - -Clears the original storage cache. Refer to StateManager.getOriginalContractStorage -for more explanation. - -#### Returns - -`void` - -#### Inherited from - -VmState.\_clearOriginalStorageCache - -#### Defined in - -[packages/vm/src/eei/vmState.ts:331](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L331) - -___ - -### accountExists - -▸ **accountExists**(`address`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | - -#### Returns - -`Promise`<`boolean`\> - -#### Implementation of - -EEIInterface.accountExists - -#### Inherited from - -VmState.accountExists - -#### Defined in - -[packages/vm/src/eei/vmState.ts:181](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L181) - -___ - -### accountIsEmpty - -▸ **accountIsEmpty**(`address`): `Promise`<`boolean`\> - -Checks if the `account` corresponding to `address` -is empty or non-existent as defined in -EIP-161 (https://eips.ethereum.org/EIPS/eip-161). - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Address` | Address to check | - -#### Returns - -`Promise`<`boolean`\> - -#### Implementation of - -EEIInterface.accountIsEmpty - -#### Inherited from - -VmState.accountIsEmpty - -#### Defined in - -[packages/vm/src/eei/vmState.ts:478](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L478) - -___ - -### addWarmedAddress - -▸ **addWarmedAddress**(`address`): `void` - -Add a warm address in the current context - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Buffer` | The address (as a Buffer) to check | - -#### Returns - -`void` - -#### Implementation of - -EEIInterface.addWarmedAddress - -#### Inherited from - -VmState.addWarmedAddress - -#### Defined in - -[packages/vm/src/eei/vmState.ts:365](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L365) - -___ - -### addWarmedStorage - -▸ **addWarmedStorage**(`address`, `slot`): `void` - -Mark the storage slot in the address as warm in the current context - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Buffer` | The address (as a Buffer) to check | -| `slot` | `Buffer` | The slot (as a Buffer) to check | - -#### Returns - -`void` - -#### Implementation of - -EEIInterface.addWarmedStorage - -#### Inherited from - -VmState.addWarmedStorage - -#### Defined in - -[packages/vm/src/eei/vmState.ts:398](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L398) - -___ - -### checkpoint - -▸ **checkpoint**(): `Promise`<`void`\> - -Checkpoints the current state of the StateManager instance. -State changes that follow can then be committed by calling -`commit` or `reverted` by calling rollback. - -Partial implementation, called from the subclass. - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.checkpoint - -#### Inherited from - -VmState.checkpoint - -#### Defined in - -[packages/vm/src/eei/vmState.ts:66](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L66) - -___ - -### cleanupTouchedAccounts - -▸ **cleanupTouchedAccounts**(): `Promise`<`void`\> - -Removes accounts form the state trie that have been touched, -as defined in EIP-161 (https://eips.ethereum.org/EIPS/eip-161). - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.cleanupTouchedAccounts - -#### Inherited from - -VmState.cleanupTouchedAccounts - -#### Defined in - -[packages/vm/src/eei/vmState.ts:277](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L277) - -___ - -### clearContractStorage - -▸ **clearContractStorage**(`address`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.clearContractStorage - -#### Inherited from - -VmState.clearContractStorage - -#### Defined in - -[packages/vm/src/eei/vmState.ts:176](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L176) - -___ - -### clearOriginalStorageCache - -▸ **clearOriginalStorageCache**(): `void` - -Clears the original storage cache. Refer to StateManager.getOriginalContractStorage -for more explanation. Alias of the internal StateManager._clearOriginalStorageCache - -#### Returns - -`void` - -#### Implementation of - -EEIInterface.clearOriginalStorageCache - -#### Inherited from - -VmState.clearOriginalStorageCache - -#### Defined in - -[packages/vm/src/eei/vmState.ts:339](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L339) - -___ - -### clearWarmedAccounts - -▸ **clearWarmedAccounts**(): `void` - -Clear the warm accounts and storage. To be called after a transaction finished. - -#### Returns - -`void` - -#### Implementation of - -EEIInterface.clearWarmedAccounts - -#### Inherited from - -VmState.clearWarmedAccounts - -#### Defined in - -[packages/vm/src/eei/vmState.ts:411](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L411) - -___ - -### commit - -▸ **commit**(): `Promise`<`void`\> - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.commit - -#### Inherited from - -VmState.commit - -#### Defined in - -[packages/vm/src/eei/vmState.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L78) - -___ - -### copy - -▸ **copy**(): [`EEI`](EEI.md) - -#### Returns - -[`EEI`](EEI.md) - -#### Implementation of - -EEIInterface.copy - -#### Defined in - -[packages/vm/src/eei/eei.ts:96](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L96) - -___ - -### deleteAccount - -▸ **deleteAccount**(`address`): `Promise`<`void`\> - -Deletes an account from state under the provided `address`. The account will also be removed from the state trie. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Address` | Address of the account which should be deleted | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.deleteAccount - -#### Inherited from - -VmState.deleteAccount - -#### Defined in - -[packages/vm/src/eei/vmState.ts:154](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L154) - -___ - -### generateAccessList - -▸ **generateAccessList**(`addressesRemoved?`, `addressesOnlyStorage?`): `AccessList` - -Generates an EIP-2930 access list - -Note: this method is not yet part of the StateManager interface. -If not implemented, [runTx](VM.md#runtx) is not allowed to be used with the -`reportAccessList` option and will instead throw. - -Note: there is an edge case on accessList generation where an -internal call might revert without an accessList but pass if the -accessList is used for a tx run (so the subsequent behavior might change). -This edge case is not covered by this implementation. - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `addressesRemoved` | `Address`[] | `[]` | List of addresses to be removed from the final list | -| `addressesOnlyStorage` | `Address`[] | `[]` | List of addresses only to be added in case of present storage slots | - -#### Returns - -`AccessList` - -- an [@ethereumjs/tx](https://github.com/ethereumjs/ethereumjs-monorepo/packages/tx) `AccessList` - -#### Implementation of - -EEIInterface.generateAccessList - -#### Inherited from - -VmState.generateAccessList - -#### Defined in - -[packages/vm/src/eei/vmState.ts:433](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L433) - -___ - -### generateCanonicalGenesis - -▸ **generateCanonicalGenesis**(`initState`): `Promise`<`void`\> - -Initializes the provided genesis state into the state trie. -Will error if there are uncommitted checkpoints on the instance. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `initState` | `any` | address -> balance \| [balance, code, storage] | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.generateCanonicalGenesis - -#### Inherited from - -VmState.generateCanonicalGenesis - -#### Defined in - -[packages/vm/src/eei/vmState.ts:240](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L240) - -___ - -### getAccount - -▸ **getAccount**(`address`): `Promise`<`Account`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | - -#### Returns - -`Promise`<`Account`\> - -#### Implementation of - -EEIInterface.getAccount - -#### Inherited from - -VmState.getAccount - -#### Defined in - -[packages/vm/src/eei/vmState.ts:137](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L137) - -___ - -### getBlockHash - -▸ **getBlockHash**(`num`): `Promise`<`bigint`\> - -Returns Gets the hash of one of the 256 most recent complete blocks. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `num` | `bigint` | Number of block | - -#### Returns - -`Promise`<`bigint`\> - -#### Implementation of - -EEIInterface.getBlockHash - -#### Defined in - -[packages/vm/src/eei/eei.ts:67](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L67) - -___ - -### getContractCode - -▸ **getContractCode**(`address`): `Promise`<`Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | - -#### Returns - -`Promise`<`Buffer`\> - -#### Implementation of - -EEIInterface.getContractCode - -#### Inherited from - -VmState.getContractCode - -#### Defined in - -[packages/vm/src/eei/vmState.ts:159](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L159) - -___ - -### getContractStorage - -▸ **getContractStorage**(`address`, `key`): `Promise`<`Buffer`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | -| `key` | `Buffer` | - -#### Returns - -`Promise`<`Buffer`\> - -#### Implementation of - -EEIInterface.getContractStorage - -#### Inherited from - -VmState.getContractStorage - -#### Defined in - -[packages/vm/src/eei/vmState.ts:167](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L167) - -___ - -### getExternalBalance - -▸ **getExternalBalance**(`address`): `Promise`<`bigint`\> - -Returns balance of the given account. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Address` | Address of account | - -#### Returns - -`Promise`<`bigint`\> - -#### Defined in - -[packages/vm/src/eei/eei.ts:41](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L41) - -___ - -### getExternalCode - -▸ **getExternalCode**(`address`): `Promise`<`Buffer`\> - -Returns code of an account. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Address` | Address of account | - -#### Returns - -`Promise`<`Buffer`\> - -#### Defined in - -[packages/vm/src/eei/eei.ts:59](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L59) - -___ - -### getExternalCodeSize - -▸ **getExternalCodeSize**(`address`): `Promise`<`bigint`\> - -Get size of an account’s code. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Address` | Address of account | - -#### Returns - -`Promise`<`bigint`\> - -#### Defined in - -[packages/vm/src/eei/eei.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L50) - -___ - -### getStateRoot - -▸ **getStateRoot**(): `Promise`<`Buffer`\> - -#### Returns - -`Promise`<`Buffer`\> - -#### Implementation of - -EEIInterface.getStateRoot - -#### Inherited from - -VmState.getStateRoot - -#### Defined in - -[packages/vm/src/eei/vmState.ts:192](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L192) - -___ - -### hasStateRoot - -▸ **hasStateRoot**(`root`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `root` | `Buffer` | - -#### Returns - -`Promise`<`boolean`\> - -#### Implementation of - -EEIInterface.hasStateRoot - -#### Inherited from - -VmState.hasStateRoot - -#### Defined in - -[packages/vm/src/eei/vmState.ts:196](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L196) - -___ - -### isWarmedAddress - -▸ **isWarmedAddress**(`address`): `boolean` - -Returns true if the address is warm in the current context - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Buffer` | The address (as a Buffer) to check | - -#### Returns - -`boolean` - -#### Implementation of - -EEIInterface.isWarmedAddress - -#### Inherited from - -VmState.isWarmedAddress - -#### Defined in - -[packages/vm/src/eei/vmState.ts:351](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L351) - -___ - -### isWarmedStorage - -▸ **isWarmedStorage**(`address`, `slot`): `boolean` - -Returns true if the slot of the address is warm - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Buffer` | The address (as a Buffer) to check | -| `slot` | `Buffer` | The slot (as a Buffer) to check | - -#### Returns - -`boolean` - -#### Implementation of - -EEIInterface.isWarmedStorage - -#### Inherited from - -VmState.isWarmedStorage - -#### Defined in - -[packages/vm/src/eei/vmState.ts:379](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L379) - -___ - -### modifyAccountFields - -▸ **modifyAccountFields**(`address`, `accountFields`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | -| `accountFields` | `Partial`<`Pick`<`Account`, ``"nonce"`` \| ``"balance"`` \| ``"storageRoot"`` \| ``"codeHash"``\>\> | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.modifyAccountFields - -#### Inherited from - -VmState.modifyAccountFields - -#### Defined in - -[packages/vm/src/eei/vmState.ts:146](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L146) - -___ - -### putAccount - -▸ **putAccount**(`address`, `account`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | -| `account` | `Account` | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.putAccount - -#### Inherited from - -VmState.putAccount - -#### Defined in - -[packages/vm/src/eei/vmState.ts:141](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L141) - -___ - -### putContractCode - -▸ **putContractCode**(`address`, `value`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | -| `value` | `Buffer` | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.putContractCode - -#### Inherited from - -VmState.putContractCode - -#### Defined in - -[packages/vm/src/eei/vmState.ts:163](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L163) - -___ - -### putContractStorage - -▸ **putContractStorage**(`address`, `key`, `value`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | -| `key` | `Buffer` | -| `value` | `Buffer` | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.putContractStorage - -#### Inherited from - -VmState.putContractStorage - -#### Defined in - -[packages/vm/src/eei/vmState.ts:171](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L171) - -___ - -### revert - -▸ **revert**(): `Promise`<`void`\> - -Reverts the current change-set to the instance since the -last call to checkpoint. - -Partial implementation , called from the subclass. - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.revert - -#### Inherited from - -VmState.revert - -#### Defined in - -[packages/vm/src/eei/vmState.ts:105](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L105) - -___ - -### setStateRoot - -▸ **setStateRoot**(`stateRoot`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `stateRoot` | `Buffer` | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.setStateRoot - -#### Inherited from - -VmState.setStateRoot - -#### Defined in - -[packages/vm/src/eei/vmState.ts:185](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L185) - -___ - -### storageLoad - -▸ **storageLoad**(`address`, `key`, `original?`): `Promise`<`Buffer`\> - -Loads a 256-bit value to memory from persistent storage. - -#### Parameters - -| Name | Type | Default value | Description | -| :------ | :------ | :------ | :------ | -| `address` | `Address` | `undefined` | Address to get storage key value from | -| `key` | `Buffer` | `undefined` | Storage key | -| `original` | `boolean` | `false` | If true, return the original storage value (default: false) | - -#### Returns - -`Promise`<`Buffer`\> - -#### Implementation of - -EEIInterface.storageLoad - -#### Defined in - -[packages/vm/src/eei/eei.ts:88](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L88) - -___ - -### storageStore - -▸ **storageStore**(`address`, `key`, `value`): `Promise`<`void`\> - -Storage 256-bit value into storage of an address - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `address` | `Address` | Address to store into | -| `key` | `Buffer` | Storage key | -| `value` | `Buffer` | Storage value | - -#### Returns - -`Promise`<`void`\> - -#### Implementation of - -EEIInterface.storageStore - -#### Defined in - -[packages/vm/src/eei/eei.ts:78](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/eei.ts#L78) - -___ - -### touchAccount - -▸ **touchAccount**(`address`): `void` - -Marks an account as touched, according to the definition -in [EIP-158](https://eips.ethereum.org/EIPS/eip-158). -This happens when the account is triggered for a state-changing -event. Touched accounts that are empty will be cleared -at the end of the tx. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `address` | `Address` | - -#### Returns - -`void` - -#### Inherited from - -VmState.touchAccount - -#### Defined in - -[packages/vm/src/eei/vmState.ts:207](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/eei/vmState.ts#L207) diff --git a/packages/vm/docs/classes/VM.md b/packages/vm/docs/classes/VM.md deleted file mode 100644 index 03dfbcf6d4..0000000000 --- a/packages/vm/docs/classes/VM.md +++ /dev/null @@ -1,1292 +0,0 @@ -[@ethereumjs/vm](../README.md) / VM - -# Class: VM - -Execution engine which can be used to run a blockchain, individual -blocks, individual transactions, or snippets of EVM bytecode. - -This class is an AsyncEventEmitter, please consult the README to learn how to use it. - -## Hierarchy - -- `AsyncEventEmitter`<[`VMEvents`](../README.md#vmevents)\> - - ↳ **`VM`** - -## Table of contents - -### Properties - -- [\_common](VM.md#_common) -- [blockchain](VM.md#blockchain) -- [eei](VM.md#eei) -- [evm](VM.md#evm) -- [stateManager](VM.md#statemanager) -- [captureRejectionSymbol](VM.md#capturerejectionsymbol) -- [captureRejections](VM.md#capturerejections) -- [defaultMaxListeners](VM.md#defaultmaxlisteners) -- [errorMonitor](VM.md#errormonitor) - -### Methods - -- [addListener](VM.md#addlistener) -- [after](VM.md#after) -- [at](VM.md#at) -- [before](VM.md#before) -- [buildBlock](VM.md#buildblock) -- [copy](VM.md#copy) -- [emit](VM.md#emit) -- [errorStr](VM.md#errorstr) -- [eventNames](VM.md#eventnames) -- [first](VM.md#first) -- [getMaxListeners](VM.md#getmaxlisteners) -- [init](VM.md#init) -- [listenerCount](VM.md#listenercount) -- [listeners](VM.md#listeners) -- [off](VM.md#off) -- [on](VM.md#on) -- [once](VM.md#once) -- [prependListener](VM.md#prependlistener) -- [prependOnceListener](VM.md#prependoncelistener) -- [rawListeners](VM.md#rawlisteners) -- [removeAllListeners](VM.md#removealllisteners) -- [removeListener](VM.md#removelistener) -- [runBlock](VM.md#runblock) -- [runTx](VM.md#runtx) -- [setMaxListeners](VM.md#setmaxlisteners) -- [create](VM.md#create) -- [getEventListeners](VM.md#geteventlisteners) -- [listenerCount](VM.md#listenercount-1) -- [on](VM.md#on-1) -- [once](VM.md#once-1) -- [setMaxListeners](VM.md#setmaxlisteners-1) - -## Properties - -### \_common - -• `Readonly` **\_common**: `Common` - -#### Defined in - -[packages/vm/src/vm.ts:45](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L45) - -___ - -### blockchain - -• `Readonly` **blockchain**: `BlockchainInterface` - -The blockchain the VM operates on - -#### Defined in - -[packages/vm/src/vm.ts:43](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L43) - -___ - -### eei - -• `Readonly` **eei**: `EEIInterface` - -#### Defined in - -[packages/vm/src/vm.ts:51](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L51) - -___ - -### evm - -• `Readonly` **evm**: `EVM` \| `EVMInterface` - -The EVM used for bytecode execution - -#### Defined in - -[packages/vm/src/vm.ts:50](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L50) - -___ - -### stateManager - -• `Readonly` **stateManager**: `StateManager` - -The StateManager used by the VM - -#### Defined in - -[packages/vm/src/vm.ts:38](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L38) - -___ - -### captureRejectionSymbol - -▪ `Static` `Readonly` **captureRejectionSymbol**: typeof [`captureRejectionSymbol`](VM.md#capturerejectionsymbol) - -#### Inherited from - -AsyncEventEmitter.captureRejectionSymbol - -#### Defined in - -node_modules/@types/node/events.d.ts:291 - -___ - -### captureRejections - -▪ `Static` **captureRejections**: `boolean` - -Sets or gets the default captureRejection value for all emitters. - -#### Inherited from - -AsyncEventEmitter.captureRejections - -#### Defined in - -node_modules/@types/node/events.d.ts:296 - -___ - -### defaultMaxListeners - -▪ `Static` **defaultMaxListeners**: `number` - -#### Inherited from - -AsyncEventEmitter.defaultMaxListeners - -#### Defined in - -node_modules/@types/node/events.d.ts:297 - -___ - -### errorMonitor - -▪ `Static` `Readonly` **errorMonitor**: typeof [`errorMonitor`](VM.md#errormonitor) - -This symbol shall be used to install a listener for only monitoring `'error'` -events. Listeners installed using this symbol are called before the regular -`'error'` listeners are called. - -Installing a listener using this symbol does not change the behavior once an -`'error'` event is emitted, therefore the process will still crash if no -regular `'error'` listener is installed. - -#### Inherited from - -AsyncEventEmitter.errorMonitor - -#### Defined in - -node_modules/@types/node/events.d.ts:290 - -## Methods - -### addListener - -▸ **addListener**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.addListener - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:82 - -___ - -### after - -▸ **after**<`E`\>(`event`, `target`, `listener`): [`VM`](VM.md) - -Adds a listener after the target listener in the listeners array for the specified event. - -**`See`** - -https://www.npmjs.com/package/async-eventemitter#important-differences-between-asynceventemitter-the-native-eventemitter - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `event` | `E` & `string` | EventMap key (event name) | -| `target` | [`VMEvents`](../README.md#vmevents)[`E`] | Listener to insert before | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | EventMap value (event function) | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.after - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:75 - -___ - -### at - -▸ **at**<`E`\>(`event`, `index`, `listener`): [`VM`](VM.md) - -Adds a listener at the specified index in the listeners array for the specified event. - -**`See`** - -https://www.npmjs.com/package/async-eventemitter#important-differences-between-asynceventemitter-the-native-eventemitter - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `event` | `E` & `string` | EventMap key (event name) | -| `index` | `number` | Index to insert at | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | EventMap value (event function) | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.at - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:55 - -___ - -### before - -▸ **before**<`E`\>(`event`, `target`, `listener`): [`VM`](VM.md) - -Adds a listener before the target listener in the listeners array for the specified event. - -**`See`** - -https://www.npmjs.com/package/async-eventemitter#important-differences-between-asynceventemitter-the-native-eventemitter - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `event` | `E` & `string` | EventMap key (event name) | -| `target` | [`VMEvents`](../README.md#vmevents)[`E`] | Listener to insert before | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | EventMap value (event function) | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.before - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:63 - -___ - -### buildBlock - -▸ **buildBlock**(`opts`): `Promise`<`BlockBuilder`\> - -Build a block on top of the current state -by adding one transaction at a time. - -Creates a checkpoint on the StateManager and modifies the state -as transactions are run. The checkpoint is committed on BlockBuilder.build -or discarded with BlockBuilder.revert. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | [`BuildBlockOpts`](../interfaces/BuildBlockOpts.md) | - -#### Returns - -`Promise`<`BlockBuilder`\> - -An instance of BlockBuilder with methods: -- BlockBuilder.addTransaction -- BlockBuilder.build -- BlockBuilder.revert - -#### Defined in - -[packages/vm/src/vm.ts:240](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L240) - -___ - -### copy - -▸ **copy**(): `Promise`<[`VM`](VM.md)\> - -Returns a copy of the [VM](VM.md) instance. - -#### Returns - -`Promise`<[`VM`](VM.md)\> - -#### Defined in - -[packages/vm/src/vm.ts:247](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L247) - -___ - -### emit - -▸ **emit**<`E`\>(`event`, ...`args`): `boolean` - -Executes all listeners for the event in order with the supplied data argument. -The optional callback is called when all of the listeners are done. - -**`See`** - -https://www.npmjs.com/package/async-eventemitter#important-differences-between-asynceventemitter-the-native-eventemitter - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `event` | `E` & `string` | EventMap key (event name) | -| `...args` | `Parameters`<[`VMEvents`](../README.md#vmevents)[`E`]\> | EventMap parameters | - -#### Returns - -`boolean` - -#### Inherited from - -AsyncEventEmitter.emit - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:37 - -___ - -### errorStr - -▸ **errorStr**(): `string` - -Return a compact error string representation of the object - -#### Returns - -`string` - -#### Defined in - -[packages/vm/src/vm.ts:263](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L263) - -___ - -### eventNames - -▸ **eventNames**(): (``"beforeTx"`` \| ``"afterTx"`` \| ``"beforeBlock"`` \| ``"afterBlock"``)[] - -#### Returns - -(``"beforeTx"`` \| ``"afterTx"`` \| ``"beforeBlock"`` \| ``"afterBlock"``)[] - -#### Inherited from - -AsyncEventEmitter.eventNames - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:94 - -___ - -### first - -▸ **first**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -Adds a listener to the beginning of the listeners array for the specified event. - -**`See`** - -https://www.npmjs.com/package/async-eventemitter#important-differences-between-asynceventemitter-the-native-eventemitter - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `event` | `E` & `string` | EventMap key (event name) | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | EventMap value (event function) | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.first - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:47 - -___ - -### getMaxListeners - -▸ **getMaxListeners**(): `number` - -#### Returns - -`number` - -#### Inherited from - -AsyncEventEmitter.getMaxListeners - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:98 - -___ - -### init - -▸ **init**(): `Promise`<`void`\> - -#### Returns - -`Promise`<`void`\> - -#### Defined in - -[packages/vm/src/vm.ts:160](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L160) - -___ - -### listenerCount - -▸ **listenerCount**(`event`): `number` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | ``"beforeTx"`` \| ``"afterTx"`` \| ``"beforeBlock"`` \| ``"afterBlock"`` | - -#### Returns - -`number` - -#### Inherited from - -AsyncEventEmitter.listenerCount - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:96 - -___ - -### listeners - -▸ **listeners**<`E`\>(`event`): [`VMEvents`](../README.md#vmevents)[`E`][] - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | - -#### Returns - -[`VMEvents`](../README.md#vmevents)[`E`][] - -#### Inherited from - -AsyncEventEmitter.listeners - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:95 - -___ - -### off - -▸ **off**(`eventName`, `listener`): [`VM`](VM.md) - -Alias for `emitter.removeListener()`. - -**`Since`** - -v10.0.0 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `eventName` | `string` \| `symbol` | -| `listener` | (...`args`: `any`[]) => `void` | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.off - -#### Defined in - -node_modules/@types/node/events.d.ts:462 - -___ - -### on - -▸ **on**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.on - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:83 - -___ - -### once - -▸ **once**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.once - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:84 - -___ - -### prependListener - -▸ **prependListener**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.prependListener - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:85 - -___ - -### prependOnceListener - -▸ **prependOnceListener**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.prependOnceListener - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:86 - -___ - -### rawListeners - -▸ **rawListeners**(`eventName`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`, -including any wrappers (such as those created by `.once()`). - -```js -const emitter = new EventEmitter(); -emitter.once('log', () => console.log('log once')); - -// Returns a new Array with a function `onceWrapper` which has a property -// `listener` which contains the original listener bound above -const listeners = emitter.rawListeners('log'); -const logFnWrapper = listeners[0]; - -// Logs "log once" to the console and does not unbind the `once` event -logFnWrapper.listener(); - -// Logs "log once" to the console and removes the listener -logFnWrapper(); - -emitter.on('log', () => console.log('log persistently')); -// Will return a new Array with a single function bound by `.on()` above -const newListeners = emitter.rawListeners('log'); - -// Logs "log persistently" twice -newListeners[0](); -emitter.emit('log'); -``` - -**`Since`** - -v9.4.0 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `eventName` | `string` \| `symbol` | - -#### Returns - -`Function`[] - -#### Inherited from - -AsyncEventEmitter.rawListeners - -#### Defined in - -node_modules/@types/node/events.d.ts:532 - -___ - -### removeAllListeners - -▸ **removeAllListeners**(`event?`): [`VM`](VM.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event?` | ``"beforeTx"`` \| ``"afterTx"`` \| ``"beforeBlock"`` \| ``"afterBlock"`` | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.removeAllListeners - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:91 - -___ - -### removeListener - -▸ **removeListener**<`E`\>(`event`, `listener`): [`VM`](VM.md) - -#### Type parameters - -| Name | Type | -| :------ | :------ | -| `E` | extends keyof [`VMEvents`](../README.md#vmevents) | - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `event` | `E` & `string` | -| `listener` | [`VMEvents`](../README.md#vmevents)[`E`] | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.removeListener - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:92 - -___ - -### runBlock - -▸ **runBlock**(`opts`): `Promise`<[`RunBlockResult`](../interfaces/RunBlockResult.md)\> - -Processes the `block` running all of the transactions it contains and updating the miner's account - -This method modifies the state. If `generate` is `true`, the state modifications will be -reverted if an exception is raised. If it's `false`, it won't revert if the block's header is -invalid. If an error is thrown from an event handler, the state may or may not be reverted. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | [`RunBlockOpts`](../interfaces/RunBlockOpts.md) | Default values for options: - `generate`: false | - -#### Returns - -`Promise`<[`RunBlockResult`](../interfaces/RunBlockResult.md)\> - -#### Defined in - -[packages/vm/src/vm.ts:209](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L209) - -___ - -### runTx - -▸ **runTx**(`opts`): `Promise`<[`RunTxResult`](../interfaces/RunTxResult.md)\> - -Process a transaction. Run the vm. Transfers eth. Checks balances. - -This method modifies the state. If an error is thrown, the modifications are reverted, except -when the error is thrown from an event handler. In the latter case the state may or may not be -reverted. - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `opts` | [`RunTxOpts`](../interfaces/RunTxOpts.md) | - -#### Returns - -`Promise`<[`RunTxResult`](../interfaces/RunTxResult.md)\> - -#### Defined in - -[packages/vm/src/vm.ts:222](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L222) - -___ - -### setMaxListeners - -▸ **setMaxListeners**(`maxListeners`): [`VM`](VM.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `maxListeners` | `number` | - -#### Returns - -[`VM`](VM.md) - -#### Inherited from - -AsyncEventEmitter.setMaxListeners - -#### Defined in - -node_modules/@types/async-eventemitter/index.d.ts:99 - -___ - -### create - -▸ `Static` **create**(`opts?`): `Promise`<[`VM`](VM.md)\> - -VM async constructor. Creates engine instance and initializes it. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `opts` | [`VMOpts`](../interfaces/VMOpts.md) | VM engine constructor options | - -#### Returns - -`Promise`<[`VM`](VM.md)\> - -#### Defined in - -[packages/vm/src/vm.ts:81](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/vm.ts#L81) - -___ - -### getEventListeners - -▸ `Static` **getEventListeners**(`emitter`, `name`): `Function`[] - -Returns a copy of the array of listeners for the event named `eventName`. - -For `EventEmitter`s this behaves exactly the same as calling `.listeners` on -the emitter. - -For `EventTarget`s this is the only way to get the event listeners for the -event target. This is useful for debugging and diagnostic purposes. - -```js -const { getEventListeners, EventEmitter } = require('events'); - -{ - const ee = new EventEmitter(); - const listener = () => console.log('Events are fun'); - ee.on('foo', listener); - getEventListeners(ee, 'foo'); // [listener] -} -{ - const et = new EventTarget(); - const listener = () => console.log('Events are fun'); - et.addEventListener('foo', listener); - getEventListeners(et, 'foo'); // [listener] -} -``` - -**`Since`** - -v15.2.0 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `emitter` | `EventEmitter` \| `DOMEventTarget` | -| `name` | `string` \| `symbol` | - -#### Returns - -`Function`[] - -#### Inherited from - -AsyncEventEmitter.getEventListeners - -#### Defined in - -node_modules/@types/node/events.d.ts:262 - -___ - -### listenerCount - -▸ `Static` **listenerCount**(`emitter`, `eventName`): `number` - -A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`. - -```js -const { EventEmitter, listenerCount } = require('events'); -const myEmitter = new EventEmitter(); -myEmitter.on('event', () => {}); -myEmitter.on('event', () => {}); -console.log(listenerCount(myEmitter, 'event')); -// Prints: 2 -``` - -**`Since`** - -v0.9.12 - -**`Deprecated`** - -Since v3.2.0 - Use `listenerCount` instead. - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `emitter` | `EventEmitter` | The emitter to query | -| `eventName` | `string` \| `symbol` | The event name | - -#### Returns - -`number` - -#### Inherited from - -AsyncEventEmitter.listenerCount - -#### Defined in - -node_modules/@types/node/events.d.ts:234 - -___ - -### on - -▸ `Static` **on**(`emitter`, `eventName`, `options?`): `AsyncIterableIterator`<`any`\> - -```js -const { on, EventEmitter } = require('events'); - -(async () => { - const ee = new EventEmitter(); - - // Emit later on - process.nextTick(() => { - ee.emit('foo', 'bar'); - ee.emit('foo', 42); - }); - - for await (const event of on(ee, 'foo')) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] - } - // Unreachable here -})(); -``` - -Returns an `AsyncIterator` that iterates `eventName` events. It will throw -if the `EventEmitter` emits `'error'`. It removes all listeners when -exiting the loop. The `value` returned by each iteration is an array -composed of the emitted event arguments. - -An `AbortSignal` can be used to cancel waiting on events: - -```js -const { on, EventEmitter } = require('events'); -const ac = new AbortController(); - -(async () => { - const ee = new EventEmitter(); - - // Emit later on - process.nextTick(() => { - ee.emit('foo', 'bar'); - ee.emit('foo', 42); - }); - - for await (const event of on(ee, 'foo', { signal: ac.signal })) { - // The execution of this inner block is synchronous and it - // processes one event at a time (even with await). Do not use - // if concurrent execution is required. - console.log(event); // prints ['bar'] [42] - } - // Unreachable here -})(); - -process.nextTick(() => ac.abort()); -``` - -**`Since`** - -v13.6.0, v12.16.0 - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `emitter` | `EventEmitter` | - | -| `eventName` | `string` | The name of the event being listened for | -| `options?` | `StaticEventEmitterOptions` | - | - -#### Returns - -`AsyncIterableIterator`<`any`\> - -that iterates `eventName` events emitted by the `emitter` - -#### Inherited from - -AsyncEventEmitter.on - -#### Defined in - -node_modules/@types/node/events.d.ts:217 - -___ - -### once - -▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\> - -Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given -event or that is rejected if the `EventEmitter` emits `'error'` while waiting. -The `Promise` will resolve with an array of all the arguments emitted to the -given event. - -This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event -semantics and does not listen to the `'error'` event. - -```js -const { once, EventEmitter } = require('events'); - -async function run() { - const ee = new EventEmitter(); - - process.nextTick(() => { - ee.emit('myevent', 42); - }); - - const [value] = await once(ee, 'myevent'); - console.log(value); - - const err = new Error('kaboom'); - process.nextTick(() => { - ee.emit('error', err); - }); - - try { - await once(ee, 'myevent'); - } catch (err) { - console.log('error happened', err); - } -} - -run(); -``` - -The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the -'`error'` event itself, then it is treated as any other kind of event without -special handling: - -```js -const { EventEmitter, once } = require('events'); - -const ee = new EventEmitter(); - -once(ee, 'error') - .then(([err]) => console.log('ok', err.message)) - .catch((err) => console.log('error', err.message)); - -ee.emit('error', new Error('boom')); - -// Prints: ok boom -``` - -An `AbortSignal` can be used to cancel waiting for the event: - -```js -const { EventEmitter, once } = require('events'); - -const ee = new EventEmitter(); -const ac = new AbortController(); - -async function foo(emitter, event, signal) { - try { - await once(emitter, event, { signal }); - console.log('event emitted!'); - } catch (error) { - if (error.name === 'AbortError') { - console.error('Waiting for the event was canceled!'); - } else { - console.error('There was an error', error.message); - } - } -} - -foo(ee, 'foo', ac.signal); -ac.abort(); // Abort waiting for the event -ee.emit('foo'); // Prints: Waiting for the event was canceled! -``` - -**`Since`** - -v11.13.0, v10.16.0 - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `emitter` | `NodeEventTarget` | -| `eventName` | `string` \| `symbol` | -| `options?` | `StaticEventEmitterOptions` | - -#### Returns - -`Promise`<`any`[]\> - -#### Inherited from - -AsyncEventEmitter.once - -#### Defined in - -node_modules/@types/node/events.d.ts:157 - -▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `emitter` | `DOMEventTarget` | -| `eventName` | `string` | -| `options?` | `StaticEventEmitterOptions` | - -#### Returns - -`Promise`<`any`[]\> - -#### Inherited from - -AsyncEventEmitter.once - -#### Defined in - -node_modules/@types/node/events.d.ts:158 - -___ - -### setMaxListeners - -▸ `Static` **setMaxListeners**(`n?`, ...`eventTargets`): `void` - -```js -const { - setMaxListeners, - EventEmitter -} = require('events'); - -const target = new EventTarget(); -const emitter = new EventEmitter(); - -setMaxListeners(5, target, emitter); -``` - -**`Since`** - -v15.4.0 - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `n?` | `number` | A non-negative number. The maximum number of listeners per `EventTarget` event. | -| `...eventTargets` | (`EventEmitter` \| `DOMEventTarget`)[] | - | - -#### Returns - -`void` - -#### Inherited from - -AsyncEventEmitter.setMaxListeners - -#### Defined in - -node_modules/@types/node/events.d.ts:280 diff --git a/packages/vm/docs/interfaces/AfterBlockEvent.md b/packages/vm/docs/interfaces/AfterBlockEvent.md deleted file mode 100644 index 7cd12236e4..0000000000 --- a/packages/vm/docs/interfaces/AfterBlockEvent.md +++ /dev/null @@ -1,129 +0,0 @@ -[@ethereumjs/vm](../README.md) / AfterBlockEvent - -# Interface: AfterBlockEvent - -Result of runBlock - -## Hierarchy - -- [`RunBlockResult`](RunBlockResult.md) - - ↳ **`AfterBlockEvent`** - -## Table of contents - -### Properties - -- [block](AfterBlockEvent.md#block) -- [gasUsed](AfterBlockEvent.md#gasused) -- [logsBloom](AfterBlockEvent.md#logsbloom) -- [receiptRoot](AfterBlockEvent.md#receiptroot) -- [receipts](AfterBlockEvent.md#receipts) -- [results](AfterBlockEvent.md#results) -- [stateRoot](AfterBlockEvent.md#stateroot) - -## Properties - -### block - -• **block**: `Block` - -#### Defined in - -[packages/vm/src/types.ts:277](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L277) - -___ - -### gasUsed - -• **gasUsed**: `bigint` - -The gas used after executing the block - -#### Inherited from - -[RunBlockResult](RunBlockResult.md).[gasUsed](RunBlockResult.md#gasused) - -#### Defined in - -[packages/vm/src/types.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L264) - -___ - -### logsBloom - -• **logsBloom**: `Buffer` - -The bloom filter of the LOGs (events) after executing the block - -#### Inherited from - -[RunBlockResult](RunBlockResult.md).[logsBloom](RunBlockResult.md#logsbloom) - -#### Defined in - -[packages/vm/src/types.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L268) - -___ - -### receiptRoot - -• **receiptRoot**: `Buffer` - -The receipt root after executing the block - -#### Inherited from - -[RunBlockResult](RunBlockResult.md).[receiptRoot](RunBlockResult.md#receiptroot) - -#### Defined in - -[packages/vm/src/types.ts:272](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L272) - -___ - -### receipts - -• **receipts**: [`TxReceipt`](../README.md#txreceipt)[] - -Receipts generated for transactions in the block - -#### Inherited from - -[RunBlockResult](RunBlockResult.md).[receipts](RunBlockResult.md#receipts) - -#### Defined in - -[packages/vm/src/types.ts:252](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L252) - -___ - -### results - -• **results**: [`RunTxResult`](RunTxResult.md)[] - -Results of executing the transactions in the block - -#### Inherited from - -[RunBlockResult](RunBlockResult.md).[results](RunBlockResult.md#results) - -#### Defined in - -[packages/vm/src/types.ts:256](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L256) - -___ - -### stateRoot - -• **stateRoot**: `Buffer` - -The stateRoot after executing the block - -#### Inherited from - -[RunBlockResult](RunBlockResult.md).[stateRoot](RunBlockResult.md#stateroot) - -#### Defined in - -[packages/vm/src/types.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L260) diff --git a/packages/vm/docs/interfaces/AfterTxEvent.md b/packages/vm/docs/interfaces/AfterTxEvent.md deleted file mode 100644 index 5a195903a8..0000000000 --- a/packages/vm/docs/interfaces/AfterTxEvent.md +++ /dev/null @@ -1,167 +0,0 @@ -[@ethereumjs/vm](../README.md) / AfterTxEvent - -# Interface: AfterTxEvent - -Execution result of a transaction - -## Hierarchy - -- [`RunTxResult`](RunTxResult.md) - - ↳ **`AfterTxEvent`** - -## Table of contents - -### Properties - -- [accessList](AfterTxEvent.md#accesslist) -- [amountSpent](AfterTxEvent.md#amountspent) -- [bloom](AfterTxEvent.md#bloom) -- [createdAddress](AfterTxEvent.md#createdaddress) -- [execResult](AfterTxEvent.md#execresult) -- [gasRefund](AfterTxEvent.md#gasrefund) -- [receipt](AfterTxEvent.md#receipt) -- [totalGasSpent](AfterTxEvent.md#totalgasspent) -- [transaction](AfterTxEvent.md#transaction) - -## Properties - -### accessList - -• `Optional` **accessList**: `AccessList` - -EIP-2930 access list generated for the tx (see `reportAccessList` option) - -#### Inherited from - -[RunTxResult](RunTxResult.md).[accessList](RunTxResult.md#accesslist) - -#### Defined in - -[packages/vm/src/types.ts:360](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L360) - -___ - -### amountSpent - -• **amountSpent**: `bigint` - -The amount of ether used by this transaction - -#### Inherited from - -[RunTxResult](RunTxResult.md).[amountSpent](RunTxResult.md#amountspent) - -#### Defined in - -[packages/vm/src/types.ts:338](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L338) - -___ - -### bloom - -• **bloom**: `Bloom` - -Bloom filter resulted from transaction - -#### Inherited from - -[RunTxResult](RunTxResult.md).[bloom](RunTxResult.md#bloom) - -#### Defined in - -[packages/vm/src/types.ts:333](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L333) - -___ - -### createdAddress - -• `Optional` **createdAddress**: `Address` - -Address of created account during transaction, if any - -#### Inherited from - -[RunTxResult](RunTxResult.md).[createdAddress](RunTxResult.md#createdaddress) - -#### Defined in - -packages/evm/dist/evm.d.ts:194 - -___ - -### execResult - -• **execResult**: `ExecResult` - -Contains the results from running the code, if any, as described in runCode - -#### Inherited from - -[RunTxResult](RunTxResult.md).[execResult](RunTxResult.md#execresult) - -#### Defined in - -packages/evm/dist/evm.d.ts:198 - -___ - -### gasRefund - -• **gasRefund**: `bigint` - -The amount of gas as that was refunded during the transaction (i.e. `gasUsed = totalGasConsumed - gasRefund`) - -#### Inherited from - -[RunTxResult](RunTxResult.md).[gasRefund](RunTxResult.md#gasrefund) - -#### Defined in - -[packages/vm/src/types.ts:355](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L355) - -___ - -### receipt - -• **receipt**: [`TxReceipt`](../README.md#txreceipt) - -The tx receipt - -#### Inherited from - -[RunTxResult](RunTxResult.md).[receipt](RunTxResult.md#receipt) - -#### Defined in - -[packages/vm/src/types.ts:343](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L343) - -___ - -### totalGasSpent - -• **totalGasSpent**: `bigint` - -The amount of gas used in this transaction, which is paid for -This contains the gas units that have been used on execution, plus the upfront cost, -which consists of calldata cost, intrinsic cost and optionally the access list costs - -#### Inherited from - -[RunTxResult](RunTxResult.md).[totalGasSpent](RunTxResult.md#totalgasspent) - -#### Defined in - -[packages/vm/src/types.ts:350](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L350) - -___ - -### transaction - -• **transaction**: `TypedTransaction` - -The transaction which just got finished - -#### Defined in - -[packages/vm/src/types.ts:367](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L367) diff --git a/packages/vm/docs/interfaces/BaseTxReceipt.md b/packages/vm/docs/interfaces/BaseTxReceipt.md deleted file mode 100644 index dd999d5007..0000000000 --- a/packages/vm/docs/interfaces/BaseTxReceipt.md +++ /dev/null @@ -1,57 +0,0 @@ -[@ethereumjs/vm](../README.md) / BaseTxReceipt - -# Interface: BaseTxReceipt - -Abstract interface with common transaction receipt fields - -## Hierarchy - -- **`BaseTxReceipt`** - - ↳ [`PreByzantiumTxReceipt`](PreByzantiumTxReceipt.md) - - ↳ [`PostByzantiumTxReceipt`](PostByzantiumTxReceipt.md) - -## Table of contents - -### Properties - -- [bitvector](BaseTxReceipt.md#bitvector) -- [cumulativeBlockGasUsed](BaseTxReceipt.md#cumulativeblockgasused) -- [logs](BaseTxReceipt.md#logs) - -## Properties - -### bitvector - -• **bitvector**: `Buffer` - -Bloom bitvector - -#### Defined in - -[packages/vm/src/types.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L22) - -___ - -### cumulativeBlockGasUsed - -• **cumulativeBlockGasUsed**: `bigint` - -Cumulative gas used in the block including this tx - -#### Defined in - -[packages/vm/src/types.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L18) - -___ - -### logs - -• **logs**: `Log`[] - -Logs emitted - -#### Defined in - -[packages/vm/src/types.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L26) diff --git a/packages/vm/docs/interfaces/BuildBlockOpts.md b/packages/vm/docs/interfaces/BuildBlockOpts.md deleted file mode 100644 index a465f043ee..0000000000 --- a/packages/vm/docs/interfaces/BuildBlockOpts.md +++ /dev/null @@ -1,50 +0,0 @@ -[@ethereumjs/vm](../README.md) / BuildBlockOpts - -# Interface: BuildBlockOpts - -Options for building a block. - -## Table of contents - -### Properties - -- [blockOpts](BuildBlockOpts.md#blockopts) -- [headerData](BuildBlockOpts.md#headerdata) -- [parentBlock](BuildBlockOpts.md#parentblock) - -## Properties - -### blockOpts - -• `Optional` **blockOpts**: [`BuilderOpts`](BuilderOpts.md) - -The block and builder options to use. - -#### Defined in - -[packages/vm/src/types.ts:178](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L178) - -___ - -### headerData - -• `Optional` **headerData**: `HeaderData` - -The block header data to use. -Defaults used for any values not provided. - -#### Defined in - -[packages/vm/src/types.ts:173](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L173) - -___ - -### parentBlock - -• **parentBlock**: `Block` - -The parent block - -#### Defined in - -[packages/vm/src/types.ts:167](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L167) diff --git a/packages/vm/docs/interfaces/BuilderOpts.md b/packages/vm/docs/interfaces/BuilderOpts.md deleted file mode 100644 index cc3adf51d7..0000000000 --- a/packages/vm/docs/interfaces/BuilderOpts.md +++ /dev/null @@ -1,185 +0,0 @@ -[@ethereumjs/vm](../README.md) / BuilderOpts - -# Interface: BuilderOpts - -Options for the block builder. - -## Hierarchy - -- `BlockOptions` - - ↳ **`BuilderOpts`** - -## Table of contents - -### Properties - -- [calcDifficultyFromHeader](BuilderOpts.md#calcdifficultyfromheader) -- [cliqueSigner](BuilderOpts.md#cliquesigner) -- [common](BuilderOpts.md#common) -- [consensusFormatValidation](BuilderOpts.md#consensusformatvalidation) -- [freeze](BuilderOpts.md#freeze) -- [hardforkByBlockNumber](BuilderOpts.md#hardforkbyblocknumber) -- [hardforkByTTD](BuilderOpts.md#hardforkbyttd) -- [putBlockIntoBlockchain](BuilderOpts.md#putblockintoblockchain) - -## Properties - -### calcDifficultyFromHeader - -• `Optional` **calcDifficultyFromHeader**: `BlockHeader` - -If a preceding BlockHeader (usually the parent header) is given the preceding -header will be used to calculate the difficulty for this block and the calculated -difficulty takes precedence over a provided static `difficulty` value. - -Note that this option has no effect on networks other than PoW/Ethash networks -(respectively also deactivates on the Merge HF switching to PoS/Casper). - -#### Inherited from - -BlockOptions.calcDifficultyFromHeader - -#### Defined in - -packages/block/dist/types.d.ts:49 - -___ - -### cliqueSigner - -• `Optional` **cliqueSigner**: `Buffer` - -Provide a clique signer's privateKey to seal this block. -Will throw if provided on a non-PoA chain. - -#### Inherited from - -BlockOptions.cliqueSigner - -#### Defined in - -packages/block/dist/types.d.ts:66 - -___ - -### common - -• `Optional` **common**: `Common` - -A Common object defining the chain and the hardfork a block/block header belongs to. - -Object will be internally copied so that tx behavior don't incidentally -change on future HF changes. - -Default: Common object set to `mainnet` and the HF currently defined as the default -hardfork in the Common class. - -Current default hardfork: `merge` - -#### Inherited from - -BlockOptions.common - -#### Defined in - -packages/block/dist/types.d.ts:23 - -___ - -### consensusFormatValidation - -• `Optional` **consensusFormatValidation**: `boolean` - -Perform consensus validation checks on header if set. Defaults to true. - -#### Inherited from - -BlockOptions.consensusFormatValidation - -#### Defined in - -packages/block/dist/types.d.ts:70 - -___ - -### freeze - -• `Optional` **freeze**: `boolean` - -A block object by default gets frozen along initialization. This gives you -strong additional security guarantees on the consistency of the block parameters. -It also enables block hash caching when the `hash()` method is called multiple times. - -If you need to deactivate the block freeze - e.g. because you want to subclass block and -add aditional properties - it is strongly encouraged that you do the freeze yourself -within your code instead. - -Default: true - -#### Inherited from - -BlockOptions.freeze - -#### Defined in - -packages/block/dist/types.d.ts:61 - -___ - -### hardforkByBlockNumber - -• `Optional` **hardforkByBlockNumber**: `boolean` - -Determine the HF by the block number - -Default: `false` (HF is set to whatever default HF is set by the Common instance) - -#### Inherited from - -BlockOptions.hardforkByBlockNumber - -#### Defined in - -packages/block/dist/types.d.ts:29 - -___ - -### hardforkByTTD - -• `Optional` **hardforkByTTD**: `BigIntLike` - -Determine the HF by total difficulty (Merge HF) - -This option is a superset of `hardforkByBlockNumber` (so only use one of both options) -and determines the HF by both the block number and the TD. - -Since the TTD is only a threshold the block number will in doubt take precedence (imagine -e.g. both Merge and Shanghai HF blocks set and the block number from the block provided -pointing to a Shanghai block: this will lead to set the HF as Shanghai and not the Merge). - -#### Inherited from - -BlockOptions.hardforkByTTD - -#### Defined in - -packages/block/dist/types.d.ts:40 - -___ - -### putBlockIntoBlockchain - -• `Optional` **putBlockIntoBlockchain**: `boolean` - -Whether to put the block into the vm's blockchain after building it. -This is useful for completing a full cycle when building a block so -the only next step is to build again, however it may not be desired -if the block is being emulated or may be discarded as to not affect -the underlying blockchain. - -Default: true - -#### Defined in - -[packages/vm/src/types.ts:157](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L157) diff --git a/packages/vm/docs/interfaces/PostByzantiumTxReceipt.md b/packages/vm/docs/interfaces/PostByzantiumTxReceipt.md deleted file mode 100644 index 755576e6e3..0000000000 --- a/packages/vm/docs/interfaces/PostByzantiumTxReceipt.md +++ /dev/null @@ -1,81 +0,0 @@ -[@ethereumjs/vm](../README.md) / PostByzantiumTxReceipt - -# Interface: PostByzantiumTxReceipt - -Receipt type for Byzantium and beyond replacing the intermediary -state root field with a status code field (EIP-658) - -## Hierarchy - -- [`BaseTxReceipt`](BaseTxReceipt.md) - - ↳ **`PostByzantiumTxReceipt`** - -## Table of contents - -### Properties - -- [bitvector](PostByzantiumTxReceipt.md#bitvector) -- [cumulativeBlockGasUsed](PostByzantiumTxReceipt.md#cumulativeblockgasused) -- [logs](PostByzantiumTxReceipt.md#logs) -- [status](PostByzantiumTxReceipt.md#status) - -## Properties - -### bitvector - -• **bitvector**: `Buffer` - -Bloom bitvector - -#### Inherited from - -[BaseTxReceipt](BaseTxReceipt.md).[bitvector](BaseTxReceipt.md#bitvector) - -#### Defined in - -[packages/vm/src/types.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L22) - -___ - -### cumulativeBlockGasUsed - -• **cumulativeBlockGasUsed**: `bigint` - -Cumulative gas used in the block including this tx - -#### Inherited from - -[BaseTxReceipt](BaseTxReceipt.md).[cumulativeBlockGasUsed](BaseTxReceipt.md#cumulativeblockgasused) - -#### Defined in - -[packages/vm/src/types.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L18) - -___ - -### logs - -• **logs**: `Log`[] - -Logs emitted - -#### Inherited from - -[BaseTxReceipt](BaseTxReceipt.md).[logs](BaseTxReceipt.md#logs) - -#### Defined in - -[packages/vm/src/types.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L26) - -___ - -### status - -• **status**: ``0`` \| ``1`` - -Status of transaction, `1` if successful, `0` if an exception occured - -#### Defined in - -[packages/vm/src/types.ts:48](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L48) diff --git a/packages/vm/docs/interfaces/PreByzantiumTxReceipt.md b/packages/vm/docs/interfaces/PreByzantiumTxReceipt.md deleted file mode 100644 index a16a44acda..0000000000 --- a/packages/vm/docs/interfaces/PreByzantiumTxReceipt.md +++ /dev/null @@ -1,81 +0,0 @@ -[@ethereumjs/vm](../README.md) / PreByzantiumTxReceipt - -# Interface: PreByzantiumTxReceipt - -Pre-Byzantium receipt type with a field -for the intermediary state root - -## Hierarchy - -- [`BaseTxReceipt`](BaseTxReceipt.md) - - ↳ **`PreByzantiumTxReceipt`** - -## Table of contents - -### Properties - -- [bitvector](PreByzantiumTxReceipt.md#bitvector) -- [cumulativeBlockGasUsed](PreByzantiumTxReceipt.md#cumulativeblockgasused) -- [logs](PreByzantiumTxReceipt.md#logs) -- [stateRoot](PreByzantiumTxReceipt.md#stateroot) - -## Properties - -### bitvector - -• **bitvector**: `Buffer` - -Bloom bitvector - -#### Inherited from - -[BaseTxReceipt](BaseTxReceipt.md).[bitvector](BaseTxReceipt.md#bitvector) - -#### Defined in - -[packages/vm/src/types.ts:22](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L22) - -___ - -### cumulativeBlockGasUsed - -• **cumulativeBlockGasUsed**: `bigint` - -Cumulative gas used in the block including this tx - -#### Inherited from - -[BaseTxReceipt](BaseTxReceipt.md).[cumulativeBlockGasUsed](BaseTxReceipt.md#cumulativeblockgasused) - -#### Defined in - -[packages/vm/src/types.ts:18](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L18) - -___ - -### logs - -• **logs**: `Log`[] - -Logs emitted - -#### Inherited from - -[BaseTxReceipt](BaseTxReceipt.md).[logs](BaseTxReceipt.md#logs) - -#### Defined in - -[packages/vm/src/types.ts:26](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L26) - -___ - -### stateRoot - -• **stateRoot**: `Buffer` - -Intermediary state root - -#### Defined in - -[packages/vm/src/types.ts:37](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L37) diff --git a/packages/vm/docs/interfaces/RunBlockOpts.md b/packages/vm/docs/interfaces/RunBlockOpts.md deleted file mode 100644 index a2adebdab6..0000000000 --- a/packages/vm/docs/interfaces/RunBlockOpts.md +++ /dev/null @@ -1,123 +0,0 @@ -[@ethereumjs/vm](../README.md) / RunBlockOpts - -# Interface: RunBlockOpts - -Options for running a block. - -## Table of contents - -### Properties - -- [block](RunBlockOpts.md#block) -- [generate](RunBlockOpts.md#generate) -- [hardforkByTTD](RunBlockOpts.md#hardforkbyttd) -- [root](RunBlockOpts.md#root) -- [skipBalance](RunBlockOpts.md#skipbalance) -- [skipBlockValidation](RunBlockOpts.md#skipblockvalidation) -- [skipHeaderValidation](RunBlockOpts.md#skipheadervalidation) -- [skipNonce](RunBlockOpts.md#skipnonce) - -## Properties - -### block - -• **block**: `Block` - -The @ethereumjs/block to process - -#### Defined in - -[packages/vm/src/types.ts:205](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L205) - -___ - -### generate - -• `Optional` **generate**: `boolean` - -Whether to generate the stateRoot and other related fields. -If `true`, `runBlock` will set the fields `stateRoot`, `receiptTrie`, `gasUsed`, and `bloom` (logs bloom) after running the block. -If `false`, `runBlock` throws if any fields do not match. -Defaults to `false`. - -#### Defined in - -[packages/vm/src/types.ts:216](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L216) - -___ - -### hardforkByTTD - -• `Optional` **hardforkByTTD**: `bigint` - -For merge transition support, pass the chain TD up to the block being run - -#### Defined in - -[packages/vm/src/types.ts:242](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L242) - -___ - -### root - -• `Optional` **root**: `Buffer` - -Root of the state trie - -#### Defined in - -[packages/vm/src/types.ts:209](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L209) - -___ - -### skipBalance - -• `Optional` **skipBalance**: `boolean` - -If true, checks the balance of the `from` account for the transaction and sets its -balance equal equal to the upfront cost (gas limit * gas price + transaction value) - -#### Defined in - -[packages/vm/src/types.ts:238](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L238) - -___ - -### skipBlockValidation - -• `Optional` **skipBlockValidation**: `boolean` - -If true, will skip "Block validation": -Block validation validates the header (with respect to the blockchain), -the transactions, the transaction trie and the uncle hash. - -#### Defined in - -[packages/vm/src/types.ts:222](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L222) - -___ - -### skipHeaderValidation - -• `Optional` **skipHeaderValidation**: `boolean` - -if true, will skip "Header validation" -If the block has been picked from the blockchain to be executed, -header has already been validated, and can be skipped especially when -consensus of the chain has moved ahead. - -#### Defined in - -[packages/vm/src/types.ts:229](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L229) - -___ - -### skipNonce - -• `Optional` **skipNonce**: `boolean` - -If true, skips the nonce check - -#### Defined in - -[packages/vm/src/types.ts:233](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L233) diff --git a/packages/vm/docs/interfaces/RunBlockResult.md b/packages/vm/docs/interfaces/RunBlockResult.md deleted file mode 100644 index 78fc7eebf7..0000000000 --- a/packages/vm/docs/interfaces/RunBlockResult.md +++ /dev/null @@ -1,94 +0,0 @@ -[@ethereumjs/vm](../README.md) / RunBlockResult - -# Interface: RunBlockResult - -Result of runBlock - -## Hierarchy - -- **`RunBlockResult`** - - ↳ [`AfterBlockEvent`](AfterBlockEvent.md) - -## Table of contents - -### Properties - -- [gasUsed](RunBlockResult.md#gasused) -- [logsBloom](RunBlockResult.md#logsbloom) -- [receiptRoot](RunBlockResult.md#receiptroot) -- [receipts](RunBlockResult.md#receipts) -- [results](RunBlockResult.md#results) -- [stateRoot](RunBlockResult.md#stateroot) - -## Properties - -### gasUsed - -• **gasUsed**: `bigint` - -The gas used after executing the block - -#### Defined in - -[packages/vm/src/types.ts:264](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L264) - -___ - -### logsBloom - -• **logsBloom**: `Buffer` - -The bloom filter of the LOGs (events) after executing the block - -#### Defined in - -[packages/vm/src/types.ts:268](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L268) - -___ - -### receiptRoot - -• **receiptRoot**: `Buffer` - -The receipt root after executing the block - -#### Defined in - -[packages/vm/src/types.ts:272](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L272) - -___ - -### receipts - -• **receipts**: [`TxReceipt`](../README.md#txreceipt)[] - -Receipts generated for transactions in the block - -#### Defined in - -[packages/vm/src/types.ts:252](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L252) - -___ - -### results - -• **results**: [`RunTxResult`](RunTxResult.md)[] - -Results of executing the transactions in the block - -#### Defined in - -[packages/vm/src/types.ts:256](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L256) - -___ - -### stateRoot - -• **stateRoot**: `Buffer` - -The stateRoot after executing the block - -#### Defined in - -[packages/vm/src/types.ts:260](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L260) diff --git a/packages/vm/docs/interfaces/RunTxOpts.md b/packages/vm/docs/interfaces/RunTxOpts.md deleted file mode 100644 index 459af87573..0000000000 --- a/packages/vm/docs/interfaces/RunTxOpts.md +++ /dev/null @@ -1,110 +0,0 @@ -[@ethereumjs/vm](../README.md) / RunTxOpts - -# Interface: RunTxOpts - -Options for the `runTx` method. - -## Table of contents - -### Properties - -- [block](RunTxOpts.md#block) -- [blockGasUsed](RunTxOpts.md#blockgasused) -- [reportAccessList](RunTxOpts.md#reportaccesslist) -- [skipBalance](RunTxOpts.md#skipbalance) -- [skipBlockGasLimitValidation](RunTxOpts.md#skipblockgaslimitvalidation) -- [skipNonce](RunTxOpts.md#skipnonce) -- [tx](RunTxOpts.md#tx) - -## Properties - -### block - -• `Optional` **block**: `Block` - -The `@ethereumjs/block` the `tx` belongs to. -If omitted, a default blank block will be used. - -#### Defined in - -[packages/vm/src/types.ts:288](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L288) - -___ - -### blockGasUsed - -• `Optional` **blockGasUsed**: `bigint` - -To obtain an accurate tx receipt input the block gas used up until this tx. - -#### Defined in - -[packages/vm/src/types.ts:323](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L323) - -___ - -### reportAccessList - -• `Optional` **reportAccessList**: `boolean` - -If true, adds a generated EIP-2930 access list -to the `RunTxResult` returned. - -Option works with all tx types. EIP-2929 needs to -be activated (included in `berlin` HF). - -Note: if this option is used with a custom StateManager implementation -StateManager.generateAccessList must be implemented. - -#### Defined in - -[packages/vm/src/types.ts:318](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L318) - -___ - -### skipBalance - -• `Optional` **skipBalance**: `boolean` - -Skip balance checks if true. Adds transaction cost to balance to ensure execution doesn't fail. - -#### Defined in - -[packages/vm/src/types.ts:300](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L300) - -___ - -### skipBlockGasLimitValidation - -• `Optional` **skipBlockGasLimitValidation**: `boolean` - -If true, skips the validation of the tx's gas limit -against the block's gas limit. - -#### Defined in - -[packages/vm/src/types.ts:306](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L306) - -___ - -### skipNonce - -• `Optional` **skipNonce**: `boolean` - -If true, skips the nonce check - -#### Defined in - -[packages/vm/src/types.ts:296](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L296) - -___ - -### tx - -• **tx**: `TypedTransaction` - -An `@ethereumjs/tx` to run - -#### Defined in - -[packages/vm/src/types.ts:292](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L292) diff --git a/packages/vm/docs/interfaces/RunTxResult.md b/packages/vm/docs/interfaces/RunTxResult.md deleted file mode 100644 index 2dc83fe123..0000000000 --- a/packages/vm/docs/interfaces/RunTxResult.md +++ /dev/null @@ -1,132 +0,0 @@ -[@ethereumjs/vm](../README.md) / RunTxResult - -# Interface: RunTxResult - -Execution result of a transaction - -## Hierarchy - -- `EVMResult` - - ↳ **`RunTxResult`** - - ↳↳ [`AfterTxEvent`](AfterTxEvent.md) - -## Table of contents - -### Properties - -- [accessList](RunTxResult.md#accesslist) -- [amountSpent](RunTxResult.md#amountspent) -- [bloom](RunTxResult.md#bloom) -- [createdAddress](RunTxResult.md#createdaddress) -- [execResult](RunTxResult.md#execresult) -- [gasRefund](RunTxResult.md#gasrefund) -- [receipt](RunTxResult.md#receipt) -- [totalGasSpent](RunTxResult.md#totalgasspent) - -## Properties - -### accessList - -• `Optional` **accessList**: `AccessList` - -EIP-2930 access list generated for the tx (see `reportAccessList` option) - -#### Defined in - -[packages/vm/src/types.ts:360](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L360) - -___ - -### amountSpent - -• **amountSpent**: `bigint` - -The amount of ether used by this transaction - -#### Defined in - -[packages/vm/src/types.ts:338](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L338) - -___ - -### bloom - -• **bloom**: `Bloom` - -Bloom filter resulted from transaction - -#### Defined in - -[packages/vm/src/types.ts:333](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L333) - -___ - -### createdAddress - -• `Optional` **createdAddress**: `Address` - -Address of created account during transaction, if any - -#### Inherited from - -EVMResult.createdAddress - -#### Defined in - -packages/evm/dist/evm.d.ts:194 - -___ - -### execResult - -• **execResult**: `ExecResult` - -Contains the results from running the code, if any, as described in runCode - -#### Inherited from - -EVMResult.execResult - -#### Defined in - -packages/evm/dist/evm.d.ts:198 - -___ - -### gasRefund - -• **gasRefund**: `bigint` - -The amount of gas as that was refunded during the transaction (i.e. `gasUsed = totalGasConsumed - gasRefund`) - -#### Defined in - -[packages/vm/src/types.ts:355](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L355) - -___ - -### receipt - -• **receipt**: [`TxReceipt`](../README.md#txreceipt) - -The tx receipt - -#### Defined in - -[packages/vm/src/types.ts:343](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L343) - -___ - -### totalGasSpent - -• **totalGasSpent**: `bigint` - -The amount of gas used in this transaction, which is paid for -This contains the gas units that have been used on execution, plus the upfront cost, -which consists of calldata cost, intrinsic cost and optionally the access list costs - -#### Defined in - -[packages/vm/src/types.ts:350](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L350) diff --git a/packages/vm/docs/interfaces/SealBlockOpts.md b/packages/vm/docs/interfaces/SealBlockOpts.md deleted file mode 100644 index 93daae527c..0000000000 --- a/packages/vm/docs/interfaces/SealBlockOpts.md +++ /dev/null @@ -1,38 +0,0 @@ -[@ethereumjs/vm](../README.md) / SealBlockOpts - -# Interface: SealBlockOpts - -Options for sealing a block. - -## Table of contents - -### Properties - -- [mixHash](SealBlockOpts.md#mixhash) -- [nonce](SealBlockOpts.md#nonce) - -## Properties - -### mixHash - -• `Optional` **mixHash**: `Buffer` - -For PoW, the mixHash. -Overrides the value passed in the constructor. - -#### Defined in - -[packages/vm/src/types.ts:195](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L195) - -___ - -### nonce - -• `Optional` **nonce**: `Buffer` - -For PoW, the nonce. -Overrides the value passed in the constructor. - -#### Defined in - -[packages/vm/src/types.ts:189](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L189) diff --git a/packages/vm/docs/interfaces/VMOpts.md b/packages/vm/docs/interfaces/VMOpts.md deleted file mode 100644 index fdc779d36b..0000000000 --- a/packages/vm/docs/interfaces/VMOpts.md +++ /dev/null @@ -1,168 +0,0 @@ -[@ethereumjs/vm](../README.md) / VMOpts - -# Interface: VMOpts - -Options for instantiating a [VM](../classes/VM.md). - -## Table of contents - -### Properties - -- [activateGenesisState](VMOpts.md#activategenesisstate) -- [activatePrecompiles](VMOpts.md#activateprecompiles) -- [blockchain](VMOpts.md#blockchain) -- [common](VMOpts.md#common) -- [eei](VMOpts.md#eei) -- [evm](VMOpts.md#evm) -- [hardforkByBlockNumber](VMOpts.md#hardforkbyblocknumber) -- [hardforkByTTD](VMOpts.md#hardforkbyttd) -- [stateManager](VMOpts.md#statemanager) - -## Properties - -### activateGenesisState - -• `Optional` **activateGenesisState**: `boolean` - -If true, the state of the VM will add the genesis state given by Blockchain.genesisState to a newly -created state manager instance. Note that if stateManager option is also passed as argument -this flag won't have any effect. - -Default: `false` - -#### Defined in - -[packages/vm/src/types.ts:113](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L113) - -___ - -### activatePrecompiles - -• `Optional` **activatePrecompiles**: `boolean` - -If true, create entries in the state tree for the precompiled contracts, saving some gas the -first time each of them is called. - -If this parameter is false, each call to each of them has to pay an extra 25000 gas -for creating the account. If the account is still empty after this call, it will be deleted, -such that this extra cost has to be paid again. - -Setting this to true has the effect of precompiled contracts' gas costs matching mainnet's from -the very first call, which is intended for testing networks. - -Default: `false` - -#### Defined in - -[packages/vm/src/types.ts:105](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L105) - -___ - -### blockchain - -• `Optional` **blockchain**: `BlockchainInterface` - -A Blockchain object for storing/retrieving blocks - -#### Defined in - -[packages/vm/src/types.ts:91](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L91) - -___ - -### common - -• `Optional` **common**: `Common` - -Use a Common instance -if you want to change the chain setup. - -### Possible Values - -- `chain`: all chains supported by `Common` or a custom chain -- `hardfork`: `mainnet` hardforks up to the `Merge` hardfork -- `eips`: `2537` (usage e.g. `eips: [ 2537, ]`) - -Note: check the associated `@ethereumjs/evm` instance options -documentation for supported EIPs. - -### Default Setup - -Default setup if no `Common` instance is provided: - -- `chain`: `mainnet` -- `hardfork`: `merge` -- `eips`: `[]` - -#### Defined in - -[packages/vm/src/types.ts:83](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L83) - -___ - -### eei - -• `Optional` **eei**: `EEIInterface` - -Use a custom EEI for the EVM. If this is not present, use the default EEI. - -#### Defined in - -[packages/vm/src/types.ts:136](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L136) - -___ - -### evm - -• `Optional` **evm**: `EVMInterface` - -Use a custom EVM to run Messages on. If this is not present, use the default EVM. - -#### Defined in - -[packages/vm/src/types.ts:141](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L141) - -___ - -### hardforkByBlockNumber - -• `Optional` **hardforkByBlockNumber**: `boolean` - -Select hardfork based upon block number. This automatically switches to the right hard fork based upon the block number. - -Default: `false` - -#### Defined in - -[packages/vm/src/types.ts:120](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L120) - -___ - -### hardforkByTTD - -• `Optional` **hardforkByTTD**: `BigIntLike` - -Select the HF by total difficulty (Merge HF) - -This option is a superset of `hardforkByBlockNumber` (so only use one of both options) -and determines the HF by both the block number and the TD. - -Since the TD is only a threshold the block number will in doubt take precedence (imagine -e.g. both Merge and Shanghai HF blocks set and the block number from the block provided -pointing to a Shanghai block: this will lead to set the HF as Shanghai and not the Merge). - -#### Defined in - -[packages/vm/src/types.ts:131](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L131) - -___ - -### stateManager - -• `Optional` **stateManager**: `StateManager` - -A StateManager instance to use as the state store - -#### Defined in - -[packages/vm/src/types.ts:87](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/vm/src/types.ts#L87) diff --git a/packages/vm/package.json b/packages/vm/package.json index d5c1fb25bd..b582445f9a 100644 --- a/packages/vm/package.json +++ b/packages/vm/package.json @@ -1,6 +1,6 @@ { "name": "@ethereumjs/vm", - "version": "6.2.0", + "version": "6.3.0", "description": "An Ethereum VM implementation", "keywords": [ "ethereum", @@ -56,15 +56,15 @@ "tsc": "../../config/cli/ts-compile.sh" }, "dependencies": { - "@ethereumjs/block": "^4.0.1", - "@ethereumjs/blockchain": "^6.0.2", - "@ethereumjs/common": "^3.0.1", - "@ethereumjs/evm": "^1.2.2", + "@ethereumjs/block": "^4.1.0", + "@ethereumjs/blockchain": "^6.1.0", + "@ethereumjs/common": "^3.0.2", + "@ethereumjs/evm": "^1.2.3", "@ethereumjs/rlp": "^4.0.0", - "@ethereumjs/statemanager": "^1.0.1", - "@ethereumjs/trie": "^5.0.1", - "@ethereumjs/tx": "^4.0.1", - "@ethereumjs/util": "^8.0.2", + "@ethereumjs/statemanager": "^1.0.2", + "@ethereumjs/trie": "^5.0.2", + "@ethereumjs/tx": "^4.0.2", + "@ethereumjs/util": "^8.0.3", "debug": "^4.3.3", "ethereum-cryptography": "^1.1.2", "mcl-wasm": "^0.7.1",