Governance
Voting
Cast governance votes on proposals
Voting
DReps, Constitutional Committee members, and Stake Pool Operators can vote on governance actions. Evolution SDK's vote operation submits voting procedures in a transaction.
Casting a Vote
import { , } from "@evolution-sdk/evolution"
const = ({
: "preprod",
: { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
: { : "seed", : ..!, : 0 }
})
declare const : .
const = await
.()
.({ })
.()
const = await .()
await .()Voter Types
| Voter | Credential Type | Script-Controlled? |
|---|---|---|
| DRep | Key hash or script hash | Yes |
| Constitutional Committee | Hot credential (key or script) | Yes |
| Stake Pool Operator | Pool key hash | No (key-hash only) |
Script-Controlled Voting
For DReps or Committee members with script credentials, provide a redeemer:
import { , , } from "@evolution-sdk/evolution"
const = ({
: "preprod",
: { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
: { : "seed", : ..!, : 0 }
})
declare const : .
declare const : any
const = await
.()
.({
,
: .(0n, []), // Vote purpose validator
: "drep-vote"
})
.({ : })
.()
const = await .()
await .()The builder automatically detects script-controlled voters and will fail if a redeemer is required but not provided.
Next Steps
- DRep Registration — Register before voting
- Proposals — Submit governance actions to vote on
- Vote Delegation — Delegate voting power