Bug: Terra->Solana auto-withdraw fails — token format not recognized as SPL mint #94
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#94
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?
LocalTerra->Solana Localnet deposit succeeds on Terra, but auto-withdraw on Solana fails with: 'Solana withdrawSubmit requires a 32-byte or 20-byte hex token in the transfer record (EVM source)'
the terra deposit receipt stores the token as a bytes32 hash (0xc0d84a8656abb91b...) which the Solana withdraw path can't parse into an SPL mint address.
same issue seen on both Terra->Solana and (from earlier session) any path where destination is Solana and source is non-EVM.
transfer details:
LocalTerra->Anvil and LocalTerra->Anvil1 both work fine (4/4). Solana->Anvil also works (4/4 via Backpack).
commit
003bf31, laptop Vite workflow.mentioned in issue #67
mentioned in issue #96
mentioned in commit
ca3c6eb045Fix pushed on
feat/solana-integration(commitca3c6eb).Cause:
TransferRecord.tokenfor Terra deposits is a denom string (e.g.uluna) or CW20terra1…, whileuseAutoWithdrawSubmitonly treated0xEVM-style tokens as valid for SolanasrcToken.Change:
resolveWithdrawSrcTokenBytesForSolanamaps EVM hex + Terraencode_token_addressrules (shared withterraTokenEncoding). Terra receipt denom is preferred when recording the transfer.still reproducing on
02d8e6a. tested Terra->Solana with TKNA via Keplr->Backpack.deposit on Terra succeeds (step 1 done), but submit hash fails with: "Solana withdrawSubmit requires a 32-byte or 20-byte hex token in the transfer record (EVM source)".
console shows destToken=0x836b1c00488e2cb1... which is a keccak hash, not a raw Solana mint pubkey (32 bytes). the resolveWithdrawSrcTokenBytes fix (
ca3c6eb) cant resolve this because the underlying token mapping is encoded wrong.same root cause as #89 -- token registration writes keccak256(address_string) instead of raw bytes (bech32-decoded left-padded for CW20, raw pubkey bytes for Solana mints). needs the registration encoding fix first, then both #89 and #94 should resolve together.
mentioned in commit
bc288606e3VERIFIED on
84c8df3. Terra->Solana deposit succeeds, submitOnSolana returns successful tx (3QHANbz...). the token encoding fix resolved the format mismatch. pending cancel window + operator execution to confirm full 4/4.closing -- verified on
84c8df3, token format fix works. Terra->Solana deposits resolve correctly now.