HumanityGovernance

Plutocratic voting system that uses Humanity token for voting and proposal fees.

HumanityGovernance.sol
function deposit(uint amount) public

Deposit tokens to the governance module in order to participate in voting.

  • amount: The amount of tokens to deposit.

HumanityGovernance.sol
function withdraw(uint amount) public

Withdraw tokens from the governance module.

  • amount: The amount of tokens to withdraw.

HumanityGovernance.sol
function proposeWithFeeRecipient(address feeRecipient, address target, bytes memory data) public returns (uint)

Propose a new action to be executed by the governance module.

  • feeRecipient: The address to send the proposal fee too if the proposal is approved.

  • target: The address of the target to execute.

  • data: The encoded calldata to execute.

    • add(address) to add an identity to the registry.

    • remove(address) to remove an identity from the registry.

    • setProposalFee(uint) to change the proposal fee.

See TwitterHumanity applicant for a convenient way to propose additions to the Humanity registry.

HumanityGovernance.sol
function voteYes(uint proposalId) public

Vote yes on a proposal. The proposal must be in the open vote period (2 days).

  • proposalId: The ID of the proposal to vote on.

HumanityGovernance.sol
function voteNo(uint proposalId) public

Vote no on a proposal. The proposal must be active (4 days).

  • proposalID: The ID of the proposal to vote on.

HumanityGovernance.sol
function removeVote(uint proposalId) public

Remove a vote on a proposal. The proposal must be active (4 days).

  • proposalID: The ID of the proposal from which to remove a vote.

HumanityGovernance.sol
function finalize(uint proposalId) public

Finalize a proposal.

proposalID: The ID of the proposal to finalize.

HumanityGovernance.sol
function setProposalFee(uint fee) public
HumanityGovernance.sol
 function getProposal(uint proposalId) external view returns (Proposal memory)
HumanityGovernance.sol
function getProposalsCount() external view returns (uint)

Last updated

Was this helpful?