Proposals
General
ethanTODO: review the General section and getAventusTime method
Method: getAventusTime
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
Method: createGovernanceProposal
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 |
Response: LogGovernanceProposalCreated
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 |
Method: endGovernanceProposal
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 |
Response: LogGovernanceProposalEnded
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 |
Method: getGovernanceProposalDeposit
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
Method: createCommunityProposal
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 |
Response: LogCommunityProposalCreated
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 |
Method: endCommunityProposal
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 |
Response: LogCommunityProposalCreated
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 |
Method: getCommunityProposalDeposit
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
Method: challengeEvent
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 |
Response: LogEventChallenged
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 |
Method: endEventChallenge
Ends a challenge on the specified event
Method Parameter Descriptions
| Parameter | Type | Description |
|---|---|---|
eventId | uint | A unique identifier for the event on the Protocol |
Response: LogEventChallengeEnded
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 |
Method: claimVoterWinnings
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 |
Response: LogVoterWinningsClaimed
Log Parameter Descriptions
| Parameter | Type | Description |
|---|---|---|
proposalId | uint | A unique identifier for the challenge on the Protocol |
Member Challenges
Method: challengeMember
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 |
Response: LogMemberChallenged
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 |
Method: endMemberChallenge
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 |
Response: LogMemberChallengeEnded
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 |
Method: memberIsActive
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 |
Method: getExistingMemberDeposit
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
