Module anchor_lang::idl
source · [−]Expand description
idl.rs defines the instructions and account state used to store a program’s IDL.
Note that the transaction to store the IDL can be larger than the max
transaction size. As a reuslt, the transaction must be broken up into
several pieces and stored into the IDL account with multiple transactions
via the Write
instruction to continuously append to the account’s IDL data
buffer.
To upgrade the IDL, first invoke the Clear
instruction to reset the data.
And invoke Write
once more. To eliminate the ability to change the IDL,
set the authority to a key for which you can’t sign, e.g., the zero address
or the system program ID, or compile the program with the “no-idl” feature
and upgrade the program with the upgradeable BPF loader.