pub struct foundryVersionCmpCall {
pub version: String,
}
Expand description
Compares the current Foundry version with the given version string.
The given version string must be in the format major.minor.patch
.
Returns: -1 if current Foundry version is less than the given version 0 if current Foundry version equals the given version 1 if current Foundry version is greater than the given version
This result can then be used with a comparison operator against 0
.
For example, to check if the current Foundry version is greater than or equal to 1.0.0
:
if (foundryVersionCmp("1.0.0") >= 0) { ... }
Function with signature foundryVersionCmp(string)
and selector 0xca7b0a09
.
function foundryVersionCmp(string calldata version) external view returns (int256);
Fields§
§version: String
Trait Implementations§
Source§impl CheatcodeDef for foundryVersionCmpCall
impl CheatcodeDef for foundryVersionCmpCall
Source§impl Clone for foundryVersionCmpCall
impl Clone for foundryVersionCmpCall
Source§fn clone(&self) -> foundryVersionCmpCall
fn clone(&self) -> foundryVersionCmpCall
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for foundryVersionCmpCall
impl Debug for foundryVersionCmpCall
Source§impl SolCall for foundryVersionCmpCall
impl SolCall for foundryVersionCmpCall
Source§type Parameters<'a> = (String,)
type Parameters<'a> = (String,)
Source§type Token<'a> = <<foundryVersionCmpCall as SolCall>::Parameters<'a> as SolType>::Token<'a>
type Token<'a> = <<foundryVersionCmpCall as SolCall>::Parameters<'a> as SolType>::Token<'a>
Source§type Return = foundryVersionCmpReturn
type Return = foundryVersionCmpReturn
Source§type ReturnTuple<'a> = (Int<256>,)
type ReturnTuple<'a> = (Int<256>,)
Source§type ReturnToken<'a> = <<foundryVersionCmpCall as SolCall>::ReturnTuple<'a> as SolType>::Token<'a>
type ReturnToken<'a> = <<foundryVersionCmpCall as SolCall>::ReturnTuple<'a> as SolType>::Token<'a>
Source§fn new<'a>(tuple: <Self::Parameters<'a> as SolType>::RustType) -> Self
fn new<'a>(tuple: <Self::Parameters<'a> as SolType>::RustType) -> Self
Source§fn abi_decode_returns(data: &[u8], validate: bool) -> Result<Self::Return>
fn abi_decode_returns(data: &[u8], validate: bool) -> Result<Self::Return>
§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
§fn abi_decode_raw(data: &[u8], validate: bool) -> Result<Self, Error>
fn abi_decode_raw(data: &[u8], validate: bool) -> Result<Self, Error>
§fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
§fn abi_encode_raw(&self, out: &mut Vec<u8>)
fn abi_encode_raw(&self, out: &mut Vec<u8>)
§fn abi_encode(&self) -> Vec<u8> ⓘ
fn abi_encode(&self) -> Vec<u8> ⓘ
Auto Trait Implementations§
impl Freeze for foundryVersionCmpCall
impl RefUnwindSafe for foundryVersionCmpCall
impl Send for foundryVersionCmpCall
impl Sync for foundryVersionCmpCall
impl Unpin for foundryVersionCmpCall
impl UnwindSafe for foundryVersionCmpCall
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,
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: 24 bytes