@@ -1421,15 +1421,15 @@ type
14211421 storageKeys: seq [Eth2Digest ]
14221422
14231423 ETHAuthorization = object
1424- chainId: uint64
1424+ chainId: UInt256
14251425 address: ExecutionAddress
14261426 nonce: uint64
14271427 authority: ExecutionAddress
14281428 signature: seq [byte ]
14291429
14301430 ETHTransaction = object
14311431 hash: Eth2Digest
1432- chainId: uint64
1432+ chainId: UInt256
14331433 `from`: ExecutionAddress
14341434 nonce: uint64
14351435 maxPriorityFeePerGas: uint64
@@ -1539,8 +1539,8 @@ proc ETHTransactionsCreateFromJson(
15391539
15401540 # Construct transaction
15411541 static :
1542- doAssert sizeof (uint64 ) == sizeof (ChainId )
1543- doAssert sizeof (uint64 ) == sizeof (data.chainId.get)
1542+ doAssert sizeof (UInt256 ) == sizeof (ChainId )
1543+ doAssert sizeof (UInt256 ) == sizeof (data.chainId.get)
15441544 doAssert sizeof (uint64 ) == sizeof (data.gas)
15451545 doAssert sizeof (uint64 ) == sizeof (data.gasPrice)
15461546 doAssert sizeof (uint64 ) == sizeof (data.maxPriorityFeePerGas.get)
@@ -1556,13 +1556,13 @@ proc ETHTransactionsCreateFromJson(
15561556 return nil
15571557 if data.authorizationList.isSome:
15581558 for authorization in data.authorizationList.get:
1559- static : doAssert sizeof (uint64 ) == sizeof (authorization.chainId)
1559+ static : doAssert sizeof (UInt256 ) == sizeof (authorization.chainId)
15601560 if authorization.v > uint8 .high:
15611561 return nil
15621562 let
15631563 tx = eth_types.EthTransaction (
15641564 txType: txType,
1565- chainId: data.chainId.get (0 .Quantity ). ChainId ,
1565+ chainId: data.chainId.get (0 .u256) ,
15661566 nonce: distinctBase (data.nonce),
15671567 gasPrice: data.gasPrice.GasInt ,
15681568 maxPriorityFeePerGas:
@@ -1663,15 +1663,15 @@ proc ETHTransactionsCreateFromJson(
16631663 authority = recoverSignerAddress (sig, auth.rlpHashForSigning).valueOr:
16641664 return nil
16651665 authorizationList.add ETHAuthorization (
1666- chainId: distinctBase ( auth.chainId) ,
1666+ chainId: auth.chainId,
16671667 address: ExecutionAddress (data: auth.address.data),
16681668 nonce: auth.nonce,
16691669 authority: ExecutionAddress (data: authority),
16701670 signature: @ sig)
16711671
16721672 txs.add ETHTransaction (
16731673 hash: keccak256 (rlpBytes),
1674- chainId: distinctBase ( tx.chainId) ,
1674+ chainId: tx.chainId,
16751675 `from`: ExecutionAddress (data: fromAddress),
16761676 nonce: tx.nonce,
16771677 maxPriorityFeePerGas: tx.maxPriorityFeePerGas.uint64 ,
@@ -1755,7 +1755,7 @@ func ETHTransactionGetHash(
17551755 addr transaction[].hash
17561756
17571757func ETHTransactionGetChainId (
1758- transaction: ptr ETHTransaction ): ptr uint64 {.exported .} =
1758+ transaction: ptr ETHTransaction ): ptr UInt256 {.exported .} =
17591759 # # Obtains the chain ID of a transaction.
17601760 # #
17611761 # # * The returned value is allocated in the given transaction.
@@ -2115,7 +2115,7 @@ func ETHAuthorizationListGet(
21152115 addr authorizationList[][authorizationIndex.int ]
21162116
21172117func ETHAuthorizationGetChainId (
2118- authorization: ptr ETHAuthorization ): ptr uint64 {.exported .} =
2118+ authorization: ptr ETHAuthorization ): ptr UInt256 {.exported .} =
21192119 # # Obtains the chain ID of an authorization tuple.
21202120 # #
21212121 # # * The returned value is allocated in the given authorization tuple.
0 commit comments