# SavingsXDai

## Variables

### wxdai

```solidity
contract IWXDAI wxdai
```

### deploymentChainId

```solidity
uint256 deploymentChainId
```

### PERMIT\_TYPEHASH

```solidity
bytes32 PERMIT_TYPEHASH
```

### VERSION

```solidity
string VERSION
```

## Errors

### ERC2612ExpiredSignature

```solidity
error ERC2612ExpiredSignature(uint256 deadline)
```

*Permit deadline has expired.*

### ERC2612InvalidSigner

```solidity
error ERC2612InvalidSigner(address signer, address owner)
```

*Mismatched signature.*

## Functions

### constructor

```solidity
constructor(string _name, string _ticker) public
```

*Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777).*

### receive

```solidity
receive() external payable
```

### \_isValidSignature

```solidity
function _isValidSignature(address signer, bytes32 digest, bytes signature) internal view returns (bool)
```

### permit

```solidity
function permit(address owner, address spender, uint256 value, uint256 deadline, bytes signature) public
```

### permit

```solidity
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external
```

\_Sets `value` as the allowance of `spender` over `owner`'s tokens, given `owner`'s signed approval.

IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here.

Emits an {Approval} event.

Requirements:

* `spender` cannot be the zero address.
* `deadline` must be a timestamp in the future.
* `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` over the EIP712-formatted function arguments.
* the signature must use `owner`'s current nonce (see {nonces}).

For more information on the signature format, see the <https://eips.ethereum.org/EIPS/eip-2612#specification\\[relevant> EIP section].

CAUTION: See Security Considerations above.\_

### nonces

```solidity
function nonces(address owner) public view virtual returns (uint256)
```

*See {IERC20Permit-nonces}.*

### DOMAIN\_SEPARATOR

```solidity
function DOMAIN_SEPARATOR() external view virtual returns (bytes32)
```

*See {IERC20Permit-DOMAIN\_SEPARATOR}.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://seer-3.gitbook.io/seer-documentation/developers/contracts/interaction/sdai-on-gnosis/savingsxdai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
