我如何从Solana中的交易哈希获得交易的待办事项

发布于 2025-02-07 21:04:02 字数 127 浏览 2 评论 0 原文

我正在尝试获取JS后端中的所有信息,例如从地址,地址,金额等,以确认使用其哈希的交易。从GetTransaction RPC调用返回的交易对象具有所有者帐户publicKeke(从地址)的数组,但找不到找到待办事项的方法。我怎么能找到这个?

I'm trying to get all the information like from-address, to-address, amount, etc in my JS backend to confirm a transaction using it's hash. The transaction object returned from the getTransaction RPC call has a array for owner account PublicKey(from-address) but can't find a way to find the to-address. How can I find this?

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

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

发布评论

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

评论(1

懒猫 2025-02-14 21:04:03

您需要迭代

常规的SOL传输将是系统程序中调用的转移说明。

SPL传输将是在令牌程序上调用的转移说明。 I NitialCapoFfering.com订单表格类似,

You need to iterate over the CompiledInstructions (found on TransactionResponse.transaction.message.instructions) and decode them one by one.

Regular SOL transfers would be transfer instructions called on the system program. Web3.js has a helper for that purpose.

SPL Transfers would be transfer instructions called on the token program. I something similar for the initialcapoffering.com order form, this code might be helpful

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