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

LandsUpgradeable

Methods

BURNER_ROLE

function BURNER_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

MINTER_ROLE

function MINTER_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

OPENSEA_POLYGON_ERC1155_PROXY

function OPENSEA_POLYGON_ERC1155_PROXY() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

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

burn

function burn(address from, uint256 id, uint256 amount) external nonpayable

Destroys amount tokens of token type id from from and reduces the balance of to by amount.See {ERC1155Upgradeable-burn}.

Parameters

NameTypeDescription
fromaddressThe address to burn tokens from.
iduint256The token id to burn.
amountuint256The amount of tokens to burn. Emits a {TransferSingle} event. Requirements: - from cannot be the zero address. - from must have at least amount tokens of token type id. - the caller must have the BURNER_ROLE.

burnBatch

function burnBatch(address from, uint256[] ids, uint256[] amounts) external nonpayable

Batched version of {_burn}.See {ERC1155Upgradeable-burnBatch}.

Parameters

NameTypeDescription
fromaddressThe address to burn tokens from.
idsuint256[]The token ids to burn.
amountsuint256[]The amounts of tokens to burn. Emits a {TransferBatch} event. Requirements: - ids and amounts must have the same length. - the caller must have the BURNER_ROLE.

contractURI

function contractURI() external view returns (string)

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

Returns

NameTypeDescription
_0stringundefined

exists

function exists(uint256 id) external view returns (bool)

Indicates whether any token exist with a given id, or not.

Parameters

NameTypeDescription
iduint256undefined

Returns

NameTypeDescription
_0boolundefined

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

getRoleMember

function getRoleMember(bytes32 role, uint256 index) external view returns (address)

Returns one of the accounts that have role. index must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.

Parameters

NameTypeDescription
rolebytes32undefined
indexuint256undefined

Returns

NameTypeDescription
_0addressundefined

getRoleMemberCount

function getRoleMemberCount(bytes32 role) external view returns (uint256)

Returns the number of accounts that have role. Can be used together with {getRoleMember} to enumerate all bearers of a role.

Parameters

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0uint256undefined

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

initialize

function initialize(string baseURI_, string contractURI_, uint256 maxMintedTokens_, uint256 maxCopiesPerToken_) external nonpayable

Citing from OpenZeppelin docs: The initialization functions use a version number. Once a version number is used, it is consumed and cannot be reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in case an upgrade adds a module that needs to be initialized. For example: contract MyToken is ERC20Upgradeable { function initialize() initializer public { __ERC20_init("MyToken", "MTK"); } } contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { function initializeV2() reinitializer(2) public { __ERC20Permit_init("MyToken"); } } TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as possible by providing the encoded function call as the _data argument to {ERC1967Proxy-constructor}. CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. [CAUTION] ==== Avoid leaving a contract uninitialized. An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: constructor() { _disableInitializers(); } ====

Initializer function. Grants DEFAULT_ADMIN_ROLE to the account that initializes the contract.

Parameters

NameTypeDescription
baseURI_stringBase URI for all tokens
contractURI_stringundefined
maxMintedTokens_uint256Maximum number of tokens to be minted
maxCopiesPerToken_uint256Maximum number of copies per token

isApprovedForAll

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

See {ERC1155Upgradeable-isApprovedForAll}.This function is overridden to add support for OpenSea's Polygon proxy accounts.See https://docs.opensea.io/docs/polygon-basic-integration

Parameters

NameTypeDescription
accountaddressAddress to check if it has the operator approval
operatoraddressAddress of the operator to check

Returns

NameTypeDescription
_0boolundefined

maxCopiesPerToken

function maxCopiesPerToken() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

maxMintedTokens

function maxMintedTokens() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

mint

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

Creates amount tokens of token type id, and assigns them to to. Also sets the token URI if uri is not empty.See {ERC1155Upgradeable-mint}.

Parameters

NameTypeDescription
toaddressThe address to mint tokens to.
iduint256The token id to mint.
amountuint256The amount of tokens to mint.
databytesadditional data with no specified format. Emits a {TransferSingle} event. Requirements: - to cannot be the zero address. - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the acceptance magic value. - the caller must have the MINTER_ROLE.

mintBatch

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

Batched version of {_mint}.See {ERC1155Upgradeable-mintBatch}.

Parameters

NameTypeDescription
toaddressThe address to mint tokens to.
idsuint256[]The token ids to mint.
amountsuint256[]The amounts of tokens to mint. Emits a {TransferBatch} event. Requirements: - ids and amounts must have the same length. - If to refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. - the caller must have the MINTER_ROLE.
databytesundefined

proxiableUUID

function proxiableUUID() external view returns (bytes32)

Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.

Returns

NameTypeDescription
_0bytes32undefined

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

See {ERC1155URIStorage-setBaseURI}

Parameters

NameTypeDescription
baseURIstringThe base URI to set. Requirements: - the caller must have the DEFAULT_ADMIN_ROLE.

setURI

function setURI(uint256 tokenId, string tokenURI) external nonpayable

See {ERC1155URIStorage-setURI}

Parameters

NameTypeDescription
tokenIduint256The token id to set the URI for.
tokenURIstringThe URI to set. Requirements: - the caller must have the DEFAULT_ADMIN_ROLE.

supportsInterface

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

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4The interface identifier, as specified in ERC-165.

Returns

NameTypeDescription
_0boolundefined

totalSupply

function totalSupply(uint256 id) external view returns (uint256)

Total amount of tokens in with a given id.

Parameters

NameTypeDescription
iduint256undefined

Returns

NameTypeDescription
_0uint256undefined

totalSupplyBatch

function totalSupplyBatch(uint256[] ids) external view returns (uint256[])

Batched version of ERC1155SupplyUpgradeable-totalSupply.

Parameters

NameTypeDescription
idsuint256[]undefined

Returns

NameTypeDescription
_0uint256[]undefined

upgradeTo

function upgradeTo(address newImplementation) external nonpayable

Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined

upgradeToAndCall

function upgradeToAndCall(address newImplementation, bytes data) external payable

Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined
databytesundefined

uri

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

Parameters

NameTypeDescription
iduint256undefined

Returns

NameTypeDescription
_0stringundefined

Events

AdminChanged

event AdminChanged(address previousAdmin, address newAdmin)

Emitted when the admin account has changed.

Parameters

NameTypeDescription
previousAdminaddressundefined
newAdminaddressundefined

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

BeaconUpgraded

event BeaconUpgraded(address indexed beacon)

Emitted when the beacon is changed.

Parameters

NameTypeDescription
beacon indexedaddressundefined

Initialized

event Initialized(uint8 version)

Triggered when the contract has been initialized or reinitialized.

Parameters

NameTypeDescription
versionuint8undefined

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

Upgraded

event Upgraded(address indexed implementation)

Emitted when the implementation is upgraded.

Parameters

NameTypeDescription
implementation indexedaddressundefined

Back to top

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