我具有这样的功能:
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.
我的问题:
- 可以通过这种论点吗?
- 如果可能的话,怎么办?
谢谢。