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

GOBManager

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

_clubIdToClubs

function _clubIdToClubs(uint256) external view returns (string name, address tokenAddress)

ClubId => Club

Parameters

NameTypeDescription
_0uint256undefined

Returns

NameTypeDescription
namestringundefined
tokenAddressaddressundefined

_nftAddressToClubId

function _nftAddressToClubId(address) external view returns (uint256)

NFTAddress => ClubId

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

addClub

function addClub(string clubName, address tokenAddress) external nonpayable

Creates a new club.

Parameters

NameTypeDescription
clubNamestringName of the club to create.
tokenAddressaddressAddress 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

NameTypeDescription
_0uint256undefined

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

NameTypeDescription
clubNamesstring[]Names of all the club.
clubTokenAddressesaddress[]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

NameTypeDescription
iduint256Id of the club to query.

Returns

NameTypeDescription
clubNamestringName of the club.
clubTokenAddressaddressAddress 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

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0bytes32undefined

gobToken

function gobToken() external view returns (contract IERC20)

instance of the interface to the main ERC20 token.

Returns

NameTypeDescription
_0contract IERC20undefined

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

mintTokensTo

function mintTokensTo(address to, uint256 amount) external nonpayable

Mints amount GOB and Club tokens to to. Used for rewards distribution.

Parameters

NameTypeDescription
toaddressAddress to mint tokens to.
amountuint256Amount 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

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

supportsInterface

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

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

Events

ClubAdded

event ClubAdded(string clubName)

event that is called when a new club is added in the addClub function.

Parameters

NameTypeDescription
clubNamestringundefined

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

Back to top

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