Skip to content

Conversation

@Ryun1
Copy link
Member

@Ryun1 Ryun1 commented Jan 8, 2026

List of changes

  • Add / Fix / Change / Remove

# Returns the deposit amount in lovelace, or "null" if query fails
query_governance_deposit() {
# Check if cardano-cli is available
if ! command -v cardano-cli >/dev/null 2>&1; then
Copy link
Member Author

Choose a reason for hiding this comment

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

move this boilerplate to top of script

local deposit_amount
deposit_amount=$(query_governance_deposit)

# If deposit query failed, use null (JSON null, not string)
Copy link
Member Author

Choose a reason for hiding this comment

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

probably exit code 1, rather than using null

we wouldnt null in metadata in any cases


# Validate the JSON file against the schemas
schemas=("$TMP_SCHEMAS_DIR"/*-schema.json)

Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
# In the case where flags are used to not have any schemas download, exit with 1


deposit_return=$(jq -r '.body.onChain.depositReturnAddress' "$input_file")
check_field "depositReturnAddress" "$deposit_return"
deposit_return=$(jq -r '.body.onChain.reward_account' "$input_file")
Copy link
Member Author

Choose a reason for hiding this comment

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

add on-chain check to compare the metadata to on-chain state


deposit_return=$(jq -r '.body.onChain.depositReturnAddress' "$input_file")
check_field "depositReturnAddress" "$deposit_return"
deposit=$(jq -r '.body.onChain.deposit' "$input_file")
Copy link
Member Author

Choose a reason for hiding this comment

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

add on-chain check to compare the metadata to on-chain state

i.e. is the number matching the on-chain parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants