naive: add config action

This commit is contained in:
yosoyubik 2021-06-03 09:11:33 +02:00
parent 943eee1db6
commit fc8e090a29

View File

@ -58,17 +58,19 @@
chain-id=@
==
::
+$ action
$% [%submit force=? sig=@ tx=part-tx]
[%cancel sig=@ keccak=@]
::
[%commit ~] ::TODO maybe pk=(unit @) later
[%frequency frequency=@dr]
+$ config
$% [%frequency frequency=@dr]
[%setkey pk=@]
[%endpoint endpoint=@t]
[%network net=?(%mainnet %ropsten %local)]
[%nonce nonce=@ud]
[%subs ~]
==
::
+$ action
$% [%submit force=? sig=@ tx=part-tx]
[%cancel sig=@ keccak=@]
[%commit ~] ::TODO maybe pk=(unit @) later
[%config config]
==
::
+$ card card:agent:gall
@ -439,31 +441,8 @@
^- (quip card _state)
?- -.action
%commit on-timer
%frequency [~ state(frequency frequency.action)]
%nonce [~ state(next-nonce nonce.action)]
%endpoint [~ state(endpoint endpoint.action)]
::
%network
:- ~
=/ [contract=@ux chain-id=@]
=< [naive chain-id]
=, azimuth
?- net.action
%mainnet mainnet-contracts
%ropsten ropsten-contracts
%local local-contracts
==
state(contract contract, chain-id chain-id)
::
%subs
:_ state
[%pass /azimuth %agent [our.bowl %azimuth] %watch /aggregator]~
::
%setkey
::TODO what about existing sending entries?
?~ pk=(de:base16:mimes:html pk.action)
`state
[(get-nonce q.u.pk) state(pk q.u.pk)]
%config (on-config +.action)
%cancel !! ::TODO
::
%submit
=^ success state
@ -475,9 +454,33 @@
~? =(success |)
[dap.bowl %submit-failed action]
[~ state]
==
::
++ on-config
|= =config
^- (quip card _state)
?- -.config
%frequency [~ state(frequency frequency.config)]
%nonce [~ state(next-nonce nonce.config)]
%endpoint [~ state(endpoint endpoint.config)]
::
%cancel
!! ::TODO
%network
:- ~
=/ [contract=@ux chain-id=@]
=< [naive chain-id]
=, azimuth
?- net.config
%mainnet mainnet-contracts
%ropsten ropsten-contracts
%local local-contracts
==
state(contract contract, chain-id chain-id)
::
%setkey
::TODO what about existing sending entries?
?~ pk=(de:base16:mimes:html pk.config)
`state
[(get-nonce q.u.pk) state(pk q.u.pk)]
==
:: TODO: move address to state?
::