Expand description
指令解析通用工具函数
Structs§
- Inner
Instructions Index - InnerInstructions 索引缓存
Functions§
- calculate_
price_ impact_ bps - 计算价格影响基点
- calculate_
slippage_ bps - 计算滑点基点
- create_
metadata - 创建事件元数据的通用函数
- create_
metadata_ simple - 创建事件元数据的兼容性函数(用于指令解析)
- get_
account - 从账户列表中获取账户
- get_
instruction_ account_ getter - 获取指令账户访问器 返回一个可以通过索引获取 Pubkey 的闭包
- get_
instruction_ account_ getter_ indexed - 使用预构建索引的账户获取器(O(1) 查找)
- read_
bool - 从指令数据中读取布尔值
- read_
bytes - Read bytes from instruction data
- read_
i32_ le - 从指令数据中读取 i32(小端序)- SIMD 优化
- read_
pubkey - 从指令数据中读取公钥 - SIMD 优化
- read_
pubkey_ fast - 快速读取 Pubkey(从字节数组)
- read_
str_ unchecked - Read string with 4-byte length prefix (Borsh format) Returns (string slice, total bytes consumed including length prefix)
- read_u8
- 从指令数据中读取 u8
- read_
u16_ le - 从指令数据中读取 u16(小端序)- SIMD 优化
- read_
u32_ le - 从指令数据中读取 u32(小端序)- SIMD 优化
- read_
u64_ le - 从指令数据中读取 u64(小端序)- SIMD 优化
- read_
u128_ le - 从指令数据中读取 u128(小端序)- SIMD 优化
- read_
vec_ u64 - 从指令数据中读取u64向量(简化版本)