Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Deploy

Full recipes: clc-protocol/docs/DEPLOY.md and docs/PUBLISH.md.

Tooling

cd clc-protocol
go build -o ./ge-publish ./cmd/ge-publish
make all
 
export RPC_URL=https://gnosis-rpc.publicnode.com
export CHAIN_ID=100
export PRIVATE_KEY=<deployer>
export OWNER=<owner; must be able to call set() / addWriter>
export ADMIN=<proxy admin; should differ from OWNER>
 
GAS="--gas-fee-cap 2000000000 --gas-tip-cap 1000000000"
BASE="--rpc-url $RPC_URL --chain-id $CHAIN_ID --private-key $PRIVATE_KEY $GAS"
FACTORY=0xB286994c648F98fD3a3BA6C43934828a5b88162b

Implementations are already on chain. Reuse them. See Addresses.

New proxy

./ge-publish deploy-proxy --contract swappool $BASE \
  --factory-address $FACTORY \
  --impl-address 0x9e694D342Cab02e295262B2290b0E64A0334160D \
  --owner $OWNER --admin $ADMIN
  # plus contract-specific flags: --token-name, --fee-policy-default, …

--admin is required and must differ from --owner or ge-publish exits.

cast send $REGISTRY "set(bytes32,address)" \
  $(cast format-bytes32-string AccountIndex) $ACCOUNT_INDEX_PROXY \
  $BASE

set is once per identifier.

Verify

VERIFY="--chain-id 100 --compiler-version 0.8.36 --evm-version osaka \
  --num-of-optimizations 200 --verifier blockscout \
  --verifier-url https://gnosisscan.io/api/"
 
forge verify-contract $IMPL src/SwapPool.sol:SwapPool $VERIFY

Gnosisscan links ERC-1967 proxies to a verified implementation. You do not verify the proxy separately.

Calibur uses 1000 optimizer runs, not 200.

After a pool exists

  1. register it on PoolIndex (writer/owner).
  2. register its vouchers on TokenIndex and the pool's own registry.
  3. setLimitFor on a later tx than pool deploy.
  4. If the pool emits SwapSettlement, set TRACKER_CHAIN__POOL_SETTLEMENT_BLOCK.