mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
RPC API structures are part of the Ethereum lib proper for now.
This commit is contained in:
parent
de116bbb2a
commit
f28b9f7b60
@ -28,7 +28,7 @@
|
||||
::
|
||||
++ request-to-json
|
||||
=, enjs:format
|
||||
|= req=request:jrpc-api
|
||||
|= req=request
|
||||
^- json
|
||||
%- pairs
|
||||
=; cal=[m=@t p=(list json)]
|
||||
@ -49,7 +49,7 @@
|
||||
==
|
||||
::
|
||||
++ eth-call-to-json
|
||||
|= cal=call:jrpc-api
|
||||
|= cal=call
|
||||
^- json
|
||||
:- %o %- ~(gas by *(map @t json))
|
||||
=- (murn - same)
|
||||
@ -73,7 +73,7 @@
|
||||
==
|
||||
::
|
||||
++ default-block-to-json
|
||||
|= dob=default-block:jrpc-api
|
||||
|= dob=default-block
|
||||
^- json
|
||||
?- -.dob
|
||||
%quantity n+(crip ((d-co:co 0) n.dob))
|
||||
|
@ -15,28 +15,24 @@
|
||||
==
|
||||
::
|
||||
:: ethereum json rpc api
|
||||
::TODO make single ++eth-rpc core, or split off into separate sur+lib
|
||||
::
|
||||
++ jrpc-api
|
||||
|%
|
||||
++ request
|
||||
$% [%eth-block-number ~]
|
||||
[%eth-call cal=call deb=default-block]
|
||||
[%eth-estimate-gas cal=call deb=default-block]
|
||||
==
|
||||
::
|
||||
++ call
|
||||
$: from=(unit @i)
|
||||
to=@i
|
||||
gas=(unit @ud)
|
||||
gas-price=(unit @ud)
|
||||
value=(unit @ud)
|
||||
data=tape
|
||||
==
|
||||
::
|
||||
++ default-block
|
||||
$% [%quantity n=@ud]
|
||||
[%label l=?(%earliest %latest %pending)]
|
||||
==
|
||||
--
|
||||
++ request
|
||||
$% [%eth-block-number ~]
|
||||
[%eth-call cal=call deb=default-block]
|
||||
[%eth-estimate-gas cal=call deb=default-block]
|
||||
==
|
||||
::
|
||||
++ call
|
||||
$: from=(unit @i)
|
||||
to=@i
|
||||
gas=(unit @ud)
|
||||
gas-price=(unit @ud)
|
||||
value=(unit @ud)
|
||||
data=tape
|
||||
==
|
||||
::
|
||||
++ default-block
|
||||
$% [%quantity n=@ud]
|
||||
[%label l=?(%earliest %latest %pending)]
|
||||
==
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user