Clone the repository using the following command: Install the dependencies using the following command:
npm i
Fill in all the required environment variables(copy .env-example to .env and fill it).
Deploy contract to the chain (polygon-mumbai):
npx hardhat run scripts/deploy/deploy.ts --network polygonMumbai
Verify the installation by running the following command:
npx hardhat verify --network polygonMumbai {CONTRACT_ADDRESS}
Create a new task(s) and save it(them) in the folder "tasks". Add a new task_name in the file "tasks/index.ts"
Running a addProposal task:
npx hardhat addProposal --dao {DAO_CONTRACT_ADDRESS} --description {STRING_DESCRIPTION} --recipient {RECIPIENT_ADDRESS} --network polygonMumbai
Running a deposit task:
npx hardhat deposit --dao {DAO_CONTRACT_ADDRESS} --token {DAO_TOKEN_ADDRESS} --amount {AMOUNT_IN_ETHER} --network polygonMumbai
Running a vote task:
npx hardhat vote --dao {DAO_CONTRACT_ADDRESS} --proposal-id {PROPOSAL_ID} --support {TRUE/FALSE} --network polygonMumbai
Running a finishProposal task:
npx hardhat finishProposal --dao {DAO_CONTRACT_ADDRESS} --proposal-id {PROPOSAL_ID} --network polygonMumbai
Running a withdraw task:
npx hardhat withdraw --dao {DAO_CONTRACT_ADDRESS} --network polygonMumbai
Running a setMinimalQuorum task:
npx hardhat setMinimalQuorum --dao {DAO_CONTRACT_ADDRESS} --quorum {NEW_QUORUM_NUMBER} --network polygonMumbai
Running a setDebatingPeriod task:
npx hardhat setDebatingPeriod --dao {DAO_CONTRACT_ADDRESS} --period {NEW_PERIOD_IN_SECONDS} --network polygonMumbai