Below is my attempt at constructing a transaction on Fantom
(Keep in mind that Fantom is not EIP-1559 compatible, so the format should be the old one)
contract_txn = contract_SPOOKY_ROUTER.functions.swapExactTokensForTokens(Web3.toWei(1.2, 'ether'), 0, path , address_wallet, block['timestamp']+60 ).buildTransaction({
'type': '0x2',
'chainId': 250, # FTM
# 'value' : Web3.toWei(1.5, 'ether'),
'gas': 200000,
'gasPrice': Web3.toWei('200', 'gwei'),
'nonce': nonce,
})
signed = w3.eth.account.sign_transaction(contract_txn, privatekey)
w3.eth.send_raw_transaction(signed.rawTransaction)
nonce += 1
When I run this, I end up with the following error message.
raise TypeError("Unknown kwargs: {0}".format(sorted(unknown_kwargs)))
TypeError: Unknown kwargs: ['gasPrice']
I am having a hard time figuring out where I made a mistake.