DAI

Ethereum ERC-20 Token

0x6b175474e89094c44da98b954eedeac495271d0f

Solidity v0.5.12+commit.7709ece9

Fungible token following the ERC-20 standard.

🤖
Query this contract from your AI
Reference: dai-eth 0x6b175474e89094c44da98b954eedeac495271d0f
Sample prompt: “Tell me the current state of dai-eth”
No AI wired up yet? → mcp.smarts.md

Admin & Risk

Who can change the rules?

Detected mintable controls from the verified ABI.

Mintable

Overview

Read Functions
11
Write Functions
11
Events
3

Read Functions

Block #25,169,801 · just now
DOMAIN_SEPARATOR() view → 0xdbb8cf42e1ecb028be3f3dbc922e1d878b963f411dc388ced501601c60f7c6f7

Returns 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
PERMIT_TYPEHASH() view → 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb

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
allowance(address, address) view

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
balanceOf(address) view

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
decimals() view → 18

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
name() view → Dai Stablecoin

Returns the token's human-readable name.✨ AI

Returns

Name Type Description
string The token's name as a string (e.g., "Dai").✨ AI
nonces(address) view

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
symbol() view → DAI

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
totalSupply() view → 4,353,181,217.56 DAI

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
version() view → 1

Returns the Dai token contract version string.✨ AI

Returns

Name Type Description
string The contract version identifier string.✨ AI
wards(address) view

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(usr: address, wad: uint256) nonpayable

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(usr: address, wad: uint256) nonpayable

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
deny(guy: address) nonpayable

Revoke administrative authorization for the specified address.✨ AI

Parameters

Name Type Description
guy address Address whose administrative authorization will be revoked.✨ AI
mint(usr: address, wad: uint256) nonpayable

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
move(src: address, dst: address, wad: uint256) nonpayable

Transfer wad tokens from src to dst within the token contract's ledger.✨ AI

dev: Performs an internal balance transfer; caller may need authorization and operation may bypass allowance checks.✨ 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
permit(holder: address, spender: address, nonce: uint256, expiry: uint256, allowed: bool, v: uint8, r: bytes32, s: bytes32) nonpayable

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
pull(usr: address, wad: uint256) nonpayable

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
push(usr: address, wad: uint256) nonpayable

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
rely(guy: address) nonpayable

Grant authorization to an address to perform privileged contract actions.✨ AI

dev: Only callable by an authorized account (auth); sets wards[guy] = 1 to grant permissions.✨ AI

Parameters

Name Type Description
guy address Address to grant authorization to.✨ AI
transfer(dst: address, wad: uint256) nonpayable

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
transferFrom(src: address, dst: address, wad: uint256) nonpayable

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

Approval(src: address, guy: address, wad: uint256)
Name Type Indexed Description
src address
guy address
wad uint256
LogNote(sig: bytes4, usr: address, arg1: bytes32, arg2: bytes32, data: bytes)
Name Type Indexed Description
sig bytes4
usr address
arg1 bytes32
arg2 bytes32
data bytes
Transfer(src: address, dst: address, wad: uint256)
Name Type Indexed Description
src address
dst address
wad uint256