SBCWrapper

Gnosis Browse chains

0x647507a70ff598f386cb96ae5046486389368c66

Proxy implementation: 0x0b91d1e3312aeef7e9e641606ad0aa19aa05673d

Solidity v0.8.9+commit.e5eed63a

🤖
Query this contract from your AI
Reference: 0x647507a70ff598f386cb96ae5046486389368c66
Sample prompt: "Tell me the current state of gnosis/0x647507a70ff598f386cb96ae5046486389368c66"
No AI wired up yet? → mcp.smarts.md · Browse chains
Gnosis is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
5
Write Functions
8
Events
7

Read Functions

paused() view

Indicates whether the contract is paused.✨ AI

dev: Returns true if the contract is paused, and false otherwise.

Returns

Name Type Description
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

Returns

Name Type Description
address The address of the sbcDeposit contract that this wrapper interacts with.✨ AI
sbcToken() view

Returns the SBC token contract address.✨ AI

Returns

Name Type Description
address The address of the SBC token contract.✨ AI
tokenRate(address) view

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

Parameters

Name Type Description
address

Returns

Name Type Description
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

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

Parameters

Name Type Description
address

Returns

Name Type Description
uint8 A uint8 status code for the token; interpretation is contract-specific (e.g. 0=unknown, 1=active, 2=paused).✨ AI

Write Functions

claimTokens(_token: address, _to: address) nonpayable

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

dev: 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.

Parameters

Name Type Description
_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

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

Parameters

Name Type Description
_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

dev: ERC677 callback for swapping tokens in the simpler way during transferAndCall.

Parameters

Name Type Description
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.

Returns

Name Type Description
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

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

Parameters

Name Type Description
_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

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

Parameters

Name Type Description
_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

dev: Swaps some of the wrapped tokens to the whitelisted token. Wrapped tokens will be burned.

Parameters

Name Type Description
_token address Address of the whitelisted token contract.
_amount uint256 Amount of tokens to swap.

Returns

Name Type Description
uint256 Amount of returned tokens.

Events

Paused(account: address)
Name Type Indexed Description
account address
Swap(token: address, user: address, amount: uint256, received: uint256)
Name Type Indexed Description
token address
user address
amount uint256
received uint256
SwapRateUpdated(token: address, rate: uint256)
Name Type Indexed Description
token address
rate uint256
TokenSwapEnabled(token: address)
Name Type Indexed Description
token address
TokenSwapPaused(token: address)
Name Type Indexed Description
token address
Unpaused(account: address)
Name Type Indexed Description
account address
Unwrap(token: address, user: address, amount: uint256, received: uint256)
Name Type Indexed Description
token address
user address
amount uint256
received uint256