@solarity/solidity-lib

2.7.15 • Public • Published

npm Coverage Status License: MIT GitPOAP Badge

Solidity Library for Savvies

Solidity modules and utilities that go far beyond mediocre solidity.

  • Implementation of the Contracts Registry pattern
  • State-of-the-art cryptography primitives (ECDSA over 256-bit and 384-bit curves, RSASSA-PSS)
  • Advanced data structures (Vector, DynamicSet, PriorityQueue, AVLTree)
  • ZK-friendly Cartesian Merkle Tree, Sparse Merkle Tree, and Incremental Merkle Tree implementations
  • Versatile access control smart contracts (Merkle whitelists, RBAC)
  • Enhanced and simplified Diamond pattern
  • Flexible finance instruments (Staking, Vesting)
  • Robust UniswapV2 and UniswapV3 oracles
  • Lightweight SBT implementation
  • Utilities to ease work with memory, types, ERC20 decimals, arrays, sets, and ZK proofs

Built leveraging OpenZeppelin Contracts (4.9.6).

Overview

Installation

$ npm install @solarity/solidity-lib

The latest stable version is always in the master branch.

Documentation

Check out the project's documentation with broad explanations and usage examples of every module. Full natspec guides are also available in the source code.

Usage

You will find the smart contracts in the /contracts directory. Feel free to play around and check the project's structure.

Once the npm package is installed, one can use the library just like that:

pragma solidity ^0.8.4;

import {OwnableContractsRegistry} from "@solarity/solidity-lib/contracts-registry/presets/OwnableContractsRegistry.sol";

contract ContractsRegistry is OwnableContractsRegistry {
    . . .
}

[!IMPORTANT] It is important to use the library as it is shipped and not copy-paste the code from untrusted sources.

Contribution

We are open to any mind-blowing ideas! Please take a look at our contribution guidelines to get involved.

License

The library is released under the MIT License.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.7.1524latest

Version History

VersionDownloads (Last 7 Days)Published
2.7.1524
2.7.141
2.7.1310
2.7.121
2.7.117
2.7.1024
2.7.90
2.7.80
2.7.70
2.7.60
2.7.50
2.7.40
2.7.32
2.7.229
2.7.10
2.7.00
2.6.190
2.6.180
2.6.170
2.6.160
2.6.150
2.6.140
2.6.130
2.6.120
2.6.110
2.6.100
2.6.98
2.6.80
2.6.70
2.6.60
2.6.50
2.6.40
2.6.30
2.6.20
2.6.10
2.6.00
2.5.110
2.5.100
2.5.92
2.5.80
2.5.73
2.5.60
2.5.59

Package Sidebar

Install

npm i @solarity/solidity-lib

Weekly Downloads

120

Version

2.7.15

License

MIT

Unpacked Size

463 kB

Total Files

65

Last publish

Collaborators

  • hrom_h
  • arvolear