pub struct SmcInfoBase {
pub now: u32,
pub block_lt: u64,
pub tx_lt: u64,
pub rand_seed: HashBytes,
pub account_balance: CurrencyCollection,
pub addr: IntAddr,
pub config: Option<BlockchainConfigParams>,
}Expand description
Common Smart Contract Info.
Fields§
§now: u32Unix timestamp in seconds.
block_lt: u64Block logical time.
tx_lt: u64Transaction logical time.
rand_seed: HashBytesRandom seed.
account_balance: CurrencyCollectionAccount balance.
addr: IntAddrAccount address.
config: Option<BlockchainConfigParams>Blockchain config.
Implementations§
Source§impl SmcInfoBase
impl SmcInfoBase
pub const MAGIC: u32 = 0x076ef1ea
pub const ACTIONS_IDX: usize = 1
pub const MSGS_SENT_IDX: usize = 2
pub const UNIX_TIME_IDX: usize = 3
pub const BLOCK_LT_IDX: usize = 4
pub const TX_LT_IDX: usize = 5
pub const RANDSEED_IDX: usize = 6
pub const BALANCE_IDX: usize = 7
pub const MYADDR_IDX: usize = 8
pub const CONFIG_IDX: usize = 9
pub fn new() -> Self
pub fn with_now(self, now: u32) -> Self
pub fn with_block_lt(self, block_lt: u64) -> Self
pub fn with_tx_lt(self, tx_lt: u64) -> Self
pub fn with_raw_rand_seed(self, raw_rand_seed: HashBytes) -> Self
pub fn with_mixed_rand_seed( self, block_seed: &HashBytes, account: &HashBytes, ) -> Self
pub fn with_account_balance(self, balance: CurrencyCollection) -> Self
pub fn with_account_addr(self, addr: IntAddr) -> Self
pub fn with_config(self, params: BlockchainConfigParams) -> Self
pub fn require_ton_v4(self) -> SmcInfoTonV4
Trait Implementations§
Source§impl Clone for SmcInfoBase
impl Clone for SmcInfoBase
Source§fn clone(&self) -> SmcInfoBase
fn clone(&self) -> SmcInfoBase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SmcInfoBase
impl Debug for SmcInfoBase
Source§impl Default for SmcInfoBase
impl Default for SmcInfoBase
Source§fn default() -> SmcInfoBase
fn default() -> SmcInfoBase
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SmcInfoBase
impl !RefUnwindSafe for SmcInfoBase
impl !Send for SmcInfoBase
impl !Sync for SmcInfoBase
impl Unpin for SmcInfoBase
impl !UnwindSafe for SmcInfoBase
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