shrub/pkg/arvo/imp/azt.hoon
2019-11-09 23:27:07 -08:00

18 lines
516 B
Plaintext

/- spider
/+ *threadio
=, thread=thread:libthread
^- imp:spider
|= [=bowl:spider =vase]
=/ m (thread ,vase)
^- form:m
~& > 'starting azt'
=/ url 'http://eth-mainnet.urbit.org:8545'
=/ poke-vase !>([%azimuth-tracker %azimuth-tracker-poke !>([%watch url])])
;< ~ bind:m (poke-our %spider %spider-imput poke-vase)
;< ~ bind:m (watch-our /sub %spider /imp/azimuth-tracker)
|- ^- form:m
=* loop $
;< [=mark =vase] bind:m (take-fact /sub)
%- (slog (sell vase) ~)
loop