Skip to content

Commit

Permalink
Exposing supported methods used by InteropService (neo-project#1060)
Browse files Browse the repository at this point in the history
* Supported methods names

* dotnet format

* Simplify
  • Loading branch information
lock9 authored and Tommo-L committed Jun 22, 2020
1 parent cf75178 commit 16e4178
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions neo/SmartContract/InteropService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public static long GetPrice(uint hash, RandomAccessStack<StackItem> stack)
return methods[hash].GetPrice(stack);
}

public static Dictionary<uint, string> SupportedMethods()
{
return methods.ToDictionary(p => p.Key, p => p.Value.Method);
}

private static long GetStoragePrice(RandomAccessStack<StackItem> stack)
{
return (stack.Peek(1).GetByteLength() + stack.Peek(2).GetByteLength()) * GasPerByte;
Expand Down

0 comments on commit 16e4178

Please sign in to comment.