public async Task <Contract> GetContract(UInt160 contractHash) { var raw = await _rocksDbContext.Get(contractHash.BuildStateContractKey()); return(raw == null ? null : _binarySerializer.Deserialize <Contract>(raw)); }
public async Task DeleteContract(UInt160 contractHash) { await _redisDbContext.Delete(contractHash.BuildStateContractKey()); }
public async Task <Contract> GetContract(UInt160 contractHash) { var raw = await _redisDbJsonContext.Get(contractHash.BuildStateContractKey()); return(raw.IsNull ? null : _jsonConverter.DeserializeObject <Contract>(raw)); }