> For the complete documentation index, see [llms.txt](https://docs.mazze.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mazze.io/testnet/deploying-smart-contracts-on-mazze-testnet.md).

# Deploying Smart Contracts

Mazze supports EVM-compatible development workflows, but test configuration must come from your current RPC environment.

## Before deploying

1. Ensure node/RPC are running: [Setup Guide](/testnet/setup-guide.md), [RPC Guide](/testnet/rpc.md).
2. Verify chain responsiveness:

```bash
./run/mazze-cli.sh status
```

3. Query EVM chain id from active RPC before hardcoding it in tooling:

```bash
curl -s http://127.0.0.1:58545 \
  -H 'content-type: application/json' \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
```

## Hardhat example (environment-driven)

```javascript
require('@nomicfoundation/hardhat-toolbox');

module.exports = {
  solidity: '0.8.24',
  networks: {
    mazze: {
      url: process.env.MAZZE_RPC_URL,
      accounts: [process.env.PRIVATE_KEY],
      chainId: Number(process.env.MAZZE_CHAIN_ID),
    },
  },
};
```

Use environment variables from your active node deployment, not old static docs values.

## Recommended workflow

* Build and deploy as usual with Hardhat/Foundry/Truffle.
* Use [RPC Guide](/testnet/rpc.md) for JSON-RPC method checks.
* Use [Mazze CLI](/testnet/mazze-cli.md) to inspect balances/receipts quickly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mazze.io/testnet/deploying-smart-contracts-on-mazze-testnet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
