P12AssetFactoryUpgradable
P12AssetFactoryUpgradable
setP12CoinFactory
function setP12CoinFactory(address newP12CoinFactory) external virtual
set new p12CoinFactory @param newP12CoinFactory address of p12CoinFactory
pause
function pause() public
unpause
function unpause() public
initialize
function initialize(address owner_, address p12CoinFactory_) public
createCollection
function createCollection(string gameId, string contractURI) public
create Collection
Name | Type | Description |
---|---|---|
gameId | string | a off-chain game id |
contractURI | string | contract-level metadata uri |
createAssetAndMint
function createAssetAndMint(address collection, uint256 amount, string uri) public
create asset and mint to msg.sender address
Name | Type | Description |
---|---|---|
collection | address | which collection want to create |
amount | uint256 | amount of asset |
uri | string | new asset's metadata uri |
updateCollectionUri
function updateCollectionUri(address collection, string newUri) public
update Collection Uri
Name | Type | Description |
---|---|---|
collection | address | collection address |
newUri | string | new Contract-level metadata uri |
updateSftUri
function updateSftUri(address collection, uint256 tokenId, string newUri) public
update Sft Uri
Name | Type | Description |
---|---|---|
collection | address | collection address |
tokenId | uint256 | token id |
newUri | string | new metadata uri |
_checkCollectionDeveloper
function _checkCollectionDeveloper(address collection) private view
throw error if not collection developer
_authorizeUpgrade
function _authorizeUpgrade(address newImplementation) internal
upgrade function
onlyDeveloper
modifier onlyDeveloper(string gameId)
onlyCollectionDeveloper
modifier onlyCollectionDeveloper(address collection)