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

ClubSeats

ClubSeats

An ERC721 token contract for managing club seat ownership. This contract allows minting tokens using ERC1155 vouchers and ensures that the club's seating capacity is adhered to. Tokens represent ownership of a specific seat in the club.

Methods

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

approve

function approve(address to, uint256 tokenId) external nonpayable

See {IERC721-approve}.

Parameters

NameTypeDescription
toaddressundefined
tokenIduint256undefined

balanceOf

function balanceOf(address owner) external view returns (uint256)

See {IERC721-balanceOf}.

Parameters

NameTypeDescription
owneraddressundefined

Returns

NameTypeDescription
_0uint256undefined

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

getApproved

function getApproved(uint256 tokenId) external view returns (address)

See {IERC721-getApproved}.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0addressundefined

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

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 owner, address operator) external view returns (bool)

See {IERC721-isApprovedForAll}.

Parameters

NameTypeDescription
owneraddressundefined
operatoraddressundefined

Returns

NameTypeDescription
_0boolundefined

maxCapacity

function maxCapacity() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

name

function name() external view returns (string)

See {IERC721Metadata-name}.

Returns

NameTypeDescription
_0stringundefined

ownerOf

function ownerOf(uint256 tokenId) external view returns (address)

See {IERC721-ownerOf}.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0addressundefined

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

safeMint

function safeMint(address to, uint256 tokenId) external nonpayable

Only accessible by accounts with the MINTER_ROLE.

Safely mints a new token to the specified address.Requires the total supply to be below the max capacity, and the tokenId to be within the allowed range (grater or equal to zero and less than max capacity).

Parameters

NameTypeDescription
toaddressThe address to mint the token to.
tokenIduint256The ID of the token to be minted.

safeTransferFrom

function safeTransferFrom(address from, address to, uint256 tokenId) external nonpayable

See {IERC721-safeTransferFrom}.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
tokenIduint256undefined

safeTransferFrom

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

See {IERC721-safeTransferFrom}.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
tokenIduint256undefined
databytesundefined

seatVoucher

function seatVoucher() external view returns (contract IERC1155Supply)

Returns

NameTypeDescription
_0contract IERC1155Supplyundefined

setApprovalForAll

function setApprovalForAll(address operator, bool approved) external nonpayable

See {IERC721-setApprovalForAll}.

Parameters

NameTypeDescription
operatoraddressundefined
approvedboolundefined

setBaseURI

function setBaseURI(string baseURI_) external nonpayable

Only accessible by accounts with the DEFAULT_ADMIN_ROLE.

Sets the base URI for token metadata.

Parameters

NameTypeDescription
baseURI_stringThe 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.

Parameters

NameTypeDescription
contractURI_stringThe 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.

Parameters

NameTypeDescription
tokenIduint256The ID of the token.
tokenURI_stringThe new token URI.

supportsInterface

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

Overrides supportsInterface to include ERC721 and AccessControl interfaces.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

symbol

function symbol() external view returns (string)

See {IERC721Metadata-symbol}.

Returns

NameTypeDescription
_0stringundefined

tokenURI

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

See {IERC721Metadata-tokenURI}.

Parameters

NameTypeDescription
tokenIduint256undefined

Returns

NameTypeDescription
_0stringundefined

totalSupply

function totalSupply() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

transferFrom

function transferFrom(address from, address to, uint256 tokenId) external nonpayable

See {IERC721-transferFrom}.

Parameters

NameTypeDescription
fromaddressundefined
toaddressundefined
tokenIduint256undefined

voucherID

function voucherID() external view returns (uint32)

Returns

NameTypeDescription
_0uint32undefined

Events

Approval

event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)

Emitted when owner enables approved to manage the tokenId token.

Parameters

NameTypeDescription
owner indexedaddressundefined
approved indexedaddressundefined
tokenId indexeduint256undefined

ApprovalForAll

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

Emitted when owner enables or disables (approved) operator to manage all of its assets.

Parameters

NameTypeDescription
owner 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

Transfer

event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)

Emitted when tokenId token is transferred from from to to.

Parameters

NameTypeDescription
from indexedaddressundefined
to indexedaddressundefined
tokenId indexeduint256undefined

Back to top

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