From 1ae1a336f50efa39e95da55687fb76c443d8010a Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Wed, 27 Mar 2024 14:11:53 -0500 Subject: [PATCH] Add comments --- ethereum/contracts/Proposal.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ethereum/contracts/Proposal.sol b/ethereum/contracts/Proposal.sol index 65ca0a2..3bd37cd 100644 --- a/ethereum/contracts/Proposal.sol +++ b/ethereum/contracts/Proposal.sol @@ -69,6 +69,8 @@ contract Proposals is DAOContract { emit NewProposal(proposalIndex); } + /// External function for reputation holders to attest toward a given proposal; + /// This is non-binding and non-encumbering, so it does not transfer any reputation. function attest(uint proposalIndex, uint amount) external { // Since this is non-binding, non-encumbering, we only need to verify that // the sender actually has the rep they claim to stake. @@ -85,6 +87,8 @@ contract Proposals is DAOContract { attestation.amount = amount; } + /// Internal convenience function to wrap our call to dao.initiateValidationPool + /// and to emit an event function initiateValidationPool( uint proposalIndex, uint referendumIndex @@ -166,6 +170,8 @@ contract Proposals is DAOContract { } } + /// External function that will advance a proposal to the referendum process + /// if attestation threshold has been reached function evaluateAttestation(uint proposalIndex) external returns (bool) { Proposal storage proposal = proposals[proposalIndex]; require(