You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe it's related to #134, but idk if it is the same issue.
I'm trying to port raydium-sdk to golang using solana-go and everything is going well, but I can't get the Liquidity.fetchInfo working on golang.
Raydium's SDK implementation for the fetchInfo function is: creates an instruction, simulates it, and then parses the logs from the simulation to get liquidity pool information.
I think it may be related to the transaction version or transaction encoding... The resulting bytes of the transaction serialization are very different from the ts code... Needs more debugging...
Edit: doing a little more debugging, if I sign the transaction, the resulting bytes will be parsed correctly and the simulation will run "correctly". I think the current marshal algorithm can't work for transactions without signatures.
The problem is: signing the transaction will not work for me, since I need the signer to be RaydiumSimuLateTransaction11111111111111111 to the raydium simulation to return the result I need...
Any idea about what needs to be done to be able to simulate transactions without signing?
Edit2: I made it work by adding a random signature in the tx.Signatures, but that should not be necessary, it is a bug..
Maybe it's related to #134, but idk if it is the same issue.
I'm trying to port
raydium-sdk
to golang usingsolana-go
and everything is going well, but I can't get theLiquidity.fetchInfo
working on golang.Raydium's SDK implementation for the
fetchInfo
function is: creates an instruction, simulates it, and then parses the logs from the simulation to get liquidity pool information.The function to create the instruction: https://github.com/raydium-io/raydium-sdk/blob/c44123e6df72c589a55eca6a595fd1153a176546/src/liquidity/liquidity.ts#L1318
Then this transaction instruction is included in a transaction and sent to RPC using the
simulateMultipleInstruction
function: https://github.com/raydium-io/raydium-sdk/blob/c44123e6df72c589a55eca6a595fd1153a176546/src/common/web3.ts#L235.I made a dummy code with the raw implementation for both
ts
andgolang
using a RANDOM (no idea who owns it) liquidity pool as an example:ts
implementation:Output:
golang
implementation:Output:
I'm trying to debug why this is happening, but because of my lack of understanding about
solana-go
internals, it is going pretty slowly...Thanks.
The text was updated successfully, but these errors were encountered: