A cloudflare worker function that is executed via a cron job and updates the deployed Zuzalu Oracle with the latest roots of the various Semaphore groups of Zuzalu.
All configuration information is placed in wrangler.toml
.
git clone https://github.com/odyslam/zuzalu-updater
yarn
ornpm install
wrangler dev
to run the worker in dev modewrangler publish
to host the wrangler in production
The worker is configured to run as a cron job, thus it only has a scheduled
function and not a fetch
function. It doesn't serve an endpoint.
The current cron configuration is to run every 2 hours and is defined in wrangler.toml
.
CONTRACT_ADDRESS
: The address of the oracle
Env variables are defined in wrangler.toml
.
ETH_RPC_URL
: The RPC url (with the api token) for the network.PRIVATE_KEY
: The private key of the contract'sowner
.
Secrets are created by running wrangler secret put <SECRET_NAME>
MIT