Skip to main content

Proposals

Governance proposals submit actions for the community to vote on. The deposit is automatically fetched from protocol parameters and refunded to your reward account when the proposal is finalized.

Submitting a Proposal

import { Anchor, GovernanceAction, RewardAccount, preprod, Client } from "@evolution-sdk/evolution"

const client = Client.make(preprod)
.withBlockfrost({
baseUrl: "https://cardano-preprod.blockfrost.io/api/v0",
projectId: process.env.BLOCKFROST_API_KEY!
})
.withSeed({ mnemonic: process.env.WALLET_MNEMONIC!, accountIndex: 0 })

declare const governanceAction: GovernanceAction.GovernanceAction
declare const rewardAccount: RewardAccount.RewardAccount
declare const anchor: Anchor.Anchor

const tx = await client
.newTx()
.propose({
governanceAction,
rewardAccount,
anchor
})
.build()

const signed = await tx.sign()
await signed.submit()

The govActionDeposit is deducted automatically during transaction balancing.

Governance Action Types

ActionDescription
Protocol Parameter UpdateModify network parameters
Hard Fork InitiationInitiate a hard fork
Treasury WithdrawalWithdraw from the treasury
No ConfidenceExpress no confidence in the committee
New ConstitutionPropose a new constitution
Update CommitteeChange committee membership
Info ActionInformational proposal (no on-chain effect)

Multiple Proposals

Submit multiple proposals in a single transaction by chaining .propose():

import { Anchor, GovernanceAction, RewardAccount, preprod, Client } from "@evolution-sdk/evolution"

const client = Client.make(preprod)
.withBlockfrost({
baseUrl: "https://cardano-preprod.blockfrost.io/api/v0",
projectId: process.env.BLOCKFROST_API_KEY!
})
.withSeed({ mnemonic: process.env.WALLET_MNEMONIC!, accountIndex: 0 })

declare const action1: GovernanceAction.GovernanceAction
declare const action2: GovernanceAction.GovernanceAction
declare const rewardAccount: RewardAccount.RewardAccount
declare const anchor1: Anchor.Anchor
declare const anchor2: Anchor.Anchor

const tx = await client
.newTx()
.propose({ governanceAction: action1, rewardAccount, anchor: anchor1 })
.propose({ governanceAction: action2, rewardAccount, anchor: anchor2 })
.build()

const signed = await tx.sign()
await signed.submit()

Next Steps