0

I built and have tested a contract on the Ropsten testnet but when I tried to deploy to the mainnet the transaction was reverted. not sure what the reasoning was I tried not spending all that much to deploy it so not sure if that was cause or not.

Using Remix IDE for deployment.

Transaction ID: 0x47bbe74d09559298b973348b7c41b4363977ccaea5ad33ced5904c16f5fffaeb

https://etherscan.io/tx/0x47bbe74d09559298b973348b7c41b4363977ccaea5ad33ced5904c16f5fffaeb

Fail with:

A Status code indicating if the top-level call succeeded or failed (applicable for Post BYZANTIUM blocks only)

8
  • How big is that contract, how are u trying to deploy it ? Truffle or remix or something else?
    – Majd TL
    Commented Mar 6, 2021 at 21:02
  • @MajdTL it is a pretty chunky contract about 450 lines and using remix to deploy Commented Mar 6, 2021 at 21:04
  • Is that transaction id from the main net? I can’t find it on etherscan
    – Majd TL
    Commented Mar 6, 2021 at 21:04
  • @MajdTL oops sorry I pasted the wrong TRX_ID 0x47bbe74d09559298b973348b7c41b4363977ccaea5ad33ced5904c16f5fffaeb is the correct one Commented Mar 6, 2021 at 21:05
  • 1
    me 2, I just added it to the question, just in case that some lazy developer dont want to go to etherscan
    – Majd TL
    Commented Mar 6, 2021 at 21:11

1 Answer 1

2

enter image description here

Probably it is the mistake, but I'm not sure: You have sent extra 60 wei with your contract. that(see the picture) is no the transaction fee and it should always be 0 unless your contract expecting the ether. If you are using metamask with remix then you can change the gas price there.

Secondly, I guess your gas limit is too low (550,000), take care of sending a transaction with low gas limit, because it will fail. Can you post the transaction id of the contract on Ropston to see how much gas was needed?

I really don't encourage you to deploy anything to the mainnet just for testing, unless you have a product and need a last test, before going live.

5
  • ropsten.etherscan.io/address/… is the testnet contract Commented Mar 6, 2021 at 21:29
  • like i said before I am still unfamiliar with the fees side of Ethereum Commented Mar 6, 2021 at 21:31
  • that contract needed 4228536 gas to be deployed, you should set the gas limit to more than that (maybe a littel more depends on the version of solidity and optimization number) in remix before sending it. it will probably cost you your rent to deploy it on the mainnet.
    – Majd TL
    Commented Mar 6, 2021 at 21:33
  • you can see how much gas the contract used in the contract creation transaction ropsten.etherscan.io/tx/…
    – Majd TL
    Commented Mar 6, 2021 at 21:35
  • ethgasstation.info/calculatorTxV.php you can calculate how much it will cost here
    – Majd TL
    Commented Mar 6, 2021 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.