From c2d2909936e7da9e66ae69662c57c1681ffc97ff Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 9 Sep 2025 10:58:07 +0200 Subject: [PATCH] chore(provider): add BlockNumber type alias --- ethers/provider.nim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ethers/provider.nim b/ethers/provider.nim index 844c9c4..e1da475 100644 --- a/ethers/provider.nim +++ b/ethers/provider.nim @@ -27,7 +27,7 @@ type FilterByBlockHash* {.serialize.} = ref object of EventFilter blockHash*: BlockHash Log* {.serialize.} = object - blockNumber*: UInt256 + blockNumber*: BlockNumber data*: seq[byte] logIndex*: UInt256 removed*: bool @@ -52,7 +52,7 @@ type blockHash*: ?BlockHash transactionHash*: TransactionHash logs*: seq[Log] - blockNumber*: ?UInt256 + blockNumber*: ?BlockNumber cumulativeGasUsed*: UInt256 effectiveGasPrice*: ?UInt256 status*: TransactionStatus @@ -61,14 +61,15 @@ type BlockHandler* = proc(blck: ?!Block) {.gcsafe, raises:[].} Topic* = array[32, byte] Block* {.serialize.} = object - number*: ?UInt256 + number*: ?BlockNumber timestamp*: UInt256 hash*: ?BlockHash baseFeePerGas* : ?UInt256 logsBloom*: ?StUint[2048] + BlockNumber* = UInt256 PastTransaction* {.serialize.} = object blockHash*: BlockHash - blockNumber*: UInt256 + blockNumber*: BlockNumber sender* {.serialize("from"), deserialize("from").}: Address gas*: UInt256 gasPrice*: UInt256