Exemplo n.º 1
0
        private static ExecutionState Nexus_CreateOrganization(RuntimeVM vm)
        {
            vm.ExpectStackSize(4);

            var source = vm.PopAddress();
            var ID     = vm.PopString("id");
            var name   = vm.PopString("name");
            var script = vm.PopBytes("script");

            vm.CreateOrganization(source, ID, name, script);

            return(ExecutionState.Running);
        }
Exemplo n.º 2
0
        private static ExecutionState Runtime_CreateOrganization(RuntimeVM Runtime)
        {
            ExpectStackSize(Runtime, 4);

            VMObject temp;

            var source = PopAddress(Runtime);

            temp = Runtime.Stack.Pop();
            Runtime.Expect(temp.Type == VMType.String, "expected string for ID");
            var ID = temp.AsString();

            temp = Runtime.Stack.Pop();
            Runtime.Expect(temp.Type == VMType.String, "expected string for name");
            var name = temp.AsString();

            temp = Runtime.Stack.Pop();
            Runtime.Expect(temp.Type == VMType.Bytes, "expected bytes for script");
            var script = temp.AsByteArray();

            Runtime.CreateOrganization(source, ID, name, script);

            return(ExecutionState.Running);
        }