Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save microchipgnu/0fca668e3588067d06ffae5761f0890c to your computer and use it in GitHub Desktop.
Save microchipgnu/0fca668e3588067d06ffae5761f0890c to your computer and use it in GitHub Desktop.

How to interact with Mintbase contracts from your DAO

This tutorial assumes you are using Sputnik DAO v2 (https://v2.sputnik.fund/)

1. Create a "Custom Function" proposal

2. Fill the proposal form

Form fields

Enter receiver contract id

This is the contract address. For example, hellovirtualworld.mintspace2.testnet.

Enter description

Your proposal description.

Method Name and Args

Different calls require different args. I'll list some of the calls and example args here.

Mint Tokens

Mint a token on your contract (store).

Method Name

mint_tokens

Args

{
  "owner_id": "luisf.testnet",
  "metadata": {
    "reference": "SzRF5wcPNHU9qgkGVX3Y92aNpMwxdSjelNdI5pU-hqk",
    "extra": "VR"
  },
  "num_to_mint": 10,
  "royalty_args": null,
  "split_owners": null
}

⚠️ Beware that if you're minting a token with the same reference, extra

⚠️ The DAO address needs to be added as a minter first

Grant Minter

Add a minter to a store.

Method Name

grant_minter

Args

{
  "account_id": "luisf.testnet"
}

Revoke Minter

Revoke minter from store.

Method Name

revoke_minter

Args

{
  "account_id": "luisf.testnet"
}

(Batch) Transfer

Transfer token(s) to account(s).

Method Name

batch_transfer

Args

{
  "token_ids": ["6","account2.testnet"]
}

Burn tokens

Burn tokens from contract.

Method Name

burn_tokens

Args

{
  "token_ids": ["6"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment