In addition to current GetVar(varId) to get input context variable, it is worth to have GetVar(inputIndex, varId) variant for reading context variable from another input. This could be useful for sharing proofs and state ids across inputs.
I think new GetVar variant should be implemented as a method call (only), avoiding introducing new opcodes (so new Context.getInputVar[T](inputIndex: Short, varId: Byte) method.
In addition to current GetVar(varId) to get input context variable, it is worth to have GetVar(inputIndex, varId) variant for reading context variable from another input. This could be useful for sharing proofs and state ids across inputs.
I think new GetVar variant should be implemented as a method call (only), avoiding introducing new opcodes (so new
Context.getInputVar[T](inputIndex: Short, varId: Byte)
method.