ethereum: add block to %eth-get-balance

This commit is contained in:
yosoyubik 2021-09-20 07:19:05 +02:00
parent 5904c6e2c8
commit 85debb1ce9
2 changed files with 6 additions and 3 deletions

View File

@ -483,7 +483,7 @@
[%eth-get-filter-changes fid=@ud] [%eth-get-filter-changes fid=@ud]
[%eth-get-transaction-by-hash txh=@ux] [%eth-get-transaction-by-hash txh=@ux]
[%eth-get-transaction-count adr=address =block] [%eth-get-transaction-count adr=address =block]
[%eth-get-balance adr=address] [%eth-get-balance adr=address =block]
[%eth-get-transaction-receipt txh=@ux] [%eth-get-transaction-receipt txh=@ux]
[%eth-send-raw-transaction dat=@ux] [%eth-send-raw-transaction dat=@ux]
== ==
@ -720,7 +720,10 @@
== ==
:: ::
%eth-get-balance %eth-get-balance
['eth_getBalance' (tape (address-to-hex adr.req)) ~] :- 'eth_getBalance'
:~ (tape (address-to-hex adr.req))
(block-to-json block.req)
==
:: ::
%eth-get-transaction-by-hash %eth-get-transaction-by-hash
['eth_getTransactionByHash' (tape (transaction-to-hex txh.req)) ~] ['eth_getTransactionByHash' (tape (transaction-to-hex txh.req)) ~]

View File

@ -283,7 +283,7 @@
^- form:m ^- form:m
;< =json bind:m ;< =json bind:m
%^ request-rpc url `'balance' %^ request-rpc url `'balance'
[%eth-get-balance address] [%eth-get-balance address [%label %latest]]
%- pure:m %- pure:m
(parse-eth-get-balance:rpc:ethereum json) (parse-eth-get-balance:rpc:ethereum json)
-- --