referrerpolicy=no-referrer-when-downgrade

Function precompile

Source
pub fn precompile<P, E>(
    ext: &mut E,
    address: &[u8; 20],
    input: &P::Interface,
) -> Result<Vec<u8>, Error>
where P: Precompile<T = E::T>, E: ExtWithInfo, BalanceOf<E::T>: Into<U256> + TryFrom<U256>, MomentOf<E::T>: Into<U256>, <<E as Ext>::T as Config>::Hash: IsType<H256>,
Expand description

Convenience function to run pre-compiles for testing or benchmarking purposes.

Use CallSetup to create an appropriate environment to pass as the ext parameter. Panics in case the MATCHER of P does not match the passed address.