From a222f4463584deb76febfee14f4225d30a0b455d Mon Sep 17 00:00:00 2001 From: metagn Date: Thu, 10 Oct 2024 14:57:04 +0300 Subject: [PATCH] fix stylecheck for UInt256 (#226) --- tests/private/ethcallsigs.nim | 6 +++--- tests/private/ethprocs.nim | 6 +++--- tests/private/ethtypes.nim | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/private/ethcallsigs.nim b/tests/private/ethcallsigs.nim index 5d798f01..235cb04b 100644 --- a/tests/private/ethcallsigs.nim +++ b/tests/private/ethcallsigs.nim @@ -31,7 +31,7 @@ proc eth_call(call: EthCall, quantityTag: string): UInt256 proc eth_estimateGas(call: EthCall, quantityTag: string): UInt256 proc eth_getBlockByHash(data: array[32, byte], fullTransactions: bool): BlockObject proc eth_getBlockByNumber(quantityTag: string, fullTransactions: bool): BlockObject -proc eth_getTransactionByHash(data: Uint256): TransactionObject +proc eth_getTransactionByHash(data: UInt256): TransactionObject proc eth_getTransactionByBlockHashAndIndex(data: UInt256, quantity: int): TransactionObject proc eth_getTransactionByBlockNumberAndIndex(quantityTag: string, quantity: int): TransactionObject proc eth_getTransactionReceipt(data: UInt256): ReceiptObject @@ -45,8 +45,8 @@ proc eth_newBlockFilter(): int proc eth_newPendingTransactionFilter(): int proc eth_uninstallFilter(filterId: int): bool proc eth_getWork(): seq[UInt256] -proc eth_submitWork(nonce: int64, powHash: Uint256, mixDigest: Uint256): bool -proc eth_submitHashrate(hashRate: UInt256, id: Uint256): bool +proc eth_submitWork(nonce: int64, powHash: UInt256, mixDigest: UInt256): bool +proc eth_submitHashrate(hashRate: UInt256, id: UInt256): bool proc shh_post(): string proc shh_newIdentity(): array[60, byte] proc shh_hasIdentity(identity: array[60, byte]): bool diff --git a/tests/private/ethprocs.nim b/tests/private/ethprocs.nim index 471ec53e..d2580c45 100644 --- a/tests/private/ethprocs.nim +++ b/tests/private/ethprocs.nim @@ -248,7 +248,7 @@ proc addEthRpcs*(server: RpcServer) = ## Returns BlockObject or nil when no block was found. discard - server.rpc("eth_getTransactionByHash") do(data: Uint256) -> TransactionObject: + server.rpc("eth_getTransactionByHash") do(data: UInt256) -> TransactionObject: ## Returns the information about a transaction requested by transaction hash. ## ## data: hash of a transaction. @@ -380,7 +380,7 @@ proc addEthRpcs*(server: RpcServer) = ## DATA, 32 Bytes - the boundary condition ("target"), 2^256 / difficulty. result = @[] - server.rpc("eth_submitWork") do(nonce: int64, powHash: Uint256, mixDigest: Uint256) -> bool: + server.rpc("eth_submitWork") do(nonce: int64, powHash: UInt256, mixDigest: UInt256) -> bool: ## Used for submitting a proof-of-work solution. ## ## nonce: the nonce found. @@ -389,7 +389,7 @@ proc addEthRpcs*(server: RpcServer) = ## Returns true if the provided solution is valid, otherwise false. discard - server.rpc("eth_submitHashrate") do(hashRate: UInt256, id: Uint256) -> bool: + server.rpc("eth_submitHashrate") do(hashRate: UInt256, id: UInt256) -> bool: ## Used for submitting mining hashrate. ## ## hashRate: a hexadecimal string representation (32 bytes) of the hash rate. diff --git a/tests/private/ethtypes.nim b/tests/private/ethtypes.nim index 303ddcc9..b69dd475 100644 --- a/tests/private/ethtypes.nim +++ b/tests/private/ethtypes.nim @@ -122,4 +122,4 @@ type sent*: int # integer of the unix timestamp when the message was sent. topics*: seq[UInt256] # list of DATA topics the message contained. payload*: string # TODO: Correct type? the payload of the message. - workProved*: int # integer of the work this message required before it was send (?). \ No newline at end of file + workProved*: int # integer of the work this message required before it was send (?).