public async Task InImmediateCall() { // Update our values 7 times. for (int i = 0; i < 7; i++) { await _contract.updateStateValues(); } // Throw an exception in a function call (so we can simply check locals on latest execution point, since we have no front end/UI to choose an execution point at the time of writing this). await _contract.throwWithLocals(778899, 100).ExpectRevertTransaction(); // TODO: Verify variables. Assert.Inconclusive(); }
public async Task InImmediateCall() { // Update our values 7 times. for (int i = 0; i < 7; i++) { await _contract.updateStateValues(); } // Throw an exception in a function call (so we can simply check locals on latest execution point). await _contract.throwWithLocals(778899, 100).ExpectRevertTransaction(); // Obtain an execution trace and parse locals from the last point in it (where the exception occurred). var executionTrace = await RpcClient.GetExecutionTrace(); ExecutionTraceAnalysis traceAnalysis = new ExecutionTraceAnalysis(executionTrace); // Obtain our local/state variables. var localVariables = traceAnalysis.GetLocalVariables(RpcClient); var stateVariables = traceAnalysis.GetStateVariables(RpcClient); // TODO: Verify variables. Assert.Inconclusive(); }