You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'll be useful to have a command that prints out the contact sizes in kb. This would help optimise contract size and stay below the 24kb limit, especially while importing multiple libraries. The command could look something like this
If you think this could be a useful addition to forge, I can take this up.
The text was updated successfully, but these errors were encountered:
pbshgthm
changed the title
feat:(forge) Size of contracts via forge size
feat:(forge) Size of contracts via 'forge size' or 'forge build --size'
Jan 26, 2022
An easy hack is to count the chars of the bytecode and divide that by 2, since due to encoding every ascii character encodes 2 bytes. A hardhat plugin had some issue with proper size estimation when non-ascii characters were used in the contract (e.g part of some string)
It'll be useful to have a command that prints out the contact sizes in kb. This would help optimise contract size and stay below the 24kb limit, especially while importing multiple libraries. The command could look something like this
Alternatively, this feature can also be part of forge build with a tag, something like
If you think this could be a useful addition to forge, I can take this up.
The text was updated successfully, but these errors were encountered: