#[repr(u8)]pub enum LoaderV4Instruction {
Write {
offset: u32,
bytes: Vec<u8>,
},
Truncate {
new_size: u32,
},
Deploy,
Retract,
TransferAuthority,
}
Variants§
Write
Write ELF data into an undeployed program account.
§Account references
[writable]
The program account to write to.[signer]
The authority of the program.
Truncate
Changes the size of an undeployed program account.
A program account is automatically initialized when its size is first increased. In this initial truncate, the program account needs to be a signer and it also sets the authority needed for subsequent operations. Decreasing to size zero closes the program account and resets it into an uninitialized state. Providing additional lamports upfront might be necessary to reach rent exemption. Superflous funds are transferred to the recipient account.
§Account references
[(signer), writable]
The program account to change the size of.[signer]
The authority of the program.[writable]
Optional, the recipient account.
Deploy
Verify the data of a program account to be a valid ELF.
If this succeeds the program becomes executable, and is ready to use. A source program account can be provided to overwrite the data before deployment in one step, instead retracting the program and writing to it and redeploying it. The source program is truncated to zero (thus closed) and lamports necessary for rent exemption are transferred, in case that the source was bigger than the program.
§Account references
[writable]
The program account to deploy.[signer]
The authority of the program.[writable]
Optional, an undeployed source program account to take data and lamports from.
Retract
Undo the deployment of a program account.
The program is no longer executable and goes into maintenance. Necessary for writing data and truncating.
§Account references
[writable]
The program account to retract.[signer]
The authority of the program.
TransferAuthority
Transfers the authority over a program account.
WARNING: Using this instruction without providing a new authority finalizes the program (it becomes immutable).
§Account references
[writable]
The program account to change the authority of.[signer]
The current authority of the program.[signer]
The new authority of the program. Optional if program is currently deployed.
Trait Implementations§
source§impl Clone for LoaderV4Instruction
impl Clone for LoaderV4Instruction
source§fn clone(&self) -> LoaderV4Instruction
fn clone(&self) -> LoaderV4Instruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LoaderV4Instruction
impl Debug for LoaderV4Instruction
source§impl<'de> Deserialize<'de> for LoaderV4Instruction
impl<'de> Deserialize<'de> for LoaderV4Instruction
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for LoaderV4Instruction
impl PartialEq for LoaderV4Instruction
source§impl Serialize for LoaderV4Instruction
impl Serialize for LoaderV4Instruction
impl Eq for LoaderV4Instruction
impl StructuralPartialEq for LoaderV4Instruction
Auto Trait Implementations§
impl Freeze for LoaderV4Instruction
impl RefUnwindSafe for LoaderV4Instruction
impl Send for LoaderV4Instruction
impl Sync for LoaderV4Instruction
impl Unpin for LoaderV4Instruction
impl UnwindSafe for LoaderV4Instruction
Blanket Implementations§
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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