macro_rules! make_solidity_function {
    ( $(#[$attr:meta])* $visibility:vis struct $name:ident ($input:ty, $interface:expr ); ) => { ... };
    ( $(#[$attr:meta])* $visibility:vis struct $name:ident ($input:ty, $interface:expr, $output:ty ); ) => { ... };
}
Expand description

Make a solidity interface function, it requires three parameters

  1. The type of input parameters.
  2. The string to compute interface signature.
  3. The type of output parameters.

For example, in order to make a function with interface get_whitelist(address user, address contract) public returns bool, you should use

use cfx_executor::{make_solidity_function, internal_contract::InterfaceTrait};
use cfx_types::{Address,U256};
use sha3_macro::keccak;

make_solidity_function!{
    struct WhateverStructName((Address, Address), "get_whitelist(address,address)", bool);
}

If the function has no return value, the third parameter can be omitted.