Task Templates
Each template is a complete task: the code, the local args.json, the permissions.json that declares the calls it may return, and a schedule to start from. They are starting points for you to read and change, not audited code.
| Template | What it does | Schedule | Calls it may return |
|---|---|---|---|
| Balance top-up | Sends a fixed amount of a token to a wallet when its balance runs low. | Interval | transfer |
| Treasury sweep | Moves everything above a floor from the Safe to a treasury address. Useful for collecting fees. | Cron | transfer |
| Monthly payout | Pays a list of recipients once a month in one atomic batch. | Cron | transfer |
| Aave supply | Supplies idle balance above a floor to an Aave V3 market. | Cron | approve, supply |
| Uniswap V3 DCA | Swaps a fixed amount on a schedule through Uniswap V3 with a minimum output. | Cron | approve, exactInputSingle |
Use a template
thyme new top-upReplace functions/top-up/index.ts with the template's task, then add the args.json and permissions.json from its page. Then follow the usual path:
- Set
RPC_URLandSIMULATE_ACCOUNTin.env, then runthyme run top-upandthyme run top-up --simulate. See local testing. - Upload a release.
- Allow the declared targets and function selectors on your Safe profile. See profiles.
- Create an executable with the schedule on the template's page, and use Execute now to confirm the first run.
What the role can and cannot limit
A Flow Safe role allows contracts and function selectors. In this release it does not restrict argument values, so a task allowed to call transfer or approve can choose the recipient, the spender and the amount. permissions.json has the same limit: it declares targets and selectors only.
An approval is not bounded by the Safe's balance, so it can expose funds deposited later, and it stays in place after the role is removed. Revoke it from the Safe by approving zero.
Treat the Safe as a funded account for the automation, not as your main treasury. Keep only the balance the task needs, and review the allowed selectors before you approve them. Profiles describes the exact scope.
Limits that apply to every template
- One executable runs on one chain, and calls are
{ to, data }with no native value. - A run has about 30 seconds and can return up to 32 calls, sent as one atomic batch. A call that reverts reverts the whole batch, but a token whose
transferreturnsfalseinstead of reverting does not. See runtime limits. - A task that returns
canExec: falsesends nothing. Each template checks the Safe's balance first so that an underfunded run skips instead of reverting.