FLEXX

GUIDES

Recurring payments

Set up a payment once, and it runs on schedule while the money stays in your wallet.

pay mihir 10 usdc every friday for 8 weeks
stop paying mihir

How it works

You approve one MetaMask permission for the plan. It's capped at each run's total and expires after the last run. Then you register the plan from your wallet. A Chainlink CRE workflow pays each run when it's due, through your own IntentExecutorV4 contract, which can only pay the recipients and schedule you registered.

Saying stop paying mihir cancels the plan and revokes the permission. A run that misses its window is skipped, not paid late.

What you need

  • Foundry
  • The CRE CLI, logged in with cre login
  • A test-only key in CRE_ETH_PRIVATE_KEY, funded with test ETH on all three chains. Never use a real wallet's key here.
  • FLEX_SOCKS_PROXY=direct, because the local CRE runner can't go through Tor

Set it up once

cd ~/.flex/current
forge build --root wallet/contracts
npm run testnet:onboard

Open http://127.0.0.1:8792 in the browser where MetaMask lives and deploy your executor. Then set FLEX_CRE_MODE=broadcast in .env, and flexx starts the recurring runner along with everything else.

Use FLEX_CRE_MODE=dry-run to check your schedules without sending anything. The runner only works while flexx is open.