-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
synchronize with AntShares 2.0.0-preview1
- Loading branch information
Erik Zhang
committed
Jun 2, 2017
1 parent
8e94227
commit f1e9c65
Showing
18 changed files
with
69 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
using AntShares.SmartContract.Framework.Services.AntShares; | ||
|
||
namespace AntShares.SmartContract.Framework | ||
namespace AntShares.SmartContract.Framework | ||
{ | ||
public class FunctionCode : Contract | ||
{ | ||
protected static Storage Storage { get; } = new Storage(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/AntShares.SmartContract.Framework/Services/AntShares/Contract.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace AntShares.SmartContract.Framework.Services.AntShares | ||
{ | ||
public class Contract | ||
{ | ||
public extern byte[] Script | ||
{ | ||
[Syscall("AntShares.Contract.GetScript")] | ||
get; | ||
} | ||
|
||
[Syscall("AntShares.Contract.Destroy")] | ||
public static extern void Destroy(); | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
src/AntShares.SmartContract.Framework/Services/AntShares/Enrollment.cs
This file was deleted.
Oops, something went wrong.
24 changes: 15 additions & 9 deletions
24
src/AntShares.SmartContract.Framework/Services/AntShares/Storage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
namespace AntShares.SmartContract.Framework.Services.AntShares | ||
{ | ||
public class Storage | ||
public static class Storage | ||
{ | ||
public static extern StorageContext CurrentContext | ||
{ | ||
[Syscall("AntShares.Storage.GetContext")] | ||
get; | ||
} | ||
|
||
[Syscall("AntShares.Storage.Get")] | ||
public extern byte[] Get(StorageContext context, byte[] key); | ||
public static extern byte[] Get(StorageContext context, byte[] key); | ||
|
||
[Syscall("AntShares.Storage.Get")] | ||
public extern byte[] Get(StorageContext context, string key); | ||
public static extern byte[] Get(StorageContext context, string key); | ||
|
||
[Syscall("AntShares.Storage.Put")] | ||
public extern void Put(StorageContext context, byte[] key, byte[] value); | ||
public static extern void Put(StorageContext context, byte[] key, byte[] value); | ||
|
||
[Syscall("AntShares.Storage.Put")] | ||
public extern void Put(StorageContext context, byte[] key, string value); | ||
public static extern void Put(StorageContext context, byte[] key, string value); | ||
|
||
[Syscall("AntShares.Storage.Put")] | ||
public extern void Put(StorageContext context, string key, byte[] value); | ||
public static extern void Put(StorageContext context, string key, byte[] value); | ||
|
||
[Syscall("AntShares.Storage.Put")] | ||
public extern void Put(StorageContext context, string key, string value); | ||
public static extern void Put(StorageContext context, string key, string value); | ||
|
||
[Syscall("AntShares.Storage.Delete")] | ||
public extern void Delete(StorageContext context, byte[] key); | ||
public static extern void Delete(StorageContext context, byte[] key); | ||
|
||
[Syscall("AntShares.Storage.Delete")] | ||
public extern void Delete(StorageContext context, string key); | ||
public static extern void Delete(StorageContext context, string key); | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
src/AntShares.SmartContract.Framework/Services/AntShares/StorageContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
using System; | ||
|
||
namespace AntShares.SmartContract.Framework.Services.AntShares | ||
namespace AntShares.SmartContract.Framework.Services.AntShares | ||
{ | ||
[Flags] | ||
public enum StorageContext : byte | ||
public class StorageContext | ||
{ | ||
Current = 1, | ||
CallingContract = 2, | ||
EntryContract = 4 | ||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
src/AntShares.SmartContract.Framework/Services/System/ExecutionEngine.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/AntShares.SmartContract.Installer/source.extension.vsixmanifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
src/AntShares.SmartContract.Template/AntShares.ILConvertPlugin.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="AntShares.SmartContract.Framework" version="1.6.1" targetFramework="net40" /> | ||
<package id="AntShares.SmartContract.Framework" version="2.0.0" targetFramework="net40" /> | ||
</packages> |