ProtocolFeesCollector

Berachain Browse chains

0xb8cf46cf1b1476e707619913a70b2085d26f1707

Solidity v0.7.1+commit.f4a555be

🤖
Query this contract from your AI
Reference: 0xb8cf46cf1b1476e707619913a70b2085d26f1707
Sample prompt: "Tell me the current state of berachain/0xb8cf46cf1b1476e707619913a70b2085d26f1707"
No AI wired up yet? → mcp.smarts.md · Browse chains
Berachain is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
6
Write Functions
3
Events
2

Read Functions

getActionId(selector: bytes4) view

Get the action identifier for a given function selector.✨ AI

dev: Returns the action identifier associated with the external function described by `selector`.

Parameters

Name Type Description
selector bytes4 The 4-byte function selector used to derive the action id.✨ AI

Returns

Name Type Description
bytes32 The 32-byte action identifier corresponding to the provided selector.✨ AI
getAuthorizer() view

Returns the address of the authorizer contract used for permission and role checks.✨ AI

dev: Returns the Vault's Authorizer.

Returns

Name Type Description
address The address of the authorizer contract that handles permissioning for protocol actions.✨ AI
getCollectedFeeAmounts(tokens: address[]) view

Return the amounts of protocol fees collected for each provided token address.✨ AI

Parameters

Name Type Description
tokens address[] Array of ERC20 token addresses to query protocol-collected fee balances for.✨ AI

Returns

Name Type Description
feeAmounts uint256[] feeAmounts: Array of uint256 values giving the collected fee amount for each token, in the token's smallest unit, matching the input order.✨ AI
getFlashLoanFeePercentage() view

Returns the current flash loan fee percentage charged by the protocol.✨ AI

Returns

Name Type Description
uint256 The current flash loan fee percentage as a uint256 value used by the protocol.✨ AI
getSwapFeePercentage() view

Returns the current swap fee percentage charged by the protocol.✨ AI

Returns

Name Type Description
uint256 The current swap fee percentage as a uint256; encoding uses the contract's fixed-point scale.✨ AI
vault() view

Returns the Vault contract address that receives protocol fees.✨ AI

Returns

Name Type Description
address The Vault contract address where the collector sends or stores protocol fees.✨ AI

Write Functions

setFlashLoanFeePercentage(newFlashLoanFeePercentage: uint256) nonpayable

Set the protocol's flash loan fee percentage to a new value.✨ AI

Parameters

Name Type Description
newFlashLoanFeePercentage uint256 New flash loan fee percentage, represented as a uint256 in the contract's fee units.✨ AI
setSwapFeePercentage(newSwapFeePercentage: uint256) nonpayable

Sets the protocol's swap fee percentage to the provided value.✨ AI

Parameters

Name Type Description
newSwapFeePercentage uint256 New swap fee percentage as an unsigned integer in the contract's internal units.✨ AI
withdrawCollectedFees(tokens: address[], amounts: uint256[], recipient: address) nonpayable

Withdraws collected protocol fees for the given tokens and sends each specified amount to the recipient.✨ AI

Parameters

Name Type Description
tokens address[] Array of token contract addresses whose collected fees will be withdrawn.✨ AI
amounts uint256[] Array of amounts to withdraw for each corresponding token (same length as tokens).✨ AI
recipient address Address that will receive the withdrawn token amounts.✨ AI

Events

FlashLoanFeePercentageChanged(newFlashLoanFeePercentage: uint256)
Name Type Indexed Description
newFlashLoanFeePercentage uint256
SwapFeePercentageChanged(newSwapFeePercentage: uint256)
Name Type Indexed Description
newSwapFeePercentage uint256