Automatic fee tax distribution

Hi guys

I am new to solidity and I am largely learning it myself.

I have created a contract that takes a 10% on swaps in fees/taxes. To distribute to set wallets like marketing (common wallets most projects use etc), I call a distribute function in the contract, so its manual.

What I am wondering is whether this distribution/call can be automated without a backend in any way? I would be very very grateful for a reply, i'm sure this is a stupid question for most of you.

You have multiple choices:

  1. call it inside another function that get called frequently
  2. use a script to trigger that function based on an interval or an event.
1 Like