Skip to content

DAO1Official/dao1-contracts

Repository files navigation

Smart contracts for DAO1

DAO1 Ethereum contracts

Solidity License Build Status

Deployments

Matic mainnet:

Ethereum mainnet:

Install node packages (hardhat)

yarn install

Testing deploy (rinkeby, matic)

Create local environments

export MNEMONIC='<your MNEMONIC phrase>'
export INFURA_API_KEY=<your API key>

Run deploy

npx hardhat --network rinkeby deploy
npx hardhat --network rinkeby etherscan-verify --solc-input --api-key <Etherscan_API_Key>

npx hardhat --network mumbai deploy
npx hardhat --network mumbai etherscan-verify --solc-input --api-key <Etherscan_API_Key>

Local-fork deploy (mainnet, matic)

Create local environments for mainnet

export MNEMONIC='<your MNEMONIC phrase where you have balace>'
export INFURA_API_KEY=<your API key>
export MAINNET_UPSTREAM=https://mainnet.infura.io/v3/${INFURA_API_KEY}

Run ganache-cli docker container for deploy mainnet-fork

docker run --detach --rm --publish 8545:8545 trufflesuite/ganache-cli:latest --fork ${MAINNET_UPSTREAM} --chainId 1

Run deploy mainnet-fork

npx hardhat --network mainnet-fork deploy --tags FixedStaking30Days,FixedStaking60Days,FixedStaking90Days

Create local environments for matic-fork

export MNEMONIC='<your MNEMONIC phrase where you have balace>'
export MATIC_UPSTREAM=https://matic-mainnet.chainstacklabs.com

Run ganache-cli docker container for deploy matic-fork

docker run --detach  --rm --publish 8546:8546 trufflesuite/ganache-cli:latest --mnemonic "${MNEMONIC}" --fork ${MATIC_UPSTREAM} --chainId 137

Run deploy matic-fork

npx hardhat --network matic-fork deploy --tags FixedStaking30Days,FixedStaking60Days,FixedStaking90Days

Production deploy (mainnet, matic)

Create local environments for mainnet

export MNEMONIC='<your MNEMONIC phrase where you have balace>'
export INFURA_API_KEY=<your API key>

Run deploy mainnet

npx hardhat --network mainnet deploy --tags FixedStaking30Days,FixedStaking60Days,FixedStaking90Days
npx hardhat --network mainnet etherscan-verify --solc-input --api-key <Etherscan_API_Key>

Create local environments for matic

export MNEMONIC='<your MNEMONIC phrase where you have balace>'

Run deploy matic

npx hardhat --network matic deploy --tags FixedStaking30Days,FixedStaking60Days,FixedStaking90Days
npx hardhat --network matic etherscan-verify --solc-input --api-key <Etherscan_API_Key>