getChainId method

Future<int> getChainId()

Retrieves the chain ID of the current Aptos network.

Implementation

Future<int> getChainId() async {
  final r = await provider.request(AptosRequestGetLedgerInfo());
  return r.chainId;
}