From c76ddefea96e7763c3cc5b28ec5cbac1adefc4e7 Mon Sep 17 00:00:00 2001 From: andri lim Date: Tue, 15 Oct 2024 19:45:50 +0700 Subject: [PATCH] Fix AuthorizationObject fields name to v, r, s (#172) * Fix AuthorizationObject fields name to v, r, s * Fix identifier style error --- tests/test_execution_types.nim | 4 ++-- web3/engine_api_types.nim | 4 ++-- web3/eth_api_types.nim | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/test_execution_types.nim b/tests/test_execution_types.nim index b2fe6e7..2b23eb4 100644 --- a/tests/test_execution_types.nim +++ b/tests/test_execution_types.nim @@ -52,8 +52,8 @@ suite "Execution types tests": ) blobs = BlobsBundleV1( - commitments: @[KZGCommitment.conv(1)], - proofs: @[KZGProof.conv(2)], + commitments: @[KzgCommitment.conv(1)], + proofs: @[KzgProof.conv(2)], blobs: @[Blob.conv(3)], ) diff --git a/web3/engine_api_types.nim b/web3/engine_api_types.nim index 4196e11..5dff6b9 100644 --- a/web3/engine_api_types.nim +++ b/web3/engine_api_types.nim @@ -123,8 +123,8 @@ type # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/cancun.md#blobsbundlev1 BlobsBundleV1* = object - commitments*: seq[KZGCommitment] - proofs*: seq[KZGProof] + commitments*: seq[KzgCommitment] + proofs*: seq[KzgProof] blobs*: seq[Blob] # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/shanghai.md#executionpayloadbodyv1 diff --git a/web3/eth_api_types.nim b/web3/eth_api_types.nim index 8cba7a2..c3d5c9a 100644 --- a/web3/eth_api_types.nim +++ b/web3/eth_api_types.nim @@ -62,8 +62,8 @@ type # EIP-4844 blob sidecars blobs*: Opt[seq[Blob]] - commitments*: Opt[seq[KZGCommitment]] - proofs*: Opt[seq[KZGProof]] + commitments*: Opt[seq[KzgCommitment]] + proofs*: Opt[seq[KzgProof]] # EIP-7702 authorizationList*: Opt[seq[AuthorizationObject]] @@ -149,9 +149,9 @@ type chainId*: Quantity address*: Address nonce*: Quantity - yParity*: Quantity - R*: UInt256 - S*: UInt256 + v*: Quantity + r*: UInt256 + s*: UInt256 TransactionObject* = ref object # A transaction object, or null when no transaction was found: hash*: Hash32 # hash of the transaction. @@ -171,7 +171,7 @@ type yParity*: Opt[Quantity] # ECDSA y parity, none for Legacy, same as v for >= Tx2930 `type`*: Opt[Quantity] # EIP-2718, with 0x0 for Legacy chainId*: Opt[Quantity] # EIP-159 - accessList*: Opt[seq[AccessPair]] # EIP-2930 + accessList*: Opt[seq[AccessPair]] # EIP-2930 maxFeePerGas*: Opt[Quantity] # EIP-1559 maxPriorityFeePerGas*: Opt[Quantity] # EIP-1559 maxFeePerBlobGas*: Opt[UInt256] # EIP-4844 @@ -181,7 +181,7 @@ type ReceiptObject* = ref object # A transaction receipt object, or null when no receipt was found: transactionHash*: Hash32 # hash of the transaction. transactionIndex*: Quantity # integer of the transactions index position in the block. - blockHash*: Hash32 # hash of the block where this transaction was in. + blockHash*: Hash32 # hash of the block where this transaction was in. blockNumber*: Quantity # block number where this transaction was in. `from`*: Address # address of the sender. to*: Opt[Address] # address of the receiver. null when its a contract creation transaction.