#[repr(C)]pub enum UpgradeInstruction {
InitializeAdmin(InitializeAdminArgs),
ChangePublicKey(ChangePublicKeyArgs),
ChangeAuthority(ChangeAuthorityArgs),
Upgrade(UpgradeArgs),
}
Variants§
InitializeAdmin(InitializeAdminArgs)
Initialize new UpgradeAdmin that will be an authority for target upgradable program.
Accounts expected by this instruction:
[writable]
The UpgradeAdmin account to initialize[writable,signer]
The fee payer[]
System program[]
Rent sysvar
ChangePublicKey(ChangePublicKeyArgs)
Change pubkey in UpgradeAdmin. The Keccak Hash of [target_contract, nonce, "solana-upgrade-program".bytes, new_public_key]
should be signed by old public key to perform that operation.
Accounts expected by this instruction:
[writable]
The UpgradeAdmin account
ChangeAuthority(ChangeAuthorityArgs)
Change contract upgrade authority. The Keccak Hash of [target_contract, nonce, "solana-upgrade-program".bytes, new_authority]
should be signed by stored public key to perform that operation.
Accounts expected by this instruction:
[writable]
The UpgradeAdmin account[writable]
The ProgramData account.[]
The new authority account[]
BPFLoaderUpgradable program
Upgrade(UpgradeArgs)
Upgrade contract. The Keccak Hash of [target_contract, nonce, "solana-upgrade-program".bytes, buffer_address]
should be signed by stored public key to perform that operation.
Accounts expected by this instruction:
[writable]
The UpgradeAdmin account[writable]
The ProgramData account.[writable]
The Program account corresponding to stores address in UpgradeAdmin.[writable]
The Buffer account where the program data has been written. The buffer account’s authority must match the program’s authority[writable]
The spill account.[]
Rent sysvar.[]
Clock sysvar.[]
BPFLoaderUpgradable program
Trait Implementations§
Source§impl BorshSerialize for UpgradeInstruction
impl BorshSerialize for UpgradeInstruction
Source§impl Clone for UpgradeInstruction
impl Clone for UpgradeInstruction
Source§fn clone(&self) -> UpgradeInstruction
fn clone(&self) -> UpgradeInstruction
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for UpgradeInstruction
impl RefUnwindSafe for UpgradeInstruction
impl Send for UpgradeInstruction
impl Sync for UpgradeInstruction
impl Unpin for UpgradeInstruction
impl UnwindSafe for UpgradeInstruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more