naive: update wires and path in azimuth
:: TODO: add poke action to allow switching?
:: eth snapshot could also be considered
::
- %mainnet
+ %local
:: TODO: maybe flop the endianness here so metamask signs it in normal
:: order?
::
:- [%give %fact ~[path] %azimuth-udiffs !>(~[i.udiffs])]
$(udiffs t.udiffs)
::
-++ aggregator-update
+++ tx-update
|= effects=(list tagged-diff)
^- (list card:agent:gall)
%+ murn effects
?. ?=(%tx +<.tag) ~
%- some
^- card:agent:gall
- [%give %fact ~[/aggregator] %naive-diffs !>(+.tag)]
+ [%give %fact ~[/txs] %naive-diffs !>(+.tag)]
::
++ get-network
|= =network
|= =path
^- (quip card:agent:gall _this)
?< =(/sole/drum path)
- ?: =(/aggregator path)
+ ?: =(/txs path)
:_ this
[%give %fact ~ %naive-state !>(nas.state)]~
=/ who=(unit ship)
==
=? nas.state ?=(%history -.diff) *^state:naive
=^ effects nas.state
- %^ run-logs
+ =; nas=^state:naive
+ (run-logs nas loglist.diff net)
?- -.diff
:: %history *^state:naive
%history nas.state
%logs nas.state
==
- loglist.diff
- net
::
:_ this
%+ weld
- (aggregator-update effects)
+ (tx-update effects)
(jael-update (to-udiffs effects))
::
++ on-arvo on-arvo:def
