https://github.com/akagi201/solc-align
A tool to align solidity contract storage and calldata struct to 256 bits to maximazing storage reduction.
https://github.com/akagi201/solc-align
calldata gas-optimization slot solidity storage storage-align storage-slot
Last synced: 8 months ago
JSON representation
A tool to align solidity contract storage and calldata struct to 256 bits to maximazing storage reduction.
- Host: GitHub
- URL: https://github.com/akagi201/solc-align
- Owner: Akagi201
- License: apache-2.0
- Created: 2023-07-27T03:44:33.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T05:35:07.000Z (over 1 year ago)
- Last Synced: 2025-01-08T23:25:59.661Z (9 months ago)
- Topics: calldata, gas-optimization, slot, solidity, storage, storage-align, storage-slot
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# solc-align
A tool to align solidity contract storage and calldata struct to 256 bits to maximizing storage reduction.
## Features
- [x] Align to 32 bytes(256 bits) for calldata struct.
- [x] Use stable sort to make the same size bytes type in the same order as input.
- [ ] Align contract storage, which needs AST parser.## Install
```sh
cargo install --git https://github.com/Akagi201/solc-align.git
```## Usage
read input.txt for example.
case 1:
just print to stdout.
```sh
solc-align ./input.txt
```case 2:
write result to a file.
```sh
solc-align ./input.txt ./output.txt
```