Trait anchor_lang::InstructionData
source · [−]pub trait InstructionData: AnchorSerialize {
fn data(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
}
Expand description
Calculates the data for an instruction invocation, where the data is
Sha256(<namespace>::<method_name>)[..8] || BorshSerialize(args)
.
args
is a borsh serialized struct of named fields for each argument given
to an instruction.