Question about IDL
Closed this issue · 1 comments
labyla commented
Hello! I have a question. I don't understand how you got pump-fun.json from pump-fun.old.json file. Could you please explain it to me?
rckprtr commented
Lots of testing and experimenting, basically made a mirror of the interface in Anchor 0.30 and then used this below to generate discriminators.
export function getDiscriminator(name: string) {
return sha256.digest(name).slice(0, 8);
}
getDiscriminator("event:NAME");
getDiscriminator("account:NAME");
getDiscriminator("global:NAME");
Other things I just guessed.
Now you can just go anchor cli convert idl.json
in anchor 0.30.1