fix(scripts): correct jq template brace count in smoke-pool-swap simulation path #730

Merged
Brouie merged 1 commit from fix/smoke-pool-swap-jq-syntax into main 2026-04-20 11:54:04 +00:00
Brouie commented 2026-04-20 08:13:55 +00:00 (Migrated from gitlab.com)

Fixes #86 Simulation path.

Problem

scripts/smoke-pool-swap.sh Simulation path failed with jq syntax error when OFFER_TOKEN is set:

jq: error: syntax error, unexpected INVALID_CHARACTER, expecting end of file
{simulation:{offer_asset:{info:{token:{contract_addr:$addr}},amount:$amt}}}}
jq: 1 compile error

Root cause: extra closing brace in the jq template (5 opens, 6 closes).

Fix

Remove the extra closing brace after $amt so the jq object is balanced (5 opens, 5 closes).

Verification

Ran the script with OFFER_TOKEN set against a deployed EMBER/JADE pair on LocalTerra:

== Simulation (pool-only; offer CW20 ...terra10mdufuv..., amount 1000) ==
{
  "data": {
    "return_amount": "96270",
    "spread_amount": "0",
    "commission_amount": "1764"
  }
}
OK: smoke-pool-swap read-only checks passed.

Pool query path was unaffected before and after. Related to issue #86.

Fixes #86 Simulation path. ## Problem `scripts/smoke-pool-swap.sh` Simulation path failed with jq syntax error when OFFER_TOKEN is set: ``` jq: error: syntax error, unexpected INVALID_CHARACTER, expecting end of file {simulation:{offer_asset:{info:{token:{contract_addr:$addr}},amount:$amt}}}} jq: 1 compile error ``` Root cause: extra closing brace in the jq template (5 opens, 6 closes). ## Fix Remove the extra closing brace after `$amt` so the jq object is balanced (5 opens, 5 closes). ## Verification Ran the script with OFFER_TOKEN set against a deployed EMBER/JADE pair on LocalTerra: ``` == Simulation (pool-only; offer CW20 ...terra10mdufuv..., amount 1000) == { "data": { "return_amount": "96270", "spread_amount": "0", "commission_amount": "1764" } } OK: smoke-pool-swap read-only checks passed. ``` Pool query path was unaffected before and after. Related to issue #86.
PlasticDigits (Migrated from gitlab.com) approved these changes 2026-04-20 08:13:55 +00:00
Brouie commented 2026-04-20 08:14:18 +00:00 (Migrated from gitlab.com)

mentioned in issue #86

mentioned in issue #86
PlasticDigits commented 2026-04-20 11:53:59 +00:00 (Migrated from gitlab.com)

approved this merge request

approved this merge request
PlasticDigits commented 2026-04-20 11:54:05 +00:00 (Migrated from gitlab.com)

mentioned in commit 9032f4287b

mentioned in commit 9032f4287b3baca348fab56db7435e476a0e0259
PlasticDigits (Migrated from gitlab.com) merged commit 9032f4287b into main 2026-04-20 11:54:05 +00:00
PlasticDigits commented 2026-04-20 11:54:14 +00:00 (Migrated from gitlab.com)

Great fix

Great fix
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!730
No description provided.