Skip to content

Commit

Permalink
Prepare for new SYSCALL
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Feb 3, 2020
1 parent 12f82ed commit 060d300
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Neo.SmartContract.Framework/Services/Neo/Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ public static class Blockchain
[Syscall("System.Blockchain.GetBlock")]
public static extern Block GetBlock(byte[] hash);

[Syscall("System.Blockchain.GetCurrentTransaction")]
public static extern Transaction GetCurrentTransaction();

[Syscall("System.Blockchain.GetTransaction")]
public static extern Transaction GetTransaction(byte[] hash = null);
public static extern Transaction GetTransaction(byte[] hash);

[Syscall("System.Blockchain.GetTransactionFromBlock")]
public static extern Transaction GetTransactionFromBlock(byte[] blockHash, int txIndex);
Expand Down
2 changes: 1 addition & 1 deletion templates/Template.NEP5.CSharp/NEP5.Crowdsale.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static bool Mint()
throw new Exception();

StorageMap balances = Storage.CurrentContext.CreateMap(GetStoragePrefixBalance());
Transaction tx = Blockchain.GetTransaction();
Transaction tx = Blockchain.GetCurrentTransaction();
var balance = balances.Get(tx.Sender).AsBigInteger();
balances.Put(tx.Sender, balance + contribution);
contract.Put("totalSupply", current_supply + contribution);
Expand Down

0 comments on commit 060d300

Please sign in to comment.