-
Create a chrome or firefox profile for testing.
-
Install metamask and create accounts using the following seed phrase
test test test test test test test test test test test junk
-
In the metamask, click network and setup local network
- Network Name: Hardhat or (something other you want).
- New RPC URL: http://127.0.0.1:8545
- Chain ID: 31337
Run this command on the workspace root directory.
task develop
When you restart the dev server, don't forget to reset your metamask account in the advanced settings. Otherwise, you will encounter nonce related error during the test.
- Go to Stable Reserve tab
- Type 5000 DAI. Then, approve and buy 2500 $COMMIT.
- Balance should be 5000 DAI / 2500 COMMIT
- Go to redeem tab.
- Type 2000
- Approve and redeem.
- Balance should be 7000 DAI / 500 COMMIT
- Go to Job Board > Post a job tab.
- Fill the form and submit.
- Upload data to IPFS & Arweave and then send transaction w/ Metamask.
- You can check the new posted job on the Inactive/Pending project tab.
- Copy project id.
- Go to Gov > Proposal tab
- Select Timelock > JobBoard > approveProject
- Paste the copied project id.
- Submit the schedule request.
- Go to Gov > Transactions tab and see timelock waiting.
- Increase the block timestamp by
cd protocol yarn localhost increase-time 86400
- Reload transaction tab and execute the scheduled transaction. (In rinkeby, you should use multisig.)
- Go back to work tab and check the posted project is active.
- Go to Gov > Transactions tab
- The 2nd scheduled tx is a transaction that appends the test ERC20 & COMMIT to the distribution token list.
- Click execute. (In Rinkeby, you should use multisig.)
- Go back to Work > Job Board > Active Project
- Click Go to admin tool. This button is only shown to the budget owner.
- Go to budget
- Increase amount to 3000
- Approve and then click add & execute.
- Go to pay tab of the project admin tool.
- Paste metamask's 2nd account address (should be
0x70997970C51812dc3A010C7d01b50e0d17dc79C8
) and increase amount to 1000. - Click pay.
- Switch account and go to Work menu to check the commit balance.
- If you are on Rinkeby, go to rinkeby uniswap v2 page and add liquidity there.
- If you are on the local testnet, run the following command to add liquidity.
cd protocol yarn localhost run scripts/demo/5-add-liquidity.ts