Solidity snippets too edgy to be in Solady.
For a future of EVMs fragmentation, where the latest opcodes are not supported on most L2s for years even after their inception on mainnet.
To install with Foundry:
forge install vectorized/soledge
To install with Hardhat:
npm install soledge
The Solidity smart contracts are located in the src
directory.
utils
├─ LibT — "Transient storage helper"
├─ ReentrancyGuard — "Reentrancy guard mixin"
└─ LibString - "Library for converting numbers into strings and other string operations"
src — "Solidity smart contracts"
test — "Foundry Forge tests"
Feel free to make a pull request.
Guidelines same as Solady's.
This is experimental software and is provided on an "as is" and "as available" basis.
We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
While Soledge has been heavily tested, there may be parts that may exhibit unexpected emergent behavior when used with other code, or may break in future Solidity versions.
Please always include your own thorough tests when using Soledge to make sure it works correctly with your code.
Most contracts in Soledge are compatible with both upgradeable and non-upgradeable (i.e. regular) contracts.
Please call any required internal initialization methods accordingly.
Some parts of Soledge may not be compatible with chains with partial EVM equivalence.
Please always check and test for compatibility accordingly.
This repository is inspired by or directly modified from many sources, primarily: