Skip to content

Conversation

@jusbar23
Copy link
Contributor

@jusbar23 jusbar23 commented Nov 5, 2025

This is a no-op

Changelist

  • Add some helper scripts for handling proposals and voting

Test Plan

  • Ran the scripts

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If the PR has breaking postgres changes to the indexer add the indexer-postgres-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added governance proposal submission and voting automation capabilities
    • Multi-network support for seamless operations across local, staging, and testnet environments
    • Automated proposal submission with intelligent vote delegation to streamline governance processes
    • Environment-aware configuration handling for consistent network-specific parameter management
    • Unified automation tooling improves the overall governance proposal workflow experience

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

The PR introduces and enhances Bash scripts for automating governance proposal submission and voting across three environments (local/dev, staging, testnet), with network-specific command flags and orchestration logic that delegates voting to environment-specific helper scripts.

Changes

Cohort / File(s) Change Summary
Proposal Submission Orchestration
protocol/scripts/governance/submit_and_vote_proposal.sh, protocol/scripts/governance/submit_proposal.sh
New scripts to submit proposals with environment-specific flags and keyring configurations. submit_and_vote_proposal.sh orchestrates the full workflow by fetching proposal IDs post-submission and delegating to voting helpers.
Network-Specific Voting
protocol/scripts/governance/vote_in_dev.sh, protocol/scripts/governance/vote_in_staging.sh, protocol/scripts/governance/vote_in_testnet.sh
vote_in_testnet.sh introduced as new testnet voter. vote_in_dev.sh and vote_in_staging.sh modified to add shebang, documentation headers, and \--keyring-backend test flag to vote commands.

Sequence Diagram

sequenceDiagram
    participant User
    participant submit_and_vote_proposal.sh
    participant submit_proposal.sh
    participant dydxprotocold
    participant Network RPC
    participant vote_in_*.sh

    User->>submit_and_vote_proposal.sh: Invoke with network, account, proposal file, vote option
    
    rect rgb(200, 220, 240)
    Note over submit_and_vote_proposal.sh, submit_proposal.sh: Proposal Submission Phase
    submit_and_vote_proposal.sh->>submit_proposal.sh: Delegate submission
    submit_proposal.sh->>dydxprotocold: Submit proposal with network-specific flags
    dydxprotocold->>Network RPC: Execute on chain
    end
    
    rect rgb(220, 240, 200)
    Note over submit_and_vote_proposal.sh, Network RPC: Fetch Proposal ID
    submit_and_vote_proposal.sh->>Network RPC: Query latest proposal ID (via dydxprotocold + jq)
    Network RPC-->>submit_and_vote_proposal.sh: Return proposal ID
    end
    
    rect rgb(240, 220, 200)
    Note over submit_and_vote_proposal.sh, vote_in_*.sh: Voting Phase
    submit_and_vote_proposal.sh->>vote_in_*.sh: Delegate voting with proposal ID and vote option
    vote_in_*.sh->>dydxprotocold: Vote on proposal (network-specific voters)
    dydxprotocold->>Network RPC: Execute votes on chain
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review network-specific flag correctness for testnet (\--fees 200000000000adydx) vs. local/staging (\--fees 500000000000000adv4tnt)
  • Verify proposal ID fetching logic and jq parsing in submit_and_vote_proposal.sh
  • Confirm environment branching logic and helper script delegation
  • Check consistency of keyring-backend flags and vote command structure across all voting scripts

Possibly related PRs

  • Add governance scripts #1505: Modifies the same governance voting scripts (vote_in_dev.sh, vote_in_staging.sh) to add network-specific configurations for automated voting.

Suggested reviewers

  • vincentwschau
  • Kefancao

Poem

🐰 Hop, skip, and a bound—
Proposals submit without a sound,
Network to network, vote by vote,
Bash brings governance close to gloat!

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding helper scripts for governance proposals and voting.
Description check ✅ Passed The description follows the template with all required sections (Changelist, Test Plan, and Author/Reviewer Checklist) completed, though the test plan is minimal.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch helper-scripts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (2)
protocol/scripts/governance/submit_proposal.sh (1)

38-39: Validate proposal file existence before use.

The script does not check whether the $PROPOSAL_FILE exists before attempting to use it. This can result in a cryptic error from dydxprotocold. Consider adding a validation check early in the script.

Add this validation after argument parsing:

if [ ! -f "$PROPOSAL_FILE" ]; then
    echo "Error: Proposal file '$PROPOSAL_FILE' not found" >&2
    exit 1
fi
protocol/scripts/governance/submit_and_vote_proposal.sh (1)

38-39: Validate proposal file before submission.

The script does not verify that the proposal file exists before attempting to submit it. Add an early validation check to provide clearer error messaging.

Add this validation after argument parsing (after line 13):

if [ ! -f "$PROPOSAL_FILE" ]; then
    echo "Error: Proposal file '$PROPOSAL_FILE' not found" >&2
    exit 1
fi
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83d1e18 and 6f0f40e.

📒 Files selected for processing (5)
  • protocol/scripts/governance/submit_and_vote_proposal.sh (1 hunks)
  • protocol/scripts/governance/submit_proposal.sh (1 hunks)
  • protocol/scripts/governance/vote_in_dev.sh (1 hunks)
  • protocol/scripts/governance/vote_in_staging.sh (1 hunks)
  • protocol/scripts/governance/vote_in_testnet.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Public Testnet) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-roundtable / (roundtable) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-vulcan / (vulcan) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-auxo-lambda / (auxo) Build and Push Lambda
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-bazooka-lambda / (bazooka) Build and Push Lambda
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-socks / (socks) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-ender / (ender) Build and Push
  • GitHub Check: (Mainnet) Build and Push ECS Services / call-build-and-push-ecs-service-comlink / (comlink) Build and Push
  • GitHub Check: check-sample-pregenesis-up-to-date
  • GitHub Check: benchmark
  • GitHub Check: unit-end-to-end-and-integration
  • GitHub Check: liveness-test
  • GitHub Check: test-coverage-upload
  • GitHub Check: test-race
  • GitHub Check: build-and-push-mainnet
  • GitHub Check: build-and-push-testnet
  • GitHub Check: container-tests
  • GitHub Check: build
  • GitHub Check: golangci-lint
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary

Comment on lines +25 to +43
# Submit the proposal
echo "Submitting proposal..."
if [ "$NETWORK" = "testnet" ]; then
# Testnet uses dydxcli and adydx
dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \
--from "$FROM_ACCOUNT" \
--yes \
--broadcast-mode sync \
--gas auto \
--fees 200000000000adydx \
--keyring-backend test
else
# Local/staging uses dydxprotocold and adv4tnt
dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \
--from "$FROM_ACCOUNT" \
--keyring-backend test \
--fees 5000000000000000adv4tnt \
--yes
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Reconcile fee inconsistency between submit_proposal.sh and submit_and_vote_proposal.sh.

This script uses 5000000000000000adv4tnt for local/staging fees (line 41), but submit_proposal.sh specifies 500000000000000adv4tnt for the same environment. These values should match. Additionally, like the other submission script, the local/staging branch lacks --broadcast-mode sync while testnet includes it (line 32).

Please verify the correct fee amount and ensure consistency across both submission scripts. Also clarify whether --broadcast-mode sync should be applied to all paths.


🏁 Script executed:

#!/bin/bash
# Find submit_proposal.sh and display its content, focusing on fee configurations
fd -t f "submit_proposal.sh" -x cat {}

Length of output: 1717


🏁 Script executed:

#!/bin/bash
# Search for fee patterns in governance scripts to understand the standard
rg -n "fees.*adv4tnt|fees.*adydx" --type=sh protocol/scripts/governance/

Length of output: 3402


🏁 Script executed:

#!/bin/bash
# Check for any documentation or comments about fee amounts
rg -n "5000000000000000|500000000000000" protocol/scripts/governance/ -B2 -A2

Length of output: 4034


Reconcile fee inconsistency between submit_proposal.sh and submit_and_vote_proposal.sh; also ensure consistent use of --broadcast-mode sync across submission scripts.

Verification confirms a 10x fee discrepancy for local/staging: submit_proposal.sh uses 500000000000000adv4tnt while submit_and_vote_proposal.sh uses 5000000000000000adv4tnt. The higher fee in submit_and_vote_proposal.sh aligns with all voting scripts, but the inconsistency between the two submission scripts needs clarification—either this is intentional separation by operation type, or one script has an error. Additionally, --broadcast-mode sync is absent from both submission scripts for local/staging, while all voting scripts include it. Determine whether all paths should consistently use --broadcast-mode sync.

🤖 Prompt for AI Agents
In protocol/scripts/governance/submit_and_vote_proposal.sh around lines 25–43,
the local/staging fee value (5000000000000000adv4tnt) is inconsistent with
protocol/scripts/governance/submit_proposal.sh (500000000000000adv4tnt) and
voting scripts; reconcile these by choosing the correct fee (prefer the value
used across voting scripts if that was intended) and make both submission
scripts use the same fee (or pull the fee into a shared variable at the top of
the scripts to avoid future drift), and also add --broadcast-mode sync to the
local/staging dydxprotocold tx gov submit-proposal invocation so submission
paths match voting scripts' broadcast behavior.

Comment on lines +73 to +77
if [ -z "$PROPOSAL_ID" ]; then
echo "⚠️ Could not retrieve proposal ID from $NODE"
echo " Please check the node is accessible or vote manually."
exit 0
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Exit with error code when proposal ID retrieval fails.

When the proposal ID cannot be retrieved, the script exits with code 0 (success), which masks the failure in CI/CD pipelines and automated workflows. This should exit with a non-zero code to indicate failure.

Apply this diff to exit with a failure code:

 if [ -z "$PROPOSAL_ID" ]; then
     echo "⚠️  Could not retrieve proposal ID from $NODE"
     echo "    Please check the node is accessible or vote manually."
-    exit 0
+    exit 1
 fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [ -z "$PROPOSAL_ID" ]; then
echo "⚠️ Could not retrieve proposal ID from $NODE"
echo " Please check the node is accessible or vote manually."
exit 0
fi
if [ -z "$PROPOSAL_ID" ]; then
echo "⚠️ Could not retrieve proposal ID from $NODE"
echo " Please check the node is accessible or vote manually."
exit 1
fi
🤖 Prompt for AI Agents
In protocol/scripts/governance/submit_and_vote_proposal.sh around lines 73 to
77, the script currently exits with code 0 when PROPOSAL_ID is empty; change the
exit to a non-zero status to signal failure (e.g. replace exit 0 with exit 1),
and optionally send the error messages to stderr to ensure CI detects the
failure.

Comment on lines +25 to +43
if [ "$NETWORK" = "testnet" ]; then
# Testnet uses dydxcli and adydx
echo "Submitting to testnet..."
dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \
--from "$FROM_ACCOUNT" \
--yes \
--broadcast-mode sync \
--gas auto \
--fees 200000000000adydx \
--keyring-backend test
else
# Local/staging uses dydxprotocold and adv4tnt
echo "Submitting to $NETWORK..."
dydxprotocold tx gov submit-proposal "$PROPOSAL_FILE" \
--from "$FROM_ACCOUNT" \
--keyring-backend test \
--fees 500000000000000adv4tnt \
--yes
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Address fee inconsistency between local/staging and testnet paths.

Line 41 specifies fees of 500000000000000adv4tnt for local/staging, but the related submit_and_vote_proposal.sh script uses 5000000000000000adv4tnt (10x higher) for the same environment. These should be consistent. Additionally, the testnet path includes --broadcast-mode sync (line 31) but the local/staging path omits it (line 38), which may cause behavioral differences.

Please verify the correct fee amount for local/staging environments and ensure both scripts use the same value. Also confirm whether --broadcast-mode sync should be present for all paths.


🏁 Script executed:

#!/bin/bash
# Find and examine both proposal submission scripts
echo "=== Finding submit_proposal.sh ==="
fd -name "submit_proposal.sh" -type f

echo -e "\n=== Finding submit_and_vote_proposal.sh ==="
fd -name "submit_and_vote_proposal.sh" -type f

echo -e "\n=== Examining submit_proposal.sh content ==="
fd -name "submit_proposal.sh" -type f -exec cat {} \;

echo -e "\n=== Examining submit_and_vote_proposal.sh content ==="
fd -name "submit_and_vote_proposal.sh" -type f -exec cat {} \;

Length of output: 1104


🏁 Script executed:

#!/bin/bash
# Search for both scripts using find
find . -name "submit_proposal.sh" -type f 2>/dev/null | head -5

find . -name "submit_and_vote_proposal.sh" -type f 2>/dev/null | head -5

# Search for fee patterns in shell scripts
echo "=== Searching for fee patterns in governance scripts ==="
rg "fees.*adv4tnt|fees.*adydx" --type sh -C 3 2>/dev/null | head -100

# Search for broadcast-mode patterns
echo "=== Searching for broadcast-mode patterns ==="
rg "broadcast-mode" --type sh -C 2 2>/dev/null | head -100

Length of output: 10604


Address fee inconsistency between local/staging paths in submit scripts, and add missing --broadcast-mode sync to local/staging submissions.

The fee mismatch is confirmed: submit_proposal.sh specifies 500000000000000adv4tnt for local/staging while submit_and_vote_proposal.sh uses 5000000000000000adv4tnt (10x higher). These must be unified.

Additionally, all governance voting scripts (vote_in_staging.sh, vote_in_dev.sh, vote_in_testnet.sh) include --broadcast-mode sync across all environments. The submit scripts inconsistently omit it only for local/staging paths (lines 38-42 in submit_proposal.sh and the equivalent in submit_and_vote_proposal.sh), which may cause unexpected behavioral differences. Add --broadcast-mode sync to the local/staging submit commands to align with the voting scripts pattern.

🤖 Prompt for AI Agents
In protocol/scripts/governance/submit_proposal.sh around lines 25 to 43, the
local/staging branch uses a different fee and omits --broadcast-mode sync;
update the else-branch submit command to use the same fee as the other submit
script (5000000000000000adv4tnt) and add --broadcast-mode sync to the
dydxprotocold tx gov submit-proposal invocation (preserving --from,
--keyring-backend, --fees and --yes flags).

Comment on lines +8 to +11
dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quote the vote_option parameter.

The $2 parameter should be quoted to handle edge cases with special characters.

Apply this diff to quote the parameter:

-dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
🤖 Prompt for AI Agents
In protocol/scripts/governance/vote_in_dev.sh around lines 8 to 11 the second
positional parameter ($2) is unquoted when passed to `dydxprotocold tx gov
vote`, which can break if the vote_option contains spaces or special chars;
update each command to quote the $2 parameter (e.g. "$2") so the shell treats it
as a single argument and preserves its contents.

Comment on lines +8 to +17
dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quote the vote_option parameter to handle edge cases.

The $2 parameter in these vote commands is unquoted and could fail if the vote option contains spaces or special characters. Additionally, there is no error handling if a vote fails; the script continues to the next voter.

Apply this diff to quote the parameter:

-dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dydxprotocold tx gov vote "$1" $2 --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from alice --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from bob --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from carl --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from dave --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from emily --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from fiona --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from greg --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from henry --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from ian --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from jeff --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
🤖 Prompt for AI Agents
protocol/scripts/governance/vote_in_staging.sh lines 8-17: the second parameter
$2 is unquoted and commands don't check for failure; update each dydxprotocold
tx gov vote invocation to use "$2" (quote the vote_option) and after each
command test its exit status, printing an error identifying the voter and
exiting non‑zero on failure (or use a failing shell option like set -e and a
descriptive trap) so the script does not silently continue on a failed vote.

Comment on lines +8 to +9
dydxprotocold tx gov vote "$1" $2 --from dydx-1 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from dydx-2 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Use correct token denomination for testnet votes.

The testnet environment uses adydx as the token denomination, but this script incorrectly uses adv4tnt in the fees. This will cause vote transactions to fail. Additionally, the vote_option parameter should be quoted.

Apply this diff to fix the token denomination and quote the parameter:

-dydxprotocold tx gov vote "$1" $2 --from dydx-1 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
-dydxprotocold tx gov vote "$1" $2 --from dydx-2 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dydx-1 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test
+dydxprotocold tx gov vote "$1" "$2" --from dydx-2 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dydxprotocold tx gov vote "$1" $2 --from dydx-1 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" $2 --from dydx-2 --broadcast-mode sync --fees 5000000000000000adv4tnt --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from dydx-1 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test
dydxprotocold tx gov vote "$1" "$2" --from dydx-2 --broadcast-mode sync --fees 200000000000adydx --yes --keyring-backend test
🤖 Prompt for AI Agents
In protocol/scripts/governance/vote_in_testnet.sh around lines 8 to 9, the fee
denomination is incorrect and the vote_option parameter is unquoted; update both
dydxprotocold tx gov vote commands to use the testnet token denomination "adydx"
in the --fees flag and ensure the vote option parameter ($2) is passed quoted
(e.g., "$2") so the command becomes dydxprotocold tx gov vote "$1" "$2" ...
--fees 5000000000000000adydx --yes --keyring-backend test for both dydx-1 and
dydx-2 invocations.

@jusbar23 jusbar23 merged commit c462a7a into main Nov 5, 2025
38 checks passed
@jusbar23 jusbar23 deleted the helper-scripts branch November 5, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants