Skip to content

Receive Solana messages and tokens in CCIPLocalSvmLane - #93

Draft
andrejrakic wants to merge 1 commit into
svm/14-svm-sendfrom
svm/15-evm-receive
Draft

andrejrakic wants to merge 1 commit into
svm/14-svm-sendfrom
svm/15-evm-receive

Conversation

@andrejrakic

Copy link
Copy Markdown
Collaborator

CCIPLocalSvmLane now also delivers Solana -> EVM messages and tokens, mirroring the EVM OffRamp (2.0 and 1.6.0).

  • The lane takes the router in its constructor: new CCIPLocalSvmLane(router). Tokens sent EVM -> Solana are escrowed in the lane instead of the router (one-line router change; the simulator's size is unchanged).
  • lane.execute(message): Solana source only; execution state per message (a success cannot run again, a failure can be retried, and a retry that fails again reverts like the OffRamp: NoStateProgressMade on 2.0, ExecutionError on 1.6); the 2.0 receiver finality rule; token release from the escrow scaled from the message's decimals exactly like TokenPool; delivery through routeMessage. A receiver failure is recorded and returned, not reverted, and rolls back the token release.
  • The receiver sees sourceChainSelector = Solana and sender = the 32-byte Solana key.

Testing: new CCIPLocalSvmLaneExecute.t.sol (both versions: data, token-only, token plus data, decimals scaling and overflow, empty escrow, failure and retry, finality rules, a full EVM -> Solana -> EVM token round trip). All non-fork Forge and Hardhat tests, npm run test:svm and consumer-smoke.sh pass.

Builds on #92.

This branch has not been deployed

No deployments
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