Skip to content

Conversation

@CruzMolina
Copy link
Contributor

@CruzMolina CruzMolina commented Jun 3, 2021

  • build: add hardhat as devDep
  • build: initial hardhat config w/ solidity settings
  • refactor: add artifacts & cache to gitignore
  • build: add npm hardhat compile script
  • refactor: port hardhat config from js to ts
  • refactor: rm unused calculateContractBytecode script
  • build: add calculate-contract-bytecode npm script

@haythemsellami
Copy link
Contributor

Why removing calculateContractBytecode script ? I sometime use it to check contract bytecode size, I think it is useful.

@haythemsellami
Copy link
Contributor

haythemsellami commented Jun 3, 2021

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.

@CruzMolina
Copy link
Contributor Author

Ah, my bad @haythem96 . It looked like an unused script. Will re-add.

@CruzMolina CruzMolina force-pushed the build/hardhat-compile branch from c309729 to 6b47969 Compare June 3, 2021 23:58
@CruzMolina CruzMolina force-pushed the build/hardhat-compile branch from 166516a to 1f2961f Compare June 3, 2021 23:59
@antoncoding
Copy link
Contributor

Use this instead of the script:
https://hardhat.org/plugins/hardhat-contract-sizer.html

@CruzMolina
Copy link
Contributor Author

CruzMolina commented Jun 4, 2021

@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.

@haythemsellami
Copy link
Contributor

@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.

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.

@CruzMolina
Copy link
Contributor Author

@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.

@antoncoding
Copy link
Contributor

antoncoding commented Jun 6, 2021

@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.

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

@haythemsellami
Copy link
Contributor

Do not merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants