pub fn encode_tx_data(&self, func: &str, params: Vec<ethabi::Token>) -> Vec<u8> {
        let f = self
            .contract()
            .function(func)
            .expect("failed to get function parameters");

        f.encode_input(&params)
            .expect("failed to encode parameters")
    }
Encodes a function using the `Self::contract()` ABI.

`params` are tokenized parameters of the function. Most of the time, you can use
[`Tokenize`][tokenize] trait to convert the parameters into tokens.

[tokenize]: https://docs.rs/web3/latest/web3/contract/tokens/trait.Tokenize.html
core/lib/eth_client/src/lib.rs