SBCDepositContract

Gnosis

0x0b98057ea310f4d31f2a452b414647007d1645d9

Proxy 实现合约: 0x49de1aced385334f1a66d86db363264eb5b6a708

Solidity v0.8.9+commit.e5eed63a

🤖
通过你的 AI 查询此合约
引用: 0x0b98057ea310f4d31f2a452b414647007d1645d9
示例提示词: "Tell me the current state of gnosis/0x0b98057ea310f4d31f2a452b414647007d1645d9"
还没有接入 AI?→ mcp.smarts.md
Gnosis 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。

概览

读取函数
7
写入函数
12
事件
3

读取函数

get_deposit_count() view

Query the current deposit count.

返回值

名称 类型 描述
bytes The deposit count encoded as a little endian 64-bit number.
get_deposit_root() view

Query the current deposit root hash.

返回值

名称 类型 描述
bytes32 The deposit root hash.
paused() view

Reports whether the contract is currently paused.✨ AI

开发者: Returns true if the contract is paused, and false otherwise.

返回值

名称 类型 描述
bool True if the contract is paused, false if it is active.✨ AI
stake_token() view

Return the ERC-20 token contract address that users stake in this contract.✨ AI

返回值

名称 类型 描述
address Address of the ERC-20 token accepted for staking.✨ AI
supportsInterface(interfaceId: bytes4) pure

Check whether the contract implements the interface specified by interfaceId.✨ AI

开发者: Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.

参数

名称 类型 描述
interfaceId bytes4 ERC-165 interface identifier to query.✨ AI

返回值

名称 类型 描述
bool true if the contract implements the given interface; false otherwise.✨ AI
validator_withdrawal_credentials(bytes) view

Return the 32-byte validator withdrawal credentials derived from the given input.✨ AI

参数

名称 类型 描述
bytes

返回值

名称 类型 描述
bytes32 Bytes32 withdrawal credentials computed from the provided input.✨ AI
withdrawableAmount(address) view

Returns the amount the specified address can currently withdraw from the contract.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
uint256 The withdrawable amount for the address as a uint256 (in the token's smallest unit, e.g., wei).✨ AI

写入函数

batchDeposit(pubkeys: bytes, withdrawal_credentials: bytes, signatures: bytes, deposit_data_roots: bytes32[], amounts: uint256[]) nonpayable

Submit multiple validator deposits to the contract in a single transaction.✨ AI

参数

名称 类型 描述
pubkeys bytes Concatenated validator public keys (48 bytes per pubkey).✨ AI
withdrawal_credentials bytes Concatenated 32-byte withdrawal credentials for each validator.✨ AI
signatures bytes Concatenated BLS signatures (96 bytes per signature) for each deposit.✨ AI
deposit_data_roots bytes32[] Array of bytes32 deposit_data_root values, one per deposit.✨ AI
amounts uint256[]
batchDeposit(pubkeys: bytes, withdrawal_credentials: bytes, signatures: bytes, deposit_data_roots: bytes32[]) nonpayable

Submit multiple validator deposits to the contract in a single transaction.✨ AI

参数

名称 类型 描述
pubkeys bytes Concatenated validator public keys (48 bytes per pubkey).✨ AI
withdrawal_credentials bytes Concatenated 32-byte withdrawal credentials for each validator.✨ AI
signatures bytes Concatenated BLS signatures (96 bytes per signature) for each deposit.✨ AI
deposit_data_roots bytes32[] Array of bytes32 deposit_data_root values, one per deposit.✨ AI
claimTokens(_token: address, _to: address) nonpayable

Transfer any ERC20 tokens held by the contract to a specified recipient.✨ AI

开发者: Allows to transfer any locked token from this contract. Only admin can call this method. Deposit-related tokens cannot be claimed.

参数

名称 类型 描述
_token address address of the token, if it is not provided (0x00..00), native coins will be transferred.
_to address address that will receive the locked tokens from this contract.
claimWithdrawal(_address: address) nonpayable

Claim a pending withdrawal for the specified address and transfer any available funds to it.✨ AI

开发者: Claim withdrawal amount for an address

参数

名称 类型 描述
_address address Address to transfer withdrawable tokens
claimWithdrawals(_addresses: address[]) nonpayable

Claim pending withdrawals for the provided addresses, executing any available withdrawal operations for each.✨ AI

开发者: Claim withdrawal amounts for an array of addresses

参数

名称 类型 描述
_addresses address[] Addresses to transfer withdrawable tokens
deposit(pubkey: bytes, withdrawal_credentials: bytes, signature: bytes, deposit_data_root: bytes32, stake_amount: uint256) nonpayable

Submit a Phase 0 DepositData object.

参数

名称 类型 描述
pubkey bytes A BLS12-381 public key.
withdrawal_credentials bytes Commitment to a public key for withdrawals.
signature bytes A BLS12-381 signature.
deposit_data_root bytes32 The SHA-256 hash of the SSZ-encoded DepositData object. Used as a protection against malformed input.
stake_amount uint256
executeSystemWithdrawals(_amounts: uint64[], _addresses: address[]) nonpayable

Execute multiple system withdrawals in a single transaction.✨ AI

开发者: Function to be used only in the system transaction. Call to this function will revert only in three cases: - the caller is not `SYSTEM_WITHDRAWAL_EXECUTOR` or `_admin()`; - the length of `_amounts` array is not equal to the length of `_addresses` array; - it is a reentrant access to failed withdrawals processing; - the call ran out of gas. Call to this function doesn't transmit flow control to any untrusted contract and uses a constant gas limit for each withdrawal, so using constant gas limit and constant number of withdrawals (including failed withdrawals) for calls of this function is ok.

参数

名称 类型 描述
_amounts uint64[] Array of amounts to be withdrawn.
_addresses address[] Array of addresses that should receive the corresponding amount of tokens.
executeSystemWithdrawals(uint256, _amounts: uint64[], _addresses: address[]) nonpayable

Execute multiple system withdrawals in a single transaction.✨ AI

开发者: Function to be used only in the system transaction. Call to this function will revert only in three cases: - the caller is not `SYSTEM_WITHDRAWAL_EXECUTOR` or `_admin()`; - the length of `_amounts` array is not equal to the length of `_addresses` array; - it is a reentrant access to failed withdrawals processing; - the call ran out of gas. Call to this function doesn't transmit flow control to any untrusted contract and uses a constant gas limit for each withdrawal, so using constant gas limit and constant number of withdrawals (including failed withdrawals) for calls of this function is ok.

参数

名称 类型 描述
uint256
_amounts uint64[] Array of amounts to be withdrawn.
_addresses address[] Array of addresses that should receive the corresponding amount of tokens.
onTokenTransfer(address, stake_amount: uint256, data: bytes) nonpayable

Handle incoming token transfers, record the stake, and trigger deposit processing.✨ AI

参数

名称 类型 描述
address
stake_amount uint256 Amount of tokens transferred and to be staked.✨ AI
data bytes Optional additional calldata provided with the transfer.✨ AI

返回值

名称 类型 描述
bool True if the transfer and staking were processed successfully; otherwise false.✨ AI
pause() nonpayable

Pause contract operations, disabling functions protected by pause checks.✨ AI

unpause() nonpayable

Unpauses the contract so functions guarded by pause checks can be executed again.✨ AI

unwrapTokens(_unwrapper: address, _token: address) nonpayable

Unwraps tokens by calling the unwrapper contract to convert wrapped tokens back to their underlying asset.✨ AI

开发者: Allows to unwrap the mGNO in this contract to GNO Only admin can call this method.

参数

名称 类型 描述
_unwrapper address address of the mGNO token unwrapper
_token address Address of the wrapped token to be unwrapped.✨ AI

事件

DepositEvent(pubkey: bytes, withdrawal_credentials: bytes, amount: bytes, signature: bytes, index: bytes)

A processed deposit event.

名称 类型 已索引 描述
pubkey bytes
withdrawal_credentials bytes
amount bytes
signature bytes
index bytes
Paused(account: address)
名称 类型 已索引 描述
account address
Unpaused(account: address)
名称 类型 已索引 描述
account address