예제 #1
0
        public async Task <Contract> GetContract(UInt160 contractHash)
        {
            var raw = await _rocksDbContext.Get(contractHash.BuildStateContractKey());

            return(raw == null
                ? null
                : _binarySerializer.Deserialize <Contract>(raw));
        }
예제 #2
0
 public async Task DeleteContract(UInt160 contractHash)
 {
     await _redisDbContext.Delete(contractHash.BuildStateContractKey());
 }
예제 #3
0
        public async Task <Contract> GetContract(UInt160 contractHash)
        {
            var raw = await _redisDbJsonContext.Get(contractHash.BuildStateContractKey());

            return(raw.IsNull ? null : _jsonConverter.DeserializeObject <Contract>(raw));
        }