An ERC1155 token contract for managing seat vouchers. This contract allows minting and burning seat vouchers, and provides functionality for associating them with specific club seats.
Methods
BURNER_ROLE
function BURNER_ROLE() external view returns (bytes32)
Returns
Name
Type
Description
_0
bytes32
undefined
DEFAULT_ADMIN_ROLE
function DEFAULT_ADMIN_ROLE() external view returns (bytes32)
Returns
Name
Type
Description
_0
bytes32
undefined
MINTER_ROLE
function MINTER_ROLE() external view returns (bytes32)
Only accessible by accounts with the DEFAULT_ADMIN_ROLE.
Adds a new set of club seats.Requires max capacity to be greater than zero
Parameters
Name
Type
Description
name_
string
The name of the club seats.
symbol_
string
The symbol of the club seats.
baseURI_
string
The base URI for token metadata.
contractURI_
string
The URI for the contract metadata.
maxCapacity_
uint256
The maximum capacity of the club seats.
balanceOf
function balanceOf(address account, uint256 id) external view returns (uint256)
See {IERC1155-balanceOf}. Requirements: - account cannot be the zero address.
Parameters
Name
Type
Description
account
address
undefined
id
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
balanceOfBatch
function balanceOfBatch(address[] accounts, uint256[] ids) external view returns (uint256[])
See {IERC1155-balanceOfBatch}. Requirements: - accounts and ids must have the same length.
Parameters
Name
Type
Description
accounts
address[]
undefined
ids
uint256[]
undefined
Returns
Name
Type
Description
_0
uint256[]
undefined
baseURI
function baseURI() external view returns (string)
Returns the base URI set via {_setBaseURI}.
Returns
Name
Type
Description
_0
string
undefined
burn
function burn(address account, uint256 id, uint256 value) external nonpayable
Only accessible by accounts with the BURNER_ROLE.
Burns a specified amount of tokens from the specified account.Requires the caller to be the token owner or approved by the owner.
Parameters
Name
Type
Description
account
address
The account to burn tokens from.
id
uint256
The ID of the token to burn.
value
uint256
The amount of tokens to burn.
burnBatch
function burnBatch(address account, uint256[] ids, uint256[] values) external nonpayable
Only accessible by accounts with the BURNER_ROLE.
Burns a batch of tokens from the specified account.Requires the caller to be the token owner or approved by the owner.
Parameters
Name
Type
Description
account
address
The account to burn tokens from.
ids
uint256[]
The IDs of the tokens to burn.
values
uint256[]
The amounts of tokens to burn for each ID.
clubSeatsFrom
function clubSeatsFrom(uint256 id) external view returns (address)
Returns the address of the club seats contract associated with the given id.
Parameters
Name
Type
Description
id
uint256
The id of the club seats.
Returns
Name
Type
Description
_0
address
The address of the club seats contract.
clubs
function clubs() external view returns (uint32)
Returns
Name
Type
Description
_0
uint32
undefined
contractURI
function contractURI() external view returns (string)
returns contract-level-metadata, See https://docs.opensea.io/docs/contract-level-metadata
Returns
Name
Type
Description
_0
string
undefined
exists
function exists(uint256 id) external view returns (bool)
Indicates whether any token exist with a given id, or not.
Parameters
Name
Type
Description
id
uint256
undefined
Returns
Name
Type
Description
_0
bool
undefined
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
Name
Type
Description
role
bytes32
undefined
Returns
Name
Type
Description
_0
bytes32
undefined
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
Name
Type
Description
role
bytes32
undefined
account
address
undefined
hasRole
function hasRole(bytes32 role, address account) external view returns (bool)
Returns true if account has been granted role.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
Returns
Name
Type
Description
_0
bool
undefined
isApprovedForAll
function isApprovedForAll(address account, address operator) external view returns (bool)
function mintBatch(address to, uint256[] ids, uint256[] amounts, bytes data) external nonpayable
Only accessible by accounts with the MINTER_ROLE.
Mints a batch of tokens to the specified account.
Parameters
Name
Type
Description
to
address
The account to mint the tokens to.
ids
uint256[]
The IDs of the tokens to be minted.
amounts
uint256[]
The amounts of tokens to mint for each ID.
data
bytes
Additional data to pass along with the minting.
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
Name
Type
Description
role
bytes32
undefined
account
address
undefined
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
Name
Type
Description
role
bytes32
undefined
account
address
undefined
safeBatchTransferFrom
function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) external nonpayable
See {IERC1155-safeBatchTransferFrom}.
Parameters
Name
Type
Description
from
address
undefined
to
address
undefined
ids
uint256[]
undefined
amounts
uint256[]
undefined
data
bytes
undefined
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) external nonpayable
See {IERC1155-safeTransferFrom}.
Parameters
Name
Type
Description
from
address
undefined
to
address
undefined
id
uint256
undefined
amount
uint256
undefined
data
bytes
undefined
setApprovalForAll
function setApprovalForAll(address operator, bool approved) external nonpayable
See {IERC1155-setApprovalForAll}.
Parameters
Name
Type
Description
operator
address
undefined
approved
bool
undefined
setBaseURI
function setBaseURI(string baseURI_) external nonpayable
Only accessible by accounts with the DEFAULT_ADMIN_ROLE.
Sets the base URI for token metadata.See {URIStorage}
Parameters
Name
Type
Description
baseURI_
string
The new base URI.
setContractURI
function setContractURI(string contractURI_) external nonpayable
Only accessible by accounts with the DEFAULT_ADMIN_ROLE.
Sets the contract URI for metadata.See {URIStorage}
Parameters
Name
Type
Description
contractURI_
string
The new contract URI.
setTokenURI
function setTokenURI(uint256 tokenId, string tokenURI_) external nonpayable
Only accessible by accounts with the DEFAULT_ADMIN_ROLE.
Sets the token URI for a given token.See {URIStorage}
Parameters
Name
Type
Description
tokenId
uint256
The ID of the token.
tokenURI_
string
The new token URI.
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
Overrides supportsInterface to include ERC1155 and AccessControl interfaces.
Parameters
Name
Type
Description
interfaceId
bytes4
undefined
Returns
Name
Type
Description
_0
bool
undefined
totalSupply
function totalSupply(uint256 id) external view returns (uint256)
Total amount of tokens in with a given id.
Parameters
Name
Type
Description
id
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
uri
function uri(uint256 tokenId) external view returns (string)
Overrides the ERC1155 uri function to retrieve the token URI.See {ERC1155URIStorage}
Emitted when newAdminRole is set as role's admin role, replacing previousAdminRoleDEFAULT_ADMIN_ROLE is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._
Emitted when account is granted role. sender is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.
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)
Emitted when value tokens of token type id are transferred from from to to by operator.
Parameters
Name
Type
Description
operator indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
id
uint256
undefined
value
uint256
undefined
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}.