1.0.0 • Published 3 years ago
@clober/library v1.0.0
Solidity Library by Clober
Implementation of Clober library contracts: SegmentedSegmentTree, OctopusHeap, and more.
Features
- SegmentedSegmentTree: A gas-efficient segment tree with a fixed size to support 32768 leaf nodes.
 - OctopusHeap: A heap data structure that can store up to 256 
uint16values. Optimized for popping values in close proximity to each other. - PackedUint256: Treats a 
uint256as a group ofuint8,uint16, oruint32and adds, subtracts, or updates the elements of the group by indexing them. - Create1: Utility functions regarding the vanilla 
CREATEoperation. - DirtyUint64: Adds, subtracts, and converts clean (original) and dirty (a non-zero representation of the original) 
uint64values. 
Installation
npm install @clober/libraryTesting
We use hardhat for code coverage and foundry for fuzzing tests.
Check Code Coverage
npm run hardhat:coverage
open coverage/index.htmlRun Fuzzing Tests
npm run forge:testVisulization
Visual aid for OctopusHeap.
cd utils/visualization
pip install -r requirements.txt 
python octopus_heap.pyLicensing
The primary license for Clober Library is the Time-delayed Open Source Software Licence, see License file.
1.0.0
3 years ago