Create Smart Contract
pragma solidity ^0.8.7;
import INftRoyaltyFactoryV2 "@picardy-protocol/interface/INftRoyaltyFactoryV2.sol";
///Do not use this code snippet for production as it is just an example
///and may use hardcoded values.
contract RoyaltyManager {
INftRoyaltyFactoryV2 i_nftRoyaltyFactory;
struct Details {
uint maxSupply;
uint maxMintAmount;
uint cost;
uint percentage;
string name;
string symbol;
string initBaseURI;
string creatorName;
address creator;
}
constructor (address _nftRoyaltyFactory){
i_nftRoyaltyFactory = INftRoyaltyFactoryV2(_nftROyaltyFactory);
// You can now use all the functions available in the nftRoyaltyFactory
// like createNftRoyalty()
}
function createNftRoyalty(Details calldata _details)external {
// this function creates the royalty sale contract.
}
}Last updated