Deploy a Smart Contract on Devnet

This guide walks you through uploading, instantiating, and interacting with a CosmWasm smart contract on the Axiome Devnet. You can find the full CosmWasm documentation here.

Requirements

Before you begin, make sure you have:

  • A running Devnet node (or access to one via RPC)

  • The CosmWasm contract compiled to .wasm (e.g., via cargo run-script optimize)

  • The CLI binary (axmd) installed

  • A key with testnet tokens (use a faucet if needed)


Step 1: Create or Recover a Wallet

axmd keys add mykey
# or recover
axmd keys add mykey --recover

Step 2: Request Test Tokens

Find you address:

axmd keys show mykey -a

And go to our faucet to get tesnet AXM tokens (only 5000 per day per address)


Step 3: Upload the Contract

This transaction returns a code ID β€” you'll need it for the next step.

To check the list of uploaded contracts:


πŸ—οΈ Step 4: Instantiate the Contract

πŸ“Œ Replace {"field":"value"} with your contract's init message.

To get the contract address:


βš™οΈ Step 5: Interact with the Contract

Example execution:

Example query:

Last updated