public static VMObject CallContext(this IRuntime runtime, string contextName, ContractMethod method, params object[] args)
        {
            runtime.Expect(method != null, "trying to call null method for context: " + contextName);

            NativeContractKind nativeKind;

            if (Enum.TryParse <NativeContractKind>(contextName, true, out nativeKind))
            {
                return(runtime.CallContext(contextName, 0, method.name, args));
            }

            runtime.Expect(method.offset >= 0, "invalid offset for method: " + method.name);
            return(runtime.CallContext(contextName, (uint)method.offset, method.name, args));
        }
        public static VMObject CallNFT(this IRuntime runtime, string symbol, BigInteger seriesID, ContractMethod method, params object[] args)
        {
            //var series = Nexus.GetTokenSeries(this.RootStorage, symbol, seriesID);
            var contextName = $"{symbol}#{seriesID}";

            return(runtime.CallContext(contextName, (uint)method.offset, method.name, args));
        }
 public static VMObject CallNativeContext(this IRuntime runtime, NativeContractKind nativeContract, string methodName, params object[] args)
 {
     return(runtime.CallContext(nativeContract.GetContractName(), 0, methodName, args));
 }