@uniswap/v4-core
Version:
š¦ Core smart contracts of Uniswap v4
71 lines (54 loc) ⢠3.05 kB
Markdown
# 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"
mixins
āā ERC4626 ā "Minimal ERC4626 tokenized Vault implementation"
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"
āā 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)