public async Task <Dictionary <string, Certificate> > GetCertificatesAsync(Attribute attribute) { Dictionary <string, Certificate> certs = new Dictionary <string, Certificate>(); AttributeService ethAttribute = new AttributeService(Web3, AccountService.PrivateKey, attribute.Address); //Getting the number of certificates in the attribute BigInteger certCount = await ethAttribute.CertificateCountAsyncCall(); //Getting each certificate and adding it to the returned dictionary for (BigInteger i = new BigInteger(0); i < certCount; i++) { string certKey = await ethAttribute.CertificateKeysAsyncCall(i); string certAddress = await ethAttribute.CertificatesAsyncCall(certKey); Certificate cert = await _certificateFacade.GetCertificateAsync(certAddress); certs.Add(certKey, cert); } return(certs); }