pub struct Source {
pub id: usize,
pub ast: Option<Value>,
}
Expand description
The solc --standard-json
output source.
Fields§
§id: usize
The source code ID.
ast: Option<Value>
The source code AST.
Implementations§
Source§impl Source
impl Source
Sourcepub fn check_ecrecover(ast: &Value) -> Option<SolcStandardJsonOutputError>
pub fn check_ecrecover(ast: &Value) -> Option<SolcStandardJsonOutputError>
Checks the AST node for the ecrecover
function usage.
Sourcepub fn check_send_and_transfer(
ast: &Value,
) -> Option<SolcStandardJsonOutputError>
pub fn check_send_and_transfer( ast: &Value, ) -> Option<SolcStandardJsonOutputError>
Checks the AST node for the <address payable>
’s send
and transfer
methods usage.
Sourcepub fn check_assembly_extcodesize(
ast: &Value,
) -> Option<SolcStandardJsonOutputError>
pub fn check_assembly_extcodesize( ast: &Value, ) -> Option<SolcStandardJsonOutputError>
Checks the AST node for the extcodesize
assembly instruction usage.
Sourcepub fn check_assembly_origin(ast: &Value) -> Option<SolcStandardJsonOutputError>
pub fn check_assembly_origin(ast: &Value) -> Option<SolcStandardJsonOutputError>
Checks the AST node for the origin
assembly instruction usage.
Sourcepub fn check_tx_origin(ast: &Value) -> Option<SolcStandardJsonOutputError>
pub fn check_tx_origin(ast: &Value) -> Option<SolcStandardJsonOutputError>
Checks the AST node for the tx.origin
value usage.
Sourcepub fn last_contract_name(&self) -> Result<String>
pub fn last_contract_name(&self) -> Result<String>
Returns the name of the last contract.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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