0

this might be a basic question, but I was trying to deploy a large smart contract with multiple solidity files within it using Truffle and I cannot seem to be able to find a correct gas or gasPrice for the truffle.js file. Everything compiles, but when I try to migrate I continue to get the error "The contract code couldn't be stored, please check your gas amount". I know that there are gas estimates in the build folder, but the contract I am trying to deploy is rather large and it would take forever to go through all the .json files in the build folder and add up all their gas estimations. Can someone give me a basic idea of what I should do here? Thanks!

1

if you are using Mocha framework for testing the smart contract using truffle you can use eth-gas-reporter. just write a test for deploying the above mentioned smart contract and the test result will show the amount of gas this function will need approx.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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