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); }
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); }
static TestEngine() { // Extract Native deploy syscall Native_Deploy = Neo_Native_Deploy; }