0
votes

I'm brand new to Solidity, and I completed a tutorial to create my own token.

Is there a way to automatically transfer my tokens to specified addresses at some time interval? In other words...

What code should I add to the contract that will transfer 100 tokens to wallet address 0x... once a day forever into the future?

I used the code at the Ethereum Foundation's website: https://www.ethereum.org/greeter

1
Here's the correct link to the code I used: linkBob Maucher

1 Answers

2
votes

Smart contracts need to be called, they can't start a transaction by themselves.

You can add a function that can be called once a day giving 100 tokens to a wallet. (Use "now" to get the timestamp and verify it hasn't been called today) But you will need to make a transaction calling this function each day.