As per the subject, I get the sui_devInspectMoveCall
but what is the effect of setting execution_mode
to “DevInspect” in sui_moveCall
?
So in discord back and forth:
So, a bit confused:
-
sui_devInspectTransaction
→ so this can do some evaluation on non-entry functions -
sui_devInspectMoveCall
→ is only really good for entry functions, butsui_devInspectTransaction
works there as well. -
sui_moveCall
withexecution_mode
is questionable as to it’s usefulness? But…What was the intent?
The last point is being looked into
Can share a bit of an update on this that I heard back from the team. The way these are intended to be used is as follows:
- If you want to dev inspect any transaction, you need to use one of the pre-existing calls to create the transaction bytes, for
MoveCall
that issui_moveCall
, and you should set the execution mode toDevInspect
at this stage if that’s your intention – this is what opens up the ability to evaluate non-entry functions, etc. - Then these transaction bytes get sent to
sui_devInspectTransaction
, to get theDevInspectResult
. -
sui_devInspectMoveCall
is similar to running those two operations (sui_moveCall
+sui_devInspectTransaction
), but (a) its fused together into one RPC call, and (b) it allows running the transaction without supplying a gas object or budget.
So to estimate gas fees sui_devInspectMoveCall
is the most appropriate, but a follow-up I have with the team is essentially why move calls are special when it comes to supporting dev-inspect without supplying gas.
Thanks, this certainly makes sense to me now. I appreciate the run-down, as always!
One more update, based on this thread we decided to get rid of sui_devInspectMoveCall
and transfer its special powers over to sui_devInspectTransaction
.
We expect the change to land in v0.24.0, and it means that any transaction that you run with sui_devInspectTransaction
can be run without supplying a gas object or setting a budget, making it much more feasible to use this endpoint for gas estimation.
Relevant PR:
Curious: When will Publish, PaySui and PayAllSui be supported for inspection?
Thank you all