pub struct Artifacts { /* private fields */ }Expand description
A source of compiled contract artifacts.
Implementations§
Source§impl Artifacts
impl Artifacts
Sourcepub const fn embedded() -> Self
pub const fn embedded() -> Self
The artifacts vendored into the crate. The default, filesystem-free path.
Sourcepub fn from_dir(dir: impl Into<PathBuf>) -> Self
pub fn from_dir(dir: impl Into<PathBuf>) -> Self
Artifacts read from a directory laid out as <File>.sol/<Name>.json
(a forge out/ directory qualifies).
Sourcepub fn raw(&self, file: &str, contract: &str) -> Result<Value>
pub fn raw(&self, file: &str, contract: &str) -> Result<Value>
The raw artifact JSON for out/<file>.sol/<contract>.json.
Sourcepub fn bytecode(&self, contract: &str) -> Result<Bytes>
pub fn bytecode(&self, contract: &str) -> Result<Bytes>
Creation bytecode of a contract whose .sol file name matches the
contract name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Artifacts
impl RefUnwindSafe for Artifacts
impl Send for Artifacts
impl Sync for Artifacts
impl Unpin for Artifacts
impl UnsafeUnpin for Artifacts
impl UnwindSafe for Artifacts
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
Converts
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> ⓘ
Converts
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 more