feat: add Compute Budget Program instruction parsing support

Add support for parsing SetComputeUnitLimit and SetComputeUnitPrice instructions from Solana's Compute Budget Program. Update event parser to handle compute budget instructions and bump version to 1.1.3.
This commit is contained in:
ysq
2025-11-16 22:49:37 +08:00
parent 1ec7f845a5
commit 4b019e5e01
8 changed files with 174 additions and 39 deletions
@@ -139,6 +139,8 @@ pub enum EventType {
// Common events
BlockMeta,
SetComputeUnitLimit,
SetComputeUnitPrice,
Unknown,
}
@@ -233,6 +235,8 @@ impl fmt::Display for EventType {
EventType::TokenAccount => write!(f, "TokenAccount"),
EventType::NonceAccount => write!(f, "NonceAccount"),
EventType::BlockMeta => write!(f, "BlockMeta"),
EventType::SetComputeUnitLimit => write!(f, "SetComputeUnitLimit"),
EventType::SetComputeUnitPrice => write!(f, "SetComputeUnitPrice"),
EventType::Unknown => write!(f, "Unknown"),
}
}