From 0b9cf2c406a85cd7ac1c20f0aa610a5fb2696a17 Mon Sep 17 00:00:00 2001 From: Alex Luu Date: Tue, 16 Apr 2024 17:28:54 -0400 Subject: [PATCH 1/6] update changelog --- packages/web3-eth/CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/web3-eth/CHANGELOG.md b/packages/web3-eth/CHANGELOG.md index 90ad4805704..53834b70fa8 100644 --- a/packages/web3-eth/CHANGELOG.md +++ b/packages/web3-eth/CHANGELOG.md @@ -225,4 +225,9 @@ Documentation: - Added `eth.getMaxPriorityFeePerGas` method (#6748) -## [Unreleased] \ No newline at end of file +## [Unreleased] + +### Added + +- method `getBlock` now includes properties of eip 4844, 4895, 4788 when returning block (#6933) +- update type `Withdrawals`, `block` and `BlockHeaderOutput` and schemas to include properties of eip 4844, 4895, 4788 (#6933) \ No newline at end of file From a4f492f8910d899ac549091e7b9e7e2e9309116b Mon Sep 17 00:00:00 2001 From: Alex Luu Date: Tue, 16 Apr 2024 18:36:16 -0400 Subject: [PATCH 2/6] update version to 4.8.0 --- CHANGELOG.md | 44 ++++++++++++++++++++++++- packages/web3-eth-abi/CHANGELOG.md | 8 ++++- packages/web3-eth-abi/package.json | 8 ++--- packages/web3-eth-accounts/CHANGELOG.md | 7 +++- packages/web3-eth-accounts/package.json | 8 ++--- packages/web3-eth-contract/CHANGELOG.md | 4 ++- packages/web3-eth-contract/package.json | 12 +++---- packages/web3-eth/CHANGELOG.md | 6 ++-- packages/web3-eth/package.json | 12 +++---- packages/web3-types/CHANGELOG.md | 1 + packages/web3-types/package.json | 2 +- packages/web3-utils/CHANGELOG.md | 6 ++-- packages/web3-utils/package.json | 4 +-- packages/web3/CHANGELOG.md | 42 +++++++++++++++++++++++ packages/web3/package.json | 14 ++++---- packages/web3/src/version.ts | 2 +- 16 files changed, 141 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34609aba1c0..c007375e541 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2405,4 +2405,46 @@ If there are any bugs, improvements, optimizations or any new feature proposal f - fixed erroneous parsing of big numbers in the `toNumber(...)` function (#6880) -## [Unreleased] \ No newline at end of file +## [4.8.0] + +### Changed + +#### web3-eth-abi + +- Dependencies updated + +#### web3-eth-accounts + +- Dependencies updated + +### Fixed + +#### web3-eth-contract + +- Fix an issue with smart contract function overloading (#6922) + +#### web3-utils + +- fixed toHex incorrectly hexing Uint8Arrays and Buffer (#6957) +- fixed isUint8Array not returning true for Buffer (#6957) + + +### Added + +#### web3-eth-contract + +- Added a console warning in case of an ambiguous call to a solidity method with parameter overloading (#6942) +- Added contract.deploy(...).decodeData(...) and contract.decodeMethodData(...) that decode data based on the ABI (#6950) + +#### web3-eth + +- method `getBlock` now includes properties of eip 4844, 4895, 4788 when returning block (#6933) +- update type `withdrawalsSchema`, `blockSchema` and `blockHeaderSchema` schemas to include properties of eip 4844, 4895, 4788 (#6933) + + +#### web3-types + +- Added `signature` to type `AbiFunctionFragment` (#6922) +- update type `Withdrawals`, `block` and `BlockHeaderOutput` to include properties of eip 4844, 4895, 4788 (#6933) + +## [Unreleased] diff --git a/packages/web3-eth-abi/CHANGELOG.md b/packages/web3-eth-abi/CHANGELOG.md index 6fa52af5287..47f57f4d2a4 100644 --- a/packages/web3-eth-abi/CHANGELOG.md +++ b/packages/web3-eth-abi/CHANGELOG.md @@ -164,4 +164,10 @@ Documentation: - Fixed an issue with detecting Uint8Array (#6486) -## [Unreleased] +## [4.2.1] + +### Changed + +- Dependencies updated + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-abi/package.json b/packages/web3-eth-abi/package.json index 47802dc53c1..e24baf7117b 100644 --- a/packages/web3-eth-abi/package.json +++ b/packages/web3-eth-abi/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-abi", - "version": "4.2.0", + "version": "4.2.1", "description": "Web3 module encode and decode EVM in/output.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -44,9 +44,9 @@ "dependencies": { "abitype": "0.7.1", "web3-errors": "^1.1.4", - "web3-types": "^1.3.1", - "web3-utils": "^4.1.1", - "web3-validator": "^2.0.4" + "web3-types": "^1.6.0", + "web3-utils": "^4.2.3", + "web3-validator": "^2.0.5" }, "devDependencies": { "@humeris/espresso-shot": "^4.0.0", diff --git a/packages/web3-eth-accounts/CHANGELOG.md b/packages/web3-eth-accounts/CHANGELOG.md index 05682b29954..30514ec972d 100644 --- a/packages/web3-eth-accounts/CHANGELOG.md +++ b/packages/web3-eth-accounts/CHANGELOG.md @@ -156,5 +156,10 @@ Documentation: - Send Transaction config used to be ignored if the passed `common` did not have a `copy()` and the `chainId` was not provided (#6663) - Fixed an issue with detecting Uint8Array (#6486) -## [Unreleased] +## [4.1.2] +### Changed + +- Dependencies updated + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth-accounts/package.json b/packages/web3-eth-accounts/package.json index 1906d06b599..06416a260b2 100644 --- a/packages/web3-eth-accounts/package.json +++ b/packages/web3-eth-accounts/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-accounts", - "version": "4.1.1", + "version": "4.1.2", "description": "Package for managing Ethereum accounts and signing", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -62,8 +62,8 @@ "crc-32": "^1.2.2", "ethereum-cryptography": "^2.0.0", "web3-errors": "^1.1.4", - "web3-types": "^1.3.1", - "web3-utils": "^4.1.1", - "web3-validator": "^2.0.4" + "web3-types": "^1.6.0", + "web3-utils": "^4.2.3", + "web3-validator": "^2.0.5" } } diff --git a/packages/web3-eth-contract/CHANGELOG.md b/packages/web3-eth-contract/CHANGELOG.md index 3aa8afa88e8..2eb9a5ca676 100644 --- a/packages/web3-eth-contract/CHANGELOG.md +++ b/packages/web3-eth-contract/CHANGELOG.md @@ -370,7 +370,7 @@ Documentation: - Types `ContractDeploySend`, `ContractMethodSend`, `Web3PromiEvent` was exported (#6883) -## [Unreleased] +## [4.4.0] ### Fixed @@ -380,3 +380,5 @@ Documentation: - Added a console warning in case of an ambiguous call to a solidity method with parameter overloading (#6942) - Added contract.deploy(...).decodeData(...) and contract.decodeMethodData(...) that decode data based on the ABI (#6950) + +## [Unreleased] diff --git a/packages/web3-eth-contract/package.json b/packages/web3-eth-contract/package.json index 0ccf9536c56..f70734cc090 100644 --- a/packages/web3-eth-contract/package.json +++ b/packages/web3-eth-contract/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth-contract", - "version": "4.3.0", + "version": "4.4.0", "description": "Web3 module to interact with Ethereum smart contracts.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -47,10 +47,10 @@ "dependencies": { "web3-core": "^4.3.2", "web3-errors": "^1.1.4", - "web3-eth": "^4.5.0", - "web3-eth-abi": "^4.2.0", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.2", + "web3-eth": "^4.6.0", + "web3-eth-abi": "^4.2.1", + "web3-types": "^1.6.0", + "web3-utils": "^4.2.3", "web3-validator": "^2.0.5" }, "devDependencies": { @@ -68,7 +68,7 @@ "prettier": "^2.7.1", "ts-jest": "^29.1.1", "typescript": "^4.7.4", - "web3-eth-accounts": "^4.1.1", + "web3-eth-accounts": "^4.1.2", "web3-providers-ws": "^4.0.7" } } diff --git a/packages/web3-eth/CHANGELOG.md b/packages/web3-eth/CHANGELOG.md index 53834b70fa8..b4b937ce6ae 100644 --- a/packages/web3-eth/CHANGELOG.md +++ b/packages/web3-eth/CHANGELOG.md @@ -225,9 +225,11 @@ Documentation: - Added `eth.getMaxPriorityFeePerGas` method (#6748) -## [Unreleased] +## [4.6.0] ### Added - method `getBlock` now includes properties of eip 4844, 4895, 4788 when returning block (#6933) -- update type `Withdrawals`, `block` and `BlockHeaderOutput` and schemas to include properties of eip 4844, 4895, 4788 (#6933) \ No newline at end of file +- update type `withdrawalsSchema`, `blockSchema` and `blockHeaderSchema` schemas to include properties of eip 4844, 4895, 4788 (#6933) + +## [Unreleased] \ No newline at end of file diff --git a/packages/web3-eth/package.json b/packages/web3-eth/package.json index 7b53c9df5ab..565de7fed54 100644 --- a/packages/web3-eth/package.json +++ b/packages/web3-eth/package.json @@ -1,6 +1,6 @@ { "name": "web3-eth", - "version": "4.5.0", + "version": "4.6.0", "description": "Web3 module to interact with the Ethereum blockchain and smart contracts.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -65,13 +65,13 @@ "setimmediate": "^1.0.5", "web3-core": "^4.3.2", "web3-errors": "^1.1.4", - "web3-eth-abi": "^4.2.0", - "web3-eth-accounts": "^4.1.1", + "web3-eth-abi": "^4.2.1", + "web3-eth-accounts": "^4.1.2", "web3-net": "^4.0.7", "web3-providers-ws": "^4.0.7", "web3-rpc-methods": "^1.2.0", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.1", - "web3-validator": "^2.0.4" + "web3-types": "^1.6.0", + "web3-utils": "^4.2.3", + "web3-validator": "^2.0.5" } } diff --git a/packages/web3-types/CHANGELOG.md b/packages/web3-types/CHANGELOG.md index 7d1e3042b96..b3a8628c9a5 100644 --- a/packages/web3-types/CHANGELOG.md +++ b/packages/web3-types/CHANGELOG.md @@ -194,3 +194,4 @@ Documentation: ### Added - Added `signature` to type `AbiFunctionFragment` (#6922) +- update type `Withdrawals`, `block` and `BlockHeaderOutput` to include properties of eip 4844, 4895, 4788 (#6933) \ No newline at end of file diff --git a/packages/web3-types/package.json b/packages/web3-types/package.json index a254eb19f19..c89ae9c5b9f 100644 --- a/packages/web3-types/package.json +++ b/packages/web3-types/package.json @@ -1,6 +1,6 @@ { "name": "web3-types", - "version": "1.5.0", + "version": "1.6.0", "description": "Provide the common data structures and interfaces for web3 modules.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/web3-utils/CHANGELOG.md b/packages/web3-utils/CHANGELOG.md index c0ab0335bed..0d18cd22d3b 100644 --- a/packages/web3-utils/CHANGELOG.md +++ b/packages/web3-utils/CHANGELOG.md @@ -205,9 +205,11 @@ Documentation: - fixed erroneous parsing of big numbers in the `toNumber(...)` function (#6880) -## [Unreleased] +## [4.2.3] ### Fixed - fixed toHex incorrectly hexing Uint8Arrays and Buffer (#6957) -- fixed isUint8Array not returning true for Buffer \ No newline at end of file +- fixed isUint8Array not returning true for Buffer (#6957) + +## [Unreleased] diff --git a/packages/web3-utils/package.json b/packages/web3-utils/package.json index 33be7953d0f..c909a1ec735 100644 --- a/packages/web3-utils/package.json +++ b/packages/web3-utils/package.json @@ -1,7 +1,7 @@ { "name": "web3-utils", "sideEffects": false, - "version": "4.2.2", + "version": "4.2.3", "description": "Collection of utility functions used in web3.js.", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -66,7 +66,7 @@ "ethereum-cryptography": "^2.0.0", "eventemitter3": "^5.0.1", "web3-errors": "^1.1.4", - "web3-types": "^1.5.0", + "web3-types": "^1.6.0", "web3-validator": "^2.0.5" } } diff --git a/packages/web3/CHANGELOG.md b/packages/web3/CHANGELOG.md index d46d48112b7..5b7242c7ebb 100644 --- a/packages/web3/CHANGELOG.md +++ b/packages/web3/CHANGELOG.md @@ -220,4 +220,46 @@ Documentation: - fixed erroneous parsing of big numbers in the `toNumber(...)` function (#6880) +## [4.8.0] + +### Changed + +#### web3-eth-abi + +- Dependencies updated + +#### web3-eth-accounts + +- Dependencies updated + +### Fixed + +#### web3-eth-contract + +- Fix an issue with smart contract function overloading (#6922) + +#### web3-utils + +- fixed toHex incorrectly hexing Uint8Arrays and Buffer (#6957) +- fixed isUint8Array not returning true for Buffer (#6957) + + +### Added + +#### web3-eth-contract + +- Added a console warning in case of an ambiguous call to a solidity method with parameter overloading (#6942) +- Added contract.deploy(...).decodeData(...) and contract.decodeMethodData(...) that decode data based on the ABI (#6950) + +#### web3-eth + +- method `getBlock` now includes properties of eip 4844, 4895, 4788 when returning block (#6933) +- update type `withdrawalsSchema`, `blockSchema` and `blockHeaderSchema` schemas to include properties of eip 4844, 4895, 4788 (#6933) + + +#### web3-types + +- Added `signature` to type `AbiFunctionFragment` (#6922) +- update type `Withdrawals`, `block` and `BlockHeaderOutput` to include properties of eip 4844, 4895, 4788 (#6933) + ## [Unreleased] \ No newline at end of file diff --git a/packages/web3/package.json b/packages/web3/package.json index 5d20596abe8..5368b3e1bfd 100644 --- a/packages/web3/package.json +++ b/packages/web3/package.json @@ -1,6 +1,6 @@ { "name": "web3", - "version": "4.7.0", + "version": "4.8.0", "description": "Ethereum JavaScript API", "main": "./lib/commonjs/index.js", "module": "./lib/esm/index.js", @@ -88,10 +88,10 @@ "dependencies": { "web3-core": "^4.3.2", "web3-errors": "^1.1.4", - "web3-eth": "^4.5.0", - "web3-eth-abi": "^4.2.0", - "web3-eth-accounts": "^4.1.1", - "web3-eth-contract": "^4.3.0", + "web3-eth": "^4.6.0", + "web3-eth-abi": "^4.2.1", + "web3-eth-accounts": "^4.1.2", + "web3-eth-contract": "^4.4.0", "web3-eth-ens": "^4.2.0", "web3-eth-iban": "^4.0.7", "web3-eth-personal": "^4.0.8", @@ -99,8 +99,8 @@ "web3-providers-http": "^4.1.0", "web3-providers-ws": "^4.0.7", "web3-rpc-methods": "^1.2.0", - "web3-types": "^1.5.0", - "web3-utils": "^4.2.2", + "web3-types": "^1.6.0", + "web3-utils": "^4.2.3", "web3-validator": "^2.0.5" } } diff --git a/packages/web3/src/version.ts b/packages/web3/src/version.ts index c6e779f738c..8e4910766d8 100644 --- a/packages/web3/src/version.ts +++ b/packages/web3/src/version.ts @@ -1 +1 @@ -/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.7.0' }; +/* eslint-disable header/header */ export const Web3PkgInfo = { version: '4.8.0' }; From 6cd8b70ee5c8b15d7c1074e07ef7520bc86561eb Mon Sep 17 00:00:00 2001 From: Alex Luu Date: Wed, 17 Apr 2024 15:53:26 -0400 Subject: [PATCH 3/6] update e2e tests --- packages/web3/test/e2e/fixtures/sepolia.ts | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/packages/web3/test/e2e/fixtures/sepolia.ts b/packages/web3/test/e2e/fixtures/sepolia.ts index 9ab06b665db..42186b857c2 100644 --- a/packages/web3/test/e2e/fixtures/sepolia.ts +++ b/packages/web3/test/e2e/fixtures/sepolia.ts @@ -694,6 +694,105 @@ export const sepoliaBlock = { ], transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', uncles: [], + "withdrawals": [ + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x3112f", + "index": "0x3a477e", + "validatorIndex": "0x38b" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a477f", + "validatorIndex": "0x38c" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4780", + "validatorIndex": "0x38d" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x23743", + "index": "0x3a4781", + "validatorIndex": "0x38e" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4782", + "validatorIndex": "0x38f" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4783", + "validatorIndex": "0x390" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4784", + "validatorIndex": "0x391" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4785", + "validatorIndex": "0x392" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4786", + "validatorIndex": "0x393" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x25915", + "index": "0x3a4787", + "validatorIndex": "0x394" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4788", + "validatorIndex": "0x395" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a4789", + "validatorIndex": "0x396" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a478a", + "validatorIndex": "0x397" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a478b", + "validatorIndex": "0x398" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x2ef5d", + "index": "0x3a478c", + "validatorIndex": "0x399" + }, + { + "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", + "amount": "0x3112f", + "index": "0x3a478d", + "validatorIndex": "0x39a" + } + ], + "withdrawalsRoot": "0xb99e42eaca3fc1000aa8be987cf107e08030c0e9ca93dc6ea6b7df69e377f953" }; export const sepoliaBlockData: { From bf06f69b4f5ff63bd50fd0870aa0a132db21cc25 Mon Sep 17 00:00:00 2001 From: Alex Luu Date: Wed, 17 Apr 2024 16:01:39 -0400 Subject: [PATCH 4/6] update --- packages/web3/test/e2e/fixtures/sepolia.ts | 117 +++++++++++---------- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/packages/web3/test/e2e/fixtures/sepolia.ts b/packages/web3/test/e2e/fixtures/sepolia.ts index 42186b857c2..a7656fa29fc 100644 --- a/packages/web3/test/e2e/fixtures/sepolia.ts +++ b/packages/web3/test/e2e/fixtures/sepolia.ts @@ -638,63 +638,7 @@ export const sepoliaBlockHydrated = { ], transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', uncles: [], -}; - -export const sepoliaBlock = { - difficulty: '0x0', - extraData: '0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465', - gasLimit: '0x1c9c380', - gasUsed: '0x4952f0', - hash: '0x241dab30227f58633e69fc4128b1c2b09699ec274cd575e39e697c1e460e5791', - logsBloom: - '0x0000000c0000000002000410a0101000080100004000001000000040200040020008800000800450001040004000000008004040008000000000000000a004000000400000002080008c020800006080010c22004000010100002001400008000082a040080211000c01010002000b00080000000800000004000010200100044020008008082100010008200805800001210000200000000004000004200000820800800000000010140040504400082404000300000000100080000000400000400002113000000000000040040008240000200000000110002011000001000018122010020000002400008000000008090810000002001000200800300000', - miner: '0x1e2cd78882b12d3954a049fd82ffd691565dc0a5', - mixHash: '0xddbb2beaede8c4a7c401156c0a02c58b3c0732e25bd5bfd350a599c54309929c', - nonce: '0x0', - number: '0x3148fe', - parentHash: '0x26b0438b6b537ec888afe7b673f633a0fdd3732c3629e1dee30e962a46444e9d', - receiptsRoot: '0x1ca1776ebf36ae37a1f48770684da37fe1c8fc134954b229b1f619e5e0ad2c51', - sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - size: '0xd66e', - stateRoot: '0xc9e235dd0e663f36fee8f80d860961f2e8056f4cdcce501372a77bc1fed20534', - totalDifficulty: '0x3c656d23029ab0', - timestamp: '0x642d14c0', - baseFeePerGas: '0x9', - transactions: [ - '0x5d703f823e7e4d6719def234cf8683d0d34708c2b0ce0285f4b008bf555b0481', - '0xa8a6e1f58adfe40a059e037c6c2b6e07bd23aa3d32d892bfcc6f40d85f22c907', - '0xa4335f3948675d7cd43b84078e3567860b4e1ffa79e9f6e5278f1d3fc860699d', - '0x25553d98cc5c2758b653b122a461e08250a0613752258ff1ecbea813632f08ef', - '0x5b7ae021605d0fad23fd882d48762851858bf0b6188641d619481f5ea230c502', - '0x6ff0dbf6f27ac5bd4cedebca54424e4ddf5bc6db1aeba945c2d980e7d759e5c5', - '0x234db0c295cf5d70729dc85b36a3df18007c80e1e6c5dd3465f739be81b062c5', - '0x745ebf4cddbadb01df7eb32e393df6f712bad3d6f45d935151eb402fa2bee5d6', - '0x35607880ee334b3e5a2bfc419aa32d4ec2b87445a0c58b347c945265ffc8e57e', - '0xb3f527bc8306499630857a4d92578b2d492762e7828580af536ed10128953327', - '0x59b21c5451f4c6bbaef6758aa4ddac3d350ee9d6f7f79cbc8aea1e4d6d30f32a', - '0xe3708d5286b2a3fdb73db6b9409c70e121e65cd5896682f011e97b578906245c', - '0x738a0a811d13a8735bd7b5ea4b784a0dff23e6bfd2b1897303f731bb49ef19bb', - '0xd63d4edc0ca6567cea22cb342eda67d37bd4a5a5a36cb66e233f368a8f98c7cb', - '0xd383977c4ab373914a2199b5673eb43b1cb3c86a129c29a440b67b8ee491bad2', - '0x554c50ff5d6578a8ea4a352651106151d0d4b5fc683fc4071096463744b3013a', - '0x92d5693632cfc366be1a143bf63aef7b6307db1227e40d7806d1fb21e67137f7', - '0x72bb6a4add14cb640948ebd801898076372c86bf2eac41154f414738da1d1a32', - '0xc33480b85a113f779725fd2c1788ab95b066792a898ee0eebb0e98c8fa605989', - '0xa8685562865ab1e6c73816fad05a38d6ea0670565ef27add5f4bd16db852eb46', - '0x7cff5abea75fd389d37b08fa73f8d4ea6c2a00f36c715fda422c8d92f05aed78', - '0xd844bf22fcdd8fd5c472638540f114824082359ef753a4f9c929889226dec5f2', - '0xbafae79055a392cea650f90096a305d1338a170a66b58dacaf69a7feb2b3f187', - '0xc9f12beaeff3325c3b58c03f66f6526593432f623d2a873bd8ca7e9f9d3c48dc', - '0xc8314b15135d8629e2423065b853fe91d7909d7cc9450e9477e667ba84eb45a9', - '0xc96f60d36bee10caaf4b40ddc2c90e752d7d4abebdd29646efff6b8a6454d070', - '0x61f293e6fc8978ee7e4f8c47e678f44ab08bc475134952452422c9ed96ea0b65', - '0xd463fb86b29f6fe631756bf475c210bac81a596486947e1439f6e63cfed71e84', - '0xcc3a340e784872ba9dba17f268029e94ed3c7a49f44a4b8c7a4b8cfe7325b9c4', - '0x31e1fd8c0516fba03ebaddf860ca4d16a63904e23b412ed7c2832c7906cf199b', - ], - transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', - uncles: [], - "withdrawals": [ + withdrawals: [ { "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", "amount": "0x3112f", @@ -792,7 +736,64 @@ export const sepoliaBlock = { "validatorIndex": "0x39a" } ], - "withdrawalsRoot": "0xb99e42eaca3fc1000aa8be987cf107e08030c0e9ca93dc6ea6b7df69e377f953" + withdrawalsRoot: "0xb99e42eaca3fc1000aa8be987cf107e08030c0e9ca93dc6ea6b7df69e377f953" + +}; + +export const sepoliaBlock = { + difficulty: '0x0', + extraData: '0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465', + gasLimit: '0x1c9c380', + gasUsed: '0x4952f0', + hash: '0x241dab30227f58633e69fc4128b1c2b09699ec274cd575e39e697c1e460e5791', + logsBloom: + '0x0000000c0000000002000410a0101000080100004000001000000040200040020008800000800450001040004000000008004040008000000000000000a004000000400000002080008c020800006080010c22004000010100002001400008000082a040080211000c01010002000b00080000000800000004000010200100044020008008082100010008200805800001210000200000000004000004200000820800800000000010140040504400082404000300000000100080000000400000400002113000000000000040040008240000200000000110002011000001000018122010020000002400008000000008090810000002001000200800300000', + miner: '0x1e2cd78882b12d3954a049fd82ffd691565dc0a5', + mixHash: '0xddbb2beaede8c4a7c401156c0a02c58b3c0732e25bd5bfd350a599c54309929c', + nonce: '0x0', + number: '0x3148fe', + parentHash: '0x26b0438b6b537ec888afe7b673f633a0fdd3732c3629e1dee30e962a46444e9d', + receiptsRoot: '0x1ca1776ebf36ae37a1f48770684da37fe1c8fc134954b229b1f619e5e0ad2c51', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + size: '0xd66e', + stateRoot: '0xc9e235dd0e663f36fee8f80d860961f2e8056f4cdcce501372a77bc1fed20534', + totalDifficulty: '0x3c656d23029ab0', + timestamp: '0x642d14c0', + baseFeePerGas: '0x9', + transactions: [ + '0x5d703f823e7e4d6719def234cf8683d0d34708c2b0ce0285f4b008bf555b0481', + '0xa8a6e1f58adfe40a059e037c6c2b6e07bd23aa3d32d892bfcc6f40d85f22c907', + '0xa4335f3948675d7cd43b84078e3567860b4e1ffa79e9f6e5278f1d3fc860699d', + '0x25553d98cc5c2758b653b122a461e08250a0613752258ff1ecbea813632f08ef', + '0x5b7ae021605d0fad23fd882d48762851858bf0b6188641d619481f5ea230c502', + '0x6ff0dbf6f27ac5bd4cedebca54424e4ddf5bc6db1aeba945c2d980e7d759e5c5', + '0x234db0c295cf5d70729dc85b36a3df18007c80e1e6c5dd3465f739be81b062c5', + '0x745ebf4cddbadb01df7eb32e393df6f712bad3d6f45d935151eb402fa2bee5d6', + '0x35607880ee334b3e5a2bfc419aa32d4ec2b87445a0c58b347c945265ffc8e57e', + '0xb3f527bc8306499630857a4d92578b2d492762e7828580af536ed10128953327', + '0x59b21c5451f4c6bbaef6758aa4ddac3d350ee9d6f7f79cbc8aea1e4d6d30f32a', + '0xe3708d5286b2a3fdb73db6b9409c70e121e65cd5896682f011e97b578906245c', + '0x738a0a811d13a8735bd7b5ea4b784a0dff23e6bfd2b1897303f731bb49ef19bb', + '0xd63d4edc0ca6567cea22cb342eda67d37bd4a5a5a36cb66e233f368a8f98c7cb', + '0xd383977c4ab373914a2199b5673eb43b1cb3c86a129c29a440b67b8ee491bad2', + '0x554c50ff5d6578a8ea4a352651106151d0d4b5fc683fc4071096463744b3013a', + '0x92d5693632cfc366be1a143bf63aef7b6307db1227e40d7806d1fb21e67137f7', + '0x72bb6a4add14cb640948ebd801898076372c86bf2eac41154f414738da1d1a32', + '0xc33480b85a113f779725fd2c1788ab95b066792a898ee0eebb0e98c8fa605989', + '0xa8685562865ab1e6c73816fad05a38d6ea0670565ef27add5f4bd16db852eb46', + '0x7cff5abea75fd389d37b08fa73f8d4ea6c2a00f36c715fda422c8d92f05aed78', + '0xd844bf22fcdd8fd5c472638540f114824082359ef753a4f9c929889226dec5f2', + '0xbafae79055a392cea650f90096a305d1338a170a66b58dacaf69a7feb2b3f187', + '0xc9f12beaeff3325c3b58c03f66f6526593432f623d2a873bd8ca7e9f9d3c48dc', + '0xc8314b15135d8629e2423065b853fe91d7909d7cc9450e9477e667ba84eb45a9', + '0xc96f60d36bee10caaf4b40ddc2c90e752d7d4abebdd29646efff6b8a6454d070', + '0x61f293e6fc8978ee7e4f8c47e678f44ab08bc475134952452422c9ed96ea0b65', + '0xd463fb86b29f6fe631756bf475c210bac81a596486947e1439f6e63cfed71e84', + '0xcc3a340e784872ba9dba17f268029e94ed3c7a49f44a4b8c7a4b8cfe7325b9c4', + '0x31e1fd8c0516fba03ebaddf860ca4d16a63904e23b412ed7c2832c7906cf199b', + ], + transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', + uncles: [] }; export const sepoliaBlockData: { From ce510b589c94617ae7d50924910dcbd649d0049c Mon Sep 17 00:00:00 2001 From: Alex Luu Date: Wed, 17 Apr 2024 17:09:16 -0400 Subject: [PATCH 5/6] update --- packages/web3/test/e2e/fixtures/sepolia.ts | 175 ++++++++++++++------- packages/web3/test/e2e/get_block.test.ts | 4 +- 2 files changed, 119 insertions(+), 60 deletions(-) diff --git a/packages/web3/test/e2e/fixtures/sepolia.ts b/packages/web3/test/e2e/fixtures/sepolia.ts index a7656fa29fc..0eac846b631 100644 --- a/packages/web3/test/e2e/fixtures/sepolia.ts +++ b/packages/web3/test/e2e/fixtures/sepolia.ts @@ -638,7 +638,121 @@ export const sepoliaBlockHydrated = { ], transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', uncles: [], - withdrawals: [ +}; + +export const sepoliaBlock = { + difficulty: '0x0', + extraData: '0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465', + gasLimit: '0x1c9c380', + gasUsed: '0x4952f0', + hash: '0x241dab30227f58633e69fc4128b1c2b09699ec274cd575e39e697c1e460e5791', + logsBloom: + '0x0000000c0000000002000410a0101000080100004000001000000040200040020008800000800450001040004000000008004040008000000000000000a004000000400000002080008c020800006080010c22004000010100002001400008000082a040080211000c01010002000b00080000000800000004000010200100044020008008082100010008200805800001210000200000000004000004200000820800800000000010140040504400082404000300000000100080000000400000400002113000000000000040040008240000200000000110002011000001000018122010020000002400008000000008090810000002001000200800300000', + miner: '0x1e2cd78882b12d3954a049fd82ffd691565dc0a5', + mixHash: '0xddbb2beaede8c4a7c401156c0a02c58b3c0732e25bd5bfd350a599c54309929c', + nonce: '0x0', + number: '0x3148fe', + parentHash: '0x26b0438b6b537ec888afe7b673f633a0fdd3732c3629e1dee30e962a46444e9d', + receiptsRoot: '0x1ca1776ebf36ae37a1f48770684da37fe1c8fc134954b229b1f619e5e0ad2c51', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + size: '0xd66e', + stateRoot: '0xc9e235dd0e663f36fee8f80d860961f2e8056f4cdcce501372a77bc1fed20534', + totalDifficulty: '0x3c656d23029ab0', + timestamp: '0x642d14c0', + baseFeePerGas: '0x9', + transactions: [ + '0x5d703f823e7e4d6719def234cf8683d0d34708c2b0ce0285f4b008bf555b0481', + '0xa8a6e1f58adfe40a059e037c6c2b6e07bd23aa3d32d892bfcc6f40d85f22c907', + '0xa4335f3948675d7cd43b84078e3567860b4e1ffa79e9f6e5278f1d3fc860699d', + '0x25553d98cc5c2758b653b122a461e08250a0613752258ff1ecbea813632f08ef', + '0x5b7ae021605d0fad23fd882d48762851858bf0b6188641d619481f5ea230c502', + '0x6ff0dbf6f27ac5bd4cedebca54424e4ddf5bc6db1aeba945c2d980e7d759e5c5', + '0x234db0c295cf5d70729dc85b36a3df18007c80e1e6c5dd3465f739be81b062c5', + '0x745ebf4cddbadb01df7eb32e393df6f712bad3d6f45d935151eb402fa2bee5d6', + '0x35607880ee334b3e5a2bfc419aa32d4ec2b87445a0c58b347c945265ffc8e57e', + '0xb3f527bc8306499630857a4d92578b2d492762e7828580af536ed10128953327', + '0x59b21c5451f4c6bbaef6758aa4ddac3d350ee9d6f7f79cbc8aea1e4d6d30f32a', + '0xe3708d5286b2a3fdb73db6b9409c70e121e65cd5896682f011e97b578906245c', + '0x738a0a811d13a8735bd7b5ea4b784a0dff23e6bfd2b1897303f731bb49ef19bb', + '0xd63d4edc0ca6567cea22cb342eda67d37bd4a5a5a36cb66e233f368a8f98c7cb', + '0xd383977c4ab373914a2199b5673eb43b1cb3c86a129c29a440b67b8ee491bad2', + '0x554c50ff5d6578a8ea4a352651106151d0d4b5fc683fc4071096463744b3013a', + '0x92d5693632cfc366be1a143bf63aef7b6307db1227e40d7806d1fb21e67137f7', + '0x72bb6a4add14cb640948ebd801898076372c86bf2eac41154f414738da1d1a32', + '0xc33480b85a113f779725fd2c1788ab95b066792a898ee0eebb0e98c8fa605989', + '0xa8685562865ab1e6c73816fad05a38d6ea0670565ef27add5f4bd16db852eb46', + '0x7cff5abea75fd389d37b08fa73f8d4ea6c2a00f36c715fda422c8d92f05aed78', + '0xd844bf22fcdd8fd5c472638540f114824082359ef753a4f9c929889226dec5f2', + '0xbafae79055a392cea650f90096a305d1338a170a66b58dacaf69a7feb2b3f187', + '0xc9f12beaeff3325c3b58c03f66f6526593432f623d2a873bd8ca7e9f9d3c48dc', + '0xc8314b15135d8629e2423065b853fe91d7909d7cc9450e9477e667ba84eb45a9', + '0xc96f60d36bee10caaf4b40ddc2c90e752d7d4abebdd29646efff6b8a6454d070', + '0x61f293e6fc8978ee7e4f8c47e678f44ab08bc475134952452422c9ed96ea0b65', + '0xd463fb86b29f6fe631756bf475c210bac81a596486947e1439f6e63cfed71e84', + '0xcc3a340e784872ba9dba17f268029e94ed3c7a49f44a4b8c7a4b8cfe7325b9c4', + '0x31e1fd8c0516fba03ebaddf860ca4d16a63904e23b412ed7c2832c7906cf199b', + ], + transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', + uncles: [], + +}; + +// sepolia block data with withdrawal properties +export const sepoliaBlockWithdrawal = { + difficulty: '0x0', + extraData: '0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465', + gasLimit: '0x1c9c380', + gasUsed: '0x4952f0', + hash: '0x241dab30227f58633e69fc4128b1c2b09699ec274cd575e39e697c1e460e5791', + logsBloom: + '0x0000000c0000000002000410a0101000080100004000001000000040200040020008800000800450001040004000000008004040008000000000000000a004000000400000002080008c020800006080010c22004000010100002001400008000082a040080211000c01010002000b00080000000800000004000010200100044020008008082100010008200805800001210000200000000004000004200000820800800000000010140040504400082404000300000000100080000000400000400002113000000000000040040008240000200000000110002011000001000018122010020000002400008000000008090810000002001000200800300000', + miner: '0x1e2cd78882b12d3954a049fd82ffd691565dc0a5', + mixHash: '0xddbb2beaede8c4a7c401156c0a02c58b3c0732e25bd5bfd350a599c54309929c', + nonce: '0x0', + number: '0x3148fe', + parentHash: '0x26b0438b6b537ec888afe7b673f633a0fdd3732c3629e1dee30e962a46444e9d', + receiptsRoot: '0x1ca1776ebf36ae37a1f48770684da37fe1c8fc134954b229b1f619e5e0ad2c51', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + size: '0xd66e', + stateRoot: '0xc9e235dd0e663f36fee8f80d860961f2e8056f4cdcce501372a77bc1fed20534', + totalDifficulty: '0x3c656d23029ab0', + timestamp: '0x642d14c0', + baseFeePerGas: '0x9', + transactions: [ + '0x5d703f823e7e4d6719def234cf8683d0d34708c2b0ce0285f4b008bf555b0481', + '0xa8a6e1f58adfe40a059e037c6c2b6e07bd23aa3d32d892bfcc6f40d85f22c907', + '0xa4335f3948675d7cd43b84078e3567860b4e1ffa79e9f6e5278f1d3fc860699d', + '0x25553d98cc5c2758b653b122a461e08250a0613752258ff1ecbea813632f08ef', + '0x5b7ae021605d0fad23fd882d48762851858bf0b6188641d619481f5ea230c502', + '0x6ff0dbf6f27ac5bd4cedebca54424e4ddf5bc6db1aeba945c2d980e7d759e5c5', + '0x234db0c295cf5d70729dc85b36a3df18007c80e1e6c5dd3465f739be81b062c5', + '0x745ebf4cddbadb01df7eb32e393df6f712bad3d6f45d935151eb402fa2bee5d6', + '0x35607880ee334b3e5a2bfc419aa32d4ec2b87445a0c58b347c945265ffc8e57e', + '0xb3f527bc8306499630857a4d92578b2d492762e7828580af536ed10128953327', + '0x59b21c5451f4c6bbaef6758aa4ddac3d350ee9d6f7f79cbc8aea1e4d6d30f32a', + '0xe3708d5286b2a3fdb73db6b9409c70e121e65cd5896682f011e97b578906245c', + '0x738a0a811d13a8735bd7b5ea4b784a0dff23e6bfd2b1897303f731bb49ef19bb', + '0xd63d4edc0ca6567cea22cb342eda67d37bd4a5a5a36cb66e233f368a8f98c7cb', + '0xd383977c4ab373914a2199b5673eb43b1cb3c86a129c29a440b67b8ee491bad2', + '0x554c50ff5d6578a8ea4a352651106151d0d4b5fc683fc4071096463744b3013a', + '0x92d5693632cfc366be1a143bf63aef7b6307db1227e40d7806d1fb21e67137f7', + '0x72bb6a4add14cb640948ebd801898076372c86bf2eac41154f414738da1d1a32', + '0xc33480b85a113f779725fd2c1788ab95b066792a898ee0eebb0e98c8fa605989', + '0xa8685562865ab1e6c73816fad05a38d6ea0670565ef27add5f4bd16db852eb46', + '0x7cff5abea75fd389d37b08fa73f8d4ea6c2a00f36c715fda422c8d92f05aed78', + '0xd844bf22fcdd8fd5c472638540f114824082359ef753a4f9c929889226dec5f2', + '0xbafae79055a392cea650f90096a305d1338a170a66b58dacaf69a7feb2b3f187', + '0xc9f12beaeff3325c3b58c03f66f6526593432f623d2a873bd8ca7e9f9d3c48dc', + '0xc8314b15135d8629e2423065b853fe91d7909d7cc9450e9477e667ba84eb45a9', + '0xc96f60d36bee10caaf4b40ddc2c90e752d7d4abebdd29646efff6b8a6454d070', + '0x61f293e6fc8978ee7e4f8c47e678f44ab08bc475134952452422c9ed96ea0b65', + '0xd463fb86b29f6fe631756bf475c210bac81a596486947e1439f6e63cfed71e84', + '0xcc3a340e784872ba9dba17f268029e94ed3c7a49f44a4b8c7a4b8cfe7325b9c4', + '0x31e1fd8c0516fba03ebaddf860ca4d16a63904e23b412ed7c2832c7906cf199b', + ], + transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', + uncles: [], + "withdrawals": [ { "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", "amount": "0x3112f", @@ -736,64 +850,7 @@ export const sepoliaBlockHydrated = { "validatorIndex": "0x39a" } ], - withdrawalsRoot: "0xb99e42eaca3fc1000aa8be987cf107e08030c0e9ca93dc6ea6b7df69e377f953" - -}; - -export const sepoliaBlock = { - difficulty: '0x0', - extraData: '0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465', - gasLimit: '0x1c9c380', - gasUsed: '0x4952f0', - hash: '0x241dab30227f58633e69fc4128b1c2b09699ec274cd575e39e697c1e460e5791', - logsBloom: - '0x0000000c0000000002000410a0101000080100004000001000000040200040020008800000800450001040004000000008004040008000000000000000a004000000400000002080008c020800006080010c22004000010100002001400008000082a040080211000c01010002000b00080000000800000004000010200100044020008008082100010008200805800001210000200000000004000004200000820800800000000010140040504400082404000300000000100080000000400000400002113000000000000040040008240000200000000110002011000001000018122010020000002400008000000008090810000002001000200800300000', - miner: '0x1e2cd78882b12d3954a049fd82ffd691565dc0a5', - mixHash: '0xddbb2beaede8c4a7c401156c0a02c58b3c0732e25bd5bfd350a599c54309929c', - nonce: '0x0', - number: '0x3148fe', - parentHash: '0x26b0438b6b537ec888afe7b673f633a0fdd3732c3629e1dee30e962a46444e9d', - receiptsRoot: '0x1ca1776ebf36ae37a1f48770684da37fe1c8fc134954b229b1f619e5e0ad2c51', - sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - size: '0xd66e', - stateRoot: '0xc9e235dd0e663f36fee8f80d860961f2e8056f4cdcce501372a77bc1fed20534', - totalDifficulty: '0x3c656d23029ab0', - timestamp: '0x642d14c0', - baseFeePerGas: '0x9', - transactions: [ - '0x5d703f823e7e4d6719def234cf8683d0d34708c2b0ce0285f4b008bf555b0481', - '0xa8a6e1f58adfe40a059e037c6c2b6e07bd23aa3d32d892bfcc6f40d85f22c907', - '0xa4335f3948675d7cd43b84078e3567860b4e1ffa79e9f6e5278f1d3fc860699d', - '0x25553d98cc5c2758b653b122a461e08250a0613752258ff1ecbea813632f08ef', - '0x5b7ae021605d0fad23fd882d48762851858bf0b6188641d619481f5ea230c502', - '0x6ff0dbf6f27ac5bd4cedebca54424e4ddf5bc6db1aeba945c2d980e7d759e5c5', - '0x234db0c295cf5d70729dc85b36a3df18007c80e1e6c5dd3465f739be81b062c5', - '0x745ebf4cddbadb01df7eb32e393df6f712bad3d6f45d935151eb402fa2bee5d6', - '0x35607880ee334b3e5a2bfc419aa32d4ec2b87445a0c58b347c945265ffc8e57e', - '0xb3f527bc8306499630857a4d92578b2d492762e7828580af536ed10128953327', - '0x59b21c5451f4c6bbaef6758aa4ddac3d350ee9d6f7f79cbc8aea1e4d6d30f32a', - '0xe3708d5286b2a3fdb73db6b9409c70e121e65cd5896682f011e97b578906245c', - '0x738a0a811d13a8735bd7b5ea4b784a0dff23e6bfd2b1897303f731bb49ef19bb', - '0xd63d4edc0ca6567cea22cb342eda67d37bd4a5a5a36cb66e233f368a8f98c7cb', - '0xd383977c4ab373914a2199b5673eb43b1cb3c86a129c29a440b67b8ee491bad2', - '0x554c50ff5d6578a8ea4a352651106151d0d4b5fc683fc4071096463744b3013a', - '0x92d5693632cfc366be1a143bf63aef7b6307db1227e40d7806d1fb21e67137f7', - '0x72bb6a4add14cb640948ebd801898076372c86bf2eac41154f414738da1d1a32', - '0xc33480b85a113f779725fd2c1788ab95b066792a898ee0eebb0e98c8fa605989', - '0xa8685562865ab1e6c73816fad05a38d6ea0670565ef27add5f4bd16db852eb46', - '0x7cff5abea75fd389d37b08fa73f8d4ea6c2a00f36c715fda422c8d92f05aed78', - '0xd844bf22fcdd8fd5c472638540f114824082359ef753a4f9c929889226dec5f2', - '0xbafae79055a392cea650f90096a305d1338a170a66b58dacaf69a7feb2b3f187', - '0xc9f12beaeff3325c3b58c03f66f6526593432f623d2a873bd8ca7e9f9d3c48dc', - '0xc8314b15135d8629e2423065b853fe91d7909d7cc9450e9477e667ba84eb45a9', - '0xc96f60d36bee10caaf4b40ddc2c90e752d7d4abebdd29646efff6b8a6454d070', - '0x61f293e6fc8978ee7e4f8c47e678f44ab08bc475134952452422c9ed96ea0b65', - '0xd463fb86b29f6fe631756bf475c210bac81a596486947e1439f6e63cfed71e84', - '0xcc3a340e784872ba9dba17f268029e94ed3c7a49f44a4b8c7a4b8cfe7325b9c4', - '0x31e1fd8c0516fba03ebaddf860ca4d16a63904e23b412ed7c2832c7906cf199b', - ], - transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', - uncles: [] + "withdrawalsRoot": "0xb99e42eaca3fc1000aa8be987cf107e08030c0e9ca93dc6ea6b7df69e377f953" }; export const sepoliaBlockData: { diff --git a/packages/web3/test/e2e/get_block.test.ts b/packages/web3/test/e2e/get_block.test.ts index bd9753992b6..fbb557fe345 100644 --- a/packages/web3/test/e2e/get_block.test.ts +++ b/packages/web3/test/e2e/get_block.test.ts @@ -23,7 +23,7 @@ import Web3, { FMT_BYTES, FMT_NUMBER } from '../../src'; import { getSystemE2ETestProvider } from './e2e_utils'; import { closeOpenConnection, getSystemTestBackend, BACKEND } from '../shared_fixtures/system_tests_utils'; import { toAllVariants } from '../shared_fixtures/utils'; -import { sepoliaBlock, sepoliaBlockData, sepoliaBlockHydrated } from './fixtures/sepolia'; +import { sepoliaBlock, sepoliaBlockData, sepoliaBlockHydrated, sepoliaBlockWithdrawal } from './fixtures/sepolia'; import { mainnetBlockHydrated } from './fixtures/mainnet_block_hydrated'; import { mainnetBlock, mainnetBlockData } from './fixtures/mainnet'; @@ -67,7 +67,9 @@ describe(`${getSystemTestBackend()} tests - getBlock`, () => { }; let expectedBlock: Block = ((): Block => { if (getSystemTestBackend() === BACKEND.SEPOLIA) { + if (block === 'earliest' || block === 'blockHash' || block === 'blockNumber') return hydrated ? sepoliaBlockHydrated : sepoliaBlock; + return hydrated ? sepoliaBlockHydrated : sepoliaBlockWithdrawal; } return hydrated ? mainnetBlockHydrated : mainnetBlock; From 93eeccb96d7bcddfa49ed4c4848dbf55b825546c Mon Sep 17 00:00:00 2001 From: Alex Luu Date: Wed, 17 Apr 2024 23:24:43 -0400 Subject: [PATCH 6/6] revert --- packages/web3/test/e2e/fixtures/sepolia.ts | 157 --------------------- packages/web3/test/e2e/get_block.test.ts | 4 +- 2 files changed, 1 insertion(+), 160 deletions(-) diff --git a/packages/web3/test/e2e/fixtures/sepolia.ts b/packages/web3/test/e2e/fixtures/sepolia.ts index 0eac846b631..9ab06b665db 100644 --- a/packages/web3/test/e2e/fixtures/sepolia.ts +++ b/packages/web3/test/e2e/fixtures/sepolia.ts @@ -694,163 +694,6 @@ export const sepoliaBlock = { ], transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', uncles: [], - -}; - -// sepolia block data with withdrawal properties -export const sepoliaBlockWithdrawal = { - difficulty: '0x0', - extraData: '0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465', - gasLimit: '0x1c9c380', - gasUsed: '0x4952f0', - hash: '0x241dab30227f58633e69fc4128b1c2b09699ec274cd575e39e697c1e460e5791', - logsBloom: - '0x0000000c0000000002000410a0101000080100004000001000000040200040020008800000800450001040004000000008004040008000000000000000a004000000400000002080008c020800006080010c22004000010100002001400008000082a040080211000c01010002000b00080000000800000004000010200100044020008008082100010008200805800001210000200000000004000004200000820800800000000010140040504400082404000300000000100080000000400000400002113000000000000040040008240000200000000110002011000001000018122010020000002400008000000008090810000002001000200800300000', - miner: '0x1e2cd78882b12d3954a049fd82ffd691565dc0a5', - mixHash: '0xddbb2beaede8c4a7c401156c0a02c58b3c0732e25bd5bfd350a599c54309929c', - nonce: '0x0', - number: '0x3148fe', - parentHash: '0x26b0438b6b537ec888afe7b673f633a0fdd3732c3629e1dee30e962a46444e9d', - receiptsRoot: '0x1ca1776ebf36ae37a1f48770684da37fe1c8fc134954b229b1f619e5e0ad2c51', - sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', - size: '0xd66e', - stateRoot: '0xc9e235dd0e663f36fee8f80d860961f2e8056f4cdcce501372a77bc1fed20534', - totalDifficulty: '0x3c656d23029ab0', - timestamp: '0x642d14c0', - baseFeePerGas: '0x9', - transactions: [ - '0x5d703f823e7e4d6719def234cf8683d0d34708c2b0ce0285f4b008bf555b0481', - '0xa8a6e1f58adfe40a059e037c6c2b6e07bd23aa3d32d892bfcc6f40d85f22c907', - '0xa4335f3948675d7cd43b84078e3567860b4e1ffa79e9f6e5278f1d3fc860699d', - '0x25553d98cc5c2758b653b122a461e08250a0613752258ff1ecbea813632f08ef', - '0x5b7ae021605d0fad23fd882d48762851858bf0b6188641d619481f5ea230c502', - '0x6ff0dbf6f27ac5bd4cedebca54424e4ddf5bc6db1aeba945c2d980e7d759e5c5', - '0x234db0c295cf5d70729dc85b36a3df18007c80e1e6c5dd3465f739be81b062c5', - '0x745ebf4cddbadb01df7eb32e393df6f712bad3d6f45d935151eb402fa2bee5d6', - '0x35607880ee334b3e5a2bfc419aa32d4ec2b87445a0c58b347c945265ffc8e57e', - '0xb3f527bc8306499630857a4d92578b2d492762e7828580af536ed10128953327', - '0x59b21c5451f4c6bbaef6758aa4ddac3d350ee9d6f7f79cbc8aea1e4d6d30f32a', - '0xe3708d5286b2a3fdb73db6b9409c70e121e65cd5896682f011e97b578906245c', - '0x738a0a811d13a8735bd7b5ea4b784a0dff23e6bfd2b1897303f731bb49ef19bb', - '0xd63d4edc0ca6567cea22cb342eda67d37bd4a5a5a36cb66e233f368a8f98c7cb', - '0xd383977c4ab373914a2199b5673eb43b1cb3c86a129c29a440b67b8ee491bad2', - '0x554c50ff5d6578a8ea4a352651106151d0d4b5fc683fc4071096463744b3013a', - '0x92d5693632cfc366be1a143bf63aef7b6307db1227e40d7806d1fb21e67137f7', - '0x72bb6a4add14cb640948ebd801898076372c86bf2eac41154f414738da1d1a32', - '0xc33480b85a113f779725fd2c1788ab95b066792a898ee0eebb0e98c8fa605989', - '0xa8685562865ab1e6c73816fad05a38d6ea0670565ef27add5f4bd16db852eb46', - '0x7cff5abea75fd389d37b08fa73f8d4ea6c2a00f36c715fda422c8d92f05aed78', - '0xd844bf22fcdd8fd5c472638540f114824082359ef753a4f9c929889226dec5f2', - '0xbafae79055a392cea650f90096a305d1338a170a66b58dacaf69a7feb2b3f187', - '0xc9f12beaeff3325c3b58c03f66f6526593432f623d2a873bd8ca7e9f9d3c48dc', - '0xc8314b15135d8629e2423065b853fe91d7909d7cc9450e9477e667ba84eb45a9', - '0xc96f60d36bee10caaf4b40ddc2c90e752d7d4abebdd29646efff6b8a6454d070', - '0x61f293e6fc8978ee7e4f8c47e678f44ab08bc475134952452422c9ed96ea0b65', - '0xd463fb86b29f6fe631756bf475c210bac81a596486947e1439f6e63cfed71e84', - '0xcc3a340e784872ba9dba17f268029e94ed3c7a49f44a4b8c7a4b8cfe7325b9c4', - '0x31e1fd8c0516fba03ebaddf860ca4d16a63904e23b412ed7c2832c7906cf199b', - ], - transactionsRoot: '0xbd2f86bc39fbe1ac6e24ce390d268404c199da060116437803875d2c0bfe7970', - uncles: [], - "withdrawals": [ - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x3112f", - "index": "0x3a477e", - "validatorIndex": "0x38b" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a477f", - "validatorIndex": "0x38c" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4780", - "validatorIndex": "0x38d" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x23743", - "index": "0x3a4781", - "validatorIndex": "0x38e" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4782", - "validatorIndex": "0x38f" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4783", - "validatorIndex": "0x390" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4784", - "validatorIndex": "0x391" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4785", - "validatorIndex": "0x392" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4786", - "validatorIndex": "0x393" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x25915", - "index": "0x3a4787", - "validatorIndex": "0x394" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4788", - "validatorIndex": "0x395" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a4789", - "validatorIndex": "0x396" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a478a", - "validatorIndex": "0x397" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a478b", - "validatorIndex": "0x398" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x2ef5d", - "index": "0x3a478c", - "validatorIndex": "0x399" - }, - { - "address": "0xe276bc378a527a8792b353cdca5b5e53263dfb9e", - "amount": "0x3112f", - "index": "0x3a478d", - "validatorIndex": "0x39a" - } - ], - "withdrawalsRoot": "0xb99e42eaca3fc1000aa8be987cf107e08030c0e9ca93dc6ea6b7df69e377f953" }; export const sepoliaBlockData: { diff --git a/packages/web3/test/e2e/get_block.test.ts b/packages/web3/test/e2e/get_block.test.ts index fbb557fe345..bd9753992b6 100644 --- a/packages/web3/test/e2e/get_block.test.ts +++ b/packages/web3/test/e2e/get_block.test.ts @@ -23,7 +23,7 @@ import Web3, { FMT_BYTES, FMT_NUMBER } from '../../src'; import { getSystemE2ETestProvider } from './e2e_utils'; import { closeOpenConnection, getSystemTestBackend, BACKEND } from '../shared_fixtures/system_tests_utils'; import { toAllVariants } from '../shared_fixtures/utils'; -import { sepoliaBlock, sepoliaBlockData, sepoliaBlockHydrated, sepoliaBlockWithdrawal } from './fixtures/sepolia'; +import { sepoliaBlock, sepoliaBlockData, sepoliaBlockHydrated } from './fixtures/sepolia'; import { mainnetBlockHydrated } from './fixtures/mainnet_block_hydrated'; import { mainnetBlock, mainnetBlockData } from './fixtures/mainnet'; @@ -67,9 +67,7 @@ describe(`${getSystemTestBackend()} tests - getBlock`, () => { }; let expectedBlock: Block = ((): Block => { if (getSystemTestBackend() === BACKEND.SEPOLIA) { - if (block === 'earliest' || block === 'blockHash' || block === 'blockNumber') return hydrated ? sepoliaBlockHydrated : sepoliaBlock; - return hydrated ? sepoliaBlockHydrated : sepoliaBlockWithdrawal; } return hydrated ? mainnetBlockHydrated : mainnetBlock;