Skip to content

Commit

Permalink
add IPFS gateway and correct anchor checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryun1 committed Jan 24, 2025
1 parent fa85e44 commit 3d44739
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 6 deletions.
5 changes: 4 additions & 1 deletion scripts/ga/hardfork.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ METADATA_URL="https://raw.githubusercontent.com/IntersectMBO/governance-actions/
METADATA_HASH="8a1bd37caa6b914a8b569adb63a0f41d8f159c110dc5c8409118a3f087fffb43"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="./txs/ga"
Expand Down Expand Up @@ -39,11 +42,11 @@ container_cli conway governance action create-hardfork \
--deposit-return-stake-verification-key-file $keys_dir/stake.vkey \
--anchor-url "$METADATA_URL" \
--anchor-data-hash "$METADATA_HASH" \
--check-anchor-data \
--protocol-major-version 11 \
--protocol-minor-version 0 \
--prev-governance-action-tx-id "$PREV_GA_TX_HASH" \
--prev-governance-action-index "$PREV_GA_INDEX" \
--check-anchor-data \
--out-file $txs_dir/hardfork.action

echo "Building transaction"
Expand Down
3 changes: 3 additions & 0 deletions scripts/ga/info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ METADATA_HASH="40375637aadfdea454726d5f2692b4a940a4d2f2213739a40f9c2560c7bc4239"

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="./txs/ga"
Expand Down
5 changes: 4 additions & 1 deletion scripts/ga/new-committee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ METADATA_URL="https://raw.githubusercontent.com/Ryun1/metadata/refs/heads/main/n
METADATA_HASH="01318fd6815453f35a4daac80cbbe3bf46c35dc070eb7dc817f26dfee5042eb8"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="./txs/ga"
Expand Down Expand Up @@ -41,6 +44,7 @@ container_cli conway governance action create\
--deposit-return-stake-verification-key-file $keys_dir/stake.vkey \
--anchor-url "$METADATA_URL" \
--anchor-data-hash "$METADATA_HASH" \
--check-anchor-data \
--out-file $txs_dir/new-committee.action

# --prev-governance-action-tx-id "$PREV_GA_TX_HASH" \
Expand All @@ -54,7 +58,6 @@ container_cli conway transaction build \
--tx-in-collateral "$(container_cli conway query utxo --address "$(cat $keys_dir/payment.addr)" --out-file /dev/stdout | jq -r 'keys[1]')" \
--proposal-file $txs_dir/new-committee.action \
--change-address "$(cat $keys_dir/payment.addr)" \
--check-anchor-data \
--out-file $txs_dir/new-committee-action-tx.unsigned

echo "Signing transaction"
Expand Down
5 changes: 4 additions & 1 deletion scripts/ga/new-consitution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ METADATA_URL="https://raw.githubusercontent.com/IntersectMBO/governance-actions/
METADATA_HASH="4b2649556c838497ee2923bdff0f05b48fb2f0c3c5cceb450200f8bd6868ac5b"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="./txs/ga"
Expand Down Expand Up @@ -44,6 +47,7 @@ container_cli conway governance action create-constitution \
--deposit-return-stake-verification-key-file $keys_dir/stake.vkey \
--anchor-url "$METADATA_URL" \
--anchor-data-hash "$METADATA_HASH" \
--check-anchor-data \
--constitution-url "$NEW_CONSTITUTION_ANCHOR_URL" \
--constitution-hash "$NEW_CONSTITUTION_ANCHOR_HASH" \
--check-constitution-hash \
Expand All @@ -61,7 +65,6 @@ container_cli conway transaction build \
--tx-in-collateral "$(container_cli conway query utxo --address "$(cat $keys_dir/payment.addr)" --out-file /dev/stdout | jq -r 'keys[1]')" \
--proposal-file $txs_dir/new-constitution.action \
--change-address "$(cat $keys_dir/payment.addr)" \
--check-anchor-data \
--out-file $txs_dir/new-constitution-action-tx.unsigned

echo "Signing transaction"
Expand Down
5 changes: 4 additions & 1 deletion scripts/ga/no-confidence.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ METADATA_URL="https://raw.githubusercontent.com/IntersectMBO/governance-actions/
METADATA_HASH="ab901c3aeeca631ee5c70147a558fbf191a4af245d8ca001e845d8569d7c38f9"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="$txs_dir/ga"
Expand Down Expand Up @@ -39,6 +42,7 @@ container_cli conway governance action create-no-confidence \
--deposit-return-stake-verification-key-file $keys_dir/stake.vkey \
--anchor-url "$METADATA_URL" \
--anchor-data-hash "$METADATA_HASH" \
--check-anchor-data \
--out-file $txs_dir/no-confidence.action

# --prev-governance-action-tx-id "$PREV_GA_TX_HASH" \
Expand All @@ -53,7 +57,6 @@ container_cli conway transaction build \
--tx-in-collateral "$(container_cli conway query utxo --address "$(cat $keys_dir/payment.addr)" --out-file /dev/stdout | jq -r 'keys[1]')" \
--proposal-file $txs_dir/no-confidence.action \
--change-address "$(cat $keys_dir/payment.addr)" \
--check-anchor-data \
--out-file $txs_dir/no-confidence-action-tx.unsigned

echo "Signing transaction"
Expand Down
5 changes: 4 additions & 1 deletion scripts/ga/parameter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ METADATA_URL="https://raw.githubusercontent.com/IntersectMBO/governance-actions/
METADATA_HASH="3e6b1083a637a740d5b84bb6edf1a5119b81440b31ea84907311b6543ebd39eb"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="./txs/ga"
Expand Down Expand Up @@ -46,11 +49,11 @@ container_cli conway governance action create-protocol-parameters-update \
--deposit-return-stake-verification-key-file $keys_dir/stake.vkey \
--anchor-url "$METADATA_URL" \
--anchor-data-hash "$METADATA_HASH" \
--check-anchor-data \
--constitution-script-hash $SCRIPT_HASH \
--cost-model-file $txs_dir/test-plutusv3-params.json \
--prev-governance-action-tx-id "$PREV_GA_TX_HASH" \
--prev-governance-action-index "$PREV_GA_INDEX" \
--check-anchor-data \
--out-file $txs_dir/parameter.action

echo "Building transaction"
Expand Down
4 changes: 3 additions & 1 deletion scripts/ga/treasury.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ METADATA_URL="https://raw.githubusercontent.com/Ryun1/metadata/refs/heads/main/c
METADATA_HASH="633e6f25fea857662d1542921f1fa2cab5f90a9e4cb51bdae8946f823e403ea8"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Set IPFS gateway incase anchor is using IPFS
export IPFS_GATEWAY_URI="https://ipfs.io/"

# Define directories
keys_dir="./keys"
txs_dir="./txs/ga"
Expand Down Expand Up @@ -52,7 +55,6 @@ container_cli conway governance action create-treasury-withdrawal \
--funds-receiving-stake-verification-key-file $keys_dir/stake.vkey \
--transfer $LOVELACE_AMOUNT \
--constitution-script-hash $SCRIPT_HASH \
--check-anchor-data \
--out-file $txs_dir/treasury.action

echo "Building the transaction."
Expand Down

0 comments on commit 3d44739

Please sign in to comment.