Skip to content

Commit 0d8f438

Browse files
committed
fix README
1 parent f80c99d commit 0d8f438

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424

2525
This project demonstrates how to perform a token swap on the Solana blockchain using Raydium and Chainstack. The example specifically illustrates swapping SOL (native Solana token) for USDC (a stablecoin).
2626

27-
> Find the full guide on the Chainstack Developer Portal.
27+
Find the full [guide on the Chainstack Developer Portal](https://docs.chainstack.com/docs/solana-how-to-perform-token-swaps-using-the-raydium-sdk).
28+
29+
> Shoutout to [precious-void](https://github.com/precious-void) for the the [base code](https://github.com/precious-void/raydium-swap) used for this project!
2830
2931
## Features
3032

src/swapConfig.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export const swapConfig = {
2-
executeSwap: false, // Send tx when true, simulate tx when false
2+
executeSwap: true, // Send tx when true, simulate tx when false
33
useVersionedTransaction: true,
4-
tokenAAmount: 0.001, // Swap 0.01 SOL for USDT in this example
4+
tokenAAmount: 0.01, // Swap 0.01 SOL for USDT in this example
55
tokenAAddress: "So11111111111111111111111111111111111111112", // Token to swap for the other, SOL in this case
6-
tokenBAddress: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC address
6+
tokenBAddress: "FN2dH9S96vtqTBSHa5snvcRG3BbWjwQC8P1XcgZNtWfQ", // USDC address
77
maxLamports: 1000000, // Max lamports allowed for fees
88
direction: "in" as "in" | "out", // Swap direction: 'in' or 'out'
99
liquidityFile: "https://api.raydium.io/v2/sdk/liquidity/mainnet.json",
10-
maxRetries: 10
10+
maxRetries: 20,
1111
};

0 commit comments

Comments
 (0)