Localnet
Currently, the fastest way to get up and running with a Clockwork localnet is to clone the repo, checkout a latest release version, and build the toolkit from scratch.
git clone https://github.com/clockwork-xyz/clockwork
cd clockwork
git checkout tags/$(git describe --tags)
./scripts/build-all.sh . && export PATH=$PWD/bin:$PATH
First, remember to configure your Solana CLI for local development:
solana config set --url localhost
Now you can use the Clockwork CLI to launch a localnet with all the Clockwork plugin and programs initialized and ready to go:
clockwork localnet
To deploy your own programs to the localnet, you can use either the Anchor CLI, Clockwork CLI, or Solana CLI. As a shortcut, the Clockwork CLI provides a
--bpf-program
flag for deploying the localnet with a pre-built program binary. Anchor
Clockwork
Solana
anchor deploy
clockwork localnet \
--bpf-program <ADDRESS_OR_KEYPAIR> <PROGRAM_FILEPATH>
solana program deploy \
--program-id <ADDRESS_OR_KEYPAIR> <PROGRAM_FILEPATH>
To stream logs from your deployed program, you can use the Solana CLI.
solana logs --url localhost
Last modified 21d ago