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