コード例 #1
0
        public EthTLSService(IEthApiContractService ethApiContractService, string ensRegistryAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e")
        {
            if (string.IsNullOrEmpty(ensRegistryAddress))
            {
                throw new ArgumentException("ensRegistryAddress cannot be null", nameof(ensRegistryAddress));
            }
            _ethApiContractService = ethApiContractService;

            EnsRegistryAddress = ensRegistryAddress;
            _ensUtil           = new EnsUtil();
            TLS         = "eth";
            TLSNameHash = _ensUtil.GetNameHash(TLS).HexToByteArray();
        }
コード例 #2
0
ファイル: ENSService.cs プロジェクト: huyen-pk/Nethereum
        public async Task <string> ResolveAddressAsync(string fullName)
        {
            var fullNameNode    = _ensUtil.GetNameHash(fullName).HexToByteArray();
            var resolverService = await GetResolverAsync(fullNameNode).ConfigureAwait(false);

            return(await resolverService.AddrQueryAsync(fullNameNode).ConfigureAwait(false));
        }