Skip to content
Thyme Docs

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.

TemplateWhat it doesScheduleCalls it may return
Balance top-upSends a fixed amount of a token to a wallet when its balance runs low.Intervaltransfer
Treasury sweepMoves everything above a floor from the Safe to a treasury address. Useful for collecting fees.Crontransfer
Monthly payoutPays a list of recipients once a month in one atomic batch.Crontransfer
Aave supplySupplies idle balance above a floor to an Aave V3 market.Cronapprove, supply
Uniswap V3 DCASwaps a fixed amount on a schedule through Uniswap V3 with a minimum output.Cronapprove, exactInputSingle

Use a template

thyme new top-up

Replace 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:

  1. Set RPC_URL and SIMULATE_ACCOUNT in .env, then run thyme run top-up and thyme run top-up --simulate. See local testing.
  2. Upload a release.
  3. Allow the declared targets and function selectors on your Safe profile. See profiles.
  4. 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 transfer returns false instead of reverting does not. See runtime limits.
  • A task that returns canExec: false sends nothing. Each template checks the Safe's balance first so that an underfunded run skips instead of reverting.