Skip to content

Modern, opinionated and gas optimized building blocks for smart contract development.

License

Notifications You must be signed in to change notification settings

mds1/solmate

 
 

solmate

Modern, opinionated, and gas optimized building blocks for smart contract development.

Contracts

auth
├─ Auth"Flexible and updatable auth pattern"
├─ Trust"Ultra minimal authorization logic"
├─ authorities
│  ├─ RolesAuthority"Role based Authority that supports up to 256 roles"
│  ├─ TrustAuthority"Simple Authority which only authorizes trusted users"
tokens
├─ WETH"Minimalist and modern Wrapped Ether implementation"
├─ ERC20"Modern and gas efficient ERC20 + EIP-2612 implementation"
utils
├─ SSTORE2 - "Library for cheaper reads and writes to persistent storage"
├─ CREATE3"Deploy to deterministic addresses without an initcode factor"
├─ SafeCastLib - "Safe unsigned integer casting lib that reverts on overflow"
├─ ReentrancyGuard"Gas optimized reentrancy protection for smart contracts"
├─ FixedPointMathLib"Arithmetic library with operations for fixed-point numbers"
├─ Bytes32AddressLib"Library for converting between addresses and bytes32 values"
├─ SafeTransferLib"Safe ERC20/ETH transfer lib that handles missing return values"

Installation

To install with DappTools:

dapp install rari-capital/solmate

To install with Foundry:

forge install rari-capital/solmate

To install with Hardhat or Truffle:

npm install @rari-capital/solmate

Acknowledgements

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

About

Modern, opinionated and gas optimized building blocks for smart contract development.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 95.5%
  • Julia 3.3%
  • Other 1.2%