Struct fe_compiler_test_utils::ContractHarness
source · pub struct ContractHarness {
pub gas_reporter: GasReporter,
pub address: H160,
pub abi: Contract,
pub caller: H160,
pub value: U256,
}
Fields§
§gas_reporter: GasReporter
§address: H160
§abi: Contract
§caller: H160
§value: U256
Implementations§
source§impl ContractHarness
impl ContractHarness
pub fn capture_call( &self, executor: &mut Executor<'_, '_>, name: &str, input: &[Token] ) -> Capture<(ExitReason, Vec<u8>), Infallible>
pub fn build_calldata(&self, name: &str, input: &[Token]) -> Vec<u8> ⓘ
pub fn capture_call_raw_bytes( &self, executor: &mut Executor<'_, '_>, input: Vec<u8> ) -> Capture<(ExitReason, Vec<u8>), Infallible>
pub fn test_function( &self, executor: &mut Executor<'_, '_>, name: &str, input: &[Token], output: Option<&Token> )
pub fn call_function( &self, executor: &mut Executor<'_, '_>, name: &str, input: &[Token] ) -> Option<Token>
pub fn test_function_reverts( &self, executor: &mut Executor<'_, '_>, name: &str, input: &[Token], revert_data: &[u8] )
pub fn test_call_reverts( &self, executor: &mut Executor<'_, '_>, input: Vec<u8>, revert_data: &[u8] )
pub fn test_function_returns( &self, executor: &mut Executor<'_, '_>, name: &str, input: &[Token], return_data: &[u8] )
pub fn test_call_returns( &self, executor: &mut Executor<'_, '_>, input: Vec<u8>, return_data: &[u8] )
pub fn events_emitted( &self, executor: Executor<'_, '_>, events: &[(&str, &[Token])] )
pub fn set_caller(&mut self, caller: H160)
Auto Trait Implementations§
impl !RefUnwindSafe for ContractHarness
impl Send for ContractHarness
impl !Sync for ContractHarness
impl Unpin for ContractHarness
impl UnwindSafe for ContractHarness
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