Skip to content

Utilities to interact with booleans more efficently in Solidity

Notifications You must be signed in to change notification settings

Omsify/BetterBools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BetterBools

Libraries to interact with booleans more efficiently in Solidity.

Currently, there are two libraries implemented:

  • BoolSetLib allows packing 256 booleans into one uint256 variable. It is useful to save a lot of gas on storage slots. Solidity stores just 32 booleans in one slot, so this library increases this number 8 times.
  • LogicalMatrix allows convenient usage of huge boolean value tables (logical matrices).

Installation

forge install Omsify/BetterBools

Suggestions and contributions are welcome!

About

Utilities to interact with booleans more efficently in Solidity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published