web3py中的验证
uniswap_v3_quoter_contract.functions.quoteExactInputSingle(wbtc_token, weth_token, web3.toWei(0.01, 'ether'), 3000, 0).call()
提出错误
ValidationError:
Could not identify the intended function with name `quoteExactInputSingle`, positional argument(s) of type `(<class 'str'>, <class 'str'>, <class 'int'>, <class 'int'>, <class 'int'>)` and keyword argument(s) of type `{}`.
Found 1 function(s) with the name `quoteExactInputSingle`: ['quoteExactInputSingle(address,address,uint24,uint256,uint160)']
Function invocation failed due to no matching argument types.
我尝试了很多次,但行不通
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您有错误,因为您提交字符串而不是地址格式。
如果您正在使用web3 python()可以使用is_checksum_address验证格式或to_checksum_address以更改字符串以进行地址格式。
You have the error because you submit string instead of address format.
if you are using web3 python (https://web3py.readthedocs.io/en/latest/web3.main.html#addresses) you can use is_checksum_address to verify the format or to_checksum_address to change your string to address format.