It is currently a bit unpractical to supply a constant max_units because some programs called externally may use more than others, and if we offload this to the parameters of the function then it adds more complexity. It would be nice to be able to pass an option to the current max_units field of the ExternalCallContext and in the case of this value being None, any unit that has not been spent would be refunded to the current context.
It is currently a bit unpractical to supply a constant
max_units
because some programs called externally may use more than others, and if we offload this to the parameters of the function then it adds more complexity. It would be nice to be able to pass an option to the currentmax_units
field of theExternalCallContext
and in the case of this value beingNone
, any unit that has not been spent would be refunded to the current context.