SavingsXDai
Gnosis ERC-20 Token0xaf204776c7245bf4147c2612bf6e5972ee483701
Solidity v0.8.21+commit.d9974bed
Fungible token following the ERC-20 standard.
概览
读取函数
Returns the contract's EIP-712 DOMAIN_SEPARATOR used when signing and verifying typed data.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 | A bytes32 EIP-712 domain separator used for constructing and verifying off-chain signatures.✨ AI |
Return the EIP-2612 permit type hash used to verify off-chain approvals.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 | Permit type hash (bytes32) used to construct and verify EIP-2612 permit signatures.✨ AI |
Returns the contract's version string.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The contract version string (human-readable identifier).✨ AI |
Returns the remaining token allowance that owner granted to spender.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address that granted the allowance.✨ AI |
| spender | address | Address allowed to spend tokens on owner's behalf.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Remaining number of tokens spender is allowed to transfer from owner, expressed as a uint256.✨ AI |
Returns the ERC-20 token address used as the contract's underlying asset.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address of the underlying ERC-20 asset token contract.✨ AI |
Returns the token balance for the given account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose token balance will be retrieved.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The account's token balance represented as a uint256.✨ AI |
Convert a share amount to the equivalent amount of underlying assets.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| shares | uint256 | Number of vault shares to convert to assets.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Equivalent amount of underlying assets for the provided shares.✨ AI |
Convert a given amount of underlying assets into the equivalent number of vault shares.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| assets | uint256 | Amount of underlying asset tokens to convert into shares.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Number of shares corresponding to the provided assets at the current conversion rate.✨ AI |
Returns the token's number of decimal places.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint8 | Number of decimals used by the token (uint8).✨ AI |
Return the chain ID where the contract was deployed.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The chain ID (uint256) of the network where the contract was deployed.✨ AI |
Returns the contract's EIP-712 domain fields used to create typed-data signatures.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| fields | bytes1 | Leading EIP-712 domain prefix byte (commonly 0x19 or 0x01).✨ AI |
| name | string | Human-readable domain name used for EIP-712 signing (usually the token or protocol name).✨ AI |
| version | string | Domain version string used for EIP-712 domain separation.✨ AI |
| chainId | uint256 | Chain ID (EIP-155 style) that the domain binds signatures to.✨ AI |
| verifyingContract | address | Address of the verifying contract included in the domain.✨ AI |
| salt | bytes32 | 32-byte salt used as an additional domain separator value.✨ AI |
| extensions | uint256[] | Array of uint256 extension values included in the domain for protocol-specific data.✨ AI |
Returns the maximum amount of tokens the specified address can deposit into the contract.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Maximum deposit amount the account may provide, expressed in the token's smallest unit (uint256).✨ AI |
Return the maximum amount of tokens the given address can mint right now.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Maximum amount of tokens the address may mint under the current contract state, in the token's smallest unit.✨ AI |
Return the maximum amount of tokens the owner can redeem.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address to query for the owner's maximum redeemable token amount.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Maximum redeemable token amount for the specified owner, in token units (uint256).✨ AI |
Returns the maximum amount of tokens the given owner can withdraw.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address whose maximum withdrawable token amount is queried.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Maximum withdrawable token amount for the owner, expressed in token units.✨ AI |
Returns the token's name.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The token name as a human-readable string defined in the contract.✨ AI |
Returns the current permit nonce for a given token holder address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address of the token holder whose nonce is queried.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Current nonce uint256 for the owner; increments with each permit and prevents signature replay.✨ AI |
Return the number of vault shares you would receive for depositing a given amount of assets.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| assets | uint256 | Amount of underlying assets to deposit.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Number of shares that would be minted for the provided assets, without changing contract state.✨ AI |
Preview the amount of underlying assets required to mint a specified number of vault shares.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| shares | uint256 | Number of vault shares the caller intends to mint.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Amount of underlying assets required to mint the specified shares, denominated in the asset token.✨ AI |
Estimate how much underlying token you will receive if you redeem a given number of shares.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| shares | uint256 | Number of vault shares to redeem.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Estimated amount of underlying tokens receivable for the specified shares.✨ AI |
Estimate the number of shares to burn to withdraw a specified amount of assets.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| assets | uint256 | Amount of underlying assets the user wants to withdraw.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Number of shares that would be burned to fulfill the requested asset withdrawal.✨ AI |
Returns the token symbol users see for the SavingsXDai ERC-20 token.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The token's short symbol string used to identify the token (e.g., "xDAI").✨ AI |
Returns the total amount of underlying assets currently held by the contract.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Total amount of underlying assets the contract manages, expressed as a uint256 in the token's smallest units.✨ AI |
Returns the total token supply of the SavingsXDai token.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | uint256 total number of tokens in existence (minted minus burned), expressed in the token's smallest unit.✨ AI |
Return the wrapped xDai (wXDAI) token contract address.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address of the wrapped xDai (wXDAI) ERC-20 token contract.✨ AI |
写入函数
Approve a spender to transfer up to a specified number of your tokens.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | Address authorized to spend tokens from the caller's balance.✨ AI |
| value | uint256 | Maximum token amount the spender is allowed to transfer.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the approval operation succeeded, otherwise false.✨ AI |
Decreases the caller's token allowance for spender by requestedDecrease and emits an Approval event.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | Address allowed to spend tokens on behalf of the caller.✨ AI |
| requestedDecrease | uint256 | Amount to subtract from the current allowance for spender.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the allowance was successfully decreased.✨ AI |
Deposit assets into the vault and mint corresponding shares to the receiver.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| assets | uint256 | Amount of underlying assets to deposit (in token base units).✨ AI |
| receiver | address | Address that will receive the minted shares.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Amount of shares minted to the receiver.✨ AI |
Increase the caller's token allowance for spender by addedValue.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | Address approved to spend the caller's tokens.✨ AI |
| addedValue | uint256 | Amount of tokens to add to the existing allowance.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the allowance was successfully increased.✨ AI |
Mint a specified number of vault shares to the receiver by providing the required underlying assets.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| shares | uint256 | Number of vault shares to mint.✨ AI |
| receiver | address | Address that will receive the minted shares.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Amount of underlying assets deposited to mint the requested shares.✨ AI |
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | |
| spender | address | |
| value | uint256 | |
| deadline | uint256 | |
| signature | bytes |
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | |
| spender | address | |
| value | uint256 | |
| deadline | uint256 | |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 |
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| shares | uint256 | |
| receiver | address | |
| owner | address |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 |
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| to | address | |
| value | uint256 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| from | address | |
| to | address | |
| value | uint256 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| assets | uint256 | |
| receiver | address | |
| owner | address |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 |
事件
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| owner | address | ✓ | |
| spender | address | ✓ | |
| value | uint256 |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| sender | address | ✓ | |
| owner | address | ✓ | |
| assets | uint256 | ||
| shares | uint256 |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| from | address | ✓ | |
| to | address | ✓ | |
| value | uint256 |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| sender | address | ✓ | |
| receiver | address | ✓ | |
| owner | address | ✓ | |
| assets | uint256 | ||
| shares | uint256 |