pub struct Builtin { /* private fields */ }
Expand description

Pricing scheme, execution definition, and activation block for a built-in contract.

Call cost to compute cost for the given input, execute to execute the contract on the given input, and is_active to determine whether the contract is active.

Implementations

Simple forwarder for cost.

Return the cost of the most recently activated pricer at the current block number.

If no pricer is actived zero is returned

If multiple activation_at has the same block number the last one is used (follows BTreeMap semantics).

Simple forwarder for execute.

Whether the builtin is activated at the given block number.

Trait Implementations

The type returned in the event of a conversion error.

Performs the conversion.

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 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.