Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 599 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 599 Bytes

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