mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-23 17:28:27 +00:00
Update return types
This commit is contained in:
parent
f6cd02ff3f
commit
184143ba65
@ -113,7 +113,7 @@ proc setupEthRpc*(node: EthereumNode, chain: BaseChainDB, rpcsrv: RpcServer) =
|
|||||||
## Returns integer of the current block number the client is on.
|
## Returns integer of the current block number the client is on.
|
||||||
result = chain.getCanonicalHead().blockNumber
|
result = chain.getCanonicalHead().blockNumber
|
||||||
|
|
||||||
rpcsrv.rpc("eth_getBalance") do(data: EthAddressStr, quantityTag: string) -> GasInt:
|
rpcsrv.rpc("eth_getBalance") do(data: EthAddressStr, quantityTag: string) -> UInt256:
|
||||||
## Returns the balance of the account of given address.
|
## Returns the balance of the account of given address.
|
||||||
##
|
##
|
||||||
## data: address to check for balance.
|
## data: address to check for balance.
|
||||||
@ -124,7 +124,7 @@ proc setupEthRpc*(node: EthereumNode, chain: BaseChainDB, rpcsrv: RpcServer) =
|
|||||||
addrBytes = data.toAddress
|
addrBytes = data.toAddress
|
||||||
balance = accountDb.get_balance(addrBytes)
|
balance = accountDb.get_balance(addrBytes)
|
||||||
|
|
||||||
result = balance.toInt
|
result = balance
|
||||||
|
|
||||||
rpcsrv.rpc("eth_getStorageAt") do(data: EthAddressStr, quantity: int, quantityTag: string) -> UInt256:
|
rpcsrv.rpc("eth_getStorageAt") do(data: EthAddressStr, quantity: int, quantityTag: string) -> UInt256:
|
||||||
## Returns the value from a storage position at a given address.
|
## Returns the value from a storage position at a given address.
|
||||||
|
@ -16,7 +16,7 @@ proc eth_hashrate(): int
|
|||||||
proc eth_gasPrice(): GasInt
|
proc eth_gasPrice(): GasInt
|
||||||
proc eth_accounts(): seq[EthAddressStr]
|
proc eth_accounts(): seq[EthAddressStr]
|
||||||
proc eth_blockNumber(): BlockNumber
|
proc eth_blockNumber(): BlockNumber
|
||||||
proc eth_getBalance(data: EthAddressStr, quantityTag: string): int
|
proc eth_getBalance(data: EthAddressStr, quantityTag: string): UInt256
|
||||||
proc eth_getStorageAt(data: EthAddressStr, quantity: int, quantityTag: string): seq[byte]
|
proc eth_getStorageAt(data: EthAddressStr, quantity: int, quantityTag: string): seq[byte]
|
||||||
proc eth_getTransactionCount(data: EthAddressStr, quantityTag: string)
|
proc eth_getTransactionCount(data: EthAddressStr, quantityTag: string)
|
||||||
proc eth_getBlockTransactionCountByHash(data: array[32, byte])
|
proc eth_getBlockTransactionCountByHash(data: array[32, byte])
|
||||||
@ -26,7 +26,7 @@ proc eth_getUncleCountByBlockNumber(quantityTag: string)
|
|||||||
proc eth_getCode(data: EthAddressStr, quantityTag: string): HexDataStr
|
proc eth_getCode(data: EthAddressStr, quantityTag: string): HexDataStr
|
||||||
proc eth_sign(data:EthAddressStr, message: HexDataStr): HexDataStr
|
proc eth_sign(data:EthAddressStr, message: HexDataStr): HexDataStr
|
||||||
#proc eth_sendRawTransaction(data: string, quantityTag: int): UInt256
|
#proc eth_sendRawTransaction(data: string, quantityTag: int): UInt256
|
||||||
proc eth_call(call: EthCall, quantityTag: string): UInt256
|
proc eth_call(call: EthCall, quantityTag: string): string
|
||||||
|
|
||||||
# TODO: Use eth_common types
|
# TODO: Use eth_common types
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user