简体   繁体   English

固体合同中的代币自动转移

[英]Automatic Transfer of Token in Solidity Contract

I'm brand new to Solidity, and I completed a tutorial to create my own token. 我是Solidity的新手,并且完成了创建自己的令牌的教程。

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? 我应该在合同中添加什么代码,该代码将永远每天一次将100个令牌转移到钱包地址0x ...?

I used the code at the Ethereum Foundation's website: https://www.ethereum.org/greeter 我在以太坊基金会的网站上使用了代码: 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. 您可以添加一个每天调用一次的功能,向钱包提供100个令牌。 (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. (使用“现在”获取时间戳并确认今天尚未调用该时间戳),但是您将需要进行每天调用此函数的事务。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试编译 Solidity 令牌合约但不断收到编译错误 - Trying to compile solidity token contract but keep getting compile error Solidity 0.5.1,创建合约object时,为什么我们必须将令牌传递给该合约的构造函数,即使没有构造函数 - Solidity 0.5.1, when creating a contract object, why do we have to pass the token to that contract's constructor even if there is no constructor 如何通过 solidity 回退 function 获取发送到智能合约的代币数量 - How to get the amount of token sent to a smart contract via the fallback function in solidity 如何在 Solidity 智能合约中启用 Claim Tokens? - How to enable Claim Tokens in Solidity Smart Contract? 有没有办法在 Solidity 的转移函数中检查买卖? - Is there a way to check sells and buys in transfer function on Solidity? 如何在Zeppelin Solidity中将标准令牌与众筹链接 - How to link Standard Token with crowdsale in Zeppelin Solidity EOS自定义令牌转移? - EOS custom token transfer? Solidity 库 openzeppelin-solidity/contracts/utils/Context.sol:15:1: ParserError: Expected pragma, abstract contract Context { ^------^ - Solidity library openzeppelin-solidity/contracts/utils/Context.sol:15:1: ParserError: Expected pragma, abstract contract Context { ^------^ 获取给定 NFT 合约的当前代币所有者 - Get Current Token Owner for a given NFT Contract 我需要帮助来建立具有5.0版或更高版本的ERC-721合同 - I need help to build ERC-721 contract with solidity version 5.0 or higher
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM