BalancerHelpers

Berachain

0x5083737ec75a728c265be578c9d0d5333a2c5951

Solidity v0.7.1+commit.f4a555be

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

概覽

讀取函式
1
寫入函式
2
事件
0

讀取函式

vault() view

Return the Balancer Vault contract address.✨ AI

回傳值

名稱 類型 描述
address The address of the Balancer Vault contract.✨ AI

寫入函式

queryExit(poolId: bytes32, sender: address, recipient: address, request: tuple) nonpayable

Estimates the BPT to burn and the token amounts returned for a specified pool exit request.✨ AI

開發者: Returns the amount of BPT that would be burned from `sender` if the `onExitPool` hook were called by the Vault with the same arguments, along with the number of tokens `recipient` would receive. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.

參數

名稱 類型 描述
poolId bytes32 Identifier of the Balancer pool to exit.✨ AI
sender address Address initiating the exit (caller or owner of the BPT).✨ AI
recipient address Address that will receive the withdrawn tokens.✨ AI
request tuple Exit request struct containing exit kind, involved assets, minimums, and userData.✨ AI

回傳值

名稱 類型 描述
bptIn uint256 bptIn: the amount of pool tokens (BPT) that must be burned to perform the exit.✨ AI
amountsOut uint256[] amountsOut: array of token amounts that will be sent to the recipient for each pool asset.✨ AI
queryJoin(poolId: bytes32, sender: address, recipient: address, request: tuple) nonpayable

Estimate BPT to mint and required token amounts for joining a Balancer pool with the given request.✨ AI

開發者: Returns the amount of BPT that would be granted to `recipient` if the `onJoinPool` hook were called by the Vault with the same arguments, along with the number of tokens `sender` would have to supply. This function is not meant to be called directly, but rather from a helper contract that fetches current Vault data, such as the protocol swap fee percentage and Pool balances. Like `IVault.queryBatchSwap`, this function is not view due to internal implementation details: the caller must explicitly use eth_call instead of eth_sendTransaction.

參數

名稱 類型 描述
poolId bytes32 Identifier of the Balancer pool to join.✨ AI
sender address Address initiating the join and supplying tokens.✨ AI
recipient address Address that will receive the minted pool tokens (BPT).✨ AI
request tuple Join request struct: assets, maxAmountsIn, userData, and fromInternalBalance flag.✨ AI

回傳值

名稱 類型 描述
bptOut uint256 bptOut: Estimated amount of BPT that will be minted for the recipient.✨ AI
amountsIn uint256[] amountsIn: Array of token amounts the sender must provide for the join.✨ AI