Closed SwatX18 closed 12 hours ago
try replacing a paid rpc node, public default rpc node https://api.mainnet-beta.solana.com
have lots of issues.
try replacing a paid rpc node, public default rpc node
https://api.mainnet-beta.solana.com
have lots of issues.
Okay, do you have any suggestion for the rpc node to use? A website name?
we use paid rpc owned by ourself and we can't provide you those. I would suggest you to subscribe paid service because free resources usually used by lots of ppl and don't have good quality.
I tried again and again, it's just not working... I tried on my mac too. I used like 5 different rpc providers.
This is my new error:
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'
please ensure
I tested it again and it still work well, it's not related to you use mac or not.
config code:
export const connection = new Connection('YOUR_RPC_URL')
export const txVersion = TxVersion.V0 // or TxVersion.LEGACY
const cluster = 'mainnet'
let raydium: Raydium | undefined
export const initSdk = async (params?: { loadToken?: boolean }) => {
if (raydium) return raydium
console.log(`connect to rpc ${connection.rpcEndpoint} in ${cluster}`)
raydium = await Raydium.load({
owner,
connection,
cluster,
disableFeatureCheck: true,
disableLoadToken: !params?.loadToken,
blockhashCommitment: 'finalized',
return raydium
}
result screen shot
It still doesn't work with 2 different paid RPCs...
Error with LEGACY because V0 has no stack to show:
TransactionExpiredBlockheightExceededError: Signature XXXX has expired: block height exceeded.
If I have to buy a $600 dedicated RPC to get it to work, there's no point.
TransactionExpiredBlockheightExceededError usually means you need to set higher priority fees or there's some error in your code. try set higher priority fees or paste your full code and wallet address here. https://github.com/raydium-io/raydium-sdk-V2-demo?tab=readme-ov-file#error-block-height-exceeded
I am pretty sure original demo code is totally fine cuz I have tested it for couple times. also suggest you to use swap api for easier tx manipulation
sol to popcat swap test tx: https://explorer.solana.com/tx/aauhx8nvsJC1fgDKjhqHxUtaUqpvjLvWGZc1Tm5Uj4YjtLR73gAbzuiuUUQWr4yQgJD2RH1L73YyRCL2aSuoR4q
due to no issues was found for demo and sdk, I will close this issue.
Hi,
I tried to swap from the default script with default execution command. Command: yarn dev src/amm/swap.ts
In the config file, I tried with TxVersion.V0 & TxVersion.LEGACY Legacy give me an error more detailed:
And this is the execution logs at start:
I also tried with the personal rpc url and it failed again.
All I do is clone the repo -> configure the config file -> run the default command swap
Can you help me please ?
PS: I'm on Windows 11 with Node v20.18.0