ProtocolFeesCollector

Berachain

0xb8cf46cf1b1476e707619913a70b2085d26f1707

Solidity v0.7.1+commit.f4a555be

🤖
透過你的 AI 查詢此合約
參考: 0xb8cf46cf1b1476e707619913a70b2085d26f1707
範例提示詞: "Tell me the current state of berachain/0xb8cf46cf1b1476e707619913a70b2085d26f1707"
還沒有接入 AI?→ mcp.smarts.md
Berachain 在 Smarts 上是僅文件鏈:原始碼和 ABI 已索引,但目前不提供即時鏈上資料(狀態、最新事件、管理員概覽)。AI 代理仍可透過 MCP 呼叫 get_contract_info 和 get_contract_source。

概覽

讀取函式
6
寫入函式
3
事件
2

讀取函式

getActionId(selector: bytes4) view

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

開發者: Returns the action identifier associated with the external function described by `selector`.

參數

名稱 類型 描述
selector bytes4 The 4-byte function selector used to derive the action id.✨ AI

回傳值

名稱 類型 描述
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

開發者: Returns the Vault's Authorizer.

回傳值

名稱 類型 描述
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

參數

名稱 類型 描述
tokens address[] Array of ERC20 token addresses to query protocol-collected fee balances for.✨ AI

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
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

回傳值

名稱 類型 描述
address The Vault contract address where the collector sends or stores protocol fees.✨ AI

寫入函式

setFlashLoanFeePercentage(newFlashLoanFeePercentage: uint256) nonpayable

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

參數

名稱 類型 描述
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

參數

名稱 類型 描述
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

參數

名稱 類型 描述
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

事件

FlashLoanFeePercentageChanged(newFlashLoanFeePercentage: uint256)
名稱 類型 已索引 描述
newFlashLoanFeePercentage uint256
SwapFeePercentageChanged(newSwapFeePercentage: uint256)
名稱 類型 已索引 描述
newSwapFeePercentage uint256