Skip to content

Commit f1eecce

Browse files
committed
fix how it works section and remove wsol
1 parent 8ea6f09 commit f1eecce

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

docs/base-chain/quickstart/base-solana-bridge.mdx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ This guide covers the bridge architecture and provides practical examples for im
2222
## How it works
2323

2424
### On Base
25-
The Base bridge contract locks or burns your tokens and emits a message. Validators collect these messages into Merkle trees and post roots to Solana every ~15 minutes. You then prove your message exists in the tree to complete the transfer on Solana.
25+
The Base bridge contract locks or burns tokens when sending messages to Solana,
26+
and mints or unlocks tokens when receiving messages from Solana.
27+
The Bridge contract itself builds Merkle trees from outgoing messages.
28+
Validators verify the Merkle root every 300 finalized blocks and relay it to Solana.
29+
You then prove your message exists in the tree to complete the transfer on Solana.
2630

2731
**Key Smart contracts:**
2832
- [**Bridge Contract**](https://github.com/base/bridge/blob/main/base/src/Bridge.sol): Handles outgoing transfers
@@ -37,7 +41,7 @@ It represents the `msg.sender` on Base when you send an arbitrary contract call
3741
</Tip>
3842

3943
### On Solana
40-
The Solana bridge program locks or burns your tokens and emits events. Validators relay these messages to Base where they're executed through your personal Twin contract - a smart contract that acts as your execution context on Base.
44+
The Solana bridge program handles token transfers by locking or burning tokens and emitting events. For messaging, validators relay these messages to Base where they're executed through your personal Twin contract - a smart contract that acts as your execution context on Base.
4145

4246
**Key Programs:**
4347
- [**Bridge Program**](https://github.com/base/bridge/blob/main/solana/programs/bridge): Handles outgoing transfers
@@ -84,7 +88,7 @@ const ixs = [
8488
bridge: bridgeAccountAddress,
8589
outgoingMessage,
8690
to: toBytes(TO),
87-
remoteToken: toBytes("0xC5b9112382f3c87AFE8e1A28fa52452aF81085AD"), // wSOL
91+
remoteToken: toBytes("0xC5b9112382f3c87AFE8e1A28fa52452aF81085AD"), // SOL on Base
8892
amount: BigInt(AMOUNT * 10**9),
8993
}),
9094
await buildPayForRelayIx(RELAYER_PROGRAM_ID, outgoingMessage, payer)
@@ -115,16 +119,16 @@ await client.writeContract({
115119

116120
## Base to Solana
117121

118-
**Flow:** Burn wSOL → Wait 15min → Generate Proof → Execute on Solana
122+
**Flow:** Burn SOL (on Base) → Wait 15min → Generate Proof → Execute on Solana
119123

120124
The Base to Solana flow requires manual proof generation. You burn wrapped SOL on Base, wait for finalization (~15 minutes), then generate a cryptographic proof to execute on Solana and receive native SOL.
121125

122126
<GithubRepoCard title="Base to Solana Example" githubUrl="https://github.com/basebase-bridge-examples/tree/main/bridgeSolFromBaseToSolana" />
123127

124128
```typescript bridgeSolFromBaseToSolana/index.ts expandable
125-
// Step 1: Burn wSOL on Base
129+
// Step 1: Burn SOL on Base
126130
const transfer = {
127-
localToken: "0xC5b9112382f3c87AFE8e1A28fa52452aF81085AD", // wSOL
131+
localToken: "0xC5b9112382f3c87AFE8e1A28fa52452aF81085AD", // SOL (on Base)
128132
remoteToken: pubkeyToBytes32(SOL_ADDRESS),
129133
to: pubkeyToBytes32(solanaAddress),
130134
remoteAmount: BigInt(AMOUNT * 10**9),

0 commit comments

Comments
 (0)