function DEFAULT_ADMIN_ROLE() external view returns (bytes32)
Returns
Name
Type
Description
_0
bytes32
undefined
_clubIdToClubs
function _clubIdToClubs(uint256) external view returns (string name, address tokenAddress)
ClubId => Club
Parameters
Name
Type
Description
_0
uint256
undefined
Returns
Name
Type
Description
name
string
undefined
tokenAddress
address
undefined
_nftAddressToClubId
function _nftAddressToClubId(address) external view returns (uint256)
NFTAddress => ClubId
Parameters
Name
Type
Description
_0
address
undefined
Returns
Name
Type
Description
_0
uint256
undefined
addClub
function addClub(string clubName, address tokenAddress) external nonpayable
Creates a new club.
Parameters
Name
Type
Description
clubName
string
Name of the club to create.
tokenAddress
address
Address of the clubToken associated with the club. Emits a {ClubAdded} event. Requirements: - Must be called by the owner. - token is assumed to be a valid ERC20 token.
clubId
function clubId() external view returns (uint256)
nonce used to generate clubId.
Returns
Name
Type
Description
_0
uint256
undefined
getAllClubs
function getAllClubs() external view returns (string[] clubNames, address[] clubTokenAddresses)
clubNames[i] and clubTokenAddresses[i] represents a Club which id is i+1.
Returns information about all clubs registered.
Returns
Name
Type
Description
clubNames
string[]
Names of all the club.
clubTokenAddresses
address[]
Addresses of the clubTokens associated with each club.
getClubInfo
function getClubInfo(uint256 id) external view returns (string clubName, address clubTokenAddress)
Returns information about a club given its id.
Parameters
Name
Type
Description
id
uint256
Id of the club to query.
Returns
Name
Type
Description
clubName
string
Name of the club.
clubTokenAddress
address
Address of the clubToken associated with that club.
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
gobToken
function gobToken() external view returns (contract IERC20)
instance of the interface to the main ERC20 token.
Returns
Name
Type
Description
_0
contract IERC20
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
mintTokensTo
function mintTokensTo(address to, uint256 amount) external nonpayable
Mints amount GOB and Club tokens to to. Used for rewards distribution.
Parameters
Name
Type
Description
to
address
Address to mint tokens to.
amount
uint256
Amount of tokens to mint. Requirements: - Must be called by a club. - It is assumed that this contract has the required MINTER_ROLE in both gobToken and clubToken nft contracts.
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
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
See {IERC165-supportsInterface}.
Parameters
Name
Type
Description
interfaceId
bytes4
undefined
Returns
Name
Type
Description
_0
bool
undefined
Events
ClubAdded
event ClubAdded(string clubName)
event that is called when a new club is added in the addClub function.
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)