SBCWrapper

Gnosis

0x647507a70ff598f386cb96ae5046486389368c66

Proxy 实现合约: 0x0b91d1e3312aeef7e9e641606ad0aa19aa05673d

Solidity v0.8.9+commit.e5eed63a

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

概览

读取函数
5
写入函数
8
事件
7

读取函数

paused() view

Indicates whether the contract is 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
sbcDepositContract() view

Return the sbcDeposit contract address used by this wrapper.✨ AI

返回值

名称 类型 描述
address The address of the sbcDeposit contract that this wrapper interacts with.✨ AI
sbcToken() view

Returns the SBC token contract address.✨ AI

返回值

名称 类型 描述
address The address of the SBC token contract.✨ AI
tokenRate(address) view

Return the current rate for a given token address.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
uint256 Unsigned integer representing the token's configured rate; interpretation depends on contract scaling.✨ AI
tokenStatus(address) view

Returns the numeric status code for the given token address.✨ AI

开发者: The uint8 is an opaque status code defined by the contract; consult contract docs for the code meanings.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
uint8 A uint8 status code for the token; interpretation is contract-specific (e.g. 0=unknown, 1=active, 2=paused).✨ AI

写入函数

claimTokens(_token: address, _to: address) nonpayable

Transfers the ERC20 tokens held by this contract to the specified recipient.✨ AI

开发者: Allows to transfer any locked token from this contract. Only admin can call this method. While it is not allowed to claim previously enabled or paused tokens, the admin should still verify that the claimed token is a valid ERC20 token contract.

参数

名称 类型 描述
_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 on this contract.
enableToken(_token: address, _rate: uint256) nonpayable

Enable a token in the wrapper and set its exchange rate.✨ AI

开发者: Enables swapping of new token into wrapped SBC token at a given rate. Only admin can call this method.

参数

名称 类型 描述
_token address address of the enabled or reenabled token contract.
_rate uint256 exchange rate for the new pair, multiplied by 10**18.
onTokenTransfer(from: address, value: uint256, data: bytes) nonpayable

Handle incoming token transfers and execute the wrapper logic encoded in data.✨ AI

开发者: ERC677 callback for swapping tokens in the simpler way during transferAndCall.

参数

名称 类型 描述
from address address of the received token contract.
value uint256 amount of the received tokens.
data bytes should be empty for a simple token swap, otherwise will pass it further to the deposit contract.

返回值

名称 类型 描述
bool True if the callback accepted the transfer and processing succeeded; false otherwise.✨ AI
pause() nonpayable

Pauses contract actions gated by the pausable mechanism to disable certain functions until unpaused.✨ AI

pauseToken(_token: address) nonpayable

Pause token transfers and operations for the specified token address.✨ AI

开发者: Temporary pauses swapping of some particular token, which can be reenaled later. Only admin can call this method.

参数

名称 类型 描述
_token address address of the paused token contract.
swap(_token: address, _amount: uint256, _permitData: bytes) nonpayable

Execute a token swap for a given ERC20 token amount using provided permit or swap data.✨ AI

开发者: Swaps some of the whitelisted tokens for the newly created wrapped tokens. Tokens must be pre-approved before calling this function.

参数

名称 类型 描述
_token address address of the swapped token contract.
_amount uint256 amount of tokens to swap.
_permitData bytes optional permit calldata to use for preliminary token approval. supports STAKE permit and EIP2612 standards.
unpause() nonpayable

Unpauses the contract so administrative and user functions resume.✨ AI

unwrap(_token: address, _amount: uint256) nonpayable

Unwrap the given amount of a wrapped token and transfer the underlying tokens to the caller.✨ AI

开发者: Swaps some of the wrapped tokens to the whitelisted token. Wrapped tokens will be burned.

参数

名称 类型 描述
_token address Address of the whitelisted token contract.
_amount uint256 Amount of tokens to swap.

返回值

名称 类型 描述
uint256 Amount of returned tokens.

事件

Paused(account: address)
名称 类型 已索引 描述
account address
Swap(token: address, user: address, amount: uint256, received: uint256)
名称 类型 已索引 描述
token address
user address
amount uint256
received uint256
SwapRateUpdated(token: address, rate: uint256)
名称 类型 已索引 描述
token address
rate uint256
TokenSwapEnabled(token: address)
名称 类型 已索引 描述
token address
TokenSwapPaused(token: address)
名称 类型 已索引 描述
token address
Unpaused(account: address)
名称 类型 已索引 描述
account address
Unwrap(token: address, user: address, amount: uint256, received: uint256)
名称 类型 已索引 描述
token address
user address
amount uint256
received uint256