SBCWrapper
Gnosis0x647507a70ff598f386cb96ae5046486389368c66
Proxy 實作合約: 0x0b91d1e3312aeef7e9e641606ad0aa19aa05673d
Solidity v0.8.9+commit.e5eed63a
概覽
讀取函式
Indicates whether the contract is paused.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | bool | True if the contract is paused; false if it is active.✨ AI |
Return the sbcDeposit contract address used by this wrapper.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The address of the sbcDeposit contract that this wrapper interacts with.✨ AI |
Returns the SBC token contract address.✨ AI
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address | The address of the SBC token contract.✨ AI |
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 |
Returns the numeric status code for the given token address.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | address |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | uint8 | A uint8 status code for the token; interpretation is contract-specific (e.g. 0=unknown, 1=active, 2=paused).✨ AI |
寫入函式
Transfers the ERC20 tokens held by this contract to the specified recipient.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _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. |
Enable a token in the wrapper and set its exchange rate.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _token | address | address of the enabled or reenabled token contract. |
| _rate | uint256 | exchange rate for the new pair, multiplied by 10**18. |
Handle incoming token transfers and execute the wrapper logic encoded in data.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| 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 |
Pauses contract actions gated by the pausable mechanism to disable certain functions until unpaused.✨ AI
Pause token transfers and operations for the specified token address.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _token | address | address of the paused token contract. |
Execute a token swap for a given ERC20 token amount using provided permit or swap data.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _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. |
Unpauses the contract so administrative and user functions resume.✨ AI
Unwrap the given amount of a wrapped token and transfer the underlying tokens to the caller.✨ AI
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| _token | address | Address of the whitelisted token contract. |
| _amount | uint256 | Amount of tokens to swap. |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| — | uint256 | Amount of returned tokens. |
事件
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| account | address |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| token | address | ✓ | |
| user | address | ✓ | |
| amount | uint256 | ||
| received | uint256 |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| token | address | ✓ | |
| rate | uint256 |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| token | address | ✓ |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| token | address | ✓ |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| account | address |
| 名稱 | 類型 | 已索引 | 描述 |
|---|---|---|---|
| token | address | ✓ | |
| user | address | ✓ | |
| amount | uint256 | ||
| received | uint256 |