getNonce method Null safety

Future<int> getNonce(
  1. String accountId,
  2. String contractId
)

Helper method to get the nonce for a given accountId for the contract specified by the contractId. Used for contract auth.

Implementation

Future<int> getNonce(String accountId, String contractId) async {
  Address address = Address.forAccountId(accountId);
  return getNonceForAddress(address, contractId);
}