Skip to content

Solidity API

PropsERC1155CreatorSplits

This contract implements minting functionality for ERC1155 tokens with creator and referral splits

init

solidity
function init(uint256 creatorSplitBips, uint256 referralSplitBips) external

Initializes the contract with creator and referral split percentages

Parameters

NameTypeDescription
creatorSplitBipsuint256Creator split percentage in basis points (1/100 of a percent)
referralSplitBipsuint256Referral split percentage in basis points

mint

solidity
function mint(address _to, uint256 _tokenId, uint256 _quantity) public payable

Mints a single token type

Parameters

NameTypeDescription
_toaddressAddress to mint the tokens to
_tokenIduint256ID of the token to mint
_quantityuint256Number of tokens to mint

relayMint

solidity
function relayMint(address _to, uint256 _tokenId, uint256 _quantity) public payable

Allows an approved relay to mint a single token type

Parameters

NameTypeDescription
_toaddressAddress to mint the tokens to
_tokenIduint256ID of the token to mint
_quantityuint256Number of tokens to mint

mintBatch

solidity
function mintBatch(address _to, uint256[] _tokenId, uint256[] _quantity) public payable

Mints multiple token types in a single transaction

Parameters

NameTypeDescription
_toaddressAddress to mint the tokens to
_tokenIduint256[]Array of token IDs to mint
_quantityuint256[]Array of quantities for each token ID

relayMintBatch

solidity
function relayMintBatch(address _to, string _tokenIds, string _quantities, uint256 _totalQuantity) public payable

Allows an approved relay to mint multiple token types in a single transaction

Parameters

NameTypeDescription
_toaddressAddress to mint the tokens to
_tokenIdsstringComma-separated string of token IDs to mint
_quantitiesstringComma-separated string of quantities for each token ID
_totalQuantityuint256

calculateMintCost

solidity
function calculateMintCost(uint256[] _tokenId, uint256[] _quantity) public view returns (uint256)

Calculates the total cost to mint multiple token types

Parameters

NameTypeDescription
_tokenIduint256[]Array of token IDs to mint
_quantityuint256[]Array of quantities for each token ID

Return Values

NameTypeDescription
[0]uint256Total cost to mint the specified tokens

setCreatorSplit

solidity
function setCreatorSplit(uint256 creatorSplitBips) external

Sets the creator split percentage

Parameters

NameTypeDescription
creatorSplitBipsuint256New creator split percentage in basis points

setReferralSplit

solidity
function setReferralSplit(uint256 referralSplitBips) external

Sets the referral split percentage

Parameters

NameTypeDescription
referralSplitBipsuint256New referral split percentage in basis points