mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
Merge pull request #998 from urbit/philip/eth-manage
add eth-manage app
This commit is contained in:
commit
8d9aadc83e
58
app/eth-manage.hoon
Normal file
58
app/eth-manage.hoon
Normal file
@ -0,0 +1,58 @@
|
||||
:: usage:
|
||||
:: :eth-manage %look
|
||||
:: kick polling from eth mainnet node
|
||||
:: :eth-manage [%wind 1.000.000]
|
||||
:: rewind to block 1.000.000
|
||||
=> $~ |%
|
||||
++ move (pair bone card)
|
||||
++ card
|
||||
$% [%turf wire ~]
|
||||
[%vein wire]
|
||||
[%look wire src=(each ship purl:eyre)]
|
||||
[%wind wire p=@ud]
|
||||
==
|
||||
++ state
|
||||
$: a/@
|
||||
==
|
||||
--
|
||||
=, gall
|
||||
|_ $: hid/bowl
|
||||
state
|
||||
==
|
||||
++ poke
|
||||
|= [mar=@tas val=*]
|
||||
^- (quip move _+>)
|
||||
:_ +>.$
|
||||
?+ val ~&(%oops ~)
|
||||
%turf [ost.hid %turf /hi ~]~
|
||||
%vein [ost.hid %vein /hi]~
|
||||
[%wind @ud] [ost.hid %wind /hi +.val]~
|
||||
%look
|
||||
:_ ~
|
||||
=/ pul
|
||||
(need (de-purl:html 'http://eth-mainnet.urbit.org:8545'))
|
||||
[ost.hid %look /hi |+pul]
|
||||
==
|
||||
::
|
||||
++ vein
|
||||
|= [wir/wire =life ven=(map life ring)]
|
||||
^- (quip move _+>)
|
||||
~& [%pierc life ven]
|
||||
`+>.$
|
||||
::
|
||||
++ turf
|
||||
|= [wir/wire pax=(list path)]
|
||||
^- (quip move _+>)
|
||||
~& [%slurp pax]
|
||||
`+>.$
|
||||
::
|
||||
++ prep
|
||||
|= old/(unit noun)
|
||||
^- [(list move) _+>.$]
|
||||
?~ old
|
||||
`+>.$
|
||||
=+ new=((soft state) u.old)
|
||||
?~ new
|
||||
`+>.$
|
||||
`+>.$(+<+ u.new)
|
||||
--
|
Loading…
Reference in New Issue
Block a user