From e2595e0d2c4743b7a0b393314807a7e72387e62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=BF=97=E5=90=8C?= Date: Tue, 17 Mar 2020 10:30:26 +0800 Subject: [PATCH 1/2] Add Features in Template.CSharp project. (#204) --- templates/Template.CSharp/Contract1.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/Template.CSharp/Contract1.cs b/templates/Template.CSharp/Contract1.cs index cf0993c7f..28c95c237 100644 --- a/templates/Template.CSharp/Contract1.cs +++ b/templates/Template.CSharp/Contract1.cs @@ -5,7 +5,8 @@ namespace $safeprojectname$ { - public class Contract1 : SmartContract + [Features(ContractFeatures.HasStorage)] + public class Contract1 : SmartContract { public static bool Main(string operation, object[] args) { From 13c2b924e46d4a0da0bd23619e2f31c4133639f1 Mon Sep 17 00:00:00 2001 From: Shargon Date: Tue, 17 Mar 2020 03:43:19 +0100 Subject: [PATCH 2/2] Update nugets (#206) Co-authored-by: lights li --- src/Neo.Compiler.MSIL/Neo.Compiler.MSIL.csproj | 4 ++-- tests/Neo.Compiler.MSIL.UnitTests/Utils/TestSnapshot.cs | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Neo.Compiler.MSIL/Neo.Compiler.MSIL.csproj b/src/Neo.Compiler.MSIL/Neo.Compiler.MSIL.csproj index b82d564bb..02523cdfc 100644 --- a/src/Neo.Compiler.MSIL/Neo.Compiler.MSIL.csproj +++ b/src/Neo.Compiler.MSIL/Neo.Compiler.MSIL.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/tests/Neo.Compiler.MSIL.UnitTests/Utils/TestSnapshot.cs b/tests/Neo.Compiler.MSIL.UnitTests/Utils/TestSnapshot.cs index 852c517e6..5953b9a8d 100644 --- a/tests/Neo.Compiler.MSIL.UnitTests/Utils/TestSnapshot.cs +++ b/tests/Neo.Compiler.MSIL.UnitTests/Utils/TestSnapshot.cs @@ -15,6 +15,7 @@ public class TestSnapshot : StoreView private DataCache, HeaderHashList> _HeaderHashList = new TestDataCache, HeaderHashList>(); private MetaDataCache _BlockHashIndex = new TestMetaDataCache(); private MetaDataCache _HeaderHashIndex = new TestMetaDataCache(); + private MetaDataCache _ContractId = new TestMetaDataCache(); public override DataCache Blocks => _Blocks; @@ -24,6 +25,8 @@ public class TestSnapshot : StoreView public override DataCache Storages => _Storages; + public override MetaDataCache ContractId => _ContractId; + public override DataCache, HeaderHashList> HeaderHashList => _HeaderHashList; public override MetaDataCache BlockHashIndex => _BlockHashIndex;