CaviarEthRoyaltyRouter.sol
Inherits: Owned, ERC721TokenReceiver
Author: out.eth
This contract is used to swap NFTs and pay royalties.
State Variables
royaltyRegistry
The royalty registry from manifold.xyz.
Functions
constructor
receive
setRoyaltyRegistry
Set the royalty registry.
Parameters
Name | Type | Description |
---|---|---|
|
| The new royalty registry. |
nftBuy
Make a buy and pay royalties.
Parameters
Name | Type | Description |
---|---|---|
|
| The pair address. |
|
| The tokenIds to buy. |
|
| The maximum amount of ETH to spend. |
|
| The deadline for the swap. |
Returns
Name | Type | Description |
---|---|---|
|
| The amount of ETH spent. |
nftSell
Sell NFTs and pay royalties.
Parameters
Name | Type | Description |
---|---|---|
|
| The pair address. |
|
| The tokenIds to sell. |
|
| The minimum amount of ETH to receive. |
|
| The deadline for the swap. |
|
| The proofs for the NFTs. |
|
|
Returns
Name | Type | Description |
---|---|---|
|
| The amount of ETH received. |
getRoyaltyRate
Get the royalty rate with 18 decimals of precision for a specific NFT collection.
Parameters
Name | Type | Description |
---|---|---|
|
| The NFT address. |
_approve
Approves the pair for transfering NFTs from this contract.
Parameters
Name | Type | Description |
---|---|---|
|
| The NFT address. |
|
| The pair address. |
_payRoyalties
Pay royalties for a list of NFTs at a specified price for each NFT.
Parameters
Name | Type | Description |
---|---|---|
|
| The NFT address. |
|
| The tokenIds to pay royalties for. |
|
| The sale price for each NFT. |
Returns
Name | Type | Description |
---|---|---|
|
| The total amount of royalties paid. |
_getRoyalty
Get the royalty for a specific NFT.
Parameters
Name | Type | Description |
---|---|---|
|
| The lookup address for the NFT royalty info. |
|
| The tokenId to get the royalty for. |
|
| The sale price for the NFT. |
Last updated