Expand description
Exposes types that can be used to extend pallet_revive
with additional functionality.
In order to add a pre-compile:
- Implement
Precompile
on a type. Most likely another pallet. - Add the type to a tuple passed into
Config::Precompiles
. - Use the types inside the
run
module to test and benchmark your pre-compile.
Use alloy
through our re-export in this module to implement Eth ABI.
Re-exports§
pub use crate::AddressMapper;
pub use alloy_core as alloy;
Modules§
- run
- Types to run a pre-compile during testing or benchmarking.
Structs§
- Diff
- This type is used to describe a storage change when charging from the meter.
- Exec
Error - Error returned by contract execution.
- GasMeter
- H160
- Fixed-size uninterpreted hash type with 20 bytes (160 bits) size.
- H256
- Fixed-size uninterpreted hash type with 32 bytes (256 bits) size.
- U256
- Little-endian large integer type 256-bit unsigned integer.
Enums§
- Address
Matcher - Used by
Precompile
in order to declare at which addresses it will be called. - Error
- A pre-compile can error in the same way that a real contract can.
- Runtime
Costs
Traits§
- Ext
- Environment functions which are available to all pre-compiles.
- ExtWith
Info - Environment functions which are available to pre-compiles with
HAS_CONTRACT_INFO = true
. - Precompile
- Type that can be implemented in other crates to extend the list of pre-compiles.
- Token
- This trait represents a token that can be used for charging
GasMeter
. There is no other way of charging it.