celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
687 stars 362 forks source link

Shell scripts to calculate smart contract sizes #10989

Closed arthurgousset closed 2 months ago

arthurgousset commented 2 months ago

Description

Sometimes it's useful to know the bytecode size of core contracts. This PR adds scripts calculate that in two ways:

  1. Using the bytecode of actually deployed smart contracts.
  2. Using the build artifacts of locally built smart contracts.

Writes the output to the console and to csv files in the scripts/bash/out/ directory (which is gitignored).

Changes

  1. Adds two shell scripts
  2. Adds commands to package.json
  3. Adds documentation to README.md

Other changes

Nit: Linting in README.md file

Tested

Related issues

Backwards compatibility

Yes, backwards compatible. The new scripts can be used on-demand, but don't interfere with any existing flows.

Documentation

Yes, added documentation to the README.md file.