/solc-align

A tool to align solidity contract storage and calldata struct to 256 bits to maximazing storage reduction.

Primary LanguageRustApache License 2.0Apache-2.0

solc-align

A tool to align solidity contract storage and calldata struct to 256 bits to maximizing storage reduction.

Features

  • Align to 32 bytes(256 bits) for calldata struct.
  • Use stable sort to make the same size bytes type in the same order as input.
  • Align contract storage, which needs AST parser.

Install

cargo install --git https://github.com/Akagi201/solc-align.git

Usage

read input.txt for example.

case 1:

just print to stdout.

solc-align ./input.txt

case 2:

write result to a file.

solc-align ./input.txt ./output.txt