pub struct BlockchainMock {
pub accounts: HashMap<Address, AccountData>,
pub new_addresses: HashMap<(Address, u64), Address>,
pub previous_block_info: BlockInfo,
pub current_block_info: BlockInfo,
}Fields§
§accounts: HashMap<Address, AccountData>§new_addresses: HashMap<(Address, u64), Address>§previous_block_info: BlockInfo§current_block_info: BlockInfoImplementations§
Source§impl BlockchainMock
impl BlockchainMock
pub fn add_account(&mut self, acct: AccountData)
pub fn validate_and_add_account(&mut self, acct: AccountData)
pub fn print_accounts(&self)
pub fn put_new_address( &mut self, creator_address: Address, creator_nonce: u64, new_address: Address, )
pub fn validate_account(&self, account: &AccountData)
pub fn is_smart_contract_address(&self, address: &Address) -> bool
pub fn check_account_has_code(&self, account: &AccountData) -> bool
pub fn subtract_tx_payment( &mut self, address: &Address, call_value: &BigUint, ) -> Result<(), BlockchainMockError>
pub fn subtract_tx_gas( &mut self, address: &Address, gas_limit: u64, gas_price: u64, )
pub fn increase_balance(&mut self, address: &Address, amount: &BigUint)
pub fn send_balance( &mut self, contract_address: &Address, send_balance_list: &[SendBalance], result_logs: &mut Vec<TxLog>, ) -> Result<(), BlockchainMockError>
pub fn substract_dcdt_balance( &mut self, address: &Address, dcdt_token_identifier: &[u8], value: &BigUint, )
pub fn increase_dcdt_balance( &mut self, address: &Address, dcdt_token_identifier: &[u8], value: &BigUint, )
pub fn increase_nonce(&mut self, address: &Address)
pub fn create_account_after_deploy( &mut self, tx_input: &TxInput, new_storage: HashMap<Vec<u8>, Vec<u8>>, contract_path: Vec<u8>, ) -> Address
pub fn increase_validator_reward(&mut self, address: &Address, amount: &BigUint)
pub fn try_set_username(&mut self, address: &Address, username: &[u8]) -> bool
Source§impl BlockchainMock
impl BlockchainMock
pub fn create_tx_info(&self, contract_address: &Address) -> BlockchainTxInfo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockchainMock
impl RefUnwindSafe for BlockchainMock
impl Send for BlockchainMock
impl Sync for BlockchainMock
impl Unpin for BlockchainMock
impl UnwindSafe for BlockchainMock
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