Skip to main content

find_mock_returns

Function find_mock_returns 

Source
pub(crate) fn find_mock_returns<'a, T>(
    mocks: &'a mut BTreeMap<MockCallDataContext, VecDeque<T>>,
    input: &Bytes,
    value: Option<U256>,
) -> Option<&'a mut VecDeque<T>>
Expand description

Finds the return data queue of the mock matching a call.

An exact calldata and value match wins. Otherwise, the first mock in map order whose calldata prefixes input and whose value, if set, equals value is used.