You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first dry run via RPC, then submit/create the extrinsic
this happens when the option skipDryRunning isn't true and the RPC call was successful
only dry run via RPC
this happens when the option skipDryRunning isn't true and the RPC call was a failure
only submit/create the extrinsic
this happens when the option skipDryRunning is `true.
The return type of these functions (ExecuteMessageResult for executeMessage and CreateExecuteMessageExtrinsicResult for createExecuteMessageExtrinsic) have an entry result which is defined to optional.
However, this value is always defined whenever skipDryRunning isn't true and is always undefined whenever skipDryRunning is true.
That means that whenever the caller does want to skip dry running, they can be ensured that result is defined. This is not reflected in the TypeScript typings. Right now they would either have to use the non-null assertion operator! or would need to add a code path for the option that result is undefined.
TODO
either separate the functions executeMessage and createExecuteMessageExtrinsic into two versions, where one skips dry running and the other doesn't and add the proper typings
or add type overloading declarations to the calls executeMessage and createExecuteMessageExtrinsic
The text was updated successfully, but these errors were encountered:
@pendulum-chain/product this is a low priority feature to improve the usability of our library api-solang that we use in wasm-deploy, the Portal and Vortex.
Since the addition of a "skip dry running feature" for message calls, every call to
executeMessage
orcreateExecuteMessageExtrinsic
can have one of three execution paths:skipDryRunning
isn'ttrue
and the RPC call was successfulskipDryRunning
isn'ttrue
and the RPC call was a failureskipDryRunning
is `true.The return type of these functions (
ExecuteMessageResult
forexecuteMessage
andCreateExecuteMessageExtrinsicResult
forcreateExecuteMessageExtrinsic
) have an entryresult
which is defined to optional.However, this value is always defined whenever
skipDryRunning
isn'ttrue
and is alwaysundefined
wheneverskipDryRunning
istrue
.That means that whenever the caller does want to skip dry running, they can be ensured that
result
is defined. This is not reflected in the TypeScript typings. Right now they would either have to use the non-null assertion operator!
or would need to add a code path for the option thatresult
is undefined.TODO
executeMessage
andcreateExecuteMessageExtrinsic
into two versions, where one skips dry running and the other doesn't and add the proper typingsexecuteMessage
andcreateExecuteMessageExtrinsic
The text was updated successfully, but these errors were encountered: