程序返回错误:自定义程序错误:solana上的0x179D
之间的通信中有下一个错误
嗨,Dex Exchange和Phantom Wallet #1未知程序指令
程序日志:free_supply:14100789713994 程序日志:自定义程序错误:0x179D 程序ZO1GGZTUKMY5BYNDVT5MTVEZXZF2FALTBKKMVGUHUQK消耗了41719个1400000计算单元 程序返回错误:自定义程序错误:0x179d
可能导致问题是什么?
Hi got next error in communication between dex exchange and phantom wallet
#1 Unknown program instruction
Program log: free_supply: 14100789713994
Program log: Custom program error: 0x179d
Program Zo1ggzTUKMY5bYnDvT5mtVeZxzf2FaLTbKkmvGUhUQk consumed 41719 of 1400000 compute units
Program returned error: custom program error: 0x179d
what might cause the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您看到
自定义程序错误...
时,它表明交易中的程序指令失败。0x179d
是程序的 code ,它可能是唯一的错误代码,通常是在此处的Rust Enum的索引(变体)程序error.rs
。例如:
因此,您可能可以通过
0x0
通过0x6
看到一个错误代码。程序还可以以其他方式分配错误代码。为了使您知道与代码关联的错误是您可以在程序源代码中查找错误。如果您要调用的程序不是开源的...您可以尝试联系程序的所有者,以获取有关代码的更多信息。
When you see
custom program error...
it indicates that a program instruction in your transaction failed. The0x179d
is the program's code which may be a unique error code, often times it is an index (variant) of a Rust enum in the programerror.rs
.For example:
So here, you could possibly see an error code of
0x0
through0x6
. A program may also assign the error code in some other way.In order for you to know what the error associated to the code is you can either look up the error in the programs source code. If the program you are calling is not open source... you can try to contact the owner of the program to get more information about the code.
弗兰克的答案非常好,但是我想提供一些其他代码来展示如何转换错误。
下面的示例是针对 spl代币库,如果您使用的是其他链程序,请替换该程序的错误
errors.rs.rs
:您的错误消息:
Frank's answer is excellent, but I wanted to give some additional code to show how to convert the errors.
The example below is for SPL Token Library, if you're using a different on-chain program, substitute the errors from that programs
errors.rs
:And a function to give you good error messages: