Artiste / Creators Token Factory
This factory or module allows for the tokenization of a creator or an artiste, their brand or their creation/music as an ERC20 token that can be traded and as an asset or attached to real world value. This factory exposes a couple of functions.
The factory contract maintains a mapping of ArtisteToken contracts, indexed by the token name and symbol, as well as a mapping of ArtisteToken details, indexed by the token ID. 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.
event NewArtisteTokenCreated(uint256 tokenId, uint256 totalAmount, address tokenAddress)
event RoyaltyDetailsUpdated(uint256 percentage, address royaltyAddress)
address picardyHub
struct ArtisteToken {
uint256 artisteTokenId;
uint256 totalAmount;
string name;
string symbol;
address creator;
address artisteTokenAddress;
uint256 cost;
}
struct RoyaltyDetails {
uint256 royaltyPercentage;
address royaltyAddress;
}
struct ArtisteTokenFactory.RoyaltyDetails royaltyDetails
mapping(string => mapping(string => address)) tokenAddressMap
mapping(uint256 => struct ArtisteTokenFactory.ArtisteToken) artisteTokenMap
uint256 artisteTokenId
constructor(address _picardyHub) public
function createArtisteToken(uint256 _totalAmount, string _name, string _symbol, uint256 _cost) external
_Creats an ERC20 contract to the caller @param _totalAmount The maximum suppyly of the token @param _name Token name @param symbol Token symbol
function getHubAddress() external view returns (address)
function updateRoyaltyDetails(uint256 _royaltyPercentage) external
function getRoyaltyDetails() external view returns (address, uint256)
function getTokenAddress(string _name, string _symbol) external view returns (address)