> For the complete documentation index, see [llms.txt](https://docs.bvm.network/bvm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bvm.network/bvm/bitcoin-dapps/evm-code-tutorials/issue-your-own-governance-token.md).

# Issue your own governance token

Once your ZK rollup on Bitcoin is up and running, it's common to issue a governance token that can be used for raising funds for future projects and for governing your project's activities as a DAO.

{% hint style="info" %}
Since your ZK Rollup is EVM-compatible, dApps should be written in Solidity. If you are new to this programming language, please learn more about it [here](https://docs.soliditylang.org/en/v0.8.26/).
{% endhint %}

The total amount of tokens in circulation can be set to a simple fixed amount or fluctuate based on any programmed ruleset.

## Write the governance token issuance smart contract

Extending the OpenZeppelin ERC-20 contract, we create a governance token (BIT) for your Layer 2 on Bitcoin.&#x20;

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract Bitswap is ERC20 {
    constructor(uint256 initialSupply) ERC20("Bitswap", "BIT") {
        _mint(msg.sender, initialSupply);
    }
}
```

## Clone the smart contract examples

We've prepared a few different examples for you to get started.

```bash
git clone https://github.com/trustlesscomputer/smart-contract-examples.git
```

## Compile and Deploy the contracts

Refer to the [tutorial](https://docs.bvm.network/bvm/more/how-to-deploy-a-smart-contract-to-supersonic).

## Interact with the contracts

Once the contracts are deployed, you can interact with them. We've prepared a few `hardhat tasks` to make it easy for you to interact with the contracts.

```bash
npx hardhat balanceERC20
npx hardhat transferERC20 --from <your-address> --amount <transfer-amount> --to <your-address>
```


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.bvm.network/bvm/bitcoin-dapps/evm-code-tutorials/issue-your-own-governance-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
