Candy-Labs / CandyContracts

Open-source NFT contract implementations
MIT License
11 stars 7 forks source link

Test gas fee with using errors instead of custom revert strings #10

Closed kyokosdream closed 2 years ago

kyokosdream commented 2 years ago

Not sure if this will decrease gas usage but I assume so since the custom strings I've provided as revert messages must be stored in the contract bytecode. It could be rather negligible but I'd still like to test it, not much information available online.

kyokosdream commented 2 years ago

It proved true, gas fees were reduced, hypothesis was correct. I believe custom errors were new to Solidity in 0.8.4.

Closed with #20