infrastructure-upgrade/lib/solmate
T-Hax 735546619e
init
Signed-off-by: T-Hax <>
2023-04-08 18:46:18 +00:00
..
.github init 2023-04-08 18:46:18 +00:00
.vscode init 2023-04-08 18:46:18 +00:00
audits init 2023-04-08 18:46:18 +00:00
lib/ds-test init 2023-04-08 18:46:18 +00:00
src init 2023-04-08 18:46:18 +00:00
.gas-snapshot init 2023-04-08 18:46:18 +00:00
.gitattributes init 2023-04-08 18:46:18 +00:00
.gitignore init 2023-04-08 18:46:18 +00:00
.gitmodules init 2023-04-08 18:46:18 +00:00
.prettierignore init 2023-04-08 18:46:18 +00:00
.prettierrc init 2023-04-08 18:46:18 +00:00
foundry.toml init 2023-04-08 18:46:18 +00:00
LICENSE init 2023-04-08 18:46:18 +00:00
package-lock.json init 2023-04-08 18:46:18 +00:00
package.json init 2023-04-08 18:46:18 +00:00
README.md init 2023-04-08 18:46:18 +00:00

solmate

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

Contracts

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"
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, 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 transmissions11/solmate

To install with Hardhat or Truffle:

npm install solmate

Acknowledgements

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