Dispatch a fallback call in the event the main call fails to execute.
May be called from any origin except None.
This function first attempts to dispatch the main call.
If the main call fails, the fallback is attemted.
if the fallback is successfully dispatched, the weights of both calls
are accumulated and an event containing the main call error is deposited.
In the event of a fallback failure the whole call fails
with the weights returned.
main: The main call to be dispatched. This is the primary action to execute.
fallback: The fallback call to be dispatched in case the main call fails.
Dispatch Logic
If the origin is root, both the main and fallback calls are executed without
applying any origin filters.
If the origin is not root, the origin filter is applied to both the main and
fallback calls.
Use Case
Some use cases might involve submitting a batch type call in either main, fallback
or both.
Dispatch a fallback call in the event the main call fails to execute. May be called from any origin except
None
.This function first attempts to dispatch the
main
call. If themain
call fails, thefallback
is attemted. if the fallback is successfully dispatched, the weights of both calls are accumulated and an event containing the main call error is deposited.In the event of a fallback failure the whole call fails with the weights returned.
main
: The main call to be dispatched. This is the primary action to execute.fallback
: The fallback call to be dispatched in case themain
call fails.Dispatch Logic
root
, both the main and fallback calls are executed without applying any origin filters.root
, the origin filter is applied to both themain
andfallback
calls.Use Case
batch
type call in either main, fallback or both.