Bob Maucher
Bob Maucher

Reputation: 25

Automatic Transfer of Token in Solidity Contract

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

Upvotes: 0

Views: 2710

Answers (1)

clemage
clemage

Reputation: 36

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.

Upvotes: 2

Related Questions