Single limit order placement fails with unknown variant 'place_limit_order_batch' — standard CW20 hook sends wrong variant #232
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#232
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue Summary
Placing a standard single limit order on
/tradevia wallet extension fails on-chain. The frontend sends a CW20sendhook with the variantplace_limit_order_batch, but the deployed pair contract does not recognise this variant — itsCw20HookMsgonly acceptsswap,place_limit_order, andwithdraw_liquidity. This affects the standard single-order placement flow (not the ladder), meaning the core limit order feature is broken on the current build.Reproduction Steps
make deploy-local, indexer running, frontend running atVITE_NETWORK=local npm run dev)/trade(or/limits), select a pair, and fill in a standard single limit order — Price, Amount, ExpiryExpected Behavior
A single limit order placement should send a CW20
sendhook with theplace_limit_ordervariant and succeed on-chain, landing the order in the pair's order book.Actual Behavior
The transaction is rejected with:
The frontend is sending
place_limit_order_batchinstead ofplace_limit_orderfor a regular single order. The variant does not exist on the deployed contract. No order is placed and gas is consumed.Console Logs
Environment Details
localterra(local Docker)VITE_NETWORK=local npm run devmake indexer-dev)make deploy-localWallet / Device Details
http://localhost:26657/tradeSeverity / Impact
P1 (Blocker) — core single limit order placement is broken. Every standard limit order placement fails at the contract level. The frontend's single-order broadcast path is emitting
place_limit_order_batchas the CW20 hook variant, which does not exist in the deployed contract. This is likely a code path that was updated for batch/ladder support but inadvertently replaced the single-order variant. Fix requires correcting the hook message variant in the single-order placement path inpair.tsortransactions.ts.cc: @PlasticDigits ~"blocker:limit-orders"
mentioned in issue #233
@totdking This is due to changes to the smart contracts. You need to rebuild the contracts and reset your localterra.
mentioned in issue #204
qa @PlasticDigits — confirmed resolved by a fresh contract redeploy on the QA box.
the unknown variant
place_limit_order_batchreproduced exactly during e2e seed on stale wasm. after make deploy-local refreshed the contracts (git_sha6be0a13), the hybrid-book seed places the bid clean ("resting bid seeded for hybrid E2E") and the variant error is gone. matches your call to totdking — rebuild contracts + reset localterra — same fix applied here.deployed-wasm drift, not a code bug. good to close once totdking confirms his side, or your call.