ethCall method

Future<String> ethCall({
  1. dynamic fromAddress,
  2. required String toAddress,
  3. required String data,
  4. BlockNum? atBlock,
})

调用合约:

Implementation

Future<String> ethCall({
  fromAddress, // 允许空
  required String toAddress, // 合约地址
  required String data, // 数据
  BlockNum? atBlock, // 允许空
}) async {
  return sdkWeb3.callRaw(
    sender: (fromAddress != null ? EthereumAddress.fromHex(fromAddress) : null),
    contract: EthereumAddress.fromHex(toAddress),
    data: hexToBytes(data),
    atBlock: atBlock,
  );
}