如何在 Solana devnet 上的 Raydium 上创建流动性池?

发布于 2025-01-19 19:00:42 字数 1103 浏览 0 评论 0原文

谁能给我关于如何在Solana Devnet上创建LP池的建议?

我计划使用Raydium协议在DEVNET上测试特定两个令牌之间的掉期。

因此,我需要先在DEVNET上创建一个交换池。 为了实现这一目标,我像下面一样做到了。

首先,要在血清市场上列表,我将Raydium-Dex存储库克隆在Mac上,并将血清DEX的程序ID从主网更改为DEVNET,我的成功在DevNet Serum上注册。 (带溶胶对的定制令牌) 结果,我获得了血清市场计划ID。

之后,我克隆了Raydium-Frontend存储库来创建一个流动性库。并修改了Wellknowntoken.config.ts,以便可以创建一个新池的自定义令牌。

最后,我可以从Localhost Web UI访问Create Pool UI。 我单击了UI上的初始化流动性池按钮,并显然获得了发送新的池交易的敬酒消息。

但是,它的效果不佳。因为我在Solscan网站上找不到交易哈希。 我跟踪了按钮的点击事件代码,我发现了一件事。

流动性的结果值之一。MakeCreateAtePoolTransaction函数具有无效的值,尤其是FeePayer。

const { transaction: sdkTransaction1, signers: sdkSigners1 } = Liquidity.makeCreatePoolTransaction({
        poolKeys: sdkAssociatedPoolKeys,
        userKeys: { payer: owner }
})
const testTx = await loadTransaction({ transaction: sdkTransaction1, signers: sdkSigners1 })
console.log('feepayer', testTx.feePayer?.toBase58()) // null

我觉得这不是在Solana Devnet上创建交换池的首选(好)方法,但是我找不到更好的方法来完成此任务。

我想念什么?还是我应该阅读或学习什么? 请给我一些有关如何使其起作用的建议。

谢谢。

Can anyone give me any advice on how to create an LP pool on the Solana devnet?

I planned this job for testing swaps between specific two tokens on the devnet using the Raydium protocol.

So, I need to create a swap pool on the devnet first.
To achieve this, I did it like below.

First of all, to list on the serum market, I cloned the Raydium-Dex repository on my mac and changed the Serum dex's program id from the mainnet to the devnet, and I success registered on the devnet serum. (Custom token with SOL pairs)
As a result, I got a serum market program id.

After that, I cloned the Raydium-frontend repository to create a liquidity pool. And modified wellknownToken.config.ts so that my custom tokens could be possible to create a new pool.

Finally, I could access the create pool UI from the localhost web UI.
I clicked Initialize Liquidity Pool button on the UI and got a Toast message Create a new pool Transaction Sent apparently.

However, It is not worked well. Because I can not find the transaction hash on the Solscan website.
I tracked the button's click event codes and I figured out one thing.

One of the result value of Liquidity.makeCreatePoolTransaction function has a null value, especially, feePayer.

const { transaction: sdkTransaction1, signers: sdkSigners1 } = Liquidity.makeCreatePoolTransaction({
        poolKeys: sdkAssociatedPoolKeys,
        userKeys: { payer: owner }
})
const testTx = await loadTransaction({ transaction: sdkTransaction1, signers: sdkSigners1 })
console.log('feepayer', testTx.feePayer?.toBase58()) // null

I felt this is not the preferred (good) way to create a swap pool on the Solana devnet, but I can not find a better way to achieve this task.

What am I missing? or What am I should read or learn?
please give me some advice on how to do it to make it works.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

厌倦 2025-01-26 19:00:42

看来使用流动性创建的交易。MakeCreatePoolTransaction尚未发送到网络,因此在任何地方都不存在。在尝试加载之前,请确保发送并确认交易。您可以使用以下内容:

const { transaction: sdkTransaction1, signers: sdkSigners1 } = Liquidity.makeCreatePoolTransaction({
        poolKeys: sdkAssociatedPoolKeys,
        userKeys: { payer: owner }
});
await sendAndConfirmTransaction(connection, transaction, [wallet]);

请注意,这需要发送连接要发送的Wallet才能签名。 https://github.com/solana-labs/solana/solana/blob/9ac2245970de90af30b30bfl30bff9d1f7f35cd28f2bf2bf2bf6d/web3/web3.js/src/src/src/src/util/sendil/send--confirm-send-confirm-confirm-confirm-thers

insperly但是,因为Raydium程序未部署到DEVNET:

It looks like the transaction created with Liquidity.makeCreatePoolTransaction hasn't been sent to the network, so it doesn't exist anywhere. Be sure to send and confirm the transaction before trying to load it. You can use something like:

const { transaction: sdkTransaction1, signers: sdkSigners1 } = Liquidity.makeCreatePoolTransaction({
        poolKeys: sdkAssociatedPoolKeys,
        userKeys: { payer: owner }
});
await sendAndConfirmTransaction(connection, transaction, [wallet]);

Note that this requires a connection to send and a wallet to sign. More info at https://github.com/solana-labs/solana/blob/9ac2245970de90af30bff9d1f7f35cd2d8f2bf6d/web3.js/src/util/send-and-confirm-transaction.ts#L18

You might run into other issues though, because the Raydium program isn't deployed to devnet: https://explorer.solana.com/address/675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8?cluster=devnet

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文