|
| 1 | +#!/bin/sh |
| 2 | + |
| 3 | +# ~~~~~~~~~~~~ CHANGE THIS ~~~~~~~~~~~~ |
| 4 | +PREV_GA_TX_HASH="" |
| 5 | +PREV_GA_INDEX="0" |
| 6 | + |
| 7 | +NEW_committee_ANCHOR_URL="ipfs://new-committee.txt" |
| 8 | +NEW_committee_ANCHOR_HASH="ab901c3aeeca631ee5c70147a558fbf191a4af245d8ca001e845d8569d7c38f9" |
| 9 | + |
| 10 | +NEW_committee_SCRIPT_HASH="fa24fb305126805cf2164c161d852a0e7330cf988f1fe558cf7d4a64" |
| 11 | + |
| 12 | +METADATA_URL="https://raw.githubusercontent.com/Ryun1/metadata/refs/heads/main/new-const-2" |
| 13 | +METADATA_HASH="01318fd6815453f35a4daac80cbbe3bf46c35dc070eb7dc817f26dfee5042eb8" |
| 14 | +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 | + |
| 16 | +# Building, signing and submitting an new-committee change governance action |
| 17 | +echo "Creating and submitting new-committee governace action." |
| 18 | + |
| 19 | +# Function to execute cardano-cli commands inside the container |
| 20 | +container_cli() { |
| 21 | + docker exec -ti sancho-node cardano-cli "$@" |
| 22 | +} |
| 23 | + |
| 24 | +container_cli conway governance action create\ |
| 25 | + --testnet \ |
| 26 | + --governance-action-deposit $(container_cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \ |
| 27 | + --deposit-return-stake-verification-key-file ./keys/stake.vkey \ |
| 28 | + --anchor-url "$METADATA_URL" \ |
| 29 | + --anchor-data-hash "$METADATA_HASH" \ |
| 30 | + |
| 31 | + --out-file ./txs/new-committee.action |
| 32 | + |
| 33 | + # --prev-governance-action-tx-id "$PREV_GA_TX_HASH" \ |
| 34 | + # --prev-governance-action-index "$PREV_GA_INDEX" \ |
| 35 | + |
| 36 | +echo "Building the transaction." |
| 37 | + |
| 38 | +container_cli conway transaction build \ |
| 39 | + --testnet-magic 4 \ |
| 40 | + --tx-in "$(container_cli conway query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]')" \ |
| 41 | + --tx-in "$(container_cli conway query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[1]')" \ |
| 42 | + --tx-in-collateral "$(container_cli conway query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[1]')" \ |
| 43 | + --proposal-file ./txs/new-committee.action \ |
| 44 | + --change-address "$(cat ./keys/payment.addr)" \ |
| 45 | + --out-file ./txs/new-committee-action-tx.unsigned |
| 46 | + |
| 47 | +container_cli conway transaction sign \ |
| 48 | + --tx-body-file ./txs/new-committee-action-tx.unsigned \ |
| 49 | + --signing-key-file ./keys/payment.skey \ |
| 50 | + --testnet-magic 4 \ |
| 51 | + --out-file ./txs/new-committee-action-tx.signed |
| 52 | + |
| 53 | +container_cli conway transaction submit \ |
| 54 | + --testnet-magic 4 \ |
| 55 | + --tx-file ./txs/new-committee-action-tx.signed |
0 commit comments