pub struct ObservedInstruction {
pub arguments: Vec<ObservedArgument>,
pub index: u64,
pub instruction: Option<ObservedInstructionInstruction>,
pub program_id: ObservedInstructionProgramId,
}Expand description
A Solana instruction as decoded by a solData criterion.
JSON schema
{
"title": "ObservedInstruction",
"description": "A Solana instruction as decoded by a `solData` criterion.",
"examples": [
{
"arguments": [
{
"name": "amount",
"truncated": false,
"type": "u64",
"value": "2000000"
}
],
"index": 1,
"instruction": "transfer_checked",
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}
],
"type": "object",
"required": [
"arguments",
"index",
"programId"
],
"properties": {
"arguments": {
"description": "The decoded arguments, in IDL order. Empty when `instruction` is omitted. Only the first 32 arguments are returned.",
"type": "array",
"items": {
"$ref": "#/components/schemas/ObservedArgument"
},
"maxItems": 32
},
"index": {
"description": "Zero-based index of the instruction in the transaction.",
"examples": [
1
],
"type": "integer",
"minimum": 0.0
},
"instruction": {
"description": "The instruction name from the IDL. Omitted when no IDL in the criterion decodes the instruction.",
"examples": [
"transfer_checked"
],
"type": "string",
"maxLength": 256
},
"programId": {
"description": "The program the instruction invokes.",
"examples": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
],
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
}
},
"additionalProperties": false
}Fields§
§arguments: Vec<ObservedArgument>The decoded arguments, in IDL order. Empty when instruction is omitted. Only the first 32 arguments are returned.
index: u64Zero-based index of the instruction in the transaction.
instruction: Option<ObservedInstructionInstruction>The instruction name from the IDL. Omitted when no IDL in the criterion decodes the instruction.
program_id: ObservedInstructionProgramIdThe program the instruction invokes.
Implementations§
Source§impl ObservedInstruction
impl ObservedInstruction
pub fn builder() -> ObservedInstruction
Trait Implementations§
Source§impl Clone for ObservedInstruction
impl Clone for ObservedInstruction
Source§impl Debug for ObservedInstruction
impl Debug for ObservedInstruction
Source§impl<'de> Deserialize<'de> for ObservedInstruction
impl<'de> Deserialize<'de> for ObservedInstruction
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ObservedInstruction> for ObservedInstruction
impl From<&ObservedInstruction> for ObservedInstruction
Source§fn from(value: &ObservedInstruction) -> Self
fn from(value: &ObservedInstruction) -> Self
Converts to this type from the input type.
Source§impl From<ObservedInstruction> for ObservedInstruction
impl From<ObservedInstruction> for ObservedInstruction
Source§fn from(value: ObservedInstruction) -> Self
fn from(value: ObservedInstruction) -> Self
Converts to this type from the input type.
Source§impl Serialize for ObservedInstruction
impl Serialize for ObservedInstruction
Source§impl TryFrom<ObservedInstruction> for ObservedInstruction
impl TryFrom<ObservedInstruction> for ObservedInstruction
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: ObservedInstruction) -> Result<Self, ConversionError>
fn try_from(value: ObservedInstruction) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ObservedInstruction
impl RefUnwindSafe for ObservedInstruction
impl Send for ObservedInstruction
impl Sync for ObservedInstruction
impl Unpin for ObservedInstruction
impl UnsafeUnpin for ObservedInstruction
impl UnwindSafe for ObservedInstruction
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
Mutably borrows from an owned value. Read more