pub struct EVMVersion {
version: SupportedEVMVersions,
}Expand description
EVM Version
Fields§
§version: SupportedEVMVersionsImplementations§
Source§impl EVMVersion
impl EVMVersion
Sourcepub fn new(version: SupportedEVMVersions) -> Self
pub fn new(version: SupportedEVMVersions) -> Self
Create a new EVM Version with the specified value
Sourcepub fn version(&self) -> &SupportedEVMVersions
pub fn version(&self) -> &SupportedEVMVersions
Get the current EVM version
Sourcepub fn has_push0(&self) -> bool
pub fn has_push0(&self) -> bool
As PartialOrd is implemented in the struct, all versions after shanghai will support this
Sourcepub fn has_prevrandao(&self) -> bool
pub fn has_prevrandao(&self) -> bool
Check if the EVM version supports prevrandao - Paris or later
Sourcepub fn has_transient_storage(&self) -> bool
pub fn has_transient_storage(&self) -> bool
Check if the EVM version supports transient storage (TLOAD, TSTORE) - Cancun or later
Sourcepub fn has_mcopy(&self) -> bool
pub fn has_mcopy(&self) -> bool
Check if the EVM version supports MCOPY opcode - Cancun or later
Sourcepub fn has_blob_opcodes(&self) -> bool
pub fn has_blob_opcodes(&self) -> bool
Check if the EVM version supports blob opcodes (BLOBHASH, BLOBBASEFEE) - Cancun or later
Sourcepub fn has_slotnum(&self) -> bool
pub fn has_slotnum(&self) -> bool
Check if the EVM version supports the SLOTNUM opcode - Amsterdam or later
Sourcepub fn has_stack_immediates(&self) -> bool
pub fn has_stack_immediates(&self) -> bool
Check if the EVM version supports DUPN, SWAPN and EXCHANGE - Amsterdam or later
Sourcepub fn max_code_size(&self) -> usize
pub fn max_code_size(&self) -> usize
Maximum size in bytes of deployed (runtime) contract code
EIP-170 (24 KiB) before Amsterdam, EIP-7954 (64 KiB) from Amsterdam on.
Sourcepub fn max_initcode_size(&self) -> usize
pub fn max_initcode_size(&self) -> usize
Maximum size in bytes of contract creation (init) code
EIP-3860 (48 KiB) before Amsterdam, EIP-7954 (128 KiB) from Amsterdam on.
Trait Implementations§
Source§impl Clone for EVMVersion
impl Clone for EVMVersion
impl Copy for EVMVersion
Source§impl Debug for EVMVersion
impl Debug for EVMVersion
Source§impl Default for EVMVersion
impl Default for EVMVersion
Source§impl Display for EVMVersion
Display EVMVersion as string
impl Display for EVMVersion
Display EVMVersion as string
Auto Trait Implementations§
impl Freeze for EVMVersion
impl RefUnwindSafe for EVMVersion
impl Send for EVMVersion
impl Sync for EVMVersion
impl Unpin for EVMVersion
impl UnsafeUnpin for EVMVersion
impl UnwindSafe for EVMVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<S, T> Upcast<T> for S
impl<S, T> Upcast<T> for S
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte