RClause constructor
RClause(})
Implementation
RClause(String to,
{this.contract,
this.functionName,
List? functionParameters,
BigInt? value}) {
value ??= BigInt.zero;
isCall = contract != null && functionName != null;
if (isCall) {
var f = contract!.getFunctionByName(functionName!);
var data = f.encode(functionParameters!);
clause = {
"to": to,
"value": value.toString(),
"data": "0x" + bytesToHex(data)
};
} else {
clause = {"to": to, "value": value.toString(), "data": "0x"};
}
}