Build: Setup initial hardhat compilations
- build: add
hardhatas devDep - build: initial hardhat config w/ solidity settings
- refactor: add
artifacts&cachetogitignore - build: add npm hardhat
compilescript - refactor: port hardhat config from js to ts
- refactor: rm unused
calculateContractBytecodescript - build: add
calculate-contract-bytecodenpm script
Why removing calculateContractBytecode script ? I sometime use it to check contract bytecode size, I think it is useful.
This is good, I think it will be great if u do a walkthrough of the setup or hardhat overall in a learning session before merging this.
Ah, my bad @haythem96 . It looked like an unused script. Will re-add.
Use this instead of the script: https://hardhat.org/plugins/hardhat-contract-sizer.html
@antoncoding the output of the script that plugin runs is different than the calculateContractBytecode script.
hardhat-contract-sizer outputs a table of each contract's bytecode size in KB but doesn't show how much space is left.
What do you think @haythem96?
Also, IIRC, by default ganache-cli maintains the EIP-170 limit. A contract breaching the limit should not deploy locally.
@antoncoding the output of the script that plugin runs is different than the
calculateContractBytecodescript.hardhat-contract-sizeroutputs a table of each contract's bytecode size in KB but doesn't show how much space is left.What do you think @haythem96?
Also, IIRC, by default
ganache-climaintains the EIP-170 limit. A contract breaching the limit should not deploy locally.
Yes that's true, I think it is fine to keep the script, it is already working and doesn't need any maintenance even if we don't mainly use it, so I don't see a cons of keeping it.
@haythem96 the issue I see with keeping is that it's very specific to truffle's framework. However, if we decide to remove truffle as a devDependency, it shouldn't be difficult to modify the hardhat plugin script to also calculate and provide similar output.
@haythem96 the issue I see with keeping is that it's very specific to
truffle's framework. However, if we decide to removetruffleas a devDependency, it shouldn't be difficult to modify the hardhat plugin script to also calculate and provide similar output.
I think we can keep it for now, and open another PR to modify all truffle script to hardhat, and then remove truffle as dev dependency
Do not merge