Governance Contract
Governance Proposals are submitted and managed using the Governance Contracts. There are two governance contracts, the Proposal Create contract and the Proposal Update contract.

Proposal Create

Handles governance proposal creation.
Request
1
{
2
userPublicKey: string,
3
timestamp: number,
4
type: ProtocolEventTypes,
5
fee: string,
6
proposalAccountId: string,
7
proposalType: ProposalType
8
params: CouncilLockParams | CouncilSwapParams | undefined
9
10
}
Copied!
Fields:
  • proposalAccountId: The public key of the account being created as the proposal account.
  • proposalType: Represents the governance proposal type using the following enum
    1
    ProposalType {
    2
    ALLOCATION = 0,
    3
    CUSTOM = 1,
    4
    COUNCIL_SWAP_SIGNER = 2,
    5
    COUNCIL_LOCK_CONTRACT = 3
    6
    }
    Copied!
  • params: undefined if the proposal is custom or an allocation proposal, otherwise related to council lock or swap proposals.
    1
    CouncilLockParams: {
    2
    lockedContracts: ProtocolEventTypes[]
    3
    }
    Copied!
    • lockedContracts: array of enums that represent the different protocol event types (Mint, Burn, etc...)
    1
    CouncilSwapParams: {
    2
    addTurret: string;
    3
    addSigner: string;
    4
    removeSigner: string;
    5
    }
    Copied!
    • addTurret: Public key of the turret sponsor account being added
    • addSigner: Public key of the turret signer account being added
    • removeSigner: Public key of the signer being removed

High-Level Contract Process Flow

This contract has been modified recently, an updated Contract Flow will be added shortly

Proposal Update

Handles updating proposals by tallying their votes, submitting them, or deleting them.
Request
1
{
2
userPublicKey: string,
3
timestamp: number,
4
fee: string,
5
type: ProtocolEventTypes,
6
proposalAccountId: string,
7
proposalType: ProposalType
8
}
Copied!
Fields:
  • proposalAccountId: The public key of the account being created as the proposal account.
  • proposalType: Represents the governance proposal type using the following enum
    1
    ProposalType {
    2
    ALLOCATION = 0,
    3
    CUSTOM = 1,
    4
    COUNCIL_SWAP_SIGNER = 2,
    5
    COUNCIL_LOCK_CONTRACT = 3
    6
    }
    Copied!

High-Level Contract Process Flow (MAY BE OUT OF DATE)

This contract has been modified recently, an updated Contract Flow will be added shortly