Ok, so I am trying to make a transaction by myself and send it to the contract compiled in the Remix IDE. I am using Ganache and Remix IDE. ( and the Python Code is being written in Jupyter Notebook )
here's the code I am using;
tx = {
'nonce': nonce,
'to': address_of_smart_contract,
'value': web3.toWei(1, 'ether'),
'gas': 2000000,
'gasPrice': : web3.toWei('50', 'gwei'),
}
signed_tx = web3.eth.account.signTransaction(tx, private_key)
tx_hash = web3.eth.sendRawTransaction(signed_tx.rawTransaction)
This is the error message i'm getting ;
'message': 'VM Exception while processing transaction: revert', 'code': -32000
Please help me out!