So it's often seen in Precompile
implementations as a trait bound :
impl<T: LinearCostPrecompile> Precompile for T {
and the trait itself :
pub trait LinearCostPrecompile {
const BASE: u64;
const WORD: u64;
fn execute(
input: &[u8],
cost: u64,
) -> core::result::Result<(ExitSucceed, Vec<u8>), PrecompileFailure>;
}
Can someone explain the why and what of this trait?