简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM