pub struct Fixed {
pub signer_account_id: AccountId,
pub current_account_id: AccountId,
pub predecessor_account_id: AccountId,
pub block_height: u64,
pub block_timestamp: Timestamp,
pub attached_deposit: u128,
pub random_seed: H256,
pub prepaid_gas: NearGas,
pub used_gas: NearGas,
}Expand description
Fully in-memory implementation of the blockchain environment with fixed values for all the fields.
Fields§
§signer_account_id: AccountId§current_account_id: AccountId§predecessor_account_id: AccountId§block_height: u64§block_timestamp: Timestamp§attached_deposit: u128§random_seed: H256§prepaid_gas: NearGas§used_gas: NearGasTrait Implementations§
Source§impl Env for Fixed
impl Env for Fixed
Source§fn signer_account_id(&self) -> AccountId
fn signer_account_id(&self) -> AccountId
Account ID that signed the transaction.
Source§fn current_account_id(&self) -> AccountId
fn current_account_id(&self) -> AccountId
Account ID of the currently executing contract.
Source§fn predecessor_account_id(&self) -> AccountId
fn predecessor_account_id(&self) -> AccountId
Account ID which called the current contract.
Source§fn block_height(&self) -> u64
fn block_height(&self) -> u64
Height of the current block.
Source§fn block_timestamp(&self) -> Timestamp
fn block_timestamp(&self) -> Timestamp
Timestamp (in ns) of the current block.
Source§fn attached_deposit(&self) -> u128
fn attached_deposit(&self) -> u128
Amount of NEAR attached to current call
Source§fn random_seed(&self) -> H256
fn random_seed(&self) -> H256
Random seed generated for the current block
Source§fn prepaid_gas(&self) -> NearGas
fn prepaid_gas(&self) -> NearGas
Prepaid NEAR Gas
fn assert_private_call(&self) -> Result<(), PrivateCallError>
fn assert_one_yocto(&self) -> Result<(), OneYoctoAttachError>
impl Eq for Fixed
impl StructuralPartialEq for Fixed
Auto Trait Implementations§
impl Freeze for Fixed
impl RefUnwindSafe for Fixed
impl Send for Fixed
impl Sync for Fixed
impl Unpin for Fixed
impl UnwindSafe for Fixed
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