pub trait LinearCostPrecompile {
    const BASE: u64;
    const WORD: u64;

    // Required method
    fn execute(
        input: &[u8],
        cost: u64
    ) -> Result<(ExitSucceed, Vec<u8, Global>), PrecompileFailure>;
}

Required Associated Constants§

const BASE: u64

const WORD: u64

Required Methods§

fn execute( input: &[u8], cost: u64 ) -> Result<(ExitSucceed, Vec<u8, Global>), PrecompileFailure>

Implementors§

§

impl LinearCostPrecompile for ECRecover

§

const BASE: u64 = 3_000u64

§

const WORD: u64 = 0u64

§

impl LinearCostPrecompile for ECRecoverPublicKey

§

const BASE: u64 = 3_000u64

§

const WORD: u64 = 0u64

§

impl LinearCostPrecompile for Identity

§

const BASE: u64 = 15u64

§

const WORD: u64 = 3u64

§

impl LinearCostPrecompile for Ripemd160

§

const BASE: u64 = 600u64

§

const WORD: u64 = 120u64

§

impl LinearCostPrecompile for Sha3FIPS256

§

const BASE: u64 = 60u64

§

const WORD: u64 = 12u64

§

impl LinearCostPrecompile for Sha3FIPS512

§

const BASE: u64 = 60u64

§

const WORD: u64 = 12u64

§

impl LinearCostPrecompile for Sha256

§

const BASE: u64 = 60u64

§

const WORD: u64 = 12u64