-
Notifications
You must be signed in to change notification settings - Fork 1
init cip169 #80
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
base: main
Are you sure you want to change the base?
init cip169 #80
Conversation
| # 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # 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") |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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
List of changes