我的代币发送程序遇到了发送交易的问题,抛出了下面的错误。
Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1
Run Code Online (Sandbox Code Playgroud)
与SOL平衡有关。我想知道这个问题背后的原因。是因为发送端的SOL较少吗?或者我想知道是否是因为收件人的溶胶较少
Jon*_*n C 13
0x1= InsufficientFunds,因此在这种情况下意味着发送令牌帐户没有足够的资金发送给收件人。
此类错误通常列在生成这些错误的 Solana 程序的公共 Github 存储库中的错误定义文件中。如果您在Solana 程序库 Token 程序错误中找不到错误,您可能会从Metaplex 程序库的 Token Metadata 程序中收到错误,该程序也被不同的 Solana 生态系统工具(例如 Metaboss)广泛使用。
请记住,您首先需要转换十六进制值(这就是 0x 前缀所表示的值)。例如,为了查找Error processing Instruction 4: custom program error: 0x26,我首先将 0x26 转换为十进制,即 38,然后我使用 Chrome 的搜索功能来查找文本的第 39 次出现error(,结果是这一行:
#[error("If using a creators array, you must be one of the creators listed")]
MustBeOneOfCreators,
Run Code Online (Sandbox Code Playgroud)
现在至少您有一个更具描述性的错误可以处理。
| 归档时间: |
|
| 查看次数: |
34376 次 |
| 最近记录: |