json rpc test: fix getStorageAt return type

This commit is contained in:
jangko 2022-04-05 16:02:20 +07:00
parent 7c603672d3
commit 64c2227c7c
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ proc eth_gasPrice(): HexQuantityStr
proc eth_accounts(): seq[EthAddressStr] proc eth_accounts(): seq[EthAddressStr]
proc eth_blockNumber(): HexQuantityStr proc eth_blockNumber(): HexQuantityStr
proc eth_getBalance(data: EthAddressStr, quantityTag: string): HexQuantityStr proc eth_getBalance(data: EthAddressStr, quantityTag: string): HexQuantityStr
proc eth_getStorageAt(data: EthAddressStr, quantity: HexQuantityStr, quantityTag: string): seq[byte] proc eth_getStorageAt(data: EthAddressStr, quantity: HexQuantityStr, quantityTag: string): HexDataStr
proc eth_getTransactionCount(data: EthAddressStr, quantityTag: string): HexQuantityStr proc eth_getTransactionCount(data: EthAddressStr, quantityTag: string): HexQuantityStr
proc eth_getBlockTransactionCountByHash(data: Hash256): HexQuantityStr proc eth_getBlockTransactionCountByHash(data: Hash256): HexQuantityStr
proc eth_getBlockTransactionCountByNumber(quantityTag: string): HexQuantityStr proc eth_getBlockTransactionCountByNumber(quantityTag: string): HexQuantityStr

View File

@ -258,7 +258,7 @@ proc rpcMain*() =
test "eth_getStorageAt": test "eth_getStorageAt":
let res = await client.eth_getStorageAt(ethAddressStr("0xfff33a3bd36abdbd412707b8e310d6011454a7ae"), hexQuantityStr "0x0", "0x0") let res = await client.eth_getStorageAt(ethAddressStr("0xfff33a3bd36abdbd412707b8e310d6011454a7ae"), hexQuantityStr "0x0", "0x0")
check hexDataStr(0.u256).string == hexDataStr(res).string check hexDataStr(0.u256).string == res.string
test "eth_getTransactionCount": test "eth_getTransactionCount":
let res = await client.eth_getTransactionCount(ethAddressStr("0xfff7ac99c8e4feb60c9750054bdc14ce1857f181"), "0x0") let res = await client.eth_getTransactionCount(ethAddressStr("0xfff7ac99c8e4feb60c9750054bdc14ce1857f181"), "0x0")