Cheers, does anybody here have experience with using etherjs in flutter? I am trying to call the estimateGas function (https://github.com/ethers-io/ethers.js/blob/efeeda5e5c3b22f0c211783a635941dc8035ae25/docs/v5/api/contract/example/README.md) on my contracts transfer method. But no matter which way I try it, I always get the back the response that my contract (simple ERC20) does not have such a function. My last try was:
Definition:
@JS("estimateGas.transfer")
external Future estimateGas(String target, String amount);
Usage:
final gas = await promiseToFuture(
contract.estimateGas(params.to, params.value));
Usage:
final gas = await promiseToFuture(
contract.estimateGas(params.to, params.value));
Apr 4, 2021, 7:56 AM