Error while sending a transaction from Web3py to a Smart Contract in Remix

+1 vote

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!

Aug 5, 2019 in Blockchain by Yaxir

edited Aug 5, 2019 by Omkar 1,806 views

1 answer to this question.

0 votes
You get the revert error when a condition that is supposed to meet hasn't. Which will lead to the incorrect signing of the transaction.
answered Dec 12, 2019 by Vivek

Related Questions In Blockchain

0 votes
1 answer

Error in sending value to an Ethereum Smart Contract.

It is stated in Solidity 4.0 documentation ...READ MORE

answered Jul 23, 2018 in Blockchain by Perry
• 17,100 points
1,444 views
0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,100 points
3,624 views
0 votes
1 answer

How is a request sent from an app to a smart contract?

Yes, the contract is distributed by every node ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,100 points
732 views
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 6, 2018 in Blockchain by aryya
• 7,460 points
821 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,946 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,470 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
1,465 views
0 votes
1 answer
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,740 points
45,299 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP