gpt4 book ai didi

solana - 为什么我在尝试部署 solana anchor IDL 时收到 "0x1004"?

转载 作者:行者123 更新时间:2023-12-03 08:09:23 62 4
gpt4 key购买 nike

当我尝试部署带有 anchor 的 IDL 时,我收到一条神秘的“自定义错误 0x1004”消息。这是什么意思:?

$ anchor idl init --provider.cluster testnet --filepath ./target/idl/myprogram.json sa3BafcCxwD6G3tUbvTcvnCD28sCXhpasauLtpw9HdA
Error: Error processing Instruction 0: custom program error: 0x1004

最佳答案

0x1004 是十六进制的 4100,或者 DeclaredProgramIdMismatch错误。

因此,在您的程序中的某个位置,您声明了一个与您部署的程序 ID 不同的程序 ID:

declare_id!("some_other_program_id"); // this is not your program id!

关于solana - 为什么我在尝试部署 solana anchor IDL 时收到 "0x1004"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71272678/

62 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com