Community directory curator dApp for Status
https://status-community-dapp.vercel.app
6b4b1b3d6d
The `FeaturedVotingContract` comes with a check in `initializeVoting()` that aims to ensure that the community that the voting is being initialized for, has not been featured previously for #n votings. This is denoted as the `cooldownPeriod`. If `cooldownPeriod = 1`, this means there needs to be at least one voting which doesn't include the community in question, that came *after* the voting that did. The internal `_isInCooldownPeriod()` check has a bug which will return false positives for any communiy that has been featured before, regardless of `cooldownPeriod`s value. When iterating previous votings, the contract actually needs to start with the last one and iterate downwards, however it does the opposite so it will never reach the correct votings to check. This commit fixes the check and adds two tests to cover the case accordingly. |
||
---|---|---|
.github/workflows | ||
packages | ||
.eslintrc.json | ||
.gitignore | ||
.node-version | ||
.prettierrc.json | ||
API.md | ||
README.md | ||
netlify.toml | ||
package.json | ||
tsconfig.json | ||
vercel.json | ||
yarn.lock |
README.md
status-community-dapp
Community directory curator dApp for Status
API
Proposed api is available here
Running the project
Note: Use node v18.15.0
- Install dependencies: Run
yarn
to install the necessary packages and dependencies. - Run local hardhat node: Navigate to the
packages/contract
directory and runyarn dev
. - Deploy contracts: Navigate to the
packages/contracts
directory and runyarn dev:deploy
to deploy the contracts needed for the project. - Start the app: Run
VOTING_CONTRACT=hex_addr DIRECTORY_CONTRACT=hex_addr MULTICALL_CONTRACT=hex_addr TOKEN_CONTRACT=hex_addr yarn dev
to start the application. Make sure to replacehex_addr
with the actual addresses of the contracts you deployed in step 3.
Once the app is run, connect to the wallet. NOTE: in 'production' mode it has to be Status wallet.