Skip to main content Link Menu Expand (external link) Document Search Copy Copied

CrossmintableERC1155Asset

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

SELLER_ROLE

function SELLER_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

WITHDRAW_ROLE

function WITHDRAW_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

balanceOf

function balanceOf(address account, uint256 id) external view returns (uint256)

See {IERC1155-balanceOf}. Requirements: - account cannot be the zero address.

Parameters

NameTypeDescription
accountaddressundefined
iduint256undefined

Returns

NameTypeDescription
_0uint256undefined

balanceOfBatch

function balanceOfBatch(address[] accounts, uint256[] ids) external view returns (uint256[])

See {IERC1155-balanceOfBatch}. Requirements: - accounts and ids must have the same length.

Parameters

NameTypeDescription
accountsaddress[]undefined
idsuint256[]undefined

Returns

NameTypeDescription
_0uint256[]undefined

baseURI

function baseURI() external view returns (string)

Returns the base URI set via {_setBaseURI}.

Returns

NameTypeDescription
_0stringundefined

contractURI

function contractURI() external view returns (string)

returns contract-level-metadata, See https://docs.opensea.io/docs/contract-level-metadata

Returns

NameTypeDescription
_0stringundefined

createBatch

function createBatch(address to, uint256[] ids, uint256[] amounts, string[] uris, uint256[] usdcPrices, bytes data) external nonpayable

See {ERC1155-_mintBatch}. Also updates the uri and prices for each token id

Parameters

NameTypeDescription
toaddressundefined
idsuint256[]undefined
amountsuint256[]undefined
urisstring[]undefined
usdcPricesuint256[]undefined
databytesundefined

getPrices

function getPrices(uint256[] tokenIds) external view returns (uint256[])

Returns the prices for the given token ids.

Parameters

NameTypeDescription
tokenIdsuint256[]The token ids to get the prices for

Returns

NameTypeDescription
_0uint256[]usdcPrices Array of USDC prices

getRoleAdmin

function getRoleAdmin(bytes32 role) external view returns (bytes32)

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0bytes32undefined

getUSDCPrice

function getUSDCPrice(uint256 tokenId) external view returns (uint256)

Returns the USDC price for a token id.

Parameters

NameTypeDescription
tokenIduint256The token id to get the price for

Returns

NameTypeDescription
_0uint256usdcPrice The USDC price

grantRole

function grantRole(bytes32 role, address account) external nonpayable

Grants role to account. If account had not been already granted role, emits a {RoleGranted} event. Requirements: - the caller must have role's admin role. May emit a {RoleGranted} event.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

hasRole

function hasRole(bytes32 role, address account) external view returns (bool)

Returns true if account has been granted role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

Returns

NameTypeDescription
_0boolundefined

isApprovedForAll

function isApprovedForAll(address account, address operator) external view returns (bool)

See {IERC1155-isApprovedForAll}.

Parameters

NameTypeDescription
accountaddressundefined
operatoraddressundefined

Returns

NameTypeDescription
_0boolundefined

mintUSDC

function mintUSDC(address account, uint256 id, uint256 amount, bytes data) external payable

See {ERC1155CrossmintAdapter-mintUSDC}.

Parameters

NameTypeDescription
accountaddressundefined
iduint256undefined
amountuint256undefined
databytesundefined

mintUSDCBatch

function mintUSDCBatch(address to, uint256[] ids, uint256[] amounts, bytes data) external payable

See {ERC1155CrossmintAdapter-mintUSDCBatch}.

Parameters

NameTypeDescription
toaddressundefined
idsuint256[]undefined
amountsuint256[]undefined
databytesundefined

prices

function prices(uint256) external view returns (uint256)

Parameters

NameTypeDescription
_0uint256undefined

Returns

NameTypeDescription
_0uint256undefined

renounceRole

function renounceRole(bytes32 role, address account) external nonpayable

Revokes role from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role, emits a {RoleRevoked} event. Requirements: - the caller must be account. May emit a {RoleRevoked} event.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

revokeRole

function revokeRole(bytes32 role, address account) external nonpayable

Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role. May emit a {RoleRevoked} event.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

safeBatchTransferFrom

function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) external nonpayable

See {IERC1155-safeBatchTransferFrom}.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
idsuint256[]undefined
amountsuint256[]undefined
databytesundefined

safeTransferFrom

function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) external nonpayable

See {IERC1155-safeTransferFrom}.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
iduint256undefined
amountuint256undefined
databytesundefined

setApprovalForAll

function setApprovalForAll(address operator, bool approved) external nonpayable

See {IERC1155-setApprovalForAll}.

Parameters

NameTypeDescription
operatoraddressundefined
approvedboolundefined

setBaseURI

function setBaseURI(string baseURI_) external nonpayable

Sets baseURI_ as the _baseURI for all tokens

Parameters

NameTypeDescription
baseURI_stringundefined

setCrossmintAddress

function setCrossmintAddress(address crossmintAddress_) external nonpayable

sets crossmint address, used in crossmint's treasury address rotation, to be implemented with proper access control, and role revokal and granting

Parameters

NameTypeDescription
crossmintAddress_addressundefined

setUSDCAddress

function setUSDCAddress(address usdcAddress_) external nonpayable

See {ERC1155CrossmintAdapter-setUsdcAddress}.

Parameters

NameTypeDescription
usdcAddress_addressundefined

setUSDCPrice

function setUSDCPrice(uint256 tokenId, uint256 usdcPrice_) external nonpayable

See {ERC1155CrossmintAdapter-set USDC Prices}.

Parameters

NameTypeDescription
tokenIduint256undefined
usdcPrice_uint256undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

See {ERC165-supportsInterface}

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

uri

function uri(uint256 tokenId) external view returns (string)

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0stringundefined

usdc

function usdc() external view returns (contract IERC20)

Returns

NameTypeDescription
_0contract IERC20undefined

withdrawUSDC

function withdrawUSDC() external nonpayable

See {ERC1155CrossmintAdapter-withdrawUSDC}.

withdrawUSDC

function withdrawUSDC(uint256 amount) external nonpayable

See {ERC1155CrossmintAdapter-withdrawUSDC}.

Parameters

NameTypeDescription
amountuint256undefined

Events

ApprovalForAll

event ApprovalForAll(address indexed account, address indexed operator, bool approved)

Emitted when account grants or revokes permission to operator to transfer their tokens, according to approved.

Parameters

NameTypeDescription
account indexedaddressundefined
operator indexedaddressundefined
approvedboolundefined

RoleAdminChanged

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Emitted when newAdminRole is set as role's admin role, replacing previousAdminRole DEFAULT_ADMIN_ROLE is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._

Parameters

NameTypeDescription
role indexedbytes32undefined
previousAdminRole indexedbytes32undefined
newAdminRole indexedbytes32undefined

RoleGranted

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Emitted when account is granted role. sender is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

RoleRevoked

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Emitted when account is revoked role. sender is the account that originated the contract call: - if using revokeRole, it is the admin role bearer - if using renounceRole, it is the role bearer (i.e. account)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

TransferBatch

event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values)

Equivalent to multiple {TransferSingle} events, where operator, from and to are the same for all transfers.

Parameters

NameTypeDescription
operator indexedaddressundefined
from indexedaddressundefined
to indexedaddressundefined
idsuint256[]undefined
valuesuint256[]undefined

TransferSingle

event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value)

Emitted when value tokens of token type id are transferred from from to to by operator.

Parameters

NameTypeDescription
operator indexedaddressundefined
from indexedaddressundefined
to indexedaddressundefined
iduint256undefined
valueuint256undefined

URI

event URI(string value, uint256 indexed id)

Emitted when the URI for token type id changes to value, if it is a non-programmatic URI. If an {URI} event was emitted for id, the standard https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that value will equal the value returned by {IERC1155MetadataURI-uri}.

Parameters

NameTypeDescription
valuestringundefined
id indexeduint256undefined

USDCAddressChanged

event USDCAddressChanged(address oldUsdcAddress, address usdcAddress)

Parameters

NameTypeDescription
oldUsdcAddressaddressundefined
usdcAddressaddressundefined

USDCPayment

event USDCPayment(address from, uint256 totalPrice)

Parameters

NameTypeDescription
fromaddressundefined
totalPriceuint256undefined

USDCPriceChanged

event USDCPriceChanged(uint256 tokenId, uint256 price)

Parameters

NameTypeDescription
tokenIduint256undefined
priceuint256undefined

USDCWithdrawn

event USDCWithdrawn(address indexed receiver, uint256 amount)

Emitted when fees are withdrawn in withdrawUSDC().

Parameters

NameTypeDescription
receiver indexedaddressundefined
amountuint256undefined

Back to top

Copyright © Guardians Of The Ball. This site is powered by Gitlab Pages