Summary
# this will only give validation error
tx1 = {
"from": wallet.address,
"to": "0x0545640A0EcD6FB6ae94766811F30dCDA4746DFC",
"value": 1,
"gas": 100_000,
"gasPrice": web3.eth.gas_price,
}
# correct way
tx2 = {
"from": wallet.address,
"to": "0x0545640A0EcD6FB6ae94766811F30dCDA4746DFC",
"value": 1,
"gas": 100_000,
"gasPrice": web3.eth.gas_price,
"chainId": web3.eth.chain_id,
"data": "0x",
}
When attempting to pass tx1 to the sign_transaction method it should trow IncorrectValues or similar error saying data and chainId is missing.
Summary
When attempting to pass tx1 to the
sign_transactionmethod it should trowIncorrectValuesor similar error sayingdataandchainIdis missing.