예제 #1
0
 public IEnumerable <Contract> FindExports(Type contractType)
 {
     if (Contracts.ContainsKey(contractType))
     {
         return(Contracts[contractType]);
     }
     else
     {
         return(Enumerable.Empty <Contract>());
     }
 }
예제 #2
0
        public bool TryResolveContractReference(string reference, out string address)
        {
            if (Contracts.ContainsKey(reference))
            {
                address = Contracts[reference].ContractAddress;
                return(true);
            }

            if (EthAddressParser.ValidateAddress(reference))
            {
                address = reference;
                return(true);
            }

            address = null;
            return(false);
        }