sendRawTransaction method
Send raw transaction Creates new message call transaction or a contract creation for signed transactions. Takes the signed transaction data. Returns the transaction hash, or the zero hash if the transaction is not yet available.
Implementation
Future<int> sendRawTransaction(BigInt signedTransaction) async {
if (signedTransaction == null) {
throw ArgumentError.notNull(
"Moac::sendRawTransaction - signedTransaction");
}
final String method = MoacRpcMethods.sendRawTransaction;
final dynamic params = [MoacUtilities.bigIntegerToHex(signedTransaction)];
final res = await rpcClient.request(method, params);
if (res != null && res.containsKey(moacResultKey)) {
return MoacUtilities.hexToInt(res[moacResultKey]);
}
_processError(method, res);
return null;
}