COMP

Ethereum ERC-20 Token Browse chains

0xc00e94cb662c3520282e6f5717214004a7f26888

Solidity v0.5.16+commit.9c3226ce

Fungible token following the ERC-20 standard.

🤖
Query this contract from your AI
Reference: comp-eth 0xc00e94cb662c3520282e6f5717214004a7f26888
Sample prompt: "Tell me the current state of comp-eth"
No AI wired up yet? → mcp.smarts.md · Browse chains

Admin & Risk

Who can change the rules?

No admin risk controls detected from the verified ABI.

Recent governance

3515 privileged events loaded. Latest: DelegateVotesChanged at block #25,492,534.

Overview

Read Functions
14
Write Functions
5
Events
4

Read Functions

Block #25,493,351 · just now
DELEGATION_TYPEHASH() view → 0xe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf

Returns the EIP-712 typehash used for delegation signatures.✨ AI

Returns

Name Type Description
bytes32 The bytes32 DELEGATION_TYPEHASH used to hash and verify delegation typed data.✨ AI
DOMAIN_TYPEHASH() view → 0x8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866

Provides the EIP-712 domain type hash used to construct the contract's domain separator for signatures.✨ AI

Returns

Name Type Description
bytes32 The bytes32 EIP-712 DOMAIN_TYPEHASH used to derive the domain separator for off-chain signatures.✨ AI
allowance(account: address, spender: address) view

Get the number of tokens `spender` is approved to spend on behalf of `account`

Parameters

Name Type Description
account address The address of the account holding the funds
spender address The address of the account spending the funds

Returns

Name Type Description
uint256 The number of tokens approved
balanceOf(account: address) view

Get the number of tokens held by the `account`

Parameters

Name Type Description
account address The address of the account to get the balance of

Returns

Name Type Description
uint256 The number of tokens held
checkpoints(address, uint32) view

Returns the checkpoint data for an account at a given index.✨ AI

Parameters

Name Type Description
address
uint32

Returns

Name Type Description
fromBlock uint32 fromBlock: Block number when this checkpoint became effective (uint32).✨ AI
votes uint96 votes: Number of votes recorded at that checkpoint (uint96).✨ AI
decimals() view → 18

Returns the number of decimal places used by the token.✨ AI

Returns

Name Type Description
uint8 The token's decimals (number of decimal places) as a uint8.✨ AI
delegates(address) view

Returns the current delegatee address for a given token holder.✨ AI

Parameters

Name Type Description
address

Returns

Name Type Description
address The delegatee address that receives voting power for the given holder; zero address if none set.✨ AI
getCurrentVotes(account: address) view

Gets the current votes balance for `account`

Parameters

Name Type Description
account address The address to get votes balance

Returns

Name Type Description
uint96 The number of current votes for `account`
getPriorVotes(account: address, blockNumber: uint256) view

Determine the prior number of votes for an account as of a block number

dev: Block number must be a finalized block or else this function will revert to prevent misinformation.

Parameters

Name Type Description
account address The address of the account to check
blockNumber uint256 The block number to get the vote balance at

Returns

Name Type Description
uint96 The number of votes the account had as of the given block
name() view → Compound

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

Returns

Name Type Description
string The token's name as a human-readable string (e.g. Compound).✨ AI
nonces(address) view

Return the current nonce for an address, used to validate off-chain permit signatures.✨ AI

dev: Nonce increments each time a permit is submitted; it prevents replay of signed messages.✨ AI

Parameters

Name Type Description
address

Returns

Name Type Description
uint256 Current uint256 nonce for the address; used to prevent replay of permits.✨ AI
numCheckpoints(address) view

Return the number of vote checkpoints recorded for an account.✨ AI

Parameters

Name Type Description
address

Returns

Name Type Description
uint32 The uint32 count of checkpoints stored for the account.✨ AI
symbol() view → COMP

Returns the token symbol users see for this COMP token.✨ AI

Returns

Name Type Description
string The ERC-20 token symbol (e.g., "COMP") as a string.✨ AI
totalSupply() view → 10,000,000 COMP

Return the current total supply of COMP tokens.✨ AI

Returns

Name Type Description
uint256 The total COMP token supply as a uint256, expressed in the token's smallest unit (wei-like).✨ AI

Write Functions

approve(spender: address, rawAmount: uint256) nonpayable

Approve `spender` to transfer up to `amount` from `src`

dev: This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)

Parameters

Name Type Description
spender address The address of the account which may transfer tokens
rawAmount uint256 The number of tokens that are approved (2^256-1 means infinite)

Returns

Name Type Description
bool Whether or not the approval succeeded
delegate(delegatee: address) nonpayable

Delegate votes from `msg.sender` to `delegatee`

Parameters

Name Type Description
delegatee address The address to delegate votes to
delegateBySig(delegatee: address, nonce: uint256, expiry: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable

Delegates votes from signatory to `delegatee`

Parameters

Name Type Description
delegatee address The address to delegate votes to
nonce uint256 The contract state required to match the signature
expiry uint256 The time at which to expire the signature
v uint8 The recovery byte of the signature
r bytes32 Half of the ECDSA signature pair
s bytes32 Half of the ECDSA signature pair
transfer(dst: address, rawAmount: uint256) nonpayable

Transfer `amount` tokens from `msg.sender` to `dst`

Parameters

Name Type Description
dst address The address of the destination account
rawAmount uint256 The number of tokens to transfer

Returns

Name Type Description
bool Whether or not the transfer succeeded
transferFrom(src: address, dst: address, rawAmount: uint256) nonpayable

Transfer `amount` tokens from `src` to `dst`

Parameters

Name Type Description
src address The address of the source account
dst address The address of the destination account
rawAmount uint256 The number of tokens to transfer

Returns

Name Type Description
bool Whether or not the transfer succeeded

Events

Approval(owner: address, spender: address, amount: uint256)

The standard EIP-20 approval event

Name Type Indexed Description
owner address
spender address
amount uint256
DelegateChanged(delegator: address, fromDelegate: address, toDelegate: address)

An event thats emitted when an account changes its delegate

Name Type Indexed Description
delegator address
fromDelegate address
toDelegate address
DelegateVotesChanged(delegate: address, previousBalance: uint256, newBalance: uint256)

An event thats emitted when a delegate account's vote balance changes

Name Type Indexed Description
delegate address
previousBalance uint256
newBalance uint256
Transfer(from: address, to: address, amount: uint256)

The standard EIP-20 transfer event

Name Type Indexed Description
from address
to address
amount uint256