Open gtsigner opened 2 years ago
hey @godtoy
being able to fetch IDLs from the chain is a very useful thing to have! :smile:
from a first look, it looks good to me.
but can you please use the standard go formatter?
Do u mean the code formatter ? should i exec go fmt ...
first right?
Hey i just finished go fmt ...
submit
The tests fail because the IDL has been updated :face_in_clouds:
How about changing the test to something like this:
idlJSON["name"] == "nft_magiceden"
?Yep, u are right. Because magiceden contract has been updated 2 days ago.
Add a method
program.FetchIDL
same as here https://github.com/project-serum/anchor/blob/master/ts/src/program/index.ts