From 16e41783c02b8cd1b0db8fe4cb5f860032fe090f Mon Sep 17 00:00:00 2001 From: Ricardo Prado <38396062+lock9@users.noreply.github.com> Date: Tue, 27 Aug 2019 04:58:24 -0300 Subject: [PATCH] Exposing supported methods used by InteropService (#1060) * Supported methods names * dotnet format * Simplify --- neo/SmartContract/InteropService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neo/SmartContract/InteropService.cs b/neo/SmartContract/InteropService.cs index b4121d7a24..8651dfbc3d 100644 --- a/neo/SmartContract/InteropService.cs +++ b/neo/SmartContract/InteropService.cs @@ -77,6 +77,11 @@ public static long GetPrice(uint hash, RandomAccessStack stack) return methods[hash].GetPrice(stack); } + public static Dictionary SupportedMethods() + { + return methods.ToDictionary(p => p.Key, p => p.Value.Method); + } + private static long GetStoragePrice(RandomAccessStack stack) { return (stack.Peek(1).GetByteLength() + stack.Peek(2).GetByteLength()) * GasPerByte;