sendTransaction method

Future<String> sendTransaction(
  1. Credentials cred,
  2. Transaction transaction, {
  3. required int networkId,
})

Signs the given transaction using the keys supplied in the cred object to upload it to the client so that it can be executed.

Returns a hash of the transaction which, after the transaction has been included in a mined block, can be used to obtain detailed information about the transaction.

Implementation

Future<String> sendTransaction(
  Credentials cred,
  Transaction transaction, {
  required int networkId,
}) async {
  final signed = await signTransaction(
    cred,
    transaction,
    networkId: networkId,
  );

  return sendRawTransaction(signed);
}