Task automation tool for the Axelar-Starknet bridge project. This tool provides convenient commands for building, deploying, and managing contracts.
- Rust toolchain
starkliCLI toolscarb(Cairo/Starknet build tool)jq(JSON processor)- Configured Starknet wallet
View all available commands:
cargo xtask --help# Build gas service contract (builds and extracts ABI)
cargo xtask build-gas-service
# Build and deploy gas service contract (initial deployment)
cargo xtask build-gas-service --deploy
# or use the short flag
cargo xtask build-gas-service -d
# Build and upgrade existing gas service contract
cargo xtask build-gas-service --upgrade
# or use the short flag
cargo xtask build-gas-service -u# Build operators contract (builds and extracts ABI)
cargo xtask build-operators
# Build and deploy operators contract (initial deployment)
cargo xtask build-operators --deploy
# or use the short flag
cargo xtask build-operators -d
# Build and upgrade existing operators contract
cargo xtask build-operators --upgrade
# or use the short flag
cargo xtask build-operators -u# Send a dummy transfer
cargo xtask send-transfer
# Send GMP gas payment AFTER call contract transaction
cargo xtask pay-gas-after-tx --tx-hash 0x029c50eb1b065f6fb67c6f7a958a174a9025bceae9d386384fb5bdeba8566697
# Collect gas
cargo xtask collect-gas --wallet <WALLET> --wallet-private-key <KEY>
# Approve tokens
cargo xtask approve-tokens <SPENDER_ADDRESS> [AMOUNT]-
Deploy (
--deploy/-d): Use this flag for initial contract deployment. This will:- Declare the contract class
- Deploy a new instance of the contract
- You'll need to update the contract address in
relayer-config-example.tomlafter deployment
-
Upgrade (
--upgrade/-u): Use this flag to upgrade an existing contract. This will:- Declare the new contract class
- Call the
upgradefunction on the existing contract to update its implementation - The contract address remains the same
Both commands will always build the contract and extract the ABI, regardless of flags.
The tool reads contract addresses from relayer-config-example.toml. Ensure this file contains up-to-date:
gateway_addressgas_service_addressoperators_address
- Most operations will prompt for your keystore password
- Use
--watchflag to monitor transaction completion - The
pay-gas-after-txcommand allows you to send a GMP (General Message Passing) gas payment after a call contract transaction has been executed