Hord Congress
Represents multi-sig wallet for HORD app.
HordCongress.sol
Standard implementation of the
multisignature
wallet. This contract contains the initial total supply of HORD
tokens.event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, string description);
- Emitted each time when a new proposal is created.
event VoteCast(address voter, uint proposalId, bool support);
- Emitted each time when a vote has been cast on a proposal.
event ProposalCanceled(uint id);
- Emitted each time when a proposal has been canceled.
event ProposalExecuted(uint id);
- Emitted each time when a proposal has been executed.
event ReceivedEther(address sender, uint amount);
- Emitted each time when ether is received.
event ExecuteTransaction(address indexed target, uint value, string signature, bytes data);
- Emitted each time when transaction is executed.
function name() external view returns (string memory);
- Returns the name of the contract. [
HordCongress
]
function proposalCount() external view returns (uint);
- Returns the total number of proposals.
function proposals(uint256 proposalId) external view returns (Proposal memory);
- Returns official record of all proposals ever proposed.
function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas);
- Returns all actions from exact proposal.
function getMembersRegistry()external view returns (address);
function setMembersRegistry(address _membersRegistry) external;
- One time call function to set address of
HordCongressMembersRegistry
contract.
function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) external onlyMember returns (uint);
- Only a member of
HordCongress
can call this function in order to create a proposal for which members will vote and based on the votes the proposal will be executed or rejected. - Returns id of new proposal.
- Emits a
ProposalCreated
event.
function castVote(uint proposalId, bool support) external onlyMember;
- Only a member of
HordCongress
can call this function in order to vote on a specific proposal. - Emits a
VoteCast
event.
function execute(uint proposalId) external onlyMember payable;
- Only a member of
HordCongress
can call this function in order to execute a specific proposal which reached the minimal quorum (50% or more of the votes are in favor). - Emits a
ExecuteTransaction
andProposalExecuted
events.
function cancel(uint proposalId) external onlyMember;
- Only a member of
HordCongress
can call this function in order to cancel a specific proposal which didn`t reach the minimal quorum (less than 50% of votes are in favor). - Emits a
ProposalCanceled
event .
Last modified 6mo ago