示例#1
0
        public static StorageData GetStorageAt(Address address, StorageKey key, Revision revision)
        {
            if (address == null)
            {
                throw ClientArgumentException.Exception("Address account is null");
            }
            if (key == null)
            {
                throw ClientArgumentException.Exception("key is null");
            }
            var currRevision = revision ?? Revision.BEST;
            var uriParams    = Parameters(new string[] { "address", "key" }, new string[] { address.ToHexString(Prefix.ZeroLowerX), key.HexKey() });
            var queryParams  = Parameters(new string[] { "revision" }, new string[] { currRevision.ToString() });

            return(SendGetRequest <StorageData>(Path.GetStorageValuePath, uriParams, queryParams));
        }