| Crates.io | ton_lib_macros |
| lib.rs | ton_lib_macros |
| version | 0.0.1 |
| created_at | 2025-04-26 17:54:30.981637+00 |
| updated_at | 2025-10-02 21:57:24.792752+00 |
| description | A collection of types and utilities for interacting with the TON network |
| homepage | |
| repository | https://github.com/sild/ton_lib_rs |
| max_upload_size | |
| id | 1650456 |
| size | 25,363 |
Automatically derive TLB and TonContract traits for your types
use ton_lib_macros::TLB;
#[derive(Debug, Clone, PartialEq, TLB)]
#[tlb(prefix = 0xc4, bits_len = 8)]
pub struct GlobalVersion {
pub version: u32,
pub capabilities: u64,
}
// specify custom adapter (ser/de functions for TLB)
#[derive(Debug, Clone, PartialEq, TLB)]
pub struct StateInit {
#[tlb(bits_len = 5)]
pub split_depth: Option<u8>,
pub tick_tock: Option<TickTock>,
pub code: Option<TonCellRef>,
pub data: Option<TonCellRef>,
#[tlb(adapter = "TLBHashMapE::<DictKeyAdapterTonHash, DictValAdapterTLB, _, _>::new(256)")]
pub library: HashMap<TonHash, SimpleLib>,
}
#[ton_contract]
pub struct JettonMaster;
impl GetJettonData for JettonMaster {}
impl GetWalletAddress for JettonMaster {}