Skip to content

Certora/reflector-dao-contract

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reflector-dao-contract

DAO contract for decentralized Reflector oracle network

Interface

Initialization and funding of the DAO contract

Executed during the deployment

pub fn config(e: Env, config: ContractConfig)

Unlock DAO tokens

Unlocks tokens distributed to the developer organization and operators on a weekly basis. Requires admin permissions.

pub fn unlock(e: Env, developer: Address, operators: Vec<Address>)

Get available balance for an account

Fetches the amount of DAO tokens available for claiming by a given account.

pub fn available(e: Env, claimant: Address) -> i128

Claim tokens

Claims tokens unlocked for a given account address.

pub fn claim(e: Env, claimant: Address, to: Address, amount: i128)

Create a new ballot

Creates a new ballot and deposits the tokens to the DAO.

pub fn create_ballot(e: Env, params: BallotInitParams) -> u64

Load ballot

Fetches a ballot by its unique ID.

pub fn get_ballot(e: Env, ballot_id: u64) -> Ballot

Retract ballot

Retracts the proposal and initiates the deposit refund on behalf of the ballot initiator.

pub fn retract_ballot(e: Env, ballot_id: u64)

Vote

Confirms ballot decision based on the operators voting (decision requires the majority of signatures)

pub fn vote(e: Env, ballot_id: u64, accepted: bool)

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%