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: u32
Unix timestamp in seconds.
block_lt: u64
Block logical time.
tx_lt: u64
Transaction logical time.
rand_seed: HashBytes
Random seed.
account_balance: CurrencyCollection
Account balance.
addr: IntAddr
Account address.
config: Option<BlockchainConfigParams>
Blockchain config.
Implementations§
Source§impl SmcInfoBase
impl SmcInfoBase
pub const MAGIC: u32 = 124_711_402u32
pub const ACTIONS_IDX: usize = 1usize
pub const MSGS_SENT_IDX: usize = 2usize
pub const UNIX_TIME_IDX: usize = 3usize
pub const BLOCK_LT_IDX: usize = 4usize
pub const TX_LT_IDX: usize = 5usize
pub const RANDSEED_IDX: usize = 6usize
pub const BALANCE_IDX: usize = 7usize
pub const MYADDR_IDX: usize = 8usize
pub const CONFIG_IDX: usize = 9usize
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