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