BalancerHelpers
Berachain0x5083737ec75a728c265be578c9d0d5333a2c5951
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 |