Loading
Memo preflight: validate memoless asset eligibility
Resolve #2776 (closed)
Summary
- Add early validation to
/thorchain/memo/check/{asset}/{amount}preflight endpoint to reject memoless-ineligible assets - Preflight now fails with explicit errors for:
- Non-gas assets (e.g. ERC20 tokens) that require the chain router and cannot be deposited directly to Asgard vaults
- When memoless transactions are globally halted (
HaltMemolessmimir) - When memoless transactions are disabled (
MemolessTxnTTL <= 0)
- Preflight continues to pass for eligible gas assets (BTC, ETH, DOGE, etc.)
- New test suite
QuerierReferenceMemoSuitewith 6 tests covering all validation paths
Test plan
- Gas asset (BTC) passes preflight
- Multiple gas assets (BTC, ETH, DOGE) pass preflight
- ERC20 token (ETH.USDC) fails with "not eligible" error
- Synth asset (BTC/BTC) fails with "not eligible" error
- HaltMemoless mimir causes "currently halted" error
- TTL=0 causes "currently disabled" error
- Existing handler reference memo tests pass
-
make lintpasses