Voting Guide for Script DReps
This voting guide is for any script base DReps
1
Review all candidates
Review all candidates on election.constitution.gov.tools
2
Select the candidates you want to vote for
Select up to 7 candidates to vote for and take note of the related id
Candidate Name
Candidate id
15
20
3
Add your selected candidates code in the metadata format (using metadatum label 11113
)
11113
){
"11113" : {
"action": "cast_vote",
"data": {
"event": "CC-Elections-2025",
"category": "CATEGORY_E794",
"proposal": "0ae97786-d17b-4f96-84af-979ff9c0b276",
"id": "2a9b76c3-9e84-4c4b-92bb-0184d4407f82",
"walletType": "CARDANO",
"network": "MAIN",
"votes": [candidate ids]
}
}
}
example
{
"11113" : {
"action": "cast_vote",
"data": {
"event": "CC-Elections-2025",
"category": "CATEGORY_E794",
"proposal": "0ae97786-d17b-4f96-84af-979ff9c0b276",
"id": "2a9b76c3-9e84-4c4b-92bb-0184d4407f82",
"walletType": "CARDANO",
"network": "MAIN",
"votes": [2,14,22]
}
}
}
4
Build a transaction that'll be witnessed by your script and contains the metadata
Now we have our metadata, we will need to construct a transaction that contains the metadata and will satisfy our script to trigger.
We recommend constructing a transaction which contains a DRep Update certificate. For continuity you can supply this certificate with the same metadata as you use now.
This certificate will trigger your script to witness the transaction.
You can use a configuration like this:
cardano-cli conway governance drep update-certificate \
--drep-script-hash $(cat my-drep-script.id) \
--drep-metadata-url https://my-metadata.jsonld \
--drep-metadata-hash "0000000000000000000000000000000000000000000000000000000000000000"
--out-file my-update-cert-that-doesnt-change-anything.cert
cardano_cli conway transaction build \
--tx-in $(cardano_cli conway query utxo --address $(cat my-payment.addr) --out-file /dev/stdout | jq -r 'keys[0]') \
--change-address $(cat my-payment.addr) \
--certificate-file my-update-cert-that-doesnt-change-anything.cert \
--certificate-script-file my-drep-script.json \
--metadata-json-file my-cc-election-vote-metadata.json \
--out-file my-cc-election-vote.unsigned
5
Sign and submit the transaction to Mainnet
See example transaction (on Preview)
Last updated
Was this helpful?