Nft Royalty Sale Factory

The Nft Royalty Sale Factory smart contract is a factory contract that allows the creation of NftRoyaltySale contracts. An NftRoyaltySale contract represents a sale of non-fungible tokens (NFTs) with a royalty payment mechanism built in.

The factory contract maintains a mapping of NFT royalty sale contracts, indexed by the artist's name and the NFT name, as well as a mapping of NFT royalty details, indexed by the contract's address. It also maintains a struct called RoyaltyDetails, which holds the percentage of royalties to be paid and the address of the party receiving the royalties.

NftRoyaltySaleFactoryV2

Details

struct Details {
  uint256 maxSupply;
  uint256 maxMintAmount;
  uint256 cost;
  uint256 percentage;
  string name;
  string symbol;
  string initBaseURI;
  string creatorName;
  address creator;
}

NftRoyaltyDetails

struct NftRoyaltyDetails {
  uint256 royaltyId;
  uint256 royaltyPercentage;
  string royaltyName;
  address royaltyAddress;
}

RoyaltyDetails

createNftRoyalty

Creates a new NftRoyaltySale contract

The NftRoyaltySale contract is created using the Clones library

Parameters

Name
Type
Description

details

struct NftRoyaltySaleFactoryV2.Details

Return Values

Name
Type
Description

[0]

address

Address of the newly created NftRoyaltySale contract

updateRoyaltyDetails

Updates the royalty details

Only the Picardy Hub Admin can call this function. Do not confuse this with the royalty percentage for the NftRoyaltySale contract

Parameters

Name
Type
Description

_royaltyPercentage

uint256

getLinkToken

getRoyaltyDetails

getHubAddress

getNftRoyaltySaleAddress

Last updated