update docs on format of method dispatch identifier (#2017)
This commit is contained in:
parent
a1bb494631
commit
df9627e952
|
@ -178,7 +178,7 @@ pub trait AccountDeserialize: Sized {
|
|||
pub trait ZeroCopy: Discriminator + Copy + Clone + Zeroable + Pod {}
|
||||
|
||||
/// Calculates the data for an instruction invocation, where the data is
|
||||
/// `Sha256(<namespace>::<method_name>)[..8] || BorshSerialize(args)`.
|
||||
/// `Sha256(<namespace>:<method_name>)[..8] || BorshSerialize(args)`.
|
||||
/// `args` is a borsh serialized struct of named fields for each argument given
|
||||
/// to an instruction.
|
||||
pub trait InstructionData: AnchorSerialize {
|
||||
|
|
|
@ -124,7 +124,7 @@ pub fn generate(program: &Program) -> proc_macro2::TokenStream {
|
|||
/// two pieces can be combined to creater a method identifier,
|
||||
/// specifically, Anchor uses
|
||||
///
|
||||
/// Sha256("<namespace>::<rust-identifier>")[..8],
|
||||
/// Sha256("<namespace>:<rust-identifier>")[..8],
|
||||
///
|
||||
/// where the namespace can be one of three types. 1) "global" for a
|
||||
/// regular instruction, 2) "state" for a state struct instruction
|
||||
|
|
Loading…
Reference in New Issue