Skip to content
ClearClear
Docs
Protocol/FundManager

FundManager

Source: contracts/core/FundManager.sol · Guide: smart-contracts · Upgradeable (UUPS proxy)

1 min readUpdated View source

On this page
Network
Chain id
Address
Base Sepolia
84532

Functions that change state

Function
Who can call
Also
addCompatibleDeedNFT(address _deedNFT)
onlyRole(ADMIN_ROLE)
addWhitelistedToken(address token)
onlyRole(ADMIN_ROLE)
grantRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
initialize(address _validatorRegistry, uint256 initialCommissionPercentage, address _feeReceiver)
Once, when the proxy is initialised
processPayment(address payer, address validatorAddress, address token, uint256 serviceFee)
Anyone; acts on the caller's own account
nonReentrant
removeCompatibleDeedNFT(address _deedNFT)
onlyRole(ADMIN_ROLE)
removeWhitelistedToken(address token)
onlyRole(ADMIN_ROLE)
renounceRole(bytes32 role, address account)
Only the account renouncing its own role
revokeRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
setCommissionPercentage(uint256 newCommissionPercentage)
onlyRole(ADMIN_ROLE)
setFeeReceiver(address _feeReceiver)
onlyRole(ADMIN_ROLE)
setValidatorRegistry(address _validatorRegistry)
onlyRole(ADMIN_ROLE)
updateValidatorRoles()
Checked inside the function
upgradeTo(address newImplementation)
onlyRole(DEFAULT_ADMIN_ROLE) (via _authorizeUpgrade)
upgradeToAndCall(address newImplementation, bytes data)
onlyRole(DEFAULT_ADMIN_ROLE) (via _authorizeUpgrade)
payable
withdrawRoyaltyCommission(address validatorContract, address token)
Checked inside the function
nonReentrant
withdrawValidatorFees(address validatorContract, address token)
Checked inside the function
nonReentrant

Read functions

Anyone can call these; they change nothing.

Function
Returns
ADMIN_ROLE()
bytes32
allCompatibleDeedNFTs(uint256)
address
commissionPercentage()
uint256
compatibleDeedNFTs(address)
bool
DEFAULT_ADMIN_ROLE()
bytes32
FEE_MANAGER_ROLE()
bytes32
feeReceiver()
address
formatFee(uint256 amount)
string
getCommissionPercentage()
uint256
getCompatibleDeedNFTs()
address[]
getRoleAdmin(bytes32 role)
bytes32
getValidatorFeeBalance(address validatorContract, address token)
uint256
getWhitelistedTokens()
address[]
hasRole(bytes32 role, address account)
bool
isCompatibleDeedNFT(address _deedNFT)
bool
MINTER_ROLE()
bytes32
proxiableUUID()
bytes32
supportsInterface(bytes4 interfaceId)
bool
validatorRegistry()
address

Events

Event
AdminChanged(address previousAdmin, address newAdmin)
BeaconUpgraded(address beacon indexed)
CommissionPercentageUpdated(uint256 newCommissionPercentage)
CompatibleDeedNFTUpdated(address deedNFT indexed, bool isCompatible)
FeeReceiverUpdated(address newFeeReceiver indexed)
Initialized(uint8 version)
RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)
RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)
RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)
RoyaltyCommissionWithdrawn(address validator indexed, address token indexed, uint256 amount, uint256 commissionAmount)
ServiceFeeCollected(address validator indexed, address token indexed, uint256 amount, uint256 commission)
Upgraded(address implementation indexed)
ValidatorFeesWithdrawn(address validator indexed, address token indexed, uint256 amount, address recipient indexed)
ValidatorRegistryUpdated(address newValidatorRegistry indexed)

Errors

No custom errors; failures revert with a reason string.