Caviar
  • Introduction
  • User Guides
    • Buying and Selling NFTs
    • Creating a New Shared Pool
    • Providing and Removing Liquidity for Shared and Custom Pools
    • Providing and Removing Liquidity for Pure-NFT Pools
    • Changing your NFTs in Pure-NFT Pools
    • Wrapping and Unwrapping NFTs
    • Impermanent Loss
  • Concepts
    • Shared pools
      • Swaps
      • Liquidity
      • Fractionalization
    • Custom pools
      • Swaps
      • Liquidity
      • Change
  • Technical Reference
    • Contract addresses
    • Shared pools
      • High level overview
      • Smart contract API
        • Caviar.sol
        • Pair.sol
        • StolenNftFilterOracle.sol
        • CaviarEthRoyaltyRouter.sol
      • Desirability Classifier
      • How to make a buy programatically
      • How to make a sell programatically
    • Custom pools
      • High level overview
      • Smart contract API
        • EthRouter
        • Factory
        • PrivatePool
        • PrivatePoolMetadata
        • IStolenNftOracle
  • Resources
    • Partners
    • NFT Collection Partnerships
    • Audits
    • Research
    • Where does the yield come from?
Powered by GitBook
On this page
  • Functions
  • tokenURI
  • attributes
  • svg
  • trait
  1. Technical Reference
  2. Custom pools
  3. Smart contract API

PrivatePoolMetadata

PreviousPrivatePoolNextIStolenNftOracle

Last updated 2 years ago

Author: out.eth (@outdoteth)

This contract is used to generate NFT metadata for private pools.

Functions

tokenURI

Returns the tokenURI for a pool with it's metadata.

function tokenURI(uint256 tokenId) public view returns (string memory);

Parameters

Name
Type
Description

tokenId

uint256

The private pool's token ID.

attributes

Returns the attributes for a pool encoded as json.

function attributes(uint256 tokenId) public view returns (string memory);

Parameters

Name
Type
Description

tokenId

uint256

The private pool's token ID.

svg

Returns an svg image for a pool.

function svg(uint256 tokenId) public view returns (bytes memory);

Parameters

Name
Type
Description

tokenId

uint256

The private pool's token ID.

trait

function trait(string memory traitType, string memory value) internal pure returns (string memory);
Git Source