Caviar.sol
Inherits: Owned
Author: out.eth (@outdoteth)
An AMM for creating and trading fractionalized NFTs.
State Variables
pairs
pairs[nft][baseToken][merkleRoot] -> pair
mapping(address => mapping(address => mapping(bytes32 => address))) public pairs;
stolenNftFilterOracle
The stolen nft filter oracle address
address public stolenNftFilterOracle;
Functions
constructor
constructor(address _stolenNftFilterOracle) Owned(msg.sender);
setStolenNftFilterOracle
Sets the stolen nft filter oracle address.
function setStolenNftFilterOracle(address _stolenNftFilterOracle) public onlyOwner;
Parameters
Name
Type
Description
_stolenNftFilterOracle
address
The stolen nft filter oracle address.
create
Creates a new pair.
function create(address nft, address baseToken, bytes32 merkleRoot) public returns (Pair pair);
Parameters
Name
Type
Description
nft
address
The NFT contract address.
baseToken
address
The base token contract address.
merkleRoot
bytes32
The merkle root for the valid tokenIds.
Returns
Name
Type
Description
pair
Pair
The address of the new pair.
destroy
Deletes the pair for the given NFT, base token, and merkle root.
function destroy(address nft, address baseToken, bytes32 merkleRoot) public;
Parameters
Name
Type
Description
nft
address
The NFT contract address.
baseToken
address
The base token contract address.
merkleRoot
bytes32
The merkle root for the valid tokenIds.
Events
SetStolenNftFilterOracle
event SetStolenNftFilterOracle(address indexed stolenNftFilterOracle);
Create
event Create(address indexed nft, address indexed baseToken, bytes32 indexed merkleRoot);
Destroy
event Destroy(address indexed nft, address indexed baseToken, bytes32 indexed merkleRoot);
Last updated