Develop Custom Workflow
Automate future tasks including switching or splitting Turing Network staking delegations!
In case you missed it, StakeTUR, Nova Wallet, and SubWallet users are now automating web3 chores and boosting rewards by automatically staking spare $TUR. But Turing Network users have increasingly asked to automate other tasks as well-automating payments, splitting staking delegations, switching delegation to another collator, and delegating indefinitely.
Rather than enable each of these use cases independently, Ava Protocol is launching Dynamic Dispatch to:
-
Extend time-based automation to every extrinsic on Turing Network
-
Enable indefinitely recurring transactions
Javascript code snippets are now available in the OAK.js SDK repo to show developers how to build automation workflows using the new Dynamic Dispatch blockchain API.
Keep reading to learn how to use Dynamic Dispatch via Polkadot{.js} to switch collator delegations and indefinitely auto-compound with pay-as-you-go fees!
Switching Delegations with Dynamic Dispatch#
Switching collator delegations is one of many workflows that Dynamic Dispatch unlocks. The below example combines:
-
Call to schedule leaving the current delegation (initiate wait period)
-
Call to unbond from the current (prior) delegation (after wait period)
-
Call to delegate the new collator
Auto-compounding with Dynamic Dispatch#
Also new to Dynamic Dispatch is the ability to schedule indefinitely recurring tasks to eliminate the need for applications and users to define the set of times that a task will recur.
In this example, Dynamic Dispatch is used to create an indefinite "Recurring" delegation that begins at a fixed time (expressed as a UNIX timestamp) and recurs at a set frequency (expressed in seconds).
Note that automation fees for indefinitely recurring tasks are calculated (in $TUR) and debited from the user's account each time the task is triggered. Tasks scheduled for a finite number of occurrences still require up-front payment for automation fees.
Join the Ava Protocol community on Discord for more updates and to #brainstorm automation workflows!
About Ava Protocol#
Ava Protocol provides automation infrastructure that enables web3 applications to offer recurring payments, stable-cost-averaging, auto-compounding, and more. Ava Protocol's layer-one blockchain infrastructure is optimized for storing and triggering future transactions by using event-driven execution and cross-chain messaging.