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.
struct Details {
uint256 maxSupply;
uint256 maxMintAmount;
uint256 cost;
uint256 percentage;
string name;
string symbol;
string initBaseURI;
string creatorName;
address creator;
}
struct NftRoyaltyDetails {
uint256 royaltyId;
uint256 royaltyPercentage;
string royaltyName;
address royaltyAddress;
}
struct RoyaltyDetails {
uint256 royaltyPercentage;
address royaltyAddress;
}
function createNftRoyalty(struct NftRoyaltySaleFactoryV2.Details details) external returns (address)
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 |
function updateRoyaltyDetails(uint256 _royaltyPercentage) external
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 | |
function getLinkToken() external view returns (address)
function getRoyaltyDetails() external view returns (address, uint256)
function getHubAddress() external view returns (address)
function getNftRoyaltySaleAddress(string _creatorName, string _name) external view returns (address)