Fizzswap
English
English
  • Introduction
  • Protocol Overview
  • Core Concept
  • Risk & Security
  • Privacy Policy
  • Audit
  • Fizz Token
    • Fizzswap Protocol
  • PRODUCT
    • SWAP
    • V2 Pool
    • V3 Pool
      • Supply Liquidity to V3 pool
        • V3 Supply Guide
        • V3 Supply Policy
      • V3 to V3 Migration
        • V3 to V3 Migration Guide
        • V3 to V3 Migration Policy
      • Remove Liquidity from V3 Pool
        • V3 Remove Guide
        • V3 Remove Policy
  • GET STARTED
    • Create a Wallet
    • How to Transfer ETH to the Silicon Network
  • DEVELOPERS
    • Contract
      • V2Factory
      • Exchange
      • VotingRewardToken
      • V2Treasury
      • Distribution
      • Governor
      • V2Router
      • V2Helper
      • V3Factory
      • V3Pool
      • NonfungiblePositionManager
      • NonfungibleTokenPositionDescriptor
      • V3SwapRouter
      • V3Migrator
      • V3Estimator
      • PositionMigrator
      • V3Treasury
      • UniversalRouter
      • V3AirdropOperator
  • Fizzswap
  • Silicon Bridge
  • Github (fork)
  • Audit report (fork)
Powered by GitBook
On this page
  • Code
  • Address
  • Events, Read-Only Functions, and State-Changing Functions
Export as PDF
  1. DEVELOPERS
  2. Contract

Governor

PreviousDistributionNextV2Router

Last updated 8 months ago

This contract acts as an administrator to manage the voting registration, voting counting, and execution of the Fizzswap. It also performs important parameters of Fizzswap, proposal registration, and voting execution.

Code

Github Link: (Will be updated after official launch)

Address

  • Silicon Mainnet :to-be

Events, Read-Only Functions, and State-Changing Functions

Events

ProposalCreated

event ProposalCreated(uint id, address proposer, address target, string signature, bytes callData, uint startBlock, uint endBlock, string description);
  • Events log of proposals are created

  • Parameters

    • id : proposal ID

    • proposer : proposer's address

    • target : Address of the contract to be executed

    • signature : signature of the function to be executed

    • callData : function data to be executed

    • startBlock : start block number

    • endBlock : end block number

    • description : proposal details

VoteCast

event VoteCast(address voter, uint proposalId, bool support, uint votes, uint againstVotes, uint forVotes, uint quorumVotes, string reason);
  • Events log of vote

  • Parameters

    • voter : voter's address

    • proposalId : proposal ID

    • support : support

    • votes : Number of vote vKSP

    • againstVotes : Number of total against vote

    • forVotes : Number of total favor vote

    • quorumVotes : Number of proposal quorum

    • reason : reason

ProposalCanceled

event ProposalCanceled(uint id);
  • Events log of proposal canceled

ProposalQueued

event ProposalQueued(uint id, uint eta, uint tid);
  • Events log of proposal queued

ProposalExecuted

event ProposalExecuted(uint id, bool succeeded);
  • Events log of proposal executed

ProposalFeeSet

event ProposalFeeSet(uint oldProposalFee, uint proposalFee);
  • Events log of proposal fee(KSP) changed

State-Changing Functions

propose

function propose(address target, string memory signature, bytes memory callData, string memory description) public returns (uint)
  • Function used to propose a new proposal

  • Sender must have delegates above the proposal threshold

  • target : Target address for proposal calls

  • signature : Function signature for proposal calls

  • callData : Calldata for proposal call

  • description : String description of the proposal

castVote

function castVote(uint proposalId, bool support) external 
  • Function used to cast a vote for a proposal

  • proposalId : The id of the proposal to vote on

  • support : The support value for the vote. false=against, true=for