Skip to content

Commit 9e03836

Browse files
committed
v15.0.0: split raydium into raydium_cp and raydium_cl
1 parent d694539 commit 9e03836

File tree

18 files changed

+585
-404
lines changed

18 files changed

+585
-404
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,14 @@ Polygon:
9595
9696
Solana:
9797
- [Orca](https://orca.so)
98+
- [Raydium](https://raydium.io/), only CP (Constant Product) and CL (Concentrated Liquidity) pools
9899
99100
Optimism:
100101
- [Uniswap v3](https://uniswap.org)
101102
- [WETH](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000006)
102103
103104
Base:
105+
- [Uniswap v2](https://uniswap.org)
104106
- [Uniswap v3](https://uniswap.org)
105107
- [WETH](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000006)
106108

dist/esm/index.js

Lines changed: 112 additions & 77 deletions
Large diffs are not rendered by default.

dist/esm/index.svm.js

Lines changed: 114 additions & 79 deletions
Large diffs are not rendered by default.

dist/umd/index.js

Lines changed: 112 additions & 77 deletions
Large diffs are not rendered by default.

dist/umd/index.svm.js

Lines changed: 114 additions & 79 deletions
Large diffs are not rendered by default.

examples/raydium.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### 1 Pool
44

55
```javascript
6-
let route = await Web3Exchanges.raydium.route({
6+
let route = await Web3Exchanges.raydium_cp.route({
77
blockchain: 'solana',
88
tokenIn: '9wvorGtBJ8gyLorFTmwXWcymPoGVUBn6MRzHwFpCdCeC',
99
tokenOut: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
@@ -23,7 +23,7 @@ wallet.sendTransaction(transaction)
2323
### 1 Pool amountOutMin
2424

2525
```javascript
26-
let route = await Web3Exchanges.raydium.route({
26+
let route = await Web3Exchanges.raydium_cl.route({
2727
blockchain: 'solana',
2828
tokenIn: '11111111111111111111111111111111',
2929
tokenOut: 'BNso1VUJnh4zcfpZa6986Ea66P6TCp59hvtNJ8b1X85',

package.evm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@depay/web3-exchanges-evm",
33
"moduleName": "Web3Exchanges",
4-
"version": "14.0.0",
4+
"version": "15.0.0",
55
"description": "JavaScript library simplifying decentralized web3 exchange routing for multiple blockchains and exchanges.",
66
"main": "dist/umd/index.evm.js",
77
"module": "dist/esm/index.evm.js",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@depay/web3-exchanges",
33
"moduleName": "Web3Exchanges",
4-
"version": "14.0.0",
4+
"version": "15.0.0",
55
"description": "JavaScript library simplifying decentralized web3 exchange routing for multiple blockchains and exchanges.",
66
"main": "dist/umd/index.js",
77
"module": "dist/esm/index.js",

package.svm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@depay/web3-exchanges-svm",
33
"moduleName": "Web3Exchanges",
4-
"version": "14.0.0",
4+
"version": "15.0.0",
55
"description": "JavaScript library simplifying decentralized web3 exchange routing for multiple blockchains and exchanges.",
66
"main": "dist/umd/index.svm.js",
77
"module": "dist/esm/index.svm.js",

src/exchanges.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,27 +111,31 @@ exchanges.worldchain.forEach((exchange)=>{ exchanges.worldchain[exchange.name] =
111111
/*#elif _SVM
112112
113113
import orca from './exchanges/orca'
114-
import raydium from './exchanges/raydium'
114+
import raydium_cp from './exchanges/raydium_cp'
115+
import raydium_cl from './exchanges/raydium_cl'
115116
116117
const exchanges = [
117118
orca(),
118-
raydium(),
119+
raydium_cp(),
120+
raydium_cl(),
119121
]
120122
exchanges.forEach((exchange)=>{
121123
exchanges[exchange.name] = exchange
122124
})
123125
124126
exchanges.solana = [
125127
orca('solana'),
126-
raydium('solana'),
128+
raydium_cp('solana'),
129+
raydium_cl('solana'),
127130
]
128131
exchanges.solana.forEach((exchange)=>{ exchanges.solana[exchange.name] = exchange })
129132
130133
//#else */
131134

132135
import honeyswap from './exchanges/honeyswap'
133136
import orca from './exchanges/orca'
134-
import raydium from './exchanges/raydium'
137+
import raydium_cp from './exchanges/raydium_cp'
138+
import raydium_cl from './exchanges/raydium_cl'
135139
import pancakeswap from './exchanges/pancakeswap'
136140
import pancakeswap_v3 from './exchanges/pancakeswap_v3'
137141
import quickswap from './exchanges/quickswap'
@@ -151,7 +155,8 @@ import wxdai from './exchanges/wxdai'
151155

152156
const exchanges = [
153157
orca(),
154-
raydium(),
158+
raydium_cp(),
159+
raydium_cl(),
155160
uniswap_v3(),
156161
pancakeswap_v3(),
157162
uniswap_v2(),
@@ -198,7 +203,8 @@ exchanges.polygon.forEach((exchange)=>{ exchanges.polygon[exchange.name] = excha
198203

199204
exchanges.solana = [
200205
orca('solana'),
201-
raydium('solana'),
206+
raydium_cp('solana'),
207+
raydium_cl('solana'),
202208
]
203209
exchanges.solana.forEach((exchange)=>{ exchanges.solana[exchange.name] = exchange })
204210

0 commit comments

Comments
 (0)