Skip to main content

FactoryERC1155

FactoryERC1155

INTERNAL TOOL Used to factory ERC721 NFTs for unit testing

lastTokenId

uint256 lastTokenId

defaultTokenMint

uint256 defaultTokenMint

constructor

constructor(string uri, uint256[] initialMint) public

Creates ERC721 token

NameTypeDescription
uristringassociate
initialMintuint256[]

mintTokens

function mintTokens(uint256[] amounts) public

Creates and gives a token to whoever calls the method

NameTypeDescription
amountsuint256[]array of token amounts to mint for each tokenID

mint

function mint(address to, uint256 tokenId, uint256 amount) public

Mints a token and assigns it to to. doesn't require permissions.

NameTypeDescription
toaddressadd
tokenIduint256token
amountuint256

mintBatch

function mintBatch(address to, uint256[] ids, uint256[] amounts, bytes data) public

Must have MINTER_ROLE

Allows caller to mint NFTs (safeMint)

NameTypeDescription
toaddressaddress to
idsuint256[]id values
amountsuint256[]to mint
databytesfor hooks

setTrustedForwarder

function setTrustedForwarder(address forwarder) public

_msgSender

function _msgSender() internal view returns (address sender)

the following 3 functions are all required for OpenGSN integration

_msgData

function _msgData() internal view returns (bytes)

versionRecipient

function versionRecipient() external pure returns (string)