Environment Variables

cw-orch leverages some environment variables to interact with contracts on actual blockchains. The environment variables are described here. You can find additional information about their usage, default values and types in the cw-orch repo.

IMPORTANT: Before proceeding, ensure that you add .env to your .gitignore. We are not responsible for any loss of funds due to leaked mnemonics.

Here are the optional environment variables:

# .env

# info, debug, trace (if using env_logger for logging)

# Where the contract wasms are located (used by ArtifactsDir::env())

# where to store the state of your deployments (default: ./state.json)

# Mnemonics of the account that will be used to sign transactions
# Can optionally be set on DaemonBuilder as well.
MAIN_MNEMONIC="" # Necessary if interacting with a cw-orch-daemon on mainnet
TEST_MNEMONIC="" # Necessary if interacting with a cw-orch-daemon on testnet
LOCAL_MNEMONIC="" # Necessary if interacting with a cw-orch-daemon locally

## Additional configuration variables. These are optional. We show default values here: 
# Optional - Float. This allows changing the gas buffer applied after tx simulation
# Optional - Integer. This changes the number of tx queries before it fails if it doesn't find any result
# Optional - Integer. Minimum block speed in seconds. Useful when the block speeds are varying a lot
# Optional - String. If equals to "true", will serialize the blockchain messages as json (for easy copying) instead of Rust Debug formatting
# Optional - Absolute Path. Sets the directory where the state file will be saved.
# This is not enforced to be an absolute path but this is highly recommended
CW_ORCH_STATE_FOLDER = "~/.cw-orchestrator"


Only 24-word mnemonics are supported at this time. If you’re experienced with keychain and private key management we’d really appreciate your help in adding support for other formats. Please reach out to us on Discord if you’re interested in helping out.