getContractEncodedDataBytes method
Implementation
Uint8List getContractEncodedDataBytes({
required String contractAbi,
required String functionName,
required List<dynamic> args,
BigInt? gasPrice,
BigInt? gasLimit,
}) {
var contractToInteract = DeployedContract(
ContractAbi.fromJson(contractAbi, randomAddress),
EthereumAddress.fromHex(randomAddress));
var func = contractToInteract.function(functionName);
var encodedData = func.encodeCall(args);
return encodedData;
}