Skip to content

Commit

Permalink
Add sequence diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
agusaldasoro committed Feb 7, 2025
1 parent ba04a37 commit 92ff522
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions chains/solana/contracts/flows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
CCIP Send Flow
```mermaid
sequenceDiagram
participant U as CCIP Sender
participant R as Router + OnRamp
participant F as FeeQuoter
participant TP as Token Program
participant T as Token Pool
U->>R: CCIP Send
R->>F: CPI: Get Fee
R->>TP: CPI: Transfer Fee
R->>T: CPI: Transfer Tokens + Lock/Burn
Note right of T: Token Pool implementation<br/>supports up to 3 CPIs
R-->>R: Emit CCIPMessageSent
```

Commit Flow
```mermaid
sequenceDiagram
participant N as Offchain Node
participant R as Router + OnRamp
participant F as FeeQuoter
participant O as OffRamp
N->>O: Commit
O-->>R: PDA: Get config
O->>F: CPI: Store Prices
O-->>O: Store Merkle Root
```


Execute Flow
```mermaid
sequenceDiagram
participant N as Offchain Node
participant R as Router + OnRamp
participant O as OffRamp
participant T as Token Pool
participant C as CCIP Receiver
N->>O: Execute
O-->>R: PDA: Get config
O->>T: CPI: Transfer Tokens +<br/>Release/Mint
O->>C: CPI: CCIP Receive
```

0 comments on commit 92ff522

Please sign in to comment.