Skip to content

Fix TON transaction status from traces#1111

Open
0xh3rman wants to merge 2 commits intomainfrom
h/ton-tx-status-fix
Open

Fix TON transaction status from traces#1111
0xh3rman wants to merge 2 commits intomainfrom
h/ton-tx-status-fix

Conversation

@0xh3rman
Copy link
Copy Markdown
Collaborator

@0xh3rman 0xh3rman commented May 6, 2026

Summary

  • Fetch TON traces by inbound message hash when checking transaction status.
  • Map incomplete traces to pending and failed trace actions to reverted.
  • Keep the existing root transaction fee update from transactionsByMessage.
  • Add a real failed STON.fi USDT -> TON swap fixture where the root wallet transaction succeeds but a child trace action fails.

Validation

  • cargo fmt --all --check
  • cargo test -p gem_ton --features rpc provider::transaction_state_mapper::tests
  • cargo clippy -p gem_ton --features rpc --all-targets -- -D warnings

Note

  • This PR targets h/ton-stonfi-swap-fixes so the diff only contains the tx-status fix. Retarget to main after the swap PR lands.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates TON traces into the transaction status logic to improve state accuracy. It adds new trace models, implements an RPC method to fetch traces, and updates the mapping logic to derive transaction states from trace actions. A review comment suggests optimizing the trace action iteration in the map_trace_state function to improve efficiency.

Comment thread crates/gem_ton/src/provider/transaction_state_mapper.rs Outdated
@0xh3rman 0xh3rman marked this pull request as draft May 7, 2026 05:49
@0xh3rman 0xh3rman force-pushed the h/ton-stonfi-swap-fixes branch from fcbb3a0 to 9cdf81c Compare May 7, 2026 05:51
@0xh3rman 0xh3rman force-pushed the h/ton-stonfi-swap-fixes branch 2 times, most recently from 2ae8ef5 to d0f63f6 Compare May 7, 2026 07:04
@0xh3rman 0xh3rman force-pushed the h/ton-tx-status-fix branch 3 times, most recently from 1109628 to 49f73e7 Compare May 7, 2026 10:11
@0xh3rman 0xh3rman marked this pull request as ready for review May 7, 2026 10:11
Base automatically changed from h/ton-stonfi-swap-fixes to main May 7, 2026 10:57
@0xh3rman 0xh3rman force-pushed the h/ton-tx-status-fix branch from 49f73e7 to fcacdd0 Compare May 7, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant