检测代币何时在交易所(或像煎饼交换这样的交换交易所)被购买/出售?
是否可以通过 Solidity
中的 ERC-20
代币检测代币是否被出售
或购买
交易所还是像 pancakeswap 这样的 swap-token-exchange
?
Solidity
中有这样的方法吗?我想让这个买/卖
操作触发代币
合约中的一些其他方法...
用户之间的常规钱包到钱包
交易不应被视为买入/卖出
Is it possible to detect through an ERC-20
token in Solidity
if the token is being sold
or bought
from an exchange or a swap-token-exchange
like pancakeswap
?
Is there a method for this in Solidity
? I want to have this buy/sell
action trigger some other methods in the token
contract...
Regular wallet-to-wallet
transactions between users should not be picked up as buy/sell
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需监听
Transfer
事件并过滤交易所的地址即可。Just listen to the
Transfer
event and filter the address of the exchanges.