From fe88d9e6b73f97d92cefa861add6f069ef70abf2 Mon Sep 17 00:00:00 2001 From: andri lim Date: Sun, 24 Sep 2023 14:33:24 +0700 Subject: [PATCH] Change maxFeePerBlobGas from GasInt to UInt256 (#640) * Change maxFeePerBlobGas from GasInt to UInt256 per latest spec: https://eips.ethereum.org/EIPS/eip-4844#blob-transaction * fix eip-4844 test --- eth/common/eth_types.nim | 2 +- tests/common/test_eip4844.nim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eth/common/eth_types.nim b/eth/common/eth_types.nim index ba942bb..3a30455 100644 --- a/eth/common/eth_types.nim +++ b/eth/common/eth_types.nim @@ -98,7 +98,7 @@ type value* : UInt256 payload* : Blob accessList* : AccessList # EIP-2930 - maxFeePerBlobGas*: GasInt # EIP-4844 + maxFeePerBlobGas*: UInt256 # EIP-4844 versionedHashes*: VersionedHashes # EIP-4844 networkPayload*: NetworkPayload # EIP-4844 V* : int64 diff --git a/tests/common/test_eip4844.nim b/tests/common/test_eip4844.nim index 9af8958..f790314 100644 --- a/tests/common/test_eip4844.nim +++ b/tests/common/test_eip4844.nim @@ -100,7 +100,7 @@ proc tx6(i: int): Transaction = maxFee: 10.GasInt, accessList: accesses, versionedHashes: @[digest], - networkPayload: NetworkPayload( + networkPayload: NetworkPayload( blobs: @[blob], commitments: @[zeroG1], proofs: @[zeroG1], @@ -120,7 +120,7 @@ proc tx7(i: int): Transaction = maxFee: 10.GasInt, accessList: accesses, versionedHashes: @[digest], - maxFeePerBlobGas: 10000000.GasInt, + maxFeePerBlobGas: 10000000.u256, ) proc tx8(i: int): Transaction = @@ -137,7 +137,7 @@ proc tx8(i: int): Transaction = maxFee: 10.GasInt, accessList: accesses, versionedHashes: @[digest], - maxFeePerBlobGas: 10000000.GasInt, + maxFeePerBlobGas: 10000000.u256, ) template roundTrip(txFunc: untyped, i: int) =