Appearance
Solidity API
IPropsERC1155CreatorSplits
Interface for ERC1155 token with creator splits functionality
This interface defines functions and events related to minting and setting creator/referral splits
Mint
solidity
event Mint(address to, uint256[] tokenId, uint256[] quantity, uint256 totalFee, address[] recipients, uint256[] feeAmounts)Event emitted when tokens are minted with creator splits
Parameters
| Name | Type | Description |
|---|---|---|
| to | address | The address receiving the minted tokens |
| tokenId | uint256[] | An array of token IDs being minted |
| quantity | uint256[] | An array of quantities for each token ID being minted |
| totalFee | uint256 | The total fee collected for this mint operation |
| recipients | address[] | An array of addresses receiving a portion of the fee |
| feeAmounts | uint256[] | An array of fee amounts corresponding to each recipient |
CreatorSplitSet
solidity
event CreatorSplitSet(uint256 creatorSplitBips)Event emitted when the creator split percentage is set or updated
Parameters
| Name | Type | Description |
|---|---|---|
| creatorSplitBips | uint256 | The new creator split in basis points (1/100th of a percent) |
ReferralSplitSet
solidity
event ReferralSplitSet(uint256 referralSplitBips)Event emitted when the referral split percentage is set or updated
Parameters
| Name | Type | Description |
|---|---|---|
| referralSplitBips | uint256 | The new referral split in basis points (1/100th of a percent) |
init
solidity
function init(uint256 creatorSplitBips, uint256 referralSplitBips) externalInitializes the contract with creator and referral split percentages
Parameters
| Name | Type | Description |
|---|---|---|
| creatorSplitBips | uint256 | Creator split percentage in basis points (1/100 of a percent) |
| referralSplitBips | uint256 | Referral split percentage in basis points |
mint
solidity
function mint(address _to, uint256 _tokenId, uint256 _quantity) external payableMints a single token type
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | Address to mint the tokens to |
| _tokenId | uint256 | ID of the token to mint |
| _quantity | uint256 | Number of tokens to mint |
relayMint
solidity
function relayMint(address _to, uint256 _tokenId, uint256 _quantity) external payableAllows an approved relay to mint a single token type
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | Address to mint the tokens to |
| _tokenId | uint256 | ID of the token to mint |
| _quantity | uint256 | Number of tokens to mint |
mintBatch
solidity
function mintBatch(address _to, uint256[] _tokenId, uint256[] _quantity) external payableMints multiple token types in a single transaction
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | Address to mint the tokens to |
| _tokenId | uint256[] | Array of token IDs to mint |
| _quantity | uint256[] | Array of quantities for each token ID |
relayMintBatch
solidity
function relayMintBatch(address _to, string _tokenIds, string _quantities, uint256 _totalQuantity) external payableAllows an approved relay to mint multiple token types in a single transaction
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | Address to mint the tokens to |
| _tokenIds | string | Comma-separated string of token IDs to mint |
| _quantities | string | Comma-separated string of quantities for each token ID |
| _totalQuantity | uint256 | Total quantity of tokens being minted |
calculateMintCost
solidity
function calculateMintCost(uint256[] _tokenId, uint256[] _quantity) external view returns (uint256)Calculates the total cost to mint multiple token types
Parameters
| Name | Type | Description |
|---|---|---|
| _tokenId | uint256[] | Array of token IDs to mint |
| _quantity | uint256[] | Array of quantities for each token ID |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | Total cost to mint the specified tokens |
setCreatorSplit
solidity
function setCreatorSplit(uint256 creatorSplitBips) externalSets the creator split percentage
Parameters
| Name | Type | Description |
|---|---|---|
| creatorSplitBips | uint256 | New creator split percentage in basis points |
setReferralSplit
solidity
function setReferralSplit(uint256 referralSplitBips) externalSets the referral split percentage
Parameters
| Name | Type | Description |
|---|---|---|
| referralSplitBips | uint256 | New referral split percentage in basis points |