Cryptosat
WebsiteBlogSatellite Tracking
  • Cryptosat
    • 🛰️Satellite tracking
    • 📄SpaceTEE paper
    • Contribution to the Ethereum KZG Ceremony
      • Cryptosat KZG Operation Tracker
      • Crypto2 contribution output
      • Contribution verification
  • Cryptosim
    • Cryptosim
    • Asynchronous API
    • Use-case examples
    • Open-source contribution
  • 🗳️Private Voting
    • Private Voting on Snapshot X
    • Private Voting Contract
    • Browser Side Encryption
  • 🎲random-beacon
    • Verifiable Random Beacon
    • Using the random beacon on-chain
  • API documentation
    • Message Signing
    • Authentication
    • Randomness API
      • Tutorial
      • API reference
    • Queue API
      • API reference
        • Queue
          • Request
          • Requests
    • Public randomness SAPI
      • About
      • API reference
        • Public randomness
          • Result
    • FROST API
      • About
      • API reference
        • Frost
          • Partial sign
          • Private key
      • Specification
    • Satellite Public Keys
  • ⏳Time-based Primitives
    • ⌚Time-based primitives and delay-encryption
    • ⚛️Using Delay Encryption for Atomic Swaps
  • Flastsat Environment
    • Overview
    • Access and Control
    • Crypto Engine Specs
    • Power API
Powered by GitBook
On this page
  • Methods:
  • Events:
  1. Private Voting

Private Voting Contract

Technical Documentation

Methods:

By default, these methods can only be called from an address granted the role CONSUMER_ROLE


requestCreateBallot(uint256 minimumVoters)

Requests the creation of a new ballot.

Successful execution results in the CreateBallotRequested event. minimumVoters must be greater than zero. Results in the CreateBallotFulfilled event after the ballot is created in space.


requestVote(bytes32 ballotId, 
            bytes memory encryptedVote)

Registers a vote for a particular ballot.

Successful execution results in the VoteRequested event. Results in the VoteFulfilled event after the vote is tabulated in space.


requestFinalizeBallot(bytes32 ballotId)

Requests the finalization (closure and tabulation) of the ballot identified by ballotId.

Successful execution results in the FinalizeBallotRequested event. Results in the FinalizeBallotFulfilled event after the ballot is finalized in space.

Events:

CreateBallotRequested(uint256 indexed requestId,
                      address indexed sender, 
                      uint256 minimumVoters)

Signals that a new ballot has been requested.


CreateBallotFulfilled(uint256 indexed requestId,
                      bytes32 indexed ballotId, 
                      bytes publicKey, 
                      uint256 indexed errorCode, 
                      bool callbackSuccess);

Signals that a new ballot has been created in space.


VoteRequested(uint256 indexed requestId,
              address indexed sender, 
              bytes32 indexed ballotId, 
              bytes encryptedVote)

Signals that an encrypted vote encryptedVote has been registered for the unique ballot identifier ballotId.


VoteFulfilled(uint256 indexed requestId,
              bytes32 indexed ballotId, 
              uint256 indexed errorCode,
              bool callbackSuccess)

Signals that a vote has been registered in space for the given ballotId.

FinalizeBallotRequested(uint256 indexed requestId,
                        address indexed sender, 
                        bytes32 indexed ballotId)

Signals that a request has been made to finalize the ballot identified by ballotId.

FinalizeBallotFulfilled(uint256 indexed requestId,
                        bytes32 indexed ballotId, 
                        string result, 
                        uint256 indexed errorCode, 
                        bool callbackSuccess)

Signals that the ballot identified by ballotId has been finalized in space. Ballot result is returned in the result parameter.

PreviousPrivate Voting on Snapshot XNextBrowser Side Encryption

Last updated 1 year ago

🗳️