Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve param update support #16

Merged
merged 4 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test-start-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ jobs:
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4

- name: Set up Docker
run: |
sudo apt-get update
sudo apt-get install -y docker-compose

- name: Start node, wait 60s then stop node
shell: bash
run: |
Expand Down
28 changes: 22 additions & 6 deletions scripts/ga/parameter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
# ~~~~~~~~~~~~ CHANGE THIS ~~~~~~~~~~~~
prev_ga_hash=""
prev_ga_index="0"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

METADATA_URL="https://buy-ryan-an-island.com"
METADATA_HASH="0000000000000000000000000000000000000000000000000000000000000000"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Building, signing and submitting an parameter change governance action
echo "Creating and submitting parameter change governace action."

echo "\nPull the latest guardrails script."
curl --silent -J -L https://book.world.dev.cardano.org/environments/mainnet/guardrails-script.plutus -o ./txs/guardrails-script.plutus

echo "\nGet the guardrails script hash from the genesis file."
SCRIPT_HASH=$(jq -r ".constitution.script" "./node/config/conway-genesis.json")
echo "Script hash: $SCRIPT_HASH"

# Function to execute cardano-cli commands inside the container
container_cli() {
docker exec -ti sancho-node cardano-cli "$@"
Expand All @@ -18,16 +27,23 @@ container_cli conway governance action create-protocol-parameters-update \
--testnet \
--governance-action-deposit $(container_cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file ./keys/stake.vkey \
--anchor-url https://buy-ryan-an-island.com \
--anchor-data-hash 0000000000000000000000000000000000000000000000000000000000000000 \
--key-reg-deposit-amt 420420420 \
--prev-governance-action-tx-id "$prev_ga_hash" \
--prev-governance-action-index "$prev_ga_index" \
--anchor-url "$METADATA_URL" \
--anchor-data-hash "$METADATA_HASH" \
--constitution-script-hash "$SCRIPT_HASH" \
--key-reg-deposit-amt 3000000 \
--out-file ./txs/parameter.action

# --prev-governance-action-tx-id "$prev_ga_hash" \
# --prev-governance-action-index "$prev_ga_index" \

container_cli conway transaction build \
--testnet-magic 4 \
--proposal-script-file ./txs/guardrails-script.plutus \
--tx-in "$(container_cli query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]')" \
--tx-in "$(container_cli query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[1]')" \
--tx-in "$(container_cli query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[2]')" \
--tx-in-collateral "$(container_cli query utxo --address "$(cat ./keys/payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]')" \
--proposal-redeemer-value {} \
--change-address "$(cat ./keys/payment.addr)" \
--proposal-file ./txs/parameter.action \
--out-file ./txs/parameter.action.raw
Expand Down
Loading