Skip to main content

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

NameTypeDescription
gameIdstringa off-chain game id
contractURIstringcontract-level metadata uri

createAssetAndMint

function createAssetAndMint(address collection, uint256 amount, string uri) public

create asset and mint to msg.sender address

NameTypeDescription
collectionaddresswhich collection want to create
amountuint256amount of asset
uristringnew asset's metadata uri

updateCollectionUri

function updateCollectionUri(address collection, string newUri) public

update Collection Uri

NameTypeDescription
collectionaddresscollection address
newUristringnew Contract-level metadata uri

updateSftUri

function updateSftUri(address collection, uint256 tokenId, string newUri) public

update Sft Uri

NameTypeDescription
collectionaddresscollection address
tokenIduint256token id
newUristringnew 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)