Ejemplo n.º 1
0
 public static ExecutionStatus FromSystemContractCall(
     SystemContractCall systemContractCall,
     InvocationContext context,
     byte[] input,
     out SystemContractExecutionFrame frame,
     ulong gasLimit
     )
 {
     frame = new SystemContractExecutionFrame(systemContractCall, context, input, gasLimit);
     return(ExecutionStatus.Ok);
 }
 public SystemContractExecutionFrame(
     SystemContractCall call, InvocationContext context, byte[] input, ulong gasLimit
     )
 {
     _call                = call;
     GasLimit             = gasLimit;
     _gasRemaining        = gasLimit;
     Input                = input;
     InvocationContext    = context;
     CurrentAddress       = call.GetAddress();
     ReturnValue          = System.Array.Empty <byte>();
     LastChildReturnValue = System.Array.Empty <byte>();
 }
Ejemplo n.º 3
0
        public static InvocationResult InvokeSystemContract(
            SystemContractCall systemContractCall, InvocationContext context, byte[] input, ulong gasLimit
            )
        {
            var status = FrameFactory.FromSystemContractCall(
                systemContractCall,
                context,
                input,
                out var rootFrame,
                gasLimit
                );

            return(status == ExecutionStatus.Ok ? ExecuteFrame(rootFrame) : InvocationResult.WithStatus(status));
        }