Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/transmissions11/solmate
Modern, opinionated, and gas optimized building blocks for smart contract development.
https://github.com/transmissions11/solmate
Last synced: 21 days ago
JSON representation
Modern, opinionated, and gas optimized building blocks for smart contract development.
- Host: GitHub
- URL: https://github.com/transmissions11/solmate
- Owner: transmissions11
- License: agpl-3.0
- Created: 2021-07-17T20:25:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-24T12:25:53.000Z (8 months ago)
- Last Synced: 2024-04-14T14:54:49.645Z (7 months ago)
- Language: Solidity
- Homepage:
- Size: 785 KB
- Stars: 3,631
- Watchers: 46
- Forks: 606
- Open Issues: 110
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audits/v6-Fixed-Point-Solutions.pdf
Awesome Lists containing this project
- awesome - Solmate
- awesome-solidity - transmissions11/solmate - Modern, opinionated and gas optimized building blocks for smart contract development. (Libraries)
- awesome-solidity - transmissions11/solmate - Modern, opinionated and gas optimized building blocks for smart contract development. (Libraries)
- stars - transmissions11/solmate - Modern, opinionated, and gas optimized building blocks for smart contract development. (Solidity)
- awesome-web3-tools-and-dapps - Solmate - Get access to open source tools for developing Solidity smart contracts. (dApps directory / Smart Contract Templates)
- awesome-solidity - transmissions11/solmate - Modern, opinionated and gas optimized building blocks for smart contract development. (Libraries)
- awesome-huff - Solmate
- awesome-foundry - Solmate - Modern, opinionated, and gas optimized building blocks for smart contract development. (Templates & Libraries)
README
# solmate
**Modern**, **opinionated**, and **gas optimized** building blocks for **smart contract development**.
## Contracts
```ml
auth
├─ Owned — "Simple single owner authorization"
├─ Auth — "Flexible and updatable auth pattern"
├─ authorities
│ ├─ RolesAuthority — "Role based Authority that supports up to 256 roles"
│ ├─ MultiRolesAuthority — "Flexible and target agnostic role based Authority"
tokens
├─ WETH — "Minimalist and modern Wrapped Ether implementation"
├─ ERC20 — "Modern and gas efficient ERC20 + EIP-2612 implementation"
├─ ERC721 — "Modern, minimalist, and gas efficient ERC721 implementation"
├─ ERC1155 — "Minimalist and gas efficient standard ERC1155 implementation"
├─ ERC4626 — "Minimal ERC4626 tokenized Vault implementation"
├─ ERC6909 — "Minimalist and gas efficient standard ERC6909 implementation"
utils
├─ SSTORE2 — "Library for cheaper reads and writes to persistent storage"
├─ CREATE3 — "Deploy to deterministic addresses without an initcode factor"
├─ LibString — "Library for creating string representations of uint values"
├─ SafeCastLib — "Safe unsigned integer casting lib that reverts on overflow"
├─ SignedWadMath — "Signed integer 18 decimal fixed point arithmetic library"
├─ MerkleProofLib — "Efficient merkle tree inclusion proof verification library"
├─ 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"
```## Safety
This is **experimental software** and is provided on an "as is" and "as available" basis.
While each [major release has been audited](audits), 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**](https://github.com/gakonst/foundry):
```sh
forge install transmissions11/solmate
```To install with [**Hardhat**](https://github.com/nomiclabs/hardhat) or [**Truffle**](https://github.com/trufflesuite/truffle):
```sh
npm install solmate
```## Acknowledgements
These contracts were inspired by or directly modified from many sources, primarily:
- [Gnosis](https://github.com/gnosis/gp-v2-contracts)
- [Uniswap](https://github.com/Uniswap/uniswap-lib)
- [Dappsys](https://github.com/dapphub/dappsys)
- [Dappsys V2](https://github.com/dapp-org/dappsys-v2)
- [0xSequence](https://github.com/0xSequence)
- [OpenZeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts)