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

0 votes

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 in Blockchain by Yaxir

edited Aug 5 by Omkar 51 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

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,020 points
65 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,020 points
420 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,020 points
57 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 5, 2018 in Blockchain by ariaholic
• 7,340 points
54 views
0 votes
1 answer

Where are the transaction details of a smart contract is written in Ethereum?

First ques:where in the blockchain is a ...READ MORE

answered Jul 11, 2018 in Blockchain by Shashank
• 10,350 points
43 views
0 votes
1 answer
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
158 views
0 votes
1 answer
+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,620 points
143 views