Struct ethane_abi::Abi [−][src]
Expand description
Parses a .json
file containing ABI encoded Solidity functions.
It stores the functions in a HashMap
with the function name being the key
and the parsed function the value.
Fields
functions: HashMap<String, Function>
Implementations
impl Abi
[src]
impl Abi
[src]pub fn parse_json(&mut self, abi: Value) -> Result<(), AbiParserError>
[src]
pub fn parse_json(&mut self, abi: Value) -> Result<(), AbiParserError>
[src]Parses an ABI value into the Abi
instance.
pub fn parse_file(&mut self, path_to_abi: &Path) -> Result<(), AbiParserError>
[src]
pub fn parse_file(&mut self, path_to_abi: &Path) -> Result<(), AbiParserError>
[src]Parses an ABI .json
file into the Abi
instance.
pub fn get_state_mutability(
&self,
function_name: &str
) -> Option<StateMutability>
[src]
&self,
function_name: &str
) -> Option<StateMutability>
pub fn encode(
&self,
function_name: &str,
parameters: Vec<Parameter>
) -> Result<Vec<u8>, AbiParserError>
[src]
pub fn encode(
&self,
function_name: &str,
parameters: Vec<Parameter>
) -> Result<Vec<u8>, AbiParserError>
[src]Encodes a function call according to Solidity’s contract ABI specification.
If the given function is found in the parsed ABI file, the function
encodes the function signature and the input data provided in the form
of a Parameter
vector.