Online Petition

Under Review

DOCUMENTSUTILITY

Contract purpose

This Smart Contract is useful for gathering signatures for online petitions. A person can sign a petition only once during the time allowed by the petition creator

Exposed methods and variables

creator the ethereum address of the contract creator

cause returns the details of the cause for which the petition was created

signaturesNeeded the number of signatures the petition needs to gathered in order to succeed

totalSignatures returns the number of people who signed the petition until now

setCauseDetails this function is used by the petition creator to set the details of the cause

parameter nametypedetails
_causestringthe description of the cause
_signaturesNeededintegerthe number of the signatures the petition has to gather

signPetition people call this function to sign the petition. If the value of signaturesNeeded is obtained, it emits the PetitionCompleted event

closePetition after this function is called, people can no longer sign the petition

Events

PetitionCompleted

parameter nametypedetails
Completedbooleantrue if the petition gathered all the needed signatures
Reviewed by Modex
Buy
Buy Contract

Create an account or login to purchase this smart contract