feat: add decode tests for Transfer and Bond transactions - #62
Merged
Conversation
themantre
approved these changes
Jul 1, 2026
Add tests that decode real, broadcasted Pactus transactions from raw bytes, verifying all fields match expected values from the block explorer. Transfer tx: 1b6b7226f7935a15f05371d1a1fefead585a89704ce464b7cc1d453d299d235f Bond tx: f83f583a5c40adf93a90ea536a7e4b467d30ca4f308d5da52624d80c42adec80 Test data sourced from: - Trust Wallet Core: tests/chains/Pactus/TestCases.h - Pactus Explorer: https://pactusscan.com
Transaction.id() now returns a Hash object (from PR #61). Hash has no .hex() method — use str() which returns the hex representation via Hash.__str__.
b00f
force-pushed
the
feat/add-tx-decode-tests
branch
from
July 1, 2026 05:37
12f9e68 to
47a4e90
Compare
b00f
enabled auto-merge (squash)
July 1, 2026 05:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add tests that decode real, broadcasted Pactus transactions from raw bytes, verifying all fields match expected values from the block explorer.
Test Data
Test data sourced from Trust Wallet Core.
1b6b7226f7935a15f05371d1a1fefead585a89704ce464b7cc1d453d299d235ff83f583a5c40adf93a90ea536a7e4b467d30ca4f308d5da52624d80c42adec80What Each Test Verifies
Testing
All 47 tests pass.