DAI
Ethereum ERC-20 Token0x6b175474e89094c44da98b954eedeac495271d0f
Solidity v0.5.12+commit.7709ece9
Fungible token following the ERC-20 standard.
Admin & Risk
Who can change the rules?
Detected mintable controls from the verified ABI.
Overview
Read Functions
Block #25,169,801 · just nowReturns the EIP-712 domain separator used for signing off-chain Dai approvals.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 | Keccak256-encoded EIP-712 domain separator (bytes32) that identifies the signing domain for Dai permits and typed data.✨ AI |
Get the EIP-2612 permit typehash used for off-chain signature verification.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 | The bytes32 constant representing the PERMIT typehash (used for EIP-2612 signature domain separation).✨ AI |
Return the remaining token allowance that an owner granted to a spender.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | The remaining number of tokens the spender is allowed to transfer on behalf of the owner.✨ AI |
Return the token balance for a given address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | The current Dai token balance of the address as an unsigned integer (smallest unit).✨ AI |
Return the number of decimal places the Dai token uses for user display and arithmetic.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | uint8 | The token's decimal places as a uint8 (e.g., 18 for Dai).✨ AI |
Returns the token's human-readable name.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | string | The token's name as a string (e.g., "Dai").✨ AI |
Return the current nonce used for signed approvals for the given address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | The current uint256 nonce for the address, incremented each time a signature is used.✨ AI |
Return the token's symbol used in user interfaces.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | string | The token symbol as a string (for example "DAI").✨ AI |
Returns the total number of Dai tokens in existence.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | Total supply of Dai tokens as a uint256, expressed in the token's smallest unit (typically 18 decimals).✨ AI |
Returns the Dai token contract version string.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | string | The contract version identifier string.✨ AI |
Returns whether an address is authorized to perform privileged actions.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | Authorization flag: nonzero means authorized, zero means not authorized.✨ AI |
Write Functions
Approve a spender to transfer up to a specified amount of tokens from your account.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| usr | address | Spender address allowed to transfer tokens from the caller's account.✨ AI |
| wad | uint256 | Maximum token amount the spender is allowed to transfer, in the token's smallest unit.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the approval was recorded successfully, otherwise false.✨ AI |
Burn a specified amount of tokens from an address, reducing its balance and the total supply.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| usr | address | Address whose tokens will be burned.✨ AI |
| wad | uint256 | Amount of tokens to burn, expressed in the token's smallest unit.✨ AI |
Revoke administrative authorization for the specified address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| guy | address | Address whose administrative authorization will be revoked.✨ AI |
Mint DAI tokens to a specified account.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| usr | address | Address receiving the newly minted DAI.✨ AI |
| wad | uint256 | Amount of DAI to mint, in the token's base units (uint256).✨ AI |
Transfer wad tokens from src to dst within the token contract's ledger.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| src | address | Source address to debit.✨ AI |
| dst | address | Destination address to credit.✨ AI |
| wad | uint256 | Amount of tokens to move, in the token's smallest unit.✨ AI |
Authorize a spender using an off-chain Dai permit signature, updating allowance after signature verification.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| holder | address | Token owner's address whose signature authorizes the approval.✨ AI |
| spender | address | Address approved to spend the holder's tokens.✨ AI |
| nonce | uint256 | Current holder nonce used to prevent signature replay.✨ AI |
| expiry | uint256 | Unix timestamp when the permit expires (0 means it does not expire).✨ AI |
| allowed | bool | Boolean that sets or clears the spender's allowance (true grants allowance).✨ AI |
| v | uint8 | Signature recovery id (27/28 or 0/1) used to recover signer address.✨ AI |
| r | bytes32 | First 32 bytes of the holder's ECDSA signature.✨ AI |
| s | bytes32 | Second 32 bytes of the holder's ECDSA signature.✨ AI |
Transfers wad Dai from usr to the caller, using any allowance that usr granted.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| usr | address | Account to transfer Dai from.✨ AI |
| wad | uint256 | Amount of Dai to transfer, in the token's smallest unit.✨ AI |
Transfer wad tokens from the caller (msg.sender) to usr.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| usr | address | Recipient address that will receive the tokens.✨ AI |
| wad | uint256 | Amount of tokens to transfer, expressed in the token's smallest unit.✨ AI |
Grant authorization to an address to perform privileged contract actions.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| guy | address | Address to grant authorization to.✨ AI |
Transfer wad Dai from the caller's account to the dst address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| dst | address | Recipient address that will receive the tokens.✨ AI |
| wad | uint256 | Amount of Dai to transfer, denominated in wei (18 decimals).✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the transfer succeeds, otherwise false.✨ AI |
Transfer wad tokens from src to dst using the caller's allowance; requires sufficient balance and allowance.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| src | address | Address to take tokens from.✨ AI |
| dst | address | Address to receive the tokens.✨ AI |
| wad | uint256 | Amount of tokens to transfer in smallest token units.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | true if the transfer succeeds, otherwise false.✨ AI |
Events
| Name | Type | Indexed | Description |
|---|---|---|---|
| src | address | ✓ | |
| guy | address | ✓ | |
| wad | uint256 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| sig | bytes4 | ✓ | |
| usr | address | ✓ | |
| arg1 | bytes32 | ✓ | |
| arg2 | bytes32 | ✓ | |
| data | bytes |
| Name | Type | Indexed | Description |
|---|---|---|---|
| src | address | ✓ | |
| dst | address | ✓ | |
| wad | uint256 |