mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 09:51:36 +03:00
71 lines
1.2 KiB
Plaintext
71 lines
1.2 KiB
Plaintext
|
:: list of ethereum transactions
|
||
|
::
|
||
|
=, format
|
||
|
=, ethereum
|
||
|
=, rpc
|
||
|
=, mimes:html
|
||
|
::
|
||
|
|_ txs=(list transaction)
|
||
|
++ u-parser
|
||
|
%- cook :_ nuck:so
|
||
|
|= =coin
|
||
|
?> ?=(%$ -.coin)
|
||
|
?> ?=(%u (end 3 1 p.p.coin))
|
||
|
`@`q.p.coin
|
||
|
::
|
||
|
++ grab
|
||
|
|%
|
||
|
++ mime
|
||
|
|= [p=mite:eyre q=octs:eyre]
|
||
|
=/ wan=wain (to-wain q.q)
|
||
|
?> ?=(^ wan)
|
||
|
%+ murn t.wan
|
||
|
|= tx=@t
|
||
|
^- (unit transaction)
|
||
|
?: =('' tx)
|
||
|
~
|
||
|
:- ~
|
||
|
%+ rash tx
|
||
|
;~ (glue com)
|
||
|
u-parser
|
||
|
u-parser
|
||
|
u-parser
|
||
|
;~(pfix (jest '0x') hex)
|
||
|
u-parser
|
||
|
;~(pfix (jest '0x') hex)
|
||
|
u-parser
|
||
|
==
|
||
|
++ noun (list transaction)
|
||
|
--
|
||
|
::
|
||
|
++ grow
|
||
|
=> v=.
|
||
|
|%
|
||
|
++ mime
|
||
|
=> v
|
||
|
:- /text/plain
|
||
|
%- as-octs %- of-wain
|
||
|
=- (weld - '' ~)
|
||
|
:- 'nonce,gas-price,gas,to,value,data,chain-id'
|
||
|
%+ turn txs
|
||
|
|= transaction
|
||
|
^- @t
|
||
|
%+ rap 3
|
||
|
:~ (scot %ui nonce)
|
||
|
','
|
||
|
(scot %ui gas-price)
|
||
|
','
|
||
|
(scot %ui gas)
|
||
|
','
|
||
|
(crip (address-to-hex to))
|
||
|
','
|
||
|
(scot %ui value)
|
||
|
','
|
||
|
(crip (prefix-hex (render-hex-bytes (max 1 (met 3 data)) `@`data)))
|
||
|
','
|
||
|
(scot %ux chain-id)
|
||
|
==
|
||
|
--
|
||
|
++ grad %mime
|
||
|
--
|