# fravoll/solidity-patterns

A compilation of patterns and best practices for the smart contract programming language Solidity

Repository: https://github.com/fravoll/solidity-patterns
Canonical: https://ross.abutalabs.com/products/solidity-patterns
Homepage: https://fravoll.github.io/solidity-patterns/
Language: Solidity
License: MIT
License Family: permissive
Topics: solidity-patterns, solidity, solidity-language, smart-contract
Last push: 2024-04-19T08:52:31+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3122, "days_push": 866, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3323, forks 528 (observed 2026-08-28T04:07:56.341516+00:00)

## What it is
A curated collection of design, security, upgradeability, and economic patterns for the Solidity smart contract language, each with code samples and detailed explanations. It is published as a documentation site and is no longer under active development.

## Use cases
- learn common solidity design patterns
- secure my smart contract against reentrancy
- how to upgrade a smart contract without breaking dependencies
- optimize gas costs in solidity contracts
- generate random numbers on the blockchain safely
- restrict access to contract functions
- implement an emergency stop in a smart contract

## When to choose
- learning foundational smart contract design and security patterns
- studying classic patterns like checks-effects-interactions or proxy delegate
- getting concise code examples with explanations for Ethereum contracts

## When to avoid
- working with modern Solidity versions, since examples target 0.4.20 and may be outdated
- needing a maintained library or production-ready audited code
- requiring up-to-date best practices for current tooling and standards

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: security, documentation
- domain: blockchain, security, developer-tools, tutorials
- platform: cross-platform
- tags: solidity, smart-contracts, design-patterns, ethereum, gas-optimization, upgradeability

## Member repositories
- fravoll/solidity-patterns (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:56.341516+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:41:48.987587+00:00, confidence not recorded.
  - readme: https://github.com/fravoll/solidity-patterns (fetched 2026-08-28T04:07:56.341516+00:00, sha 38612a6f9aea)
  - homepage: https://fravoll.github.io/solidity-patterns/ (fetched 2026-08-29T09:34:46.759180+00:00, sha 937408bbf867)
- Data as of 2026-08-30T08:39:29.467469+00:00.
