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
  • State Variables
  • TOKEN_TYPE_HASH
  • cooldownPeriod
  • validFor
  • Functions
  • constructor
  • setCooldownPeriod
  • setValidFor
  • validateTokensAreNotStolen
  1. Technical Reference
  2. Shared pools
  3. Smart contract API

StolenNftFilterOracle.sol

Git Source

Inherits: ReservoirOracle, Owned

Author: out.eth (@outdoteth)

A contract to check that a set of NFTs are not stolen.

State Variables

TOKEN_TYPE_HASH

bytes32 private constant TOKEN_TYPE_HASH = keccak256("Token(address contract,uint256 tokenId)");

cooldownPeriod

uint256 public cooldownPeriod = 0;

validFor

uint256 public validFor = 60 minutes;

Functions

constructor

constructor() Owned(msg.sender) ReservoirOracle(0x32dA57E736E05f75aa4FaE2E9Be60FD904492726);

setCooldownPeriod

Sets the cooldown period.

function setCooldownPeriod(uint256 _cooldownPeriod) public onlyOwner;

Parameters

Name
Type
Description

_cooldownPeriod

uint256

The cooldown period.

setValidFor

Sets the valid for period.

function setValidFor(uint256 _validFor) public onlyOwner;

Parameters

Name
Type
Description

_validFor

uint256

The valid for period.

validateTokensAreNotStolen

Checks that a set of NFTs are not stolen.

function validateTokensAreNotStolen(address tokenAddress, uint256[] calldata tokenIds, Message[] calldata messages)
    public
    view;

Parameters

Name
Type
Description

tokenAddress

address

The address of the NFT contract.

tokenIds

uint256[]

The ids of the NFTs.

messages

Message[]

The messages signed by the reservoir oracle.

PreviousPair.solNextCaviarEthRoyaltyRouter.sol

Last updated 2 years ago