Coder Social home page Coder Social logo

snx-grants-dao's Introduction

Synthetix Grants DAO

Usage

Voting

createProposal

This function allows proposers, which can be team or community members, the ability to create a prposal for funding of a receiver address for a specified amount. When the proposal is created, it is automatically counted as voted on by the proposer and assigned a unique number. Proposals remain in a submission phase for 2 days before they can be voted on.

voteProposal

After a proposal has been in the submission phase for 2 days, it enters the voting phase for the next 7 days. While in the voting phase, proposers may vote on the proposal. Community members may wish to withhold their votes in order to vote against a proposal. If a team member votes against a proposal, it is automatically deleted. Each proposal needs at least one team member to approve in order for the proposal to execute.

deleteProposal

If a proposal did not receive enough votes within the voting phase, this function may be called in order to clean up the smart contract's storage and to unlock the funds associated with the proposal.

Team Only

withdraw

If extra tokens need to be withdrawn from the contract, this method may be used to retrieve them. This can only be called by team members and will not allow balances to be pulled out which are locked in proposals.

addCommunityMember

Community members may be added to the contract so that new addresses can propose funding and vote on existing proposals.

removeCommunityMember

Community members may be removed by a team member from being able to vote or propose grants. An array of proposals may also be specified to have that member's vote removed.

addTeamMember

Team members may be added to the contract since all proposals need at least one team approving vote.

removeTeamMember

Team members may also be removed from the contract, but a team member cannot remove themself. This prevents a scenario where no team members are on the contract, which would mean no proposals could be executed and no tokens could be withdrawn.

updateToPass

This function allows the number of votes required to pass a proposal to be updated. It should be noted that all proposals still require approval by at least one team member, even if this number has been met.

Views

getCommunityMembers

Returns the addresses of the community members.

getTeamMembers

Returns the addresses of hte team members.

getProposals

Returns the IDs of active proposals.

getCompleteProposals

Returns an array of the completed proposal IDs.

completeProposals

Returns the proposal for a given Proposal ID which has been executed.

withdrawable

Returns the amount of tokens which may be withdrawn from the contract by team members. This excludes the amount locked in proposals.

totalBalance

Returns the total balance of tokens on the contract, including locked and withdrawable balances.

voted

This function may be used to check if an address has voted on a proposal, regardless if they voted true or false.

votingPhase

This function may be used to check if a proposal is in the voting phase. It will return true if it is, false if not.

Install

npm install

Test

npm test

snx-grants-dao's People

Contributors

thodges-gh avatar garthtravers avatar patrickmcnab avatar raymogg avatar michaelcohen716 avatar k06a avatar validatoreth avatar snxified avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.