mirror of
https://github.com/urbit/shrub.git
synced 2025-01-06 04:07:23 +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
|
++ request-to-json
|
||||||
=, enjs:format
|
=, enjs:format
|
||||||
|= req=request:jrpc-api
|
|= req=request
|
||||||
^- json
|
^- json
|
||||||
%- pairs
|
%- pairs
|
||||||
=; cal=[m=@t p=(list json)]
|
=; cal=[m=@t p=(list json)]
|
||||||
@ -49,7 +49,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ eth-call-to-json
|
++ eth-call-to-json
|
||||||
|= cal=call:jrpc-api
|
|= cal=call
|
||||||
^- json
|
^- json
|
||||||
:- %o %- ~(gas by *(map @t json))
|
:- %o %- ~(gas by *(map @t json))
|
||||||
=- (murn - same)
|
=- (murn - same)
|
||||||
@ -73,7 +73,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ default-block-to-json
|
++ default-block-to-json
|
||||||
|= dob=default-block:jrpc-api
|
|= dob=default-block
|
||||||
^- json
|
^- json
|
||||||
?- -.dob
|
?- -.dob
|
||||||
%quantity n+(crip ((d-co:co 0) n.dob))
|
%quantity n+(crip ((d-co:co 0) n.dob))
|
||||||
|
@ -15,28 +15,24 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: ethereum json rpc api
|
:: ethereum json rpc api
|
||||||
::TODO make single ++eth-rpc core, or split off into separate sur+lib
|
|
||||||
::
|
::
|
||||||
++ jrpc-api
|
++ request
|
||||||
|%
|
$% [%eth-block-number ~]
|
||||||
++ request
|
[%eth-call cal=call deb=default-block]
|
||||||
$% [%eth-block-number ~]
|
[%eth-estimate-gas cal=call deb=default-block]
|
||||||
[%eth-call cal=call deb=default-block]
|
==
|
||||||
[%eth-estimate-gas cal=call deb=default-block]
|
::
|
||||||
==
|
++ call
|
||||||
::
|
$: from=(unit @i)
|
||||||
++ call
|
to=@i
|
||||||
$: from=(unit @i)
|
gas=(unit @ud)
|
||||||
to=@i
|
gas-price=(unit @ud)
|
||||||
gas=(unit @ud)
|
value=(unit @ud)
|
||||||
gas-price=(unit @ud)
|
data=tape
|
||||||
value=(unit @ud)
|
==
|
||||||
data=tape
|
::
|
||||||
==
|
++ default-block
|
||||||
::
|
$% [%quantity n=@ud]
|
||||||
++ default-block
|
[%label l=?(%earliest %latest %pending)]
|
||||||
$% [%quantity n=@ud]
|
==
|
||||||
[%label l=?(%earliest %latest %pending)]
|
|
||||||
==
|
|
||||||
--
|
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user