refactor(intents): extract the decoder into a crate with no chain dependency - #490
Draft
shahan-khatchadourian-anchorage wants to merge 3 commits into
Conversation
This was referenced Sep 18, 2026
shahan-khatchadourian-anchorage
marked this pull request as draft
September 18, 2026 02:56
shahan-khatchadourian-anchorage
added this pull request to stack #495
September 18, 2026 03:50
shahan-khatchadourian-anchorage
force-pushed
the
shahankhatch/vp3-intents-crate
branch
from
September 21, 2026 17:57
b8ab18c to
ecbc230
Compare
shahan-khatchadourian-anchorage
force-pushed
the
shahankhatch/vp3-intents-crate
branch
from
September 22, 2026 16:51
ecbc230 to
fcce742
Compare
…endency The NEAR Intents decoder lived under visualsign-near/src/presets/intents, but the same DefusePayload reaches Solana and Ethereum through their own message envelopes. Moving it to visualsign-intents, a crate with no chain dependency, lets each chain parser decode intents without depending on NEAR. What stays NEAR-specific is recognizing that a payload carries intents at all, which is the receiver_id/method_name gate in convert; presets/intents.rs is now a re-export so that gate reads unchanged. INTENTS_RECEIVER moves with the decoder. A multi-token asset id names that contract when the balance it wraps is one the protocol holds, so resolving such an id is a property of intents rather than of any chain; the NEAR crate now takes the constant from here instead of defining it. The NEP-413 envelope renderer is not here: it needs Nep413Payload, which the NEAR envelope work introduces, so it lands with that. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
shahan-khatchadourian-anchorage
force-pushed
the
shahankhatch/vp3-intents-crate
branch
from
September 22, 2026 17:10
fcce742 to
04e04f2
Compare
CodeQL's cleartext-logging query flags a `panic!`/`assert!` message that carries a ValidationError string embedding the receiver account id. The account id is not secret -- it's the same value VisualSign renders to a signer -- but the query can't tell that, so the fix is to stop embedding the tainted string rather than argue with the query per PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
shahan-khatchadourian-anchorage
requested
a lite review from Copilot
and removed request for
Copilot
September 23, 2026 00:54
Copilot started reviewing on behalf of
shahan-khatchadourian-anchorage
September 23, 2026 00:54
View session
Every other workspace member opts into [workspace.lints] via [lints] workspace = true (unwrap_used/expect_used/panic deny, unsafe_code forbid). visualsign-intents was missing this section, so its production code carried none of those guarantees even though its test modules already use the standard #[allow(...)] shape that assumes the crate-level deny is active. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
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.
VP3. Moves the NEAR Intents decoder into
visualsign-intents, a crate with no chain dependency, so Solana and Ethereum decode intents without depending on NEAR. Stacked on #489.INTENTS_RECEIVERmoves with it — a multi-token asset id names that contract, which is a property of intents, not of a chain.presets/intents.rsbecomes a re-export so the NEAR gate reads unchanged.Not here: the NEP-413 envelope renderer, which needs
Nep413Payloadfrom #492; anddefuse-nep413, which no source in the crate uses.59 tests green across the affected crates.