检测代币何时在交易所(或像煎饼交换这样的交换交易所)被购买/出售?

发布于 2025-01-14 05:00:49 字数 307 浏览 3 评论 0原文

是否可以通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流年里的时光 2025-01-21 05:00:50

只需监听 Transfer 事件并过滤交易所的地址即可。

Just listen to the Transfer event and filter the address of the exchanges.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文