Proposals
General
ethanTODO: review the General section and getAventusTime method
getAventusTime
Method: Timestamp of the current time on the main net or the mock time on a test network
Method Parameter Descriptions
None
Response
Parameter | Type | Description |
---|---|---|
time | uint | The current time on the main net or the mock time on a test network |
Governance
ethanTODO: what are governance proposals and how to vote
createGovernanceProposal
Method: Create a governance proposal to be voted on
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
desc | string | Either just a title or a pointer to IPFS details |
bytecode | bytes | The bytecode to be run if the proposal succeeds |
LogGovernanceProposalCreated
Response: Log Parameter Descriptions
Parameter | Type | Indexed | Description |
---|---|---|---|
proposalId | uint | ✔ | A unique identifier for the new governance proposal been created |
sender | address | ✔ | Address of the governance proposal sender |
desc | string | ✘ | Either just a title or a pointer to IPFS details |
lobbyingStart | uint | ✘ | UNIX epoch timestamp for the start of the vote lobbying period |
votingStart | uint | ✘ | UNIX epoch timestamp for the start of the voting period |
revealingStart | uint | ✘ | UNIX epoch timestamp for the start of the vote revealing period |
revealingEnd | uint | ✘ | UNIX epoch timestamp for the end of the vote revealing period |
deposit | uint | ✘ | The deposit value in AVT for the new corporate governance proposal |
bytecode | bytes | ✘ | The bytecode to be run if the proposal succeeds |
endGovernanceProposal
Method: End the governance proposal: will unlock the deposit.
NOTE: Can only be called once vote revealing has finished.
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
proposalId | uint | A unique identifier for the governance proposal |
LogGovernanceProposalEnded
Response: Log Parameter Descriptions
Parameter | Type | Indexed | Description |
---|---|---|---|
proposalId | uint | ✔ | A unique identifier for the governance proposal |
votesFor | uint | ✘ | Total number of votes for the governance proposal |
votesAgainst | uint | ✘ | Total number of votes against the governance proposal |
implemented | bool | ✘ | Returns true if the bytecode assigned to the governance proposal has been run successfully, otherwise returns false |
getGovernanceProposalDeposit
Method: Get the governance proposal deposit
Method Parameter Descriptions
None
Response
Parameter | Type | Description |
---|---|---|
proposalDeposit | uint | The deposit value in AVT for the governance proposal |
Community Proposals
ethanTODO: what are community proposals and how to vote
createCommunityProposal
Method: Create a community proposal to be voted on
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
desc | string | Description of the new community proposal, preferably with a URL for further details |
LogCommunityProposalCreated
Response: Log Parameter Descriptions
Parameter | Type | Indexed | Description |
---|---|---|---|
proposalId | uint | ✔ | A unique identifier for the new community proposal been created |
sender | address | ✔ | Address of the community proposal sender |
desc | string | ✘ | Description of the proposal, preferably with a URL for further details |
lobbyingStart | uint | ✘ | UNIX epoch timestamp for the start of the vote lobbying period |
votingStart | uint | ✘ | UNIX epoch timestamp for the start of the voting period |
revealingStart | uint | ✘ | UNIX epoch timestamp for the start of the vote revealing period |
revealingEnd | uint | ✘ | UNIX epoch timestamp for the end of the vote revealing period |
deposit | uint | ✘ | The deposit value in AVT for the new community proposal |
endCommunityProposal
Method: End the community proposal: will unlock the deposit.
NOTE: Can only be called once vote revealing has finished.
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
proposalId | uint | A unique identifier for the community proposal to be ended |
LogCommunityProposalCreated
Response: Log Parameter Descriptions
Parameter | Type | Indexed | Description |
---|---|---|---|
proposalId | uint | ✔ | A unique identifier for the proposal to be ended |
votesFor | uint | ✘ | Total number of votes for the community proposal |
votesAgainst | uint | ✘ | Total number of votes against the community proposal |
getCommunityProposalDeposit
Method: Get the community proposal deposit
Method Parameter Descriptions
None
Response
Parameter | Type | Description |
---|---|---|
proposalDeposit | uint | The deposit value in AVT for the community proposal |
Challenges
ethanTODO: what are challenges and how to vote, claim winnings
Event Challenges
Create a challenge for the specified event, locks a deposit and starts voting process, can be called by anyone
challengeEvent
Method: Note: Requires a deposit to be made. See
getExistingEventDeposit
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
eventId | uint | A unique identifier for the event on the Protocol |
LogEventChallenged
Response: Log Parameter Descriptions
Parameter | Type | Description |
---|---|---|
eventId | uint | A unique identifier for the event on the Protocol |
proposalId | uint | A unique identifier for the challenge on the Protocol |
lobbyingStart | uint | UNIX epoch timestamp for the start of the vote lobbying period |
votingStart | uint | UNIX epoch timestamp for the start of the voting period |
revealingStart | uint | UNIX epoch timestamp for the start of the vote revealing period |
revealingEnd | uint | UNIX epoch timestamp for the end of the vote revealing period |
endEventChallenge
Method: Ends a challenge on the specified event
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
eventId | uint | A unique identifier for the event on the Protocol |
LogEventChallengeEnded
Response: Log Parameter Descriptions
Parameter | Type | Description |
---|---|---|
eventId | uint | A unique identifier for the event on the Protocol |
proposalId | uint | A unique identifier for the challenge on the Protocol |
votesFor | uint | Total number of votes for a challenge |
votesAgainst | uint | Total number of votes against a challenge |
claimVoterWinnings
Method: Claim winnings from a proposal if caller voted on the winning side. Results in the caller's share of any proposal winnings being put into their AVT account.
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
proposalId | uint | A unique identifier for the challenge on the Protocol |
LogVoterWinningsClaimed
Response: Log Parameter Descriptions
Parameter | Type | Description |
---|---|---|
proposalId | uint | A unique identifier for the challenge on the Protocol |
Member Challenges
challengeMember
Method: Create a challenge for the specified member
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
memberAddress | address | Address of the member to be challenged |
memberType | string | Type of the member to be challenged |
LogMemberChallenged
Response: Log Parameter Descriptions
Parameter | Type | Indexed | Description |
---|---|---|---|
memberAddress | address | ✔ | Address of the member been challenged |
memberType | string | ✘ | Type of the member been challenged, either Primary or Secondary |
proposalId | uint | ✔ | A unique identifier for the challenge on the Protocol |
lobbyingStart | uint | ✘ | UNIX epoch timestamp for the start of the vote lobbying period |
votingStart | uint | ✘ | UNIX epoch timestamp for the start of the voting period |
revealingStart | uint | ✘ | UNIX epoch timestamp for the start of the vote revealing period |
revealingEnd | uint | ✘ | UNIX epoch timestamp for the end of the vote revealing period |
endMemberChallenge
Method: Ends a challenge on the specified member
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
memberAddress | address | Address of the member to stop being challenged |
memberType | string | Type of the member to stop being challenged, either Primary or Secondary |
LogMemberChallengeEnded
Response: Log Parameter Descriptions
Parameter | Type | Indexed | Description |
---|---|---|---|
memberAddress | address | ✔ | Address of the member been ended the challenge |
memberType | string | ✘ | Type of the member been ended the challenge, either Primary or Secondary |
proposalId | uint | ✔ | A unique identifier for the challenge on the Protocol |
votesFor | uint | ✘ | Total number of votes for a challenge |
votesAgainst | uint | ✘ | Total number of votes against a challenge |
memberIsActive
Method: Check if the given member is allowed to use the Aventus Protocol or not.
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
memberAddress | address | Address of the member to be checked |
memberType | string | Type of the member to be checked, either Primary or Secondary |
Response
Parameter | Type | Indexed | Description |
---|---|---|---|
isActive | bool | ✘ | Returns true if the given member is registered AND not fraudulent, otherwise returns false |
getExistingMemberDeposit
Method: Gets the deposit paid by the specified member
Method Parameter Descriptions
Parameter | Type | Description |
---|---|---|
memberAddress | address | Address of the member |
memberType | string | Type of the member, either Primary or Secondary |
Response
Parameter | Type | Indexed | Description |
---|---|---|---|
memberDepositInAVT | uint | ✘ | The amount of AVT been deposited to events by the member, expressed in attoavts |
Voting
StevenTODO: find methods