mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
Merge remote-tracking branch 'origin/release-candidate' into lighter-than-eyre
This commit is contained in:
commit
727cdbda1c
@ -1 +1 @@
|
||||
https://ci-piers.urbit.org/zod-5d1d390c917fa3e51760af40cf6eafb04ceae880.tgz
|
||||
https://ci-piers.urbit.org/zod-3a7fea5537efe2ccbbb43257478677e5688e6acb.tgz
|
||||
|
@ -1 +1 @@
|
||||
65ce838b26f64311e73410512d83898b081873db
|
||||
4d7a04d4d9db334fb34558a7537a741d17319ce9
|
||||
|
@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs')
|
||||
var runner = require('urbit-runner')
|
||||
var Urbit = runner.Urbit;
|
||||
var ERROR = runner.ERROR;
|
||||
@ -8,18 +9,79 @@ var actions = runner.actions
|
||||
var args = ['-B', 'urbit.pill', '-A', '..', '-cSF', 'zod', 'zod'];
|
||||
var urbit = new Urbit(args);
|
||||
|
||||
// XX upstream the following into runner-js
|
||||
//
|
||||
function rePill(urb) {
|
||||
return new Promise(function(resolve,reject){
|
||||
fs.stat('./built-pill/', function(err, stat) {
|
||||
if (err) return resolve()
|
||||
|
||||
fs.readdir('./built-pill/', function(err, files) {
|
||||
if (err || (1 !== files.length)) {
|
||||
return resolve()
|
||||
}
|
||||
|
||||
var name = files[0].replace(/\.pill$/, '')
|
||||
|
||||
urb.note('re-soliding pill')
|
||||
|
||||
return urb.expect(/dojo> /)
|
||||
.then(function(){
|
||||
return urb.line('|label %home %' + name)
|
||||
})
|
||||
.then(function(){
|
||||
return urb.expect(/dojo> /)
|
||||
})
|
||||
.then(function(){
|
||||
return urb.line('.latest/pill +solid /==/' + name + '/sys')
|
||||
})
|
||||
.then(function(){
|
||||
return urb.expectEcho("%resolid")
|
||||
})
|
||||
.then(function(){
|
||||
return urb.resetListeners();
|
||||
})
|
||||
.then(function(){
|
||||
var write = fs.createWriteStream('./built-pill/' + name + '.pill')
|
||||
var read = fs.createReadStream('./zod/.urb/put/latest.pill')
|
||||
|
||||
read.on('error', function(err){
|
||||
return reject(err)
|
||||
})
|
||||
|
||||
write.on('error', function(err){
|
||||
return reject(err)
|
||||
})
|
||||
|
||||
write.on('finish', function(){
|
||||
return resolve()
|
||||
})
|
||||
|
||||
return read.pipe(write)
|
||||
})
|
||||
.catch(function(err){
|
||||
return reject(err)
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Promise.resolve(urbit)
|
||||
.then(actions.safeBoot)
|
||||
.then(actions.test)
|
||||
.then(actions.testCores)
|
||||
.then(actions.testRenderers)
|
||||
.then(function(){
|
||||
return rePill(urbit);
|
||||
})
|
||||
.then(function(){
|
||||
return urbit.exit(0);
|
||||
})
|
||||
.catch(function(err){
|
||||
return urbit.waitSilent()
|
||||
.then(function(){
|
||||
urbit.warn("Test aborted:", err);
|
||||
urbit.warn('Test aborted:', err);
|
||||
return urbit.exit(1);
|
||||
});
|
||||
});
|
||||
|
@ -388,19 +388,25 @@
|
||||
~
|
||||
=. let ?. ?=($w p.p.u.rot) let ud:((hard cass:clay) q.q.r.u.rot)
|
||||
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
=/ =cass .^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now))
|
||||
:: germ: merge mode for sync merges
|
||||
::
|
||||
:: If we will be syncing in remote changes, we need all our sync merges
|
||||
:: up to and including the first remote sync to use the %init germ.
|
||||
:: Otherwise we won't have a merge-base with our sponsor.
|
||||
:: Initial merges from any source must use the %init germ.
|
||||
:: Subsequent merges may use any germ, but if the source is
|
||||
:: a remote ship with which we have not yet merged, we won't
|
||||
:: share a merge-base commit and all germs but %that will fail.
|
||||
::
|
||||
=/ bar=@ud
|
||||
?: ?| ?=(?($czar $pawn) (clan:title our))
|
||||
!?=(%home syd)
|
||||
==
|
||||
2
|
||||
3
|
||||
=/ =germ ?:((gte bar ud.cass) %init %mate)
|
||||
:: We want to always use %that for the first remote merge.
|
||||
:: But we also want local syncs (%base to %home or %kids)
|
||||
:: to succeed after that first remote sync. To accomplish both
|
||||
:: we simply use %that for the first three sync merges.
|
||||
:: (The first two are from the pill.)
|
||||
::
|
||||
=/ =germ
|
||||
=/ =cass
|
||||
.^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now))
|
||||
?: =(0 ud.cass)
|
||||
%init
|
||||
?:((gth 3 ud.cass) %that %mate)
|
||||
=< %- spam
|
||||
?: =(our her) ~
|
||||
[(render "beginning sync" sud her syd) ~]
|
||||
|
@ -81,7 +81,7 @@
|
||||
=+ => (from-seed:bip32 64^seed)
|
||||
(derive-path "m/44'/60'/0'/0/0")
|
||||
:+ [public-key private-key]
|
||||
(address-from-prv:ethereum private-key)
|
||||
(address-from-prv:key:ethereum private-key)
|
||||
chain-code
|
||||
::
|
||||
++ urbit
|
||||
|
@ -1,8 +1,8 @@
|
||||
::
|
||||
|_ upd=update:constitution:ethe
|
||||
|_ upd=update:azimuth
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun update:constitution:ethe :: from %noun
|
||||
++ noun update:azimuth :: from %noun
|
||||
--
|
||||
--
|
@ -395,11 +395,11 @@
|
||||
:: ~& [%swim-wyt `@ud`~(wyt in worm.vane)]
|
||||
=+ ^= pru
|
||||
?~ pux
|
||||
~| [%swim-call-vane lal ({term $~} +.p.hil)]
|
||||
~| [%swim-call-vane lal (symp ?@(+.p.hil +.p.hil +<.p.hil))]
|
||||
=^ vax worm.vane (~(slap wa worm.vane) rig [%limb %call])
|
||||
%^ slur-pro lal vax
|
||||
(slid [%& duc.vil hen] (slix hil))
|
||||
~| [%swim-take-vane lal ({term $~} +.p.hil)]
|
||||
~| [%swim-take-vane lal (symp ?@(+.p.hil +.p.hil +<.p.hil))]
|
||||
=^ vax worm.vane (~(slap wa worm.vane) rig [%limb %take])
|
||||
%^ slur-pro lal vax
|
||||
;: slid
|
||||
@ -552,9 +552,12 @@
|
||||
|= {lac/? mor/(list muse)}
|
||||
=| ova/(list ovum)
|
||||
|- ^- {p/(list ovum) q=(list [label=@tas =vane])}
|
||||
?~ mor [(flop ova) vanes]
|
||||
?~ mor
|
||||
[ova vanes]
|
||||
=^ nyx vanes (jack lac i.mor)
|
||||
$(ova (weld p.nyx ova), mor (weld q.nyx t.mor))
|
||||
:: we emit ova to unix in fifo order, but emit internal moves depth-first
|
||||
::
|
||||
$(ova (weld ova p.nyx), mor (weld q.nyx t.mor))
|
||||
--
|
||||
--
|
||||
=< :: Arvo larval stage
|
||||
|
@ -515,8 +515,10 @@
|
||||
++ deed
|
||||
~/ %deed
|
||||
|= [who=ship lyf=life]
|
||||
;; ^deed
|
||||
%- need %- need
|
||||
^- (unit ^deed)
|
||||
=; ded
|
||||
?~(ded ~ u.ded)
|
||||
;; (unit (unit ^deed))
|
||||
%- (sloy-light ski)
|
||||
=/ pur=spur
|
||||
/(scot %ud lyf)/(scot %p who)
|
||||
@ -564,7 +566,7 @@
|
||||
law.ton
|
||||
:: save our deed (for comet/moon communication)
|
||||
::
|
||||
(deed our life)
|
||||
(need (deed our life))
|
||||
::
|
||||
val.ton
|
||||
:: save our secrets, ready for action
|
||||
@ -809,38 +811,53 @@
|
||||
++ chew :: chew:la:ho:um:am
|
||||
|= [sin=skin msg=@] :: receive
|
||||
^+ +>
|
||||
=< apse
|
||||
=< abed
|
||||
|%
|
||||
++ apse
|
||||
:: +abed: check that we have the keys to communicate with :her
|
||||
::
|
||||
++ abed
|
||||
^+ +>.$
|
||||
:: bos: our sponsor
|
||||
::
|
||||
=/ bos (sein our)
|
||||
:: seg: her sponsor
|
||||
::
|
||||
=/ seg (sein her)
|
||||
:: rac: her rank
|
||||
::
|
||||
=/ rac (clan:title her)
|
||||
:: request keys and continue processing packet if
|
||||
:: :her is our initial sponsor (TOFU)
|
||||
:: if we don't have a deed, subscribe for public key updates
|
||||
::
|
||||
:: XX update state so we only ask once?
|
||||
::
|
||||
=? +>.$ &(=(~ lew.wod.dur.diz) =(her bos))
|
||||
=? +>.$ ?=(~ lew.wod.dur.diz)
|
||||
(emit %beer her)
|
||||
:: request keys and drop packet if :her is (or is a moon of)
|
||||
:: an unfamilar on-chain ship (and not our sponsor)
|
||||
:: if we don't have a deed, scry for it
|
||||
:: (to avoid dropping the packet, if possible).
|
||||
::
|
||||
?: ?& =(~ lew.wod.dur.diz)
|
||||
!=(her bos)
|
||||
?| !?=(?(%earl %pawn) rac)
|
||||
?& ?=(%earl rac)
|
||||
=/ fod (~(get by hoc.ton.fox) seg)
|
||||
?| ?=(~ fod)
|
||||
?=(~ lew.wod.u.fod)
|
||||
== == == ==
|
||||
(emit %beer ?:(?=(%earl rac) seg her))
|
||||
=? lew.wod.dur.diz ?=(~ lew.wod.dur.diz)
|
||||
:: we could get the life from the packet if %open
|
||||
:: for now, we guess 1 for the life
|
||||
:: XX revise
|
||||
::
|
||||
(deed her 1)
|
||||
:: if we have a deed, proceed
|
||||
::
|
||||
?^ lew.wod.dur.diz
|
||||
apse
|
||||
:: if :her is our initial sponsor, proceed (TOFU)
|
||||
::
|
||||
:: XX TOFU is unnecessary if we include keys
|
||||
:: for the full sponsorship chain in the boot event
|
||||
::
|
||||
?: =(her (sein our))
|
||||
apse
|
||||
:: if :her is a comet, or a moon of a known ship, proceed
|
||||
::
|
||||
=/ =rank:title (clan:title her)
|
||||
?: ?| ?=(%pawn rank)
|
||||
?& ?=(%earl rank)
|
||||
!=(~ lew.wod.dur:(myx:gus (sein her)))
|
||||
== ==
|
||||
apse
|
||||
:: otherwise, drop the packet
|
||||
::
|
||||
+>.$
|
||||
:: +apse: process the packet, notify if :her status changed
|
||||
::
|
||||
++ apse
|
||||
^+ +>.$
|
||||
=/ oub bust:puz
|
||||
=/ neg =(~ yed.caq.dur.diz)
|
||||
=. +>.$ east
|
||||
@ -1216,6 +1233,7 @@
|
||||
?. ?=(%soft -.wrapped-task)
|
||||
wrapped-task
|
||||
((hard task:able) p.wrapped-task)
|
||||
=. any.ton.fox eny
|
||||
=^ duy ..knob (knob hen task)
|
||||
[duy ..^$]
|
||||
::
|
||||
@ -1241,6 +1259,7 @@
|
||||
~/ %take
|
||||
|= [tea=wire hen=duct hin=(hypo sign:able)]
|
||||
^- [(list move) _..^$]
|
||||
=. any.ton.fox eny
|
||||
=^ duy ..knap
|
||||
(knap tea hen q.hin)
|
||||
[duy ..^$]
|
||||
@ -1430,12 +1449,6 @@
|
||||
::
|
||||
%init
|
||||
:_ fox [[%sake ~] [%brew ~] ~]
|
||||
::
|
||||
:: XX this is unused, but they only way to set
|
||||
:: entropy for symmetric keys. Review.
|
||||
::
|
||||
%junk
|
||||
[~ fox(any.ton (shax (mix any.ton.fox p.kyz)))]
|
||||
::
|
||||
%kick
|
||||
=^ ban fox (~(kick am [our now fox(hop p.kyz) ski]) hen)
|
||||
|
@ -1805,49 +1805,52 @@
|
||||
==
|
||||
^+ +>
|
||||
=< wake
|
||||
=+ ^- nut/(map tako yaki)
|
||||
%- molt ^- (list (pair tako yaki))
|
||||
%+ turn ~(tap in lar)
|
||||
|= yak/yaki
|
||||
[r.yak yak]
|
||||
=+ ^- nat/(map lobe blob)
|
||||
%- molt ^- (list (pair lobe blob))
|
||||
%+ turn ~(tap in bar)
|
||||
|= bol/blob
|
||||
[p.bol bol]
|
||||
~| :* %bad-foreign-update
|
||||
:* gar=gar
|
||||
let=let
|
||||
nut=(~(run by nut) ,~)
|
||||
nat=(~(run by nat) ,~)
|
||||
:: hit: updated commit-hashes by @ud case
|
||||
::
|
||||
=/ hit (~(uni by hit.dom) gar)
|
||||
:: nut: new commit-hash/commit pairs
|
||||
::
|
||||
=/ nut
|
||||
(turn ~(tap in lar) |=(=yaki [r.yaki yaki]))
|
||||
:: hut: updated commits by hash
|
||||
::
|
||||
=/ hut (~(gas by hut.ran) nut)
|
||||
:: nat: new blob-hash/blob pairs
|
||||
::
|
||||
=/ nat
|
||||
(turn ~(tap in bar) |=(=blob [p.blob blob]))
|
||||
:: lat: updated blobs by hash
|
||||
::
|
||||
=/ lat (~(gas by lat.ran) nat)
|
||||
:: traverse updated state and sanity check
|
||||
::
|
||||
=+ ~| :* %bad-foreign-update
|
||||
[gar=gar let=let nut=(turn nut head) nat=(turn nat head)]
|
||||
[hitdom=hit.dom letdom=let.dom]
|
||||
==
|
||||
:* hitdom=hit.dom
|
||||
letdom=let.dom
|
||||
hutran=(~(run by hut.ran) ,~)
|
||||
latran=(~(run by lat.ran) ,~)
|
||||
==
|
||||
==
|
||||
=+ hit=(~(uni by hit.dom) gar)
|
||||
=+ let=let
|
||||
=+ hut=(~(uni by hut.ran) nut)
|
||||
=+ lat=(~(uni by lat.ran) nat)
|
||||
=+ ?: =(0 let) ~
|
||||
=+ yon=`aeon`1 :: sanity check
|
||||
|-
|
||||
~| yon=yon
|
||||
=+ tak=(~(got by hit) yon)
|
||||
=+ yak=(~(got by hut) tak)
|
||||
=+ %- ~(urn by q.yak)
|
||||
|= {pax/path lob/lobe}
|
||||
~| [pax=path lob=lobe]
|
||||
(~(got by lat) lob)
|
||||
?: =(let yon)
|
||||
?: =(0 let)
|
||||
~
|
||||
=/ =aeon 1
|
||||
|- ^- ~
|
||||
=/ =tako
|
||||
~| [%missing-aeon aeon] (~(got by hit) aeon)
|
||||
=/ =yaki
|
||||
~| [%missing-tako tako] (~(got by hut) tako)
|
||||
=+ %+ turn
|
||||
~(tap by q.yaki)
|
||||
|= [=path =lobe]
|
||||
~| [%missing-blob path lobe]
|
||||
?> (~(has by lat) lobe)
|
||||
~
|
||||
$(yon +(yon))
|
||||
?: =(let aeon)
|
||||
~
|
||||
$(aeon +(aeon))
|
||||
:: persist updated state
|
||||
::
|
||||
%= +>.$
|
||||
let.dom (max let let.dom)
|
||||
lim (max (fall lem lim) lim)
|
||||
hit.dom hit
|
||||
let.dom (max let let.dom)
|
||||
hut.ran hut
|
||||
lat.ran lat
|
||||
==
|
||||
@ -3897,10 +3900,6 @@
|
||||
cancel-request:den
|
||||
(start-request:den for u.q.rif)
|
||||
[mos ..^$]
|
||||
::
|
||||
$went
|
||||
:: this won't happen until we send responses.
|
||||
!!
|
||||
::
|
||||
$west
|
||||
=* wer wer.req
|
||||
|
@ -69,7 +69,7 @@
|
||||
++ note-jael ::
|
||||
$% $: %dawn :: boot from keys
|
||||
=seed:able:jael :: identity params
|
||||
spon=(unit ship) :: sponsor
|
||||
spon=ship :: sponsor
|
||||
czar=(map ship [=life =pass]) :: galaxy table
|
||||
turf=(list turf) :: domains
|
||||
bloq=@ud :: block number
|
||||
@ -508,9 +508,9 @@
|
||||
[~ ..^$]
|
||||
:: this lets lib/helm send %heft a la |mass
|
||||
::
|
||||
=/ not=note-dill
|
||||
?:(?=([%crud %hax-heft ~] p.task) [%heft ~] p.task)
|
||||
[[u.hey.all %slip %d not]~ ..^$]
|
||||
=? p.task ?=([%crud %hax-heft ~] p.task) [%heft ~]
|
||||
::
|
||||
$(hen u.hey.all, wrapped-task p.task)
|
||||
:: a %sunk notification from %jail comes in on an unfamiliar duct
|
||||
::
|
||||
?: ?=(%sunk -.task)
|
||||
|
@ -39,8 +39,7 @@
|
||||
== == == ::
|
||||
++ sign :: in result $<-
|
||||
$% $: $a :: by %ames
|
||||
$% {$woot p/ship q/coop} :: acknowledgment
|
||||
{$went ship cape:ames} :: XX ignore
|
||||
$% {$woot p/ship q/coop} :: acknowledgment
|
||||
== == ::
|
||||
$: $b :: by %behn
|
||||
$% {$wake ~} :: timer activate
|
||||
@ -758,11 +757,31 @@
|
||||
$them :: outbound request
|
||||
?~ p.kyz
|
||||
=+ sud=(need (~(get by kes) hen))
|
||||
%= +>.$
|
||||
mow :_(mow [ged [%give %thus sud ~]])
|
||||
q.ask (~(del by q.ask) sud)
|
||||
kes (~(del by kes) hen)
|
||||
==
|
||||
=. +>.$
|
||||
%_ +>.$
|
||||
mow :_(mow [ged [%give %thus sud ~]])
|
||||
q.ask (~(del by q.ask) sud)
|
||||
kes (~(del by kes) hen)
|
||||
==
|
||||
::
|
||||
=/ driver=(unit [key=[user (list @t)] val=driv])
|
||||
=/ drivers ~(tap by sec)
|
||||
|- ^- (unit [key=[user (list @t)] val=driv])
|
||||
?~ drivers ~
|
||||
::
|
||||
?~ q=req.q.q.i.drivers
|
||||
$(drivers t.drivers)
|
||||
::
|
||||
?~ tip=~(top to q)
|
||||
$(drivers t.drivers)
|
||||
::
|
||||
?: =(hen p.u.tip)
|
||||
`i.drivers
|
||||
$(drivers t.drivers)
|
||||
::
|
||||
?~ driver
|
||||
+>.$
|
||||
~(cancel-request vi u.driver)
|
||||
:: ~& eyre-them+(en-purl p.u.p.kyz)
|
||||
%= +>.$
|
||||
mow :_(mow [ged [%give %thus p.ask p.kyz]])
|
||||
@ -819,10 +838,6 @@
|
||||
::
|
||||
$well
|
||||
+>.$(wel (dank wel p.kyz q.kyz))
|
||||
::
|
||||
$went
|
||||
:: this won't happen until we send responses.
|
||||
!!
|
||||
::
|
||||
$west :: remote request
|
||||
=. mow :_(mow [hen %give %mack ~])
|
||||
@ -923,11 +938,6 @@
|
||||
:: (emule |.(~|(gall-dumb+tee !!)))
|
||||
::
|
||||
$woot +>.$
|
||||
$went
|
||||
:: XX eyre sends no wests, so should get no wents
|
||||
::~& e+unexpected+sih
|
||||
+>.$
|
||||
::
|
||||
::
|
||||
$thou
|
||||
?+ -.tee !!
|
||||
@ -2191,6 +2201,9 @@
|
||||
=. liv | :: block requests until a reponse is given
|
||||
(eyre-them wir (slam !>(|=({$send a/hiss} a)) res))
|
||||
::
|
||||
++ cancel-request ~& %cancel-request
|
||||
(dead-hiss(liv &) [leaf+"canceled"]~)
|
||||
::
|
||||
++ handle-moves
|
||||
|= a/(list {p/term q/$-(vase _abet)})
|
||||
|= b/vase
|
||||
|
@ -1087,8 +1087,6 @@
|
||||
(ap-lame %pour (ap-suck "pour: malformed card"))
|
||||
=^ cug +>.$ (ap-find [-.q.vax pax])
|
||||
?~ cug
|
||||
?: =(-.q.vax %went)
|
||||
+>.$
|
||||
(ap-lame -.q.vax (ap-suck "pour: no {(trip -.q.vax)}: {<pax>}"))
|
||||
=^ tel vel (~(slot wa vel) 3 vax)
|
||||
=^ cam +>.$
|
||||
@ -1364,8 +1362,6 @@
|
||||
==
|
||||
=/ =move [hen %give %mass %gall %| [mass ~]]
|
||||
[[move ~] ..^$]
|
||||
::
|
||||
$went !! :: XX fixme
|
||||
==
|
||||
::
|
||||
++ load :: recreate vane
|
||||
|
@ -21,10 +21,9 @@
|
||||
=, able:jael
|
||||
=, crypto
|
||||
=, jael
|
||||
=, ethe
|
||||
=, constitution:ethe
|
||||
=, ethereum
|
||||
=, constitution:ethereum
|
||||
=, rpc
|
||||
=, azimuth
|
||||
:: ::::
|
||||
:::: # models :: data structures
|
||||
:: ::::
|
||||
@ -71,11 +70,11 @@
|
||||
kyz=(map ship public) :: public key state
|
||||
== ::
|
||||
$= eth :: ethereum (vent)
|
||||
::TODO the subscribers here never hear dns or hul...
|
||||
::TODO the subscribers here never hear dns or pos...
|
||||
$: yen=(set duct) :: trackers
|
||||
dns=dnses :: on-chain dns state
|
||||
hul=(map ship hull) :: on-chain ship state
|
||||
::TODO do we want (map ship diff-hull) too?
|
||||
pos=(map ship point) :: on-chain ship state
|
||||
::TODO do we want (map ship diff-point) too?
|
||||
== ::
|
||||
== ::
|
||||
++ state-absolute :: absolute urbit
|
||||
@ -559,7 +558,7 @@
|
||||
:: +order-events: sort changes by block and log numbers
|
||||
::
|
||||
++ order-events
|
||||
|= loz=(list (pair event-id diff-constitution))
|
||||
|= loz=(list (pair event-id diff-azimuth))
|
||||
^+ loz
|
||||
%+ sort loz
|
||||
:: sort by block number, then by event log number,
|
||||
@ -635,14 +634,11 @@
|
||||
^- ship
|
||||
:: XX save %dawn sponsor in .own.sub, check there
|
||||
::
|
||||
=/ hul (~(get by hul.eth.sub) who)
|
||||
?: ?& ?=(^ hul)
|
||||
?=(^ net.u.hul)
|
||||
?=(^ sponsor.u.net.u.hul)
|
||||
=/ pot (~(get by pos.eth.sub) who)
|
||||
?: ?& ?=(^ pot)
|
||||
?=(^ net.u.pot)
|
||||
==
|
||||
u.sponsor.u.net.u.hul
|
||||
:: XX fall back to most recent sponsor instead?
|
||||
::
|
||||
who.sponsor.u.net.u.pot
|
||||
(^sein:title who)
|
||||
:: :: ++saxo:of
|
||||
++ saxo :: sponsorship chain
|
||||
@ -671,7 +667,7 @@
|
||||
:: boot from keys
|
||||
:: $: $dawn
|
||||
:: =seed
|
||||
:: spon=(unit ship)
|
||||
:: spon=ship
|
||||
:: czar=(map ship [=life =pass])
|
||||
:: turf=(list turf)}
|
||||
:: bloq=@ud
|
||||
@ -1101,7 +1097,7 @@
|
||||
++ extract-snap :: extract rewind point
|
||||
^- snapshot
|
||||
:* kyz.puk.sub
|
||||
[dns hul]:eth.sub
|
||||
[dns pos]:eth.sub
|
||||
heard.etn
|
||||
latest-block.etn
|
||||
==
|
||||
@ -1329,7 +1325,7 @@
|
||||
=? +> new
|
||||
::TODO should we be mutating state here,
|
||||
:: or better to move this into ++vent:feel?
|
||||
+>(dns.eth *dnses, hul.eth ~, kyz.puk ~)
|
||||
+>(dns.eth *dnses, pos.eth ~, kyz.puk ~)
|
||||
=? +> |(new !=(0 ~(wyt by evs)))
|
||||
%- vent:feel
|
||||
:- %chain
|
||||
@ -1371,7 +1367,7 @@
|
||||
(~(put by kyz) who -)
|
||||
::
|
||||
++ file-event
|
||||
|= [wer=event-id dif=diff-constitution]
|
||||
|= [wer=event-id dif=diff-azimuth]
|
||||
^+ [kyz ..file]
|
||||
?: (~(has in heard) wer)
|
||||
~& %ignoring-already-heard-event
|
||||
@ -1386,16 +1382,16 @@
|
||||
==
|
||||
=^ kyz ..file
|
||||
?- -.dif
|
||||
%hull ~|(wer=wer (file-hull +.dif))
|
||||
%point ~|(wer=wer (file-point +.dif))
|
||||
%dns [kyz (file-dns +.dif)]
|
||||
==
|
||||
[kyz (file-snap wer)]
|
||||
::
|
||||
++ file-hull
|
||||
|= [who=ship dif=diff-hull]
|
||||
++ file-point
|
||||
|= [who=ship dif=diff-point]
|
||||
^+ [kyz ..file]
|
||||
=- ::TODO =; with just the type
|
||||
=. hul.eth (~(put by hul.eth) who hel)
|
||||
=. pos.eth (~(put by pos.eth) who pon)
|
||||
:: new keys
|
||||
::
|
||||
?: ?=(%& -.new)
|
||||
@ -1423,26 +1419,26 @@
|
||||
[hen %slip %g %sunk who lyf]
|
||||
==
|
||||
==
|
||||
:: hel: updated hull
|
||||
:: pon: updated point
|
||||
:: new: new keypair or "kept continuity?" (yes is no-op)
|
||||
^- [hel=hull new=(each (pair life pass) ?)]
|
||||
=+ hul=(fall (~(get by hul.eth) who) *hull)
|
||||
^- [pon=point new=(each (pair life pass) ?)]
|
||||
=+ pot=(fall (~(get by pos.eth) who) *point)
|
||||
::
|
||||
:: sanity checks, should never fail if we operate correctly
|
||||
::
|
||||
~| [%diff-order-insanity -.dif who (~(get by hul.eth) who)]
|
||||
~| [%diff-order-insanity -.dif who (~(get by pos.eth) who)]
|
||||
?> ?+ -.dif &
|
||||
%spawned ?> ?=(^ kid.hul)
|
||||
!(~(has in spawned.u.kid.hul) who.dif)
|
||||
%keys ?> ?=(^ net.hul)
|
||||
=(life.dif +(life.u.net.hul))
|
||||
%continuity ?> ?=(^ net.hul)
|
||||
=(new.dif +(continuity-number.u.net.hul))
|
||||
%spawned ?> ?=(^ kid.pot)
|
||||
!(~(has in spawned.u.kid.pot) who.dif)
|
||||
%keys ?> ?=(^ net.pot)
|
||||
=(life.dif +(life.u.net.pot))
|
||||
%continuity ?> ?=(^ net.pot)
|
||||
=(new.dif +(continuity-number.u.net.pot))
|
||||
==
|
||||
::
|
||||
:: apply hull changes, catch continuity and key changes
|
||||
:: apply point changes, catch continuity and key changes
|
||||
::
|
||||
:- (apply-hull-diff hul dif)
|
||||
:- (apply-point-diff pot dif)
|
||||
=* nop |+& :: no-op
|
||||
?+ -.dif nop
|
||||
%continuity |+|
|
||||
@ -1666,7 +1662,7 @@
|
||||
:: +put-change: store change made by event
|
||||
::
|
||||
++ put-change
|
||||
|= [cause=event-id dif=diff-constitution]
|
||||
|= [cause=event-id dif=diff-azimuth]
|
||||
?: (~(has by changes) cause) :: one diff per event
|
||||
~& [%duplicate-cause cause]
|
||||
!!
|
||||
@ -1747,7 +1743,7 @@
|
||||
:* %eth-get-logs
|
||||
`number+from-block
|
||||
`number+next-block
|
||||
~[ships:contracts]
|
||||
~[azimuth:contracts]
|
||||
~
|
||||
==
|
||||
::
|
||||
@ -1755,7 +1751,7 @@
|
||||
::
|
||||
:: +new-filter: request a new polling filter
|
||||
::
|
||||
:: Listens only to the Ships state contract, and only from
|
||||
:: Listens only to the Azimuth state contract, and only from
|
||||
:: the last-heard block onward.
|
||||
::
|
||||
++ new-filter
|
||||
@ -1766,10 +1762,10 @@
|
||||
:: XX We want to load from a snapshot at least 40 blocks behind, then
|
||||
:: replay to the present
|
||||
:: `[%number ?:((lte latest-block 40) 0 (sub.add latest-block 40))]
|
||||
::TODO or Ships origin block when 0
|
||||
::TODO or Azimuth origin block when 0
|
||||
~ ::TODO we should probably chunck these, maybe?
|
||||
:: https://stackoverflow.com/q/49339489
|
||||
~[ships:contracts]
|
||||
~[azimuth:contracts]
|
||||
~
|
||||
==
|
||||
::
|
||||
@ -1883,7 +1879,7 @@
|
||||
:: +accept: process single event
|
||||
::
|
||||
++ accept
|
||||
|= [cause=event-id dif=diff-constitution]
|
||||
|= [cause=event-id dif=diff-azimuth]
|
||||
^+ +>
|
||||
?: (~(has in heard) cause)
|
||||
~& %accept-ignoring-duplicate-event
|
||||
@ -2071,16 +2067,16 @@
|
||||
==
|
||||
=+ cuz=[block-number.place log-index.place]
|
||||
::
|
||||
?: =(event.log changed-dns:ships-events)
|
||||
?: =(event.log changed-dns:azimuth-events)
|
||||
=+ ^- [pri=tape sec=tape ter=tape]
|
||||
%+ decode-results data.log
|
||||
~[%string %string %string]
|
||||
%+ put-change cuz
|
||||
[%dns (crip pri) (crip sec) (crip ter)]
|
||||
::
|
||||
=+ dif=(event-log-to-hull-diff log)
|
||||
=+ dif=(event-log-to-point-diff log)
|
||||
?~ dif +>.$
|
||||
(put-change cuz %hull u.dif)
|
||||
(put-change cuz %point u.dif)
|
||||
:: :: ++restore-block:et
|
||||
++ restore-block :: rewind before block
|
||||
|= block=@ud
|
||||
@ -2103,7 +2099,7 @@
|
||||
?: |(=(~ old-qeu) (lth block block-number:(need ~(top to old-qeu))))
|
||||
[snap.snap +>.^$]
|
||||
$
|
||||
~& [%restoring-block block latest-block.snap ~(wyt by hul.eth.snap)]
|
||||
~& [%restoring-block block latest-block.snap ~(wyt by pos.eth.snap)]
|
||||
(restore-snap snap &)
|
||||
:: :: ++restore-snap:et
|
||||
++ restore-snap :: restore snapshot
|
||||
@ -2129,7 +2125,7 @@
|
||||
latest-block.etn latest-block.snap
|
||||
kyz.puk.sub kyz.snap
|
||||
dns.eth.sub dns.eth.snap
|
||||
hul.eth.sub hul.eth.snap
|
||||
pos.eth.sub pos.eth.snap
|
||||
sap sap(last-block 0)
|
||||
moves
|
||||
?. look moves
|
||||
@ -2299,12 +2295,15 @@
|
||||
[u.lyf pub:ex:cub sig.own.sub.lex]
|
||||
::
|
||||
=/ pub (~(get by kyz.puk.sub.lex) u.who)
|
||||
?~ pub ~
|
||||
:: XX check lyf
|
||||
::
|
||||
?~ pub
|
||||
~
|
||||
?: (gth u.lyf life.u.pub)
|
||||
~
|
||||
=/ pas (~(get by pubs.u.pub) u.lyf)
|
||||
?~ pas
|
||||
~
|
||||
:^ ~ ~ %noun
|
||||
!> ^- deed:ames
|
||||
[life.u.pub (~(got by pubs.u.pub) life.u.pub) ~]
|
||||
!> `deed:ames`[u.lyf u.pas ~]
|
||||
::
|
||||
%earl
|
||||
?. ?=([@ @ @ ~] tyl) [~ ~]
|
||||
|
2145
sys/zuse.hoon
2145
sys/zuse.hoon
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@
|
||||
-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 ~] 0 url ~]
|
||||
[`seed:able:jael`[~nul 1 key ~] ~nul ~ [/org/urbit ~] 0 url ~]
|
||||
::
|
||||
=^ results1 jael-gate
|
||||
=/ hen=duct
|
||||
@ -56,9 +56,9 @@
|
||||
::
|
||||
=^ results3 jael-gate
|
||||
=/ hiss-httr=hiss:eyre
|
||||
%+ json-request:ethereum
|
||||
%+ json-request:rpc:ethereum
|
||||
(need url)
|
||||
%+ request-to-json:ethereum
|
||||
%+ request-to-json:rpc:ethereum
|
||||
`'block number'
|
||||
[%eth-block-number ~]
|
||||
%- jael-take-with-comparator :*
|
||||
|
@ -1,9 +1,9 @@
|
||||
/+ *test
|
||||
|%
|
||||
:: example hull for ~zod
|
||||
:: example point for ~zod
|
||||
::
|
||||
++ hul
|
||||
^- hull:constitution:ethe
|
||||
++ pot
|
||||
^- point:azimuth-types
|
||||
:+ [0x0 0x0 0x0 0x0]
|
||||
:* ~
|
||||
life=1
|
||||
@ -12,22 +12,22 @@
|
||||
188.597.545.066.664.466.963.044.328.182.155.965.137.512.758.548.384.
|
||||
637.214.562
|
||||
continuity-number=0
|
||||
sponsor=[~ u=~zod]
|
||||
sponsor=[& ~zod]
|
||||
escape=~
|
||||
==
|
||||
[~ u=[spawn-proxy=0x0 spawn-count=2 spawned=~]]
|
||||
[~ u=[spawn-proxy=0x0 spawned=~]]
|
||||
:: secret key for ~zod
|
||||
::
|
||||
++ sec
|
||||
^- ring
|
||||
0w8.Ugyke.eUOf2.NcHRo.tZA7r.P8vP6.DGKp4.yn-BI.etdzb.ucv75.WgRob.H1-7n.
|
||||
4qCje.gc7z7.1i-3T.9~8UR.IGkGH.6NWR2
|
||||
:: Ships contract address
|
||||
:: Azimuth contract address
|
||||
::
|
||||
++ ships
|
||||
++ azimuth
|
||||
%- crip
|
||||
%+ weld "0x"
|
||||
(render-hex-bytes:ethereum 20 `@`ships:contracts:constitution:ethe)
|
||||
(render-hex-bytes:ethereum 20 `@`azimuth:contracts:^azimuth)
|
||||
:: snapshot
|
||||
::
|
||||
++ snap
|
||||
@ -38,11 +38,11 @@
|
||||
dns.eth
|
||||
['urbit.org' 'urbit.org' '']
|
||||
::
|
||||
hul.eth
|
||||
pos.eth
|
||||
%- malt
|
||||
:* ~zod^hul
|
||||
~marzod^hul
|
||||
(turn (gulf 1 255) |=(gal=@ gal^hul))
|
||||
:* ~zod^pot
|
||||
~marzod^pot
|
||||
(turn (gulf 1 255) |=(gal=@ gal^pot))
|
||||
==
|
||||
::
|
||||
latest-block 4.230.000
|
||||
@ -64,18 +64,18 @@
|
||||
!> &
|
||||
!> ?=(^ zar)
|
||||
::
|
||||
++ test-give-hull
|
||||
++ test-give-point
|
||||
=/ oct
|
||||
%- as-octs:mimes:html
|
||||
%+ rap 3
|
||||
:~ '{"jsonrpc":"2.0","id":"0","method":"eth_call","params":[{"data":"'
|
||||
'0xb3220694'
|
||||
'0x63fa9a87'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'","to":"' ships '"},"0x0"]}'
|
||||
'","to":"' azimuth '"},"0x0"]}'
|
||||
==
|
||||
%+ expect-eq
|
||||
!> oct
|
||||
!> (hull:give:dawn 0 ~zod)
|
||||
!> (point:give:dawn 0 ~zod)
|
||||
::
|
||||
++ test-give-turf
|
||||
=/ oct
|
||||
@ -84,15 +84,15 @@
|
||||
:~ '[{"jsonrpc":"2.0","id":"turf-0","method":"eth_call","params":[{"data":"'
|
||||
'0xeccc8ff1'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'","to":"' ships '"},"0x0"]},'
|
||||
'","to":"' azimuth '"},"0x0"]},'
|
||||
'{"jsonrpc":"2.0","id":"turf-1","method":"eth_call","params":[{"data":"'
|
||||
'0xeccc8ff1'
|
||||
'0000000000000000000000000000000000000000000000000000000000000001'
|
||||
'","to":"' ships '"},"0x0"]},'
|
||||
'","to":"' azimuth '"},"0x0"]},'
|
||||
'{"jsonrpc":"2.0","id":"turf-2","method":"eth_call","params":[{"data":"'
|
||||
'0xeccc8ff1'
|
||||
'0000000000000000000000000000000000000000000000000000000000000002'
|
||||
'","to":"' ships '"},"0x0"]}]'
|
||||
'","to":"' azimuth '"},"0x0"]}]'
|
||||
==
|
||||
%+ expect-eq
|
||||
!> oct
|
||||
@ -143,27 +143,26 @@
|
||||
[[~zod 1 zod.kyz] [~nec 1 nec.kyz] ~]
|
||||
!> (czar:take:dawn oct)
|
||||
::
|
||||
++ test-take-hull
|
||||
++ test-take-point
|
||||
=/ oct
|
||||
%- as-octs:mimes:html
|
||||
%+ rap 3
|
||||
:~ '{"jsonrpc":"2.0","result":"'
|
||||
'0x0000000000000000000000000000000000000000000000000000000000000001'
|
||||
'b69b6818b17b7cc22f8e0a2291f58e4aa840cbf44cb2f1c94dc3d71e3cda0d94'
|
||||
'0xb69b6818b17b7cc22f8e0a2291f58e4aa840cbf44cb2f1c94dc3d71e3cda0d94'
|
||||
'3defb87516f42ce4327820b588002aa53e52527af8d23bee4aa215fa296bdf5f'
|
||||
'0000000000000000000000000000000000000000000000000000000000000001'
|
||||
'0000000000000000000000000000000000000000000000000000000000000001'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'0000000000000000000000000000000000000000000000000000000000000002'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'0000000000000000000000000000000000000000000000000000000000000001'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'0000000000000000000000000000000000000000000000000000000000000001'
|
||||
'0000000000000000000000000000000000000000000000000000000000000000'
|
||||
'"}'
|
||||
==
|
||||
%+ expect-eq
|
||||
!> [~ hul]
|
||||
!> (hull:take:dawn ~zod oct)
|
||||
!> [~ pot]
|
||||
!> (point:take:dawn ~zod oct)
|
||||
::
|
||||
++ test-take-turf
|
||||
=/ oct
|
||||
@ -192,10 +191,10 @@
|
||||
!> [~ 4.230.000]
|
||||
!> (bloq:snap:dawn snap)
|
||||
::
|
||||
++ test-snap-hull
|
||||
++ test-snap-point
|
||||
%+ expect-eq
|
||||
!> [~ hul]
|
||||
!> (hull:snap:dawn ~zod snap)
|
||||
!> [~ pot]
|
||||
!> (point:snap:dawn ~zod snap)
|
||||
::
|
||||
++ test-snap-czar
|
||||
%+ expect-eq
|
||||
@ -210,37 +209,37 @@
|
||||
++ test-veri-good
|
||||
=/ sed [~zod 1 sec ~]
|
||||
%+ expect-eq
|
||||
!> [%& `~zod]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> [%& ~zod]
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
++ test-veri-not-spawned
|
||||
=/ sed [~zod 1 sec ~]
|
||||
%+ expect-eq
|
||||
!> [%| %not-keyed]
|
||||
!> (veri:dawn sed =>(hul .(net ~)) ~)
|
||||
!> (veri:dawn sed =>(pot .(net ~)) ~)
|
||||
::
|
||||
++ test-veri-wrong-key
|
||||
=/ sed [~zod 1 sec:ex:(pit:nu:crub:crypto 24 %foo) ~]
|
||||
%+ expect-eq
|
||||
!> [%| %key-mismatch]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
++ test-veri-life-mismatch
|
||||
=/ sed [~zod 2 sec ~]
|
||||
%+ expect-eq
|
||||
!> [%| %life-mismatch]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
++ test-veri-already-booted
|
||||
=/ sed [~zod 1 sec ~]
|
||||
;: weld
|
||||
%+ expect-eq
|
||||
!> [%| %already-booted]
|
||||
!> (veri:dawn sed hul `[1 |])
|
||||
!> (veri:dawn sed pot `[1 |])
|
||||
::
|
||||
%+ expect-eq
|
||||
!> [%| %already-booted]
|
||||
!> (veri:dawn sed hul `[2 &])
|
||||
!> (veri:dawn sed pot `[2 &])
|
||||
==
|
||||
::
|
||||
++ test-veri-earl-good
|
||||
@ -252,8 +251,8 @@
|
||||
(shaf %earl (sham who 1 pub:ex:cub))
|
||||
[who 1 sec:ex:cub `sig]
|
||||
%+ expect-eq
|
||||
!> [%& ~]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> [%& (^sein:title who)]
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
++ test-veri-earl-missing-sig
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -262,7 +261,7 @@
|
||||
[who 1 sec:ex:cub ~]
|
||||
%+ expect-eq
|
||||
!> [%| %missing-sig]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
++ test-veri-earl-parent-not-keyed
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -274,7 +273,7 @@
|
||||
[who 1 sec:ex:cub `sig]
|
||||
%+ expect-eq
|
||||
!> [%| %parent-not-keyed]
|
||||
!> (veri:dawn sed =>(hul .(net ~)) ~)
|
||||
!> (veri:dawn sed =>(pot .(net ~)) ~)
|
||||
::
|
||||
++ test-veri-earl-life-mismatch
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -286,7 +285,7 @@
|
||||
[who 2 sec:ex:cub `sig]
|
||||
%+ expect-eq
|
||||
!> [%| %life-mismatch]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
++ test-veri-earl-invalid-sig
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -299,7 +298,7 @@
|
||||
[who 1 sec:ex:cub `sig]
|
||||
%+ expect-eq
|
||||
!> [%| %invalid-sig]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> (veri:dawn sed pot ~)
|
||||
::
|
||||
=/ sed
|
||||
=/ sig
|
||||
@ -308,7 +307,7 @@
|
||||
[who 1 sec:ex:cub `sig]
|
||||
%+ expect-eq
|
||||
!> [%| %invalid-sig]
|
||||
!> (veri:dawn sed hul ~)
|
||||
!> (veri:dawn sed pot ~)
|
||||
==
|
||||
::
|
||||
++ test-veri-earl-already-booted
|
||||
@ -321,15 +320,15 @@
|
||||
[who 1 sec:ex:cub `sig]
|
||||
%+ expect-eq
|
||||
!> [%| %already-booted]
|
||||
!> (veri:dawn sed hul `[1 |])
|
||||
!> (veri:dawn sed pot `[1 |])
|
||||
::
|
||||
++ test-veri-pawn-good
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
=/ who=ship `@`fig:ex:cub
|
||||
=/ sed [who 1 sec:ex:cub ~]
|
||||
%+ expect-eq
|
||||
!> [%& ~]
|
||||
!> (veri:dawn sed *hull:constitution:ethe ~)
|
||||
!> [%& ~mittun]
|
||||
!> (veri:dawn sed *point:azimuth-types ~)
|
||||
::
|
||||
++ test-veri-pawn-key-mismatch
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -337,7 +336,7 @@
|
||||
=/ sed [who 1 sec:ex:(pit:nu:crub:crypto 24 %bar) ~]
|
||||
%+ expect-eq
|
||||
!> [%| %key-mismatch]
|
||||
!> (veri:dawn sed *hull:constitution:ethe ~)
|
||||
!> (veri:dawn sed *point:azimuth-types ~)
|
||||
::
|
||||
++ test-veri-pawn-invalid-life
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -345,7 +344,7 @@
|
||||
=/ sed [who 2 sec:ex:cub ~]
|
||||
%+ expect-eq
|
||||
!> [%| %invalid-life]
|
||||
!> (veri:dawn sed *hull:constitution:ethe ~)
|
||||
!> (veri:dawn sed *point:azimuth-types ~)
|
||||
::
|
||||
++ test-veri-pawn-already-booted
|
||||
=/ cub (pit:nu:crub:crypto 24 %foo)
|
||||
@ -353,5 +352,5 @@
|
||||
=/ sed [who 1 sec:ex:cub ~]
|
||||
%+ expect-eq
|
||||
!> [%| %already-booted]
|
||||
!> (veri:dawn sed *hull:constitution:ethe `[1 |])
|
||||
!> (veri:dawn sed *point:azimuth-types `[1 |])
|
||||
--
|
||||
|
@ -5,7 +5,7 @@
|
||||
::
|
||||
++ test-static-args
|
||||
%+ expect-eq
|
||||
!> %- encode-args:ethereum
|
||||
!> %- encode-args:abi:ethereum
|
||||
:~ [%string "dave"]
|
||||
[%bool &]
|
||||
[%array [%uint 1] [%uint 2] [%uint 3] ~]
|
||||
@ -24,7 +24,7 @@
|
||||
::
|
||||
++ test-dynamic-args
|
||||
%+ expect-eq
|
||||
!> %- encode-args:ethereum
|
||||
!> %- encode-args:abi:ethereum
|
||||
:~ [%uint `@ud`0x123]
|
||||
[%array [%uint `@ud`0x456] [%uint `@ud`0x789] ~]
|
||||
[%bytes-n (as-octt:mimes:html (flop "1234567890"))]
|
||||
@ -41,4 +41,4 @@
|
||||
"000000000000000000000000000000000000000000000000000000000000000d"
|
||||
"48656c6c6f2c20776f726c642100000000000000000000000000000000000000"
|
||||
==
|
||||
--
|
||||
--
|
@ -4,7 +4,7 @@
|
||||
::
|
||||
++ test-signing-transaction-1
|
||||
%+ expect-eq
|
||||
!> %+ sign-transaction:ethereum
|
||||
!> %+ sign-transaction:key:ethereum
|
||||
:* 123
|
||||
1.000
|
||||
5.000
|
||||
@ -25,7 +25,7 @@
|
||||
::
|
||||
++ test-signing-transaction-2
|
||||
%+ expect-eq
|
||||
!> %+ sign-transaction:ethereum
|
||||
!> %+ sign-transaction:key:ethereum
|
||||
:* 42
|
||||
1.000
|
||||
5.000
|
||||
|
Loading…
Reference in New Issue
Block a user