pub fn update_oracle(
oracle: Pubkey,
new_oracle_authority: Pubkey,
) -> Instruction
Expand description
Builds an update oracle instruction.
This instruction allows the current oracle authority to update itself to a new oracle authority. Only the current oracle authority can execute this instruction.
§Parameters
oracle
: The current oracle authority public key (must be a signer)new_oracle_authority
: The new oracle authority public key
§Returns
An instruction that can be included in a transaction to update the oracle authority.
§Security
- Only the current oracle authority can execute this instruction
- New oracle authority must be different from current and not zero
- Both main and social oracle authorities are updated consistently
§Example
use steel::Pubkey;
let current_oracle = Pubkey::new_unique();
let new_oracle = Pubkey::new_unique();
let instruction = miracle_api::sdk::update_oracle(current_oracle, new_oracle);