Skip to content

An evolutionary smart contract project on Base Network. Starting from a basic escrow (v0) and progressively improving through 10 versions with enhanced features, security, and gas efficiency.

License

Notifications You must be signed in to change notification settings

danyzly/BaseFund

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BaseFund Banner

BaseFund – Smart Contract Evolution Series

Solidity EVM Optimizer Standard JSON License


Overview

BaseFund is an experimental series of smart contracts deployed on Base Network. The project evolves step-by-step from a basic escrow crowdfunding contract into more complex and feature-rich versions. Each version highlights improvements in security, gas efficiency, developer UX, and best practices.


Evolution Tree

graph TD
  v0["v0 · Basic Escrow"] --> v1["v1 · Events & Custom Errors"]
  v1 --> v2["v2 · Roles & Access Control"]
  v2 --> v3["v3 · Pausable + ReentrancyGuard"]
  v3 --> v4["v4 · Gas Optimizations"]
  v4 --> v5["v5 · ERC-20 Contributions"]
  v5 --> v6["v6 · Fees & Treasury"]
  v6 --> v7["v7 · Factory/Proxy"]
  v7 --> v8["v8 · Meta-transactions (ERC-2771)"]
  v8 --> v9["v9 · Security Hardening"]
  v9 --> v10["v10 · UX & Security: Permit/Allowlist/Cooldowns"]
Loading

Version Key Change Sepolia Deploy Mainnet Deploy Build Config
v0 Basic escrow crowdfunding base-sepolia.json base-mainnet.json mainnet: v0.standard-json.mainnet.json · sepolia: v0.standard-json.sepolia
v1 Events & custom errors base-sepolia.json base-mainnet.json mainnet: v1.standard-json.mainnet.json · sepolia: v1.standard-json.sepolia.json
v2 Roles & AccessControl base-sepolia.json base-mainnet.json mainnet: v2.standard-json.mainnet.json · sepolia: v2.standard-json.sepolia.json
v3 Pausable + ReentrancyGuard base-sepolia.json base-mainnet.json mainnet: v3.standard-json.mainnet.json · sepolia: v3.standard-json.sepolia.json
v4 Gas optimizations base-sepolia.json base-mainnet.json mainnet: v4.standard-json.mainnet.json · sepolia: v4.standard-json.sepolia.json
v5 ERC-20 contributions base-sepolia.json base-mainnet.json mainnet: v5.standard-json.mainnet.json · sepolia: v5.standard-json.sepolia.json
v6 Fees & treasury flows base-sepolia.json base-mainnet.json mainnet: v6.standard-json.mainnet.json · sepolia: v6.standard-json.sepolia.json
v7 Factory/Proxy ready base-sepolia.json base-mainnet.json mainnet: v7.standard-json.mainnet.json · sepolia: v7.standard-json.sepolia.json
v8 Meta-tx (ERC-2771 relayer) base-sepolia.json base-mainnet.json mainnet: v8.standard-json.mainnet.json · sepolia: v8.standard-json.sepolia.json
v9 Security hardening base-sepolia.json base-mainnet.json mainnet: v9.standard-json.mainnet.json · sepolia: v9.standard-json.sepolia.json
v10 UX/Security: Permit, allowlist, cooldowns base-sepolia.json base-mainnet.json mainnet: v10.standard-json.mainnet.json · sepolia: v10.standard-json.sepolia.json

Deployments

All contract deployments and minimal interaction logs live under /deployments.

Version Sepolia Mainnet
v0 deploy · interactions deploy · interactions
v1 deploy · interactions deploy · interactions
v2 deploy · interactions deploy · interactions
v3 deploy · interactions deploy · interactions
v4 deploy · interactions deploy · interactions
v5 deploy · interactions deploy · interactions
v6 deploy · interactions deploy · interactions
v7 deploy · interactions deploy · interactions
v8 deploy · interactions deploy · interactions
v9 deploy · interactions deploy · interactions
v10 deploy · interactions deploy · interactions

Roadmap & Contributions

✅ v0–v10 delivered (progressive features and hardening).

🧪 Future: fuzzing, slippage protections for volatile tokens, optional timelocks/multisigs for admin ops, extended docs & scripts.

Contributions welcome — please open issues or PRs. See LICENSE for terms.


Verify on BaseScan/Etherscan (Standard JSON)

Prereqs

  • Pick the version (vX) and network (Sepolia/Mainnet).
  • Open the matching Standard JSON in build-config/vX.standard-json.<network>.json.

UI flow (recommended)

  1. Open your contract on BaseScan → Contract tab → Verify & Publish.
  2. Method: Solidity (Standard-JSON-Input).
  3. Paste the full contents of the Standard JSON file.
  4. Contract Name: BaseFundVX.sol:BaseFundVX (match the exact version).
  5. Settings (solc 0.8.24, optimizer 200, EVM Cancún) are already embedded.
  6. Submit and wait for Pass.

API flow (advanced)

# Replace: API_KEY, CONTRACT, and the version/network path
curl -X POST "https://api.basescan.org/api" \
  -d module=contract \
  -d action=verifysourcecode \
  -d apikey=API_KEY \
  -d contractaddress=CONTRACT \
  -d codeformat=solidity-standard-json-input \
  -d contractname="BaseFundV10.sol:BaseFundV10" \
  --data-urlencode sourceCode@build-config/v10.standard-json.mainnet.json

Notes • Do not duplicate compiler/optimizer flags in the form; they’re inside the JSON. • Constructor args are not required here (we don’t pass ABI-encoded params via the form).


Security

This repository documents an experimental smart-contract series.
If you believe you’ve found a vulnerability, please report it privately via GitHub Security Advisories for this repository. We acknowledge within 5 business days.
See SECURITY.md for full details.


Releases

Looking for the release & tagging workflow?
See RELEASING.md — concise guide for annotated tags (v0–v10), verification, and optional GitHub Releases.


License

This project is released under the MIT License.
See LICENSE for the full text, permissions, and attribution requirements.

About

An evolutionary smart contract project on Base Network. Starting from a basic escrow (v0) and progressively improving through 10 versions with enhanced features, security, and gas efficiency.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published