mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
includes block number and ethereum gateway url in boot event
This commit is contained in:
parent
ff0564338c
commit
3e09b9b6c5
@ -1 +1 @@
|
||||
770207e18637fdccdaca4e8408d9c1f87eec0b01
|
||||
f0efa1ac1211c686cf2da73df0e86b06f91b98df
|
@ -75,6 +75,8 @@
|
||||
spon=(unit ship) :: sponsor
|
||||
czar=(map ship [=life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
node=(unit purl:eyre) :: gateway url
|
||||
== ::
|
||||
[%fake our=ship] :: boot fake
|
||||
:: XX wegh ::
|
||||
@ -510,9 +512,10 @@
|
||||
?> ?=(?(%dawn %fake) -.p.q.hic)
|
||||
?> =(~ hey.all)
|
||||
=. hey.all `hen
|
||||
:: XX clamming - use +hard or something?
|
||||
::
|
||||
:_(..^$ [hen %pass / (note %j p.q.hic)]~)
|
||||
=/ boot ((soft note-jael) p.q.hic)
|
||||
?~ boot
|
||||
~| invalid-boot-event+hen !!
|
||||
:_(..^$ [hen %pass / %j u.boot]~)
|
||||
:: we are subsequently initialized. single-home
|
||||
::
|
||||
?: ?=(%init -.q.hic)
|
||||
|
@ -61,6 +61,9 @@
|
||||
sig=(unit oath) :: for a moon
|
||||
:: XX reconcile with .dns.eth ::
|
||||
tuf=(list turf) :: domains
|
||||
:: XX use for eth replay ::
|
||||
boq=@ud :: boot block
|
||||
nod=(unit purl:eyre) :: eth gateway
|
||||
fak/_| :: fake keys
|
||||
lyf/life :: version
|
||||
jaw/(map life ring) :: private keys
|
||||
@ -687,13 +690,26 @@
|
||||
abet:abet:(deal:(burb our.tac) p.tac [~ q.tac])
|
||||
::
|
||||
:: boot from keys
|
||||
:: {$dawn =seed spon=(unit ship) czar=(map ship [=life =pass]) turf=(list turf)}
|
||||
:: $: $dawn
|
||||
:: =seed
|
||||
:: spon=(unit ship)
|
||||
:: czar=(map ship [=life =pass])
|
||||
:: turf=(list turf)}
|
||||
:: bloq=@ud
|
||||
:: node=purl
|
||||
:: ==
|
||||
::
|
||||
%dawn
|
||||
=* our who.seed.tac
|
||||
:: sort-of single-homed
|
||||
::
|
||||
=. our.own.sub our
|
||||
:: save our boot block
|
||||
::
|
||||
=. boq.own.sub bloq.tac
|
||||
:: save our ethereum gateway (required for galaxies)
|
||||
::
|
||||
=. nod.own.sub node.tac
|
||||
:: save our parent signature (only for moons)
|
||||
::
|
||||
=. sig.own.sub sig.seed.tac
|
||||
@ -1777,10 +1793,10 @@
|
||||
:: TODO: ship or node as sample?
|
||||
::
|
||||
=. latest-block launch:contracts
|
||||
?. =(our bos)
|
||||
(listen-to-ship our bos)
|
||||
=+ (need (de-purl:html 'http://localhost:8545'))
|
||||
(listen-to-node -(p.p |))
|
||||
?: |(=(our bos) ?=(^ nod.own))
|
||||
~| %jael-init-node
|
||||
(listen-to-node (need nod.own))
|
||||
(listen-to-ship our bos)
|
||||
::
|
||||
:: +look: configure the source of ethereum events
|
||||
::
|
||||
|
@ -2078,6 +2078,8 @@
|
||||
spon=(unit ship) :: sponsor
|
||||
czar=(map ship [=life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
node=(unit purl:eyre) :: gateway url
|
||||
== ::
|
||||
[%fake our=ship] :: fake boot
|
||||
[%look our=ship src=(each ship purl:eyre)] :: set ethereum source
|
||||
|
@ -15,8 +15,9 @@
|
||||
=/ key=ring
|
||||
0w8O.k5Ry4.QsKQq.1k~uj.DBOU4.numfq.nXOwa.cSk7B.VcHVm.
|
||||
-8~kX.3ALiG.rQjOi.HZ9hj.84b6G.P5pCZ.UtNtt.Lh9TE.2DQJ2
|
||||
=/ url (de-purl:html 'http://localhost:8545')
|
||||
=/ dan
|
||||
[`seed:able:jael`[~nul 1 key ~] ~ ~ [/org/urbit ~]]
|
||||
[`seed:able:jael`[~nul 1 key ~] ~ ~ [/org/urbit ~] 0 url]
|
||||
::
|
||||
=^ results1 jael-gate
|
||||
=/ hen=duct
|
||||
@ -27,10 +28,10 @@
|
||||
call-args=[hen type=*type %dawn dan]
|
||||
:~ [hen %slip %a %init ~nul]
|
||||
[hen %slip %c %init ~nul]
|
||||
[hen %slip %e %init ~nul]
|
||||
[hen %slip %g %init ~nul]
|
||||
[hen %give %init ~nul]
|
||||
[hen %slip %d %init ~nul]
|
||||
[hen %slip %e %init ~nul]
|
||||
[hen %give %init ~nul]
|
||||
[hen %pass /~nul/init %b %wait +(~1234.5.6)]
|
||||
== ==
|
||||
::
|
||||
@ -56,15 +57,10 @@
|
||||
=^ results3 jael-gate
|
||||
=/ hiss-httr=hiss:eyre
|
||||
%+ json-request:ethereum
|
||||
=- -(p.p |)
|
||||
(need (de-purl:html 'http://localhost:8545'))
|
||||
%+ request-to-json:ethereum `'new filter'
|
||||
:* %eth-new-filter
|
||||
`[%number 1]
|
||||
~
|
||||
~[ships:contracts:constitution:ethe]
|
||||
~
|
||||
==
|
||||
(need url)
|
||||
%+ request-to-json:ethereum
|
||||
`'block number'
|
||||
[%eth-block-number ~]
|
||||
%- jael-take-with-comparator :*
|
||||
jael-gate
|
||||
now=(add ~s2 ~1234.5.6)
|
||||
|
Loading…
Reference in New Issue
Block a user