Skip to content

Step 1: Deploy the Contracts

From the repository root, build and deploy all four contracts in one command:

Terminal window
./scripts/deploy.sh \
--network testnet \
--rpc-url https://testnet.ckb.dev \
--from-address <YOUR_CKT1_ADDRESS>

This builds the RISC-V contract binaries and deploys:

The script writes deployment metadata to deploy/info.json and migration files to deploy/migrations/.

After the command completes:

Terminal window
cat deploy/info.json | python3 -m json.tool | grep -A3 "tx_hash"

You should see tx hashes for each deployed contract. Confirm they are live:

Terminal window
TX="<governance-lock tx_hash from info.json>"
ckb-cli --url https://testnet.ckb.dev rpc get_transaction \
--hash "$TX" --output-format json | python3 -m json.tool | grep '"status"'

Expected: "status": "committed".

Record the Type IDs for each contract — you will need them in the next steps. They are in deploy/info.json under each contract’s type_id field.

Continue to Step 2.