pub enum Pricing {
    Blake2F {
        gas_per_round: u64,
    },
    Linear(Linear),
    Modexp(Modexp),
    Modexp2565(Modexp2565),
    AltBn128Pairing(AltBn128Pairing),
    AltBn128ConstOperations(AltBn128ConstOperations),
    Bls12ConstOperations(Bls12ConstOperations),
    Bls12Pairing(Bls12Pairing),
    Bls12G1Multiexp(Bls12G1Multiexp),
    Bls12G2Multiexp(Bls12G2Multiexp),
}
Expand description

Pricing variants.

Variants

Blake2F

Fields

gas_per_round: u64

Price per round of Blake2 compression function.

Pricing for Blake2 compression function: each call costs the same amount per round.

Linear(Linear)

Linear pricing.

Modexp(Modexp)

Pricing for EIP198 modular exponentiation.

Modexp2565(Modexp2565)

Pricing for EIP2565 modular exponentiation.

AltBn128Pairing(AltBn128Pairing)

Pricing for alt_bn128_pairing exponentiation.

AltBn128ConstOperations(AltBn128ConstOperations)

Pricing for constant alt_bn128 operations

Bls12ConstOperations(Bls12ConstOperations)

Pricing of constant price bls12_381 operations

Bls12Pairing(Bls12Pairing)

Pricing of pairing bls12_381 operation

Bls12G1Multiexp(Bls12G1Multiexp)

Pricing of bls12_381 multiexp operations in G1

Bls12G2Multiexp(Bls12G2Multiexp)

Pricing of bls12_381 multiexp operations in G2

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.