繁体   English   中英

web3py python 获取确切价值交换令牌

[英]web3py python get exact value swap tokens

I'm using web3py to swap tokens, using the " swapExactETHForTokens " function, it's working perfectly, with the return hash I use the " web3.eth.get_transaction_receipt " function to get the transaction details, but I couldn't find how get the进入我钱包的确切数量的代币。

我发现这个其他主题回答了同样的问题,但我不明白答案,或者我对 web3py 太陌生了。

我真正想要的是获得交换中获得的令牌的最终值,如下图所示

在此处输入图像描述

我不知道我是否以错误的方式寻找这些信息,但我没有在 web3py 上找到任何关于该主题的其他材料。

您可以使用交易中的事件日志,从中您应该能够计算出被转移的 Bomber Coins 的数量。

暂无
暂无

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

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