Auctionhouse Integration Examples

This directory contains example contracts and adapters for integrating Manifold Creator Core contracts with the auctionhouse marketplace.

Contracts

Lazy Delivery Adapters

These adapters enable lazy minting (on-demand minting at purchase time) for Creator Core contracts:

  • ERC721CreatorLazyDelivery: Adapter for ERC721 Creator Core contracts
  • ERC1155CreatorLazyDelivery: Adapter for ERC1155 Creator Core contracts
  • ERC721CreatorLazyDeliveryWithPricing: Combined adapter that implements both ILazyDelivery and IPriceEngine for dynamic pricing

Price Engines

These contracts implement the IPriceEngine interface for dynamic pricing:

  • LinearBondingCurvePriceEngine: Linear price increase per token (price = basePrice + (alreadyMinted * increment))
  • ExponentialBondingCurvePriceEngine: Exponential price increase (price = basePrice * (multiplier ^ alreadyMinted))
  • DutchAuctionPriceEngine: Time-based decreasing price (price decreases from start to reserve over duration)
  • StepPricingEngine: Tiered pricing at quantity thresholds

On-Chain Art Generators

These contracts generate SVG art on-chain, similar to the DynamicSVGExample:

  • GenerativePolygonArt: Unique geometric polygon patterns with animated gradients
  • WaveInterferenceArt: Wave interference patterns using SVG filters (GLSL-inspired)
  • FractalArt: Fractal-like patterns using SVG turbulence filters
  • PlasmaArt: Plasma effects using SVG filters that simulate GLSL shader techniques

See ART_EXAMPLES.md for detailed information about the art generators.

Usage

See INTEGRATION_GUIDE.md for detailed usage instructions and examples.

Quick Start

Lazy Minting

// 1. Deploy adapter
ERC721CreatorLazyDelivery adapter = new ERC721CreatorLazyDelivery(creatorContract);

// 2. Register as extension
ICreatorCore(creatorContract).registerExtension(address(adapter), "");

// 3. Authorize marketplace
adapter.setAuthorizedMarketplace(marketplaceAddress, true);

// 4. Create listing with lazy=true

Dynamic Pricing

// Option 1: Use combined adapter
ERC721CreatorLazyDeliveryWithPricing adapter = new ERC721CreatorLazyDeliveryWithPricing(
    creatorContract,
    0.01 ether,  // basePrice
    0.001 ether  // increment
);

// Option 2: Use separate price engine (requires adapter that implements both interfaces)
LinearBondingCurvePriceEngine priceEngine = new LinearBondingCurvePriceEngine(
    0.01 ether,
    0.001 ether
);

On-Chain Art

// Deploy art generator
GenerativePolygonArt art = new GenerativePolygonArt(creatorContract);

// Register as extension
ICreatorCore(creatorContract).registerExtension(address(art), "");

// Mint tokens - each will have unique art generated
art.mint(to);

Security Notes

⚠️ Important: The setAuthorizedMarketplace() function in the adapters currently allows any caller. In production, you must add proper access control (e.g., only creator contract owner can authorize).

Testing

These contracts are designed to work with the auctionhouse marketplace. Test them thoroughly before deploying to mainnet:

  1. Deploy adapter/price engine/art contract
  2. Register adapter as extension on Creator Core
  3. Authorize marketplace address
  4. Create test listing
  5. Verify minting and pricing work correctly

License

MIT

On-Chain Art Examples

This directory contains example contracts for generating on-chain art using SVG and GLSL-inspired effects.

Art Contracts

GenerativePolygonArt

Generates unique geometric polygon art with animated gradients and rotations. Each token produces a unique polygon pattern based on token ID and owner address.

Features:

  • Procedurally generated polygon shapes (3-8 sides)
  • Radial gradients with animated rotation
  • Unique color schemes per token
  • Deterministic generation based on token ID and owner

WaveInterferenceArt

Creates wave interference patterns using SVG filters that simulate GLSL shader effects. Features animated wave patterns with interference.

Features:

  • SVG turbulence filters for wave generation
  • Color gradients with hue rotation
  • Multiple overlapping wave layers
  • Smooth animations

FractalArt

Generates fractal-like patterns using SVG filters and gradients. Creates recursive geometric patterns with procedural generation.

Features:

  • Turbulence-based fractal generation
  • Multiple octave layers for complexity
  • Animated scaling and rotation
  • Radial gradient color schemes

PlasmaArt

Creates plasma-like effects using SVG filters that simulate GLSL shader techniques. Features animated plasma patterns with color shifts.

Features:

  • Turbulence-based plasma generation
  • Animated base frequency changes
  • Hue rotation for color effects
  • Component transfer for intensity control

Usage

These contracts are Creator Core extensions that must be registered with a Creator Core contract:

// Deploy art contract
GenerativePolygonArt art = new GenerativePolygonArt(creatorContractAddress);

// Register as extension
ICreatorCore(creatorContract).registerExtension(address(art), "");

// Mint tokens
art.mint(to);

Integration with Auctionhouse

These art contracts can be used with the auctionhouse marketplace:

Standard Sales:

// Mint token
art.mint(seller);

// Transfer to marketplace
IERC721(creatorContract).transferFrom(seller, marketplace, tokenId);

// Create listing
// ... standard listing creation

Lazy Minting: Combine with ERC721CreatorLazyDelivery adapter:

// Deploy adapter
ERC721CreatorLazyDelivery adapter = new ERC721CreatorLazyDelivery(creatorContract);

// Register adapter
ICreatorCore(creatorContract).registerExtension(address(adapter), "");

// Register art contract
ICreatorCore(creatorContract).registerExtension(address(art), "");

// Authorize marketplace
adapter.setAuthorizedMarketplace(marketplaceAddress, true);

// Create lazy listing
// Token will be minted with art when purchased

Technical Details

All art contracts:

  • Implement ICreatorExtensionTokenURI to generate SVG on-chain
  • Use tag-based replacement system for efficient SVG generation
  • Generate deterministic art based on token ID and owner address
  • Support animated SVG with transform and attribute animations
  • Use SVG filters to simulate GLSL shader effects

Customization

Each contract can be customized by:

  • Modifying the SVG template in _initializeSVGTemplate()
  • Adjusting parameter ranges in tokenURI()
  • Adding new tags and replacement logic
  • Changing color schemes and animation timings

License

MIT