Git Product home page Git Product logo

solbase's Introduction

⚡ Solbase

Modern, opinionated, and gas optimized base for smart contract development.

Contracts

auth
├─ Owned"Simple single owner authorization"
├─ Auth"Flexible and updatable auth pattern"
├─ OwnedThreeStep"Three-step single owner authorization mixin"
├─ OwnedRoles"Simple single owner and multiroles authorization mixin"
├─ authorities
│  ├─ RolesAuthority"Role based Authority that supports up to 256 roles"
│  ├─ MultiRolesAuthority"Flexible and target agnostic role based Authority"
mixins
├─ ERC4626"Minimal ERC4626 tokenized Vault implementation"
tokens
├─ WETH"Minimalist and modern Wrapped Ether implementation"
├─ ERC20"Modern, minimalist, and gas-optimized ERC20 implementation"
├─ ERC721"Modern, minimalist, and gas-optimized ERC721 implementation"
├─ ERC1155"Modern, minimalist, and gas-optimized ERC1155 implementation"
extensions
├─ ERC20Permit"ERC20 + EIP-2612 implementation"
├─ ERC721Permit"ERC721 + EIP-2612-style implementation"
├─ ERC1155Permit"ERC1155 + EIP-2612-style implementation"
utils
├─ LibSort"Optimized intro sort"
├─ LibClone"Minimal proxy library"
├─ ECDSA"Gas-optimized ECDSA wrapper"
├─ Base64"Library to encode strings in Base64"
├─ LibBit"Library for bit twiddling operations"
├─ ERC165"Interface for contracts with ERC165 support"
├─ LibBytemap"Efficient bytemap library for mapping integers to bytes"
├─ SSTORE2"Library for cheaper reads and writes to persistent storage"
├─ Clone"Class with helper read functions for clone with immutable args"
├─ CREATE3"Deploy to deterministic addresses without an initcode factor"
├─ LibString"Library for creating string representations of uint values"
├─ Permit"Signature permit interface for any EIP-2612 or Dai-style token"
├─ SafeCastLib"Safe unsigned integer casting lib that reverts on overflow"
├─ SelfPermit"Signature permit helper for any EIP-2612 or Dai-style token"
├─ SignedWadMath"Signed integer 18 decimal fixed point arithmetic library"
├─ ReentrancyGuard"Gas-optimized reentrancy protection for smart contracts"
├─ MerkleProofLib"Efficient merkle tree inclusion proof verification library"
├─ SafeCastLib"Safe unsigned integer casting library that reverts on overflow"
├─ LibERC165"Library used to query support of an interface declared via ERC165"
├─ FixedPointMathLib"Arithmetic library with operations for fixed-point numbers"
├─ Bytes32AddressLib"Library for converting between addresses and bytes32 values"
├─ LibRLP"Library for computing contract addresses from their deployer and nonce"
├─ LibBitMap"Efficient bitmap library for mapping integers to single bit booleans"
├─ SafeTransferLib"Safe ERC20/ETH transfer lib that handles missing return values"
├─ LibString"Library for converting numbers into strings and other string operations"
├─ EIP712"Gas-optimized implementation of EIP-712 domain separator and digest encoding"
├─ Multicallable"Contract that enables a single call to call multiple methods on itself"
├─ SafeMulticallable"Contract that enables a single call to call multiple methods on itself"
├─ MerkleProofLib"Gas-optimized verification of proof of inclusion for a leaf in a Merkle tree"
├─ SignatureCheckerLib"Signature verification helper that supports both ECDSA signatures from EOAs"

Safety

This is experimental software and is provided on an "as is" and "as available" basis.

While each major release has been audited, these contracts are not designed with user safety in mind:

  • There are implicit invariants these contracts expect to hold.
  • You can easily shoot yourself in the foot if you're not careful.
  • You should thoroughly read each contract you plan to use top to bottom.

We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Installation

To install with Foundry:

forge install Sol-DAO/solbase

To install with Hardhat or Truffle:

npm install solbase

Acknowledgements

These contracts were inspired by or directly modified from many sources, primarily:

solbase's People

Contributors

0xclandestine avatar 134dd3v avatar ahbanavi avatar brockelmore avatar cyrusofeden avatar devanoneth avatar donosonaumczuk avatar eswak avatar frankieislost avatar gakonst avatar jaglinux avatar jetjadeja avatar joeysantoro avatar jparklev avatar mattsse avatar nerderlyne avatar onbjerg avatar outdoteth avatar pedrommaiaa avatar rajivpo avatar ro5s avatar stermi avatar transmissions11 avatar vminkov avatar wildmolasses avatar z0r0z avatar zeroekkusu avatar zerosnacks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.