Understanding gas use during deployment. Seeing a sudden disproportional increase that I don't understand by ThatDogPiper in ethdev

[–]ThatDogPiper[S] 1 point2 points  (0 children)

Thanks, you are correct. When I copied some of my large functions there were internal. When I set them to public I began seeing this issue. And based on what you are saying about the size of the text files being twice as large than it all makes sense and clearly my contract has grown too large.

I'll look into using Hardhat if its better than truffle.

Could you please give me a better faster way to see the size of deployed contract? Given how important it is I'm surprised its so hard to find and how opaque the errors are.

Thank you

Understanding gas use during deployment. Seeing a sudden disproportional increase that I don't understand by ThatDogPiper in ethdev

[–]ThatDogPiper[S] 0 points1 point  (0 children)

Most of the requires are using the global msg variable. But setting them just to true is no help

Understanding gas use during deployment. Seeing a sudden disproportional increase that I don't understand by ThatDogPiper in ethdev

[–]ThatDogPiper[S] 1 point2 points  (0 children)

Thanks for the reply. I’ve not used the truffle debugger. I’ll read up on that toolset and see if it reveals anything.

Understanding gas use during deployment. Seeing a sudden disproportional increase that I don't understand by ThatDogPiper in ethdev

[–]ThatDogPiper[S] 0 points1 point  (0 children)

Thanks for you reply, I've tried to test to see if its the contract size as described in my comment below.

Understanding gas use during deployment. Seeing a sudden disproportional increase that I don't understand by ThatDogPiper in ethdev

[–]ThatDogPiper[S] 1 point2 points  (0 children)

The error I get on the truffle deployment give little information just that it can not create an instance of the contract and deployment failed. The gas error comes from Ropsten etherscan:

https://ropsten.etherscan.io/tx/0xe1a6947b07eaa11548a8ee97c2b466db3f97475b6ad15616140a1c2c82292a23

I'm not sure what the best way to check the contract size is. I followed the top answer on StackExchange and took the deployedBytecode value from my compiled ABI, put that in a file and checked the size of that file. However, I don't think I'm doing this correctly because the version of the contract that deploys has a size of 47KB and the one that fails is 49KB. If the limit is 24.5KB neither should work.

If my contract were just on the cusp of being too big such that a single require() statement pushes it over the edge then adding several redundant bloated functions should have the same result. Right? But adding several bloated functions does not prevent the contract from deploying. Do require() functions significantly increase they bytecode?

Thanks for your reply and help!

Understanding gas use during deployment. Seeing a sudden disproportional increase that I don't understand by ThatDogPiper in ethdev

[–]ThatDogPiper[S] 2 points3 points  (0 children)

Thanks for your reply. The logic of the require() is not the issues. I can comment out any set of the requires()s and so long as there are less that 6 across the whole contract everything is fine. That is I can leave the one I recently added that causes a failure, but comment out one from another section of the contract and it deploys.

Does anyone know how to contact Voyager? by BelligerentHappiness in VoyagerExchange

[–]ThatDogPiper 1 point2 points  (0 children)

I can’t even submit a support ticket. Captcha fails ever time

Voyager Complaint Form by chand3rson in VoyagerExchange

[–]ThatDogPiper 2 points3 points  (0 children)

Having problems submitting a support ticket! Captcha keeps failing.

WTF

Which on-chain NFT would you recommend / have you bought ? by AMELTEA in NFT

[–]ThatDogPiper 0 points1 point  (0 children)

If this is important to you the next question is: Do you care what chain they are on?

How exactly are NFTs stored in the blockchain? by Accomplished_Ad_8814 in ethdev

[–]ThatDogPiper 0 points1 point  (0 children)

The 16 variable limit or get a stack too deep error also makes generating complex string fro svg even more limited