resolveENSName method
override
Resolves an ENS name to its corresponding Ethereum address.
Given the name
, this method returns an ENSResponse
containing
information about the Ethereum address associated with the ENS name.
Implementation
@override
Future<ENSResponse> resolveENSName(String name, {BlockNum? toBlock}) async {
return ENSResponse.fromJson(await _restClient
.get<Map<String, dynamic>>('/ens/records', queryParameters: {
'domain': name,
'chain_id': 1,
if (toBlock != null) 'to_block': toBlock.toBlockParam()
}));
}