Skip to content

Commit

Permalink
add more overloads to storage api (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
lightszero authored and Erik Zhang committed May 13, 2017
1 parent a11a801 commit a39bf83
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions src/AntShares.SmartContract.Framework/Services/AntShares/Storage.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
namespace AntShares.SmartContract.Framework.Services.AntShares
{
public class Storage
{
[Syscall("AntShares.Storage.Get")]
public extern byte[] Get(StorageContext context, byte[] key);

[Syscall("AntShares.Storage.Put")]
public extern void Put(StorageContext context, byte[] key, byte[] value);

[Syscall("AntShares.Storage.Delete")]
public extern void Delete(StorageContext context, byte[] key);
}
}
namespace AntShares.SmartContract.Framework.Services.AntShares
{
public class Storage
{
[Syscall("AntShares.Storage.Get")]
public extern byte[] Get(StorageContext context, byte[] key);

[Syscall("AntShares.Storage.Get")]
public extern byte[] Get(StorageContext context, string key);

[Syscall("AntShares.Storage.Put")]
public extern void Put(StorageContext context, byte[] key, byte[] value);

[Syscall("AntShares.Storage.Put")]
public extern void Put(StorageContext context, byte[] key, string value);

[Syscall("AntShares.Storage.Put")]
public extern void Put(StorageContext context, string key, byte[] value);

[Syscall("AntShares.Storage.Put")]
public extern void Put(StorageContext context, string key, string value);

[Syscall("AntShares.Storage.Delete")]
public extern void Delete(StorageContext context, byte[] key);

[Syscall("AntShares.Storage.Delete")]
public extern void Delete(StorageContext context, string key);
}
}

0 comments on commit a39bf83

Please sign in to comment.