6

怎样使用web3.js实现erc20代币自动转账? | 登链社区 | 技术问答

 2 years ago
source link: https://learnblockchain.cn/question/2874
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

怎样使用web3.js实现erc20代币自动转账? | 登链社区 | 技术问答

5 怎样使用web3.js实现erc20代币自动转账?

回答问题即可获得 5 贡献值,回答被采纳后即可获得 10 学分。

我的以太坊地址为Address,私钥为Private,该地址的以太坊余额balance为零,该地址拥有erc20代币U。我要实现的功能是:
1.实时监听该地址的eth转入交易;
2.一旦有eth转入,即以太坊余额balance由零变为非零,立刻自动转出erc20代币U到某地址。
请问实现该需求的简易代码段或者逻辑是什么?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK