예제 #1
0
 public SyscallCallback(uint method, bool check = true)
 {
     this.Method = ApplicationEngine.Services[method];
     if (check && !Method.AllowCallback)
     {
         throw new InvalidOperationException("This SYSCALL is not allowed for creating callback.");
     }
 }
        static TestEngine()
        {
            // Extract Native deploy syscall

            Native_Deploy = (InteropDescriptor)typeof(InteropService)
                            .GetNestedType("Native", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static)
                            .GetField("Deploy")
                            .GetValue(null);
        }
예제 #3
0
        public void TestGetMethod()
        {
            string            method          = @"System.ExecutionEngine.GetScriptContainer";
            long              price           = 0_00000250;
            TriggerType       allowedTriggers = TriggerType.All;
            InteropDescriptor descriptor      = new InteropDescriptor(method, TestHandler, price, allowedTriggers);

            descriptor.Method.Should().Be(method);
            descriptor.Price.Should().Be(price);
        }
예제 #4
0
        static TestEngine()
        {
            // Extract Native deploy syscall

            Native_Deploy = Neo_Native_Deploy;
        }