Skip to content

devacc8/basepaint-market-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BasePaint Bundle Marketplace - Smart Contracts

Smart contracts for BasePaint Bundle Marketplace on Base L2. Trade complete BasePaint year collections (365 NFTs) in single transactions.

Overview

BasePaint Bundle Marketplace enables trading of complete year bundles:

  • Year 1: Days 1-365 (365 NFTs)
  • Year 2: Days 366-730 (365 NFTs)

Features

  • Approval-Based Listings: NFTs remain with seller until purchase (OpenSea pattern)
  • WETH Offers: Off-chain EIP-712 signatures, zero gas for offer creation
  • Bundle Validation: Atomic validation of all 365 NFTs at purchase time
  • Security First: ReentrancyGuard, Pausable, comprehensive access control
  • UUPS Upgradeable: Proxy pattern for future improvements

Contract Addresses

Base Mainnet

Contract Address
Marketplace Proxy 0xB0897037052BB9104CcDF743358ea4f91990A362
BasePaint NFT 0xba5e05cb26b78eda3a2f8e3b3814726305dcac83
WETH 0x4200000000000000000000000000000000000006

Development

Prerequisites

Setup

# Clone repository
git clone https://github.com/devacc8/basepaint-market-contracts.git
cd basepaint-market-contracts

# Install dependencies
forge install

# Build
forge build

# Run tests
forge test

# Run tests with verbosity
forge test -vvv

Test Coverage

forge coverage

Contract Variants

This repository includes two versions of the marketplace contract:

Contract Description Use Case
BasePaintMarket.sol UUPS Upgradeable Production deployment (proxy pattern)
BasePaintMarketFlat.sol Non-upgradeable Simple deployment via Remix, immutable

Differences

BasePaintMarket.sol (Upgradeable)

  • Uses OpenZeppelin Upgradeable contracts
  • Deployed via UUPS proxy pattern
  • Can be upgraded by owner
  • initialize() function instead of constructor

BasePaintMarketFlat.sol (Non-upgradeable)

  • Uses standard OpenZeppelin contracts
  • Direct deployment (no proxy)
  • Immutable after deployment
  • Standard constructor()

Architecture

src/
├── BasePaintMarket.sol      # Main contract (UUPS upgradeable)
├── BasePaintMarketFlat.sol  # Non-upgradeable version
└── mocks/
    ├── MockBasePaint.sol    # Mock ERC1155 for testing
    └── MockWETH.sol         # Mock WETH for testing

test/
├── BasePaintMarket.t.sol      # Unit tests
└── BasePaintMarketFuzz.t.sol  # Fuzz tests

Security

  • Audit Status: Internal audit completed (v1.11, score 9.0/10)
  • Bug Bounty: Contact via GitHub issues

Security Features

  • ReentrancyGuard on all state-changing functions
  • Pausable for emergency stops
  • Ownable2Step for secure ownership transfer
  • Buyer blacklist for compliance
  • Minimum price requirements

License

MIT License - see LICENSE

Links

About

BasePaint Bundle Marketplace - Smart Contracts (Base L2)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •