transferOwnership method

Future<String> transferOwnership(
  1. EthereumAddress newOwner
)

transferOwnership - Transaction function

Implementation

Future<String> transferOwnership(EthereumAddress newOwner) async {
  if (credentials == null) {
    throw Exception('Credentials required for write operations');
  }

  final function = contract.function('transferOwnership');
  final transaction = Transaction.callContract(
    contract: contract,
    function: function,
    parameters: [newOwner],
  );

  final txHash = await client.sendTransaction(credentials!, transaction, chainId: chainId);
  return txHash;
}