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#

caution

Be sure you are adding a subgraph in the legacy version of The Graph! You should see legacy-explorer in the URL (https://thegraph.com/legacy-explorer/dashboard).

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. The configs are a set of environment variables that will provide to the deployment script all the essential information to deploy the smart contracts to the correct network. In this tutorial we will be covering the deploying of the DAO using Rinkeby test network.

Environment Variables#

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

touch .env

Then set the following content to the .env file, and fill out each environment variable with the values as indicated in the comments below:

# The name of the DAO.DAO_NAME=My First DAO
# 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.DAO_OWNER_ADDR=0x...
#can set that to use the same address you have in the DAO_OWNER_ADDRCOUPON_CREATOR_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=FDAO
# 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 Infura Key to connect to Rinkeby network. You can follow# these steps to get your ProjectId/API Key from Infura:# https://blog.infura.io/getting-started-with-infura-28e41844cc89/INFURA_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.TRUFFLE_MNEMONIC=...
# The Graph API Access Token that will be used to deploy the Subgraph.# Copy the access token from the subgraph project you have created.# https://thegraph.com/legacy-explorer/dashboardGRAPH_ACCESS_TOKEN=...
caution

The DAO_OWNER_ADDR env var needs to match the ethereum address derived from your TRUFFLE_MNEMONIC.

⚡️ 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.