Before you start
Make sure you understand:- Field types available for building visualizations
- Creating visualizations design patterns
Contribution workflow
1. Fork the repository
Fork visualsign-parser on GitHub and clone your fork locally.2. Create your visualization
Where the code goes depends on the chain — the two layouts are not interchangeable:
All paths are under
src/chain_parsers/.
Most Solana presets are IDL-driven and ship the program’s Anchor IDL alongside the Rust.
The exceptions are the native programs — spl_token, compute_budget,
associated_token_account — which decode instructions by hand and carry a tests.rs
instead of an IDL. If your program has an Anchor IDL, follow the IDL-driven shape.
NEAR has one preset, intents/, and it is not the two-file shape: it is a module
(args.rs, render.rs, verify.rs, tokens.rs, token_signature.rs) because NEAR
Intents carries its own signature verification across several schemes. Treat it as a
reference for a substantial protocol rather than a template to copy for a simple one.
Ethereum has no presets/ directory; its decoders live under protocols/ and use the
sol! macro for
type-safe ABI decoding rather than a checked-in ABI file. Tron currently has neither
directory, so a Tron protocol needs a decoder in the crate itself.
Copy the closest existing preset and adapt it:
- Solana —
presets/marginfi/(IDL-driven) orpresets/spl_token/ - Sui —
presets/cetus/ - NEAR —
presets/intents/ - Ethereum —
protocols/uniswap/(it has aREADME.mdexplaining its structure)
visualsign::field_builders (create_text_field,
create_amount_field, create_address_field, and so on) rather than constructing field structs
directly, and keep display strings ASCII — use >= not ≥, -> not →.
3. Test with parser CLI
Use the parser CLI to verify your visualization works correctly.4. Check what CI checks
CI requires all three of these to pass, so run them before opening the PR:make -C src test is the right command; cargo test --workspace fails an
unrelated integration test for reasons specific to this workspace.
The workspace denies unwrap(), expect(), panic!() and unsafe outside test modules,
so use ? or ok_or_else(...)? in preset code. Test modules opt out with
#[allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)].
5. Submit a pull request
Open a pull request with:- Your preset file(s)
- At least one fixture pair —
tests/fixtures/<name>.inputand<name>.expected— built from a real mainnet transaction - A brief description of your protocol
What reviewers look for
Accuracy
- Field values match the raw transaction data
- Addresses, amounts, and parameters are correctly decoded
- Protocol name and function names are accurate
Clarity
- A non-technical user can understand what the transaction does
- Labels are action-oriented (“You’re sending” not just “Amount”)
- Important information is visible in the condensed view
Completeness
- All relevant parameters are displayed
- Risk indicators are included where appropriate (large amounts, new addresses)
- Both expanded and condensed views work well
Consistency
- Follows existing visualization patterns for similar operations
- Uses appropriate field types for each data type
- Matches the style of other visualizations on the same chain
Testing checklist
Before submitting, verify:- Parser CLI produces correct output for your transaction type
- Condensed view shows the most critical information
- Amounts display with correct decimals and token symbols
- Addresses are properly formatted for the chain
- Test with multiple real transactions, not just one
Related documentation
- Creating Visualizations - Design patterns and examples
- Field Types Reference - Available field types
- Parser CLI - Testing tool documentation