Skip to content

cowdao-grants/herd-token

Repository files navigation

Herd Token

A non-transferable ERC20 token for Grants Committee voting. The token can only be minted or burned by the Grants DAO Safe, and tokens cannot be transferred between addresses.

Overview

  • Token Name: Herd Token
  • Symbol: HERD
  • Max Per Address: 1 HERD
  • Owner: Grants DAO Safe (0xCA1F000D520c21C47E6c634DD31b92b91A6338bD)

Development

This project uses Foundry. Make sure you have it installed before proceeding.

Install Dependencies

forge install

Build

forge build

Test

# Run all tests
forge test

# Run tests with verbosity
forge test -vvv

# Run specific test contract
forge test --match-contract HerdTest

# Run deployment tests
forge test --match-contract HerdScriptTest

Deployment

Prerequisites

  1. Create a .env file with:
GNOSIS_RPC_URL=your_gnosis_rpc_url
PRIVATE_KEY=your_private_key
GNOSISSCAN_API_KEY=your_gnosisscan_api_key
  1. Load environment variables:
source .env

Deploy to Gnosis Chain

forge script script/Herd.s.sol:HerdScript \
    --rpc-url $GNOSIS_RPC_URL \
    --private-key $PRIVATE_KEY \
    --broadcast \
    --verify \
    --etherscan-api-key $GNOSISSCAN_API_KEY \
    -vvvv

Manual Verification

If automatic verification fails, verify manually:

forge verify-contract \
    <DEPLOYED_CONTRACT_ADDRESS> \
    src/Herd.sol:Herd \
    --chain-id 100 \
    --etherscan-api-key $GNOSISSCAN_API_KEY \
    --compiler-version v0.8.28

Contract Usage

Owner Functions

  • hope(address guy): Mint 1 HERD token to an address
  • nope(address guy): Burn 1 HERD token from an address

User Functions

  • Standard ERC20 view functions (balanceOf, allowance)
  • Note: transfer and transferFrom are prohibited

Security Considerations

  • Only the Grants DAO Safe can mint or burn tokens
  • Tokens cannot be transferred between addresses
  • Each address can only hold 1 HERD token
  • The contract is non-upgradeable

License

UNLICENSED

Contributing

This project is maintained by Grants DAO. For questions or issues, please open an issue in the repository.


This README now includes:
1. Complete project overview
2. Detailed development setup
3. Testing instructions including fork tests
4. Step-by-step deployment guide
5. Contract usage documentation
6. Security considerations
7. License and contributing information

About

Herd token for Grants DAO Governance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published