29 lines
1.4 KiB
Rust
29 lines
1.4 KiB
Rust
// file: kb-lib/src/decoder/spl/associated_token_account/constants.rs
|
|
// version: 2
|
|
|
|
//! Local constants for the `kb-lib` SPL Associated Token Account component.
|
|
|
|
/// Stable protocol and surface code for the Associated Token Account program.
|
|
pub(crate) const DC_SPL_ATA_SURFACE_CODE: &str = "spl_associated_token_account";
|
|
/// Current stable decoded event contract version.
|
|
pub(crate) const DC_SPL_ATA_EVENT_VERSION: u32 = 1;
|
|
/// Maximum retained instruction payload size.
|
|
pub(crate) const DC_SPL_ATA_MAX_INSTRUCTION_BYTES: usize = 64;
|
|
/// Maximum retained instruction account count.
|
|
pub(crate) const DC_SPL_ATA_MAX_ACCOUNTS: usize = 64;
|
|
/// Maximum retained transaction account-key count.
|
|
pub(crate) const DC_SPL_ATA_MAX_TRANSACTION_KEYS: usize = 4_096;
|
|
/// Maximum retained account-key text length.
|
|
pub(crate) const DC_SPL_ATA_MAX_ACCOUNT_KEY_BYTES: usize = 128;
|
|
/// Maximum retained semantic diagnostic count.
|
|
pub(crate) const DC_SPL_ATA_MAX_DIAGNOSTICS: usize = 32;
|
|
/// Exact instructions published by `spl-associated-token-account-interface` 2.0.0.
|
|
pub(crate) const DC_SPL_ATA_INSTRUCTION_ENTRIES: &[(u8, &str, bool)] = &[
|
|
(0, "create", false),
|
|
(1, "create_idempotent", false),
|
|
(2, "recover_nested", false),
|
|
];
|
|
/// Canonical tracing target for the Associated Token Account decoder.
|
|
pub(crate) const TRACING_TARGET_DECODER_SPL_ATA: &str =
|
|
"kb-lib.decoder.spl.associated_token_account";
|