Skip to main content

Configuration

⚡️ TributeDAO Framework provides you a set of modular and extensible smart contracts to launch your DAO with minimal costs.

Requirements#

warning

Make sure you are on the branch release-v2.4.0 which is the version that contains the contracts integrated with TributeUI.

Configuring the project#

⚙️ Now that you have the tribute-contracts project prepared in your local environment, it is time to set up the DAO configs.

In the root of tribute-contracts folder we will create a .env file. This file will contain all the environment variables required by the deployment script. Most of these variables are configurations that are applied to the DAO contracts during the deployment.

In this section we will be covering the configurations to deploy a Tribute DAO to Rinkeby test network.

Environment Variables#

The first step is to create a .env file in the root of the tribute-contracts directory:

touch .env

Here is a sample .env file which you can use to set the environment variables.

Please use the following template, and fill out each environment variable with the proper values as indicated in the comments below:

caution

The DAO_OWNER_ADDR env var needs to match the first ethereum address derived from your WALLET_MNEMONIC. With a seed phrase you can create multiple addresses, but in this case we need the address of the first account of the wallet to be used as DAO owner.

# tribute-contracts/.env
######################## Tribute Contracts env vars ########################
# Set the name of your DAO. Make sure the DAO name is unique.DAO_NAME=My Tribute DAO xyz...
# The public ethereum address that belongs to the Owner of the DAO,# in this case, it is your public ethereum address on Rinkeby network.# Make sure you have some ETH, otherwise the deployment will fail.# It needs to be the address of the first account you have in metamask accounts,# otherwise it won't work.DAO_OWNER_ADDR=0x...
# The name of the ERC20 token of your DAO.ERC20_TOKEN_NAME=My First DAO Token
# The symbol of your ERC20 Token that will be used to control the# DAO units that each member holds.ERC20_TOKEN_SYMBOL=TDAO
# Number of decimals to display the token units in MM. We usually# set 0 because the DAO units are managed in WEI, and to be able# to see that in the MM wallet you need to remove the precision.ERC20_TOKEN_DECIMALS=0
# The Ethereum Node URL to connect the Ethereum network. You can follow# these steps to get your ProjectId/API Key from Infura:# https://blog.infura.io/getting-started-with-infura-28e41844cc89/# Set your own Infura API or Alchemy API keyETH_NODE_URL=https://rinkeby.infura.io/v3/your-infura-api-key#ETH_NODE_URL=https://eth-rinkeby.alchemyapi.io/v2/your-alchemy-api-key
# The 12 word "secret recovery phrase" for the ethereum address# referenced in DAO_OWNER_ADDR above. This can be found in your wallet.# It will be used to create the HD wallet and sign transactions on your behalf.WALLET_MNEMONIC=...

Build#

With the .env file created, and all the environment variables set, you can install the project dependencies and compile the smart contracts:

npm run build

⚡️ Alright! You have configured the project to deploy the contracts to Rinkeby test network. Let's move the next section to finally publish your DAO to the world 🌎!

Problems?#

Ask for help on Discord or on GitHub Discussions.