// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see .
use call_contract::CallContract;
use ethabi::Address;
use keccak_hash::keccak;
use types::ids::BlockId;
use_contract!(registrar, "res/registrar.json");
// Maps a domain name to an Ethereum address
const DNS_A_RECORD: &'static str = "A";
/// Registrar contract interface
pub trait RegistrarClient: CallContract + Send + Sync {
/// Get address of the registrar itself
fn registrar_address(&self) -> Option
;
/// Get address from registrar for the specified key.
fn get_address(&self, key: &str, block: BlockId) -> Result