ProtocolConfig
ProtocolConfig stores configuration associated with the OpenGuild protocol, including take rates and contract address whitelists
Methods
DEFAULT_ADMIN_ROLE
Returns
OWNER_ROLE
Returns
PAUSER_ROLE
Returns
POOL_MANAGER_TAKE_RATE
Returns
PROTOCOL_TAKE_RATE
Returns
TAKE_RATE_PRECISION
Returns
__BaseUpgradeablePausable__init
Parameters
__PauserPausable__init
addAggregatePool
Adds the given aggregate pool to the array of validAggregatePoolsOnly callable by the admin
Parameters
addIndividualPool
Adds the given individual pool to the array of validIndividualPoolsOnly callable by the admin
Parameters
addresses
Parameters
Returns
getAddress
The address at a given index
Parameters
Returns
getGovernanceTokenContract
Returns the governance token contract
Returns
getPoolManagerTakeRate
Returns
getProtocolTakeRate
Returns
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Returns
getRoleMember
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
Returns
getRoleMemberCount
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Parameters
Returns
getTakeRatePrecision
Returns
getTreasuryAddress
Returns the governance token contract
Returns
grantRole
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.
Parameters
hasRole
Returns true
if account
has been granted role
.
Parameters
Returns
initialize
Run only once, on initialization
Parameters
isAdmin
Returns
isValidAggregatePool
Parameters
Returns
isValidIndividualPool
Whether or not the individual pool is valid
Parameters
Returns
pause
Pauses all functions guarded by Pause See {Pausable-_pause}. Requirements: - the caller must have the PAUSER_ROLE.
paused
Returns true if the contract is paused, and false otherwise.
Returns
removeAggregatePool
Removes the given aggregate pool from the array of validAggregatePoolsOnly callable by the admin
Parameters
removeIndividualPool
Removes the given individual pool from the array of validIndividualPoolsOnly callable by the admin
Parameters
renounceRole
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
.
Parameters
revokeRole
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Parameters
setGovernanceTokenAddress
Sets the governance token address in the addresses mappingOnly callable by the admin
Parameters
setTreasuryAddress
Sets the treasury address in the addresses mappingOnly callable by the admin
Parameters
supportsInterface
See {IERC165-supportsInterface}.
Parameters
Returns
unpause
Unpauses the contract See {Pausable-_unpause}. Requirements: - the caller must have the Pauser role
validAggregatePools
Parameters
Returns
validIndividualPools
Parameters
Returns
Events
Paused
Parameters
RoleAdminChanged
Parameters
RoleGranted
Parameters
RoleRevoked
Parameters
Unpaused
Parameters
Last updated