Cambrian CLI
Last updated
Last updated
node.js >= 22.0.0
docker >= 20.0.0
There are 4 ways of updating oracle data:
[RECOMMENDED] Streaming container (container-stream
option while scaffolding operator) - container periodically writes string data to stdout, operator stores this chunks of data on-chain
Running container (container-run
option while scaffolding operator) - operator starts container with periods specified by a cron spec. Container should write some string data into stdout and then it exits with code 0. Operator stores this data on-chain.
[DEPRECATED] Running typescript/javascript code (file-run
option while scaffolding operator) - operator should execute a code from the given file with periods specified by a cron spec. This code should write some string data into stdout and then child process exits with code 0. Operator stores this data on-chain.
[DEPRECATED] Streaming typescript/javascript code (Not implemented yet).
Build Oracle Update Container image:
Before scaffolding the operators make sure instance of AVS is already running.
During this wizard choose container-stream
as oracle update method and then enter image name specified in previous step (oracle-update-current-date
)
After start each operator run its own Oracle Datasource Container (ODC)
ODC streams string data into stdout. Every chunk of this data operator will store onchain invoking Oracle Program
There are two ways of executing payload:
From a container (recommended way, using camb payload run-container
command)
From a typescript/javascript code (deprecated way, using camb payload run-file
)
Container receives a parameter serialized as JSON-object. It's type is:
extraSigners
represents an optional array of serialized private keys used for signing transaction.
Container should write a JSON-stringified object. It's type is:
where data
is base58-serialized data buffer and role
is the following enum:
Send image name of payload container from the previous step (payload-check-oracle
) to the AVS instance
AVS broadcasts payload container image name to running operators
Operators run payload containers
Payload containers return proposal instructions
Operators invoke handle_proposal
instruction in PoA program with these proposal instructions