Instruction: SetPeerConfig
This instruction can be used by the OApp admin to initialize and edit PeerConfig configuration accounts representing an instance of an associated application on a remote chain. Multiple PeerConfig accounts can exist.
The instruction allows to edit one of the following configuration parameters at a time:
peer_address: This is the address of the peer contract on the remote chain.enforced_options: This specifies the set of enforced options↗ that are always added to outgoing messages destined to this peer.
Input parameters
remote_eid: This is the arbitrary ID identifying the remote contract.config: This is the parameter to be configured.
Accounts
admin: Authorizes the operation and pays rent for account creation.Signer: Yes.
Mutable: Yes.
Constraints: Must be the
adminconfigured in thestore.
peer: Account representing the configuration for the remote contract.Init: Yes, if needed.
PDA: Yes, with seeds
PEER_SEED,store.key(), andparams.remote_eid.
store: Account storing the OApp global configuration.PDA: Yes, with seed
STORE_SEED.