我具有这样的功能:
function convertEthToTokenUniswap(uint tokenAmount,address[] memory path,uint deadline) public payable {
//can be empty still throws no matching argument types error
}
,并且我试图在python中调用它,但现在不介绍如何传递address []参数。像这样(在python中),编译器将变量作为列表传递时中断了:
path = [ethaddresses.ethToken,ethaddresses.makerToken]
错误:
ValidationError:
Could not identify the intended function with name `convertEthToTokenUniswap`,positional argument(s) of type `(<class 'int'>,<class 'list'>,<class 'float'>)` and keyword argument(s) of type `{}`.
Found 1 function(s) with the name `convertEthToTokenUniswap`: ['convertEthToTokenUniswap(uint256,address[],uint256)']
Function invocation failed due to no matching argument types.
我的问题:
- 可以通过这种论点吗?
- 如果可能的话,怎么办?
谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。