transaction = contract.functions.swapForETH(
'0xf10...',
[ '0xB4f...', [8999], [0], 0, '0', '2', data_time],
100,
'0xB4feDc0...',
'0x',
data_time
).build_transaction({
'nonce': w3.eth.get_transaction_count(account_address),
'from': account_address,
'gas': 10,
'gasPrice': w3.to_wei('500', 'gwei')
})
error:
web3.exceptions.Web3ValidationError:
Could not identify the intended function with name swapForETH
, positional arguments with type(s) address,(address,(int),(int),int,str,str,int),int,address,str,int
and keyword arguments with type(s) {}
.
Found 1 function(s) with the name swapForETH
: [‘swapForETH(address,(uint160,address,uint256[],uint256[],uint256,bytes32,bytes32,uint8),uint256,address,bytes,uint256)’]
Function invocation failed due to no matching argument types.
(.venv) yujianfeng@yujianfengdeMacBook-Pro-2 eth_transfer %
transaction = contract.functions.swapForETH(
‘0xf10…’,
(‘0xB4f…’, [8999], [0], 0, ‘0’, ‘2’, data_time),
100,
‘0xB4feDc0…’,
‘0x’,
data_time
).build_transaction({
‘nonce’: w3.eth.get_transaction_count(account_address),
‘from’: account_address,
‘gas’: 10,
‘gasPrice’: w3.to_wei(‘500’, ‘gwei’)
}) not work
user2717490 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.