Skip to content

Commit

Permalink
Change callFlags (#2653)
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Jan 25, 2022
1 parent 6b0b7e8 commit abd53e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/neo/SmartContract/Native/ContractManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ public IEnumerable<ContractState> ListContracts(DataCache snapshot)
return snapshot.Find(listContractsPrefix).Select(kvp => kvp.Value.GetInteroperable<ContractState>());
}

[ContractMethod(RequiredCallFlags = CallFlags.States | CallFlags.AllowNotify)]
[ContractMethod(RequiredCallFlags = CallFlags.All)]
private ContractTask<ContractState> Deploy(ApplicationEngine engine, byte[] nefFile, byte[] manifest)
{
return Deploy(engine, nefFile, manifest, StackItem.Null);
}

[ContractMethod(RequiredCallFlags = CallFlags.States | CallFlags.AllowNotify)]
[ContractMethod(RequiredCallFlags = CallFlags.All)]
private async ContractTask<ContractState> Deploy(ApplicationEngine engine, byte[] nefFile, byte[] manifest, StackItem data)
{
if (engine.ScriptContainer is not Transaction tx)
Expand Down Expand Up @@ -200,13 +200,13 @@ private async ContractTask<ContractState> Deploy(ApplicationEngine engine, byte[
return contract;
}

[ContractMethod(RequiredCallFlags = CallFlags.States | CallFlags.AllowNotify)]
[ContractMethod(RequiredCallFlags = CallFlags.All)]
private ContractTask Update(ApplicationEngine engine, byte[] nefFile, byte[] manifest)
{
return Update(engine, nefFile, manifest, StackItem.Null);
}

[ContractMethod(RequiredCallFlags = CallFlags.States | CallFlags.AllowNotify)]
[ContractMethod(RequiredCallFlags = CallFlags.All)]
private ContractTask Update(ApplicationEngine engine, byte[] nefFile, byte[] manifest, StackItem data)
{
if (nefFile is null && manifest is null) throw new ArgumentException();
Expand Down

0 comments on commit abd53e8

Please sign in to comment.