macro_rules! impl_function_type {
    ( $name:ident, "non_payable_write" $(, gas: $gas:expr)? ) => { ... };
    ( $name:ident, "payable_write" $(, gas: $gas:expr)? ) => { ... };
    ( $name:ident, "query" $(, gas: $gas:expr)? ) => { ... };
    ( @inner, $name:ident, $payable:expr, $has_write_op:expr $(, $gas:expr)? ) => { ... };
    ( $name:ident, "query_with_default_gas" ) => { ... };
}