Ethereum Smart Contracts in Python: a comprehensive(ish) guide
Nick Williams
1.2K7

Hi, Nick, great article!

I met a mistake which is like this: TypeError: Transaction had invalid fields: {‘to’: [my smart contract address]}. I googled and found that we need add contract_address = w3.toChecksumAddress(contract_address)
wallet_address = w3.toChecksumAddress(wallet_address) after w3.eth.enable_unaudited_features(), then it worked.