⚡️ TributeDAO Framework provides you a set of modular and extensible smart contracts to launch your DAO with minimal costs.
- Infura Ethereum API KEY: sign up for free, verify your email, create an ethereum project to get your API Key (also known as
Project Id). We will use that to deploy the contracts to the Rinkeby network. Checkout this Infura Blog Post for more info on that.
- The Graph API Access Token: sign up to https://thegraph.com/legacy-explorer/dashboard with your Github account, access the dashboard, and copy the Access Token. We will use that to deploy the Tribute DAO Subgraph to thegraph.com. Then click on "Add Subgraph" and type: Tribute DAO Tutorial, give it any subtitle, and hit Create subgraph.
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).
⚙️ 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.
The first step is to create a
.env file in the root of the tribute-contracts directory:
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=...
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 🌎!