OP

Optimism ERC-20 Token

0x4200000000000000000000000000000000000042

Solidity v0.8.12+commit.f00d7308

Fungible token following the ERC-20 standard.

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

Admin & Risk

Who can change the rules?

Block #152,041,521

Detected mintable and ownable controls from the verified ABI.

Mintable Ownable

Current controls

Owner
0x5c4e7ba1e219e47948e6e3f55019a647ba501005 ↗ Etherscan → smarts

Overview

Read Functions
15
Write Functions
13
Events
5

Read Functions

Block #152,041,521 · just now
DOMAIN_SEPARATOR() view → 0xd423c9c6b838296762a6bbf9663d4609148ea6bc83b5e94ce2c05615edc69072

Returns

Name Type Description
bytes32
allowance(owner: address, spender: address) view
dev: Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.

Parameters

Name Type Description
owner address
spender address

Returns

Name Type Description
uint256
balanceOf(account: address) view
dev: Returns the amount of tokens owned by `account`.

Parameters

Name Type Description
account address

Returns

Name Type Description
uint256
checkpoints(account: address, pos: uint32) view
dev: Get the `pos`-th checkpoint for `account`.

Parameters

Name Type Description
account address
pos uint32

Returns

Name Type Description
tuple
decimals() view → 18
dev: Returns the decimals places of the token.

Returns

Name Type Description
uint8
delegates(account: address) view
dev: Returns the delegate that `account` has chosen.

Parameters

Name Type Description
account address

Returns

Name Type Description
address
getPastTotalSupply(blockNumber: uint256) view
dev: Returns the total supply of votes available at the end of a past block (`blockNumber`). NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. Votes that have not been delegated are still part of total supply, even though they would not participate in a vote.

Parameters

Name Type Description
blockNumber uint256

Returns

Name Type Description
uint256
getPastVotes(account: address, blockNumber: uint256) view
dev: Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).

Parameters

Name Type Description
account address
blockNumber uint256

Returns

Name Type Description
uint256
getVotes(account: address) view
dev: Returns the current amount of votes that `account` has.

Parameters

Name Type Description
account address

Returns

Name Type Description
uint256
name() view → Optimism
dev: Returns the name of the token.

Returns

Name Type Description
string
nonces(owner: address) view
dev: Returns the current nonce for `owner`. This value must be included whenever a signature is generated for {permit}. Every successful call to {permit} increases ``owner``'s nonce by one. This prevents a signature from being used multiple times.

Parameters

Name Type Description
owner address

Returns

Name Type Description
uint256
numCheckpoints(account: address) view
dev: Get number of checkpoints for `account`.

Parameters

Name Type Description
account address

Returns

Name Type Description
uint32
owner() view → 0x5c4e7ba1e219e47948e6e3f55019a647ba501005
dev: Returns the address of the current owner.

Returns

Name Type Description
address
symbol() view → OP
dev: Returns the symbol of the token.

Returns

Name Type Description
string
totalSupply() view → 4,294,963,292.49 OP
dev: Returns the amount of tokens in existence.

Returns

Name Type Description
uint256

Write Functions

approve(spender: address, amount: uint256) nonpayable
dev: Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.

Parameters

Name Type Description
spender address
amount uint256

Returns

Name Type Description
bool
burn(amount: uint256) nonpayable
dev: Destroys `amount` tokens from the caller. See {ERC20-_burn}.

Parameters

Name Type Description
amount uint256
burnFrom(account: address, amount: uint256) nonpayable
dev: Destroys `amount` tokens from `account`, deducting from the caller's allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for ``accounts``'s tokens of at least `amount`.

Parameters

Name Type Description
account address
amount uint256
decreaseAllowance(spender: address, subtractedValue: uint256) nonpayable
dev: Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.

Parameters

Name Type Description
spender address
subtractedValue uint256

Returns

Name Type Description
bool
delegate(delegatee: address) nonpayable
dev: Delegates votes from the sender to `delegatee`.

Parameters

Name Type Description
delegatee address
delegateBySig(delegatee: address, nonce: uint256, expiry: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable
dev: Delegates votes from signer to `delegatee`.

Parameters

Name Type Description
delegatee address
nonce uint256
expiry uint256
v uint8
r bytes32
s bytes32
increaseAllowance(spender: address, addedValue: uint256) nonpayable
dev: Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.

Parameters

Name Type Description
spender address
addedValue uint256

Returns

Name Type Description
bool
mint(_account: address, _amount: uint256) nonpayable

Parameters

Name Type Description
_account address
_amount uint256
permit(owner: address, spender: address, value: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable
dev: 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].

Parameters

Name Type Description
owner address
spender address
value uint256
deadline uint256
v uint8
r bytes32
s bytes32
renounceOwnership() nonpayable
dev: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transfer(to: address, amount: uint256) nonpayable
dev: Moves `amount` tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.

Parameters

Name Type Description
to address
amount uint256

Returns

Name Type Description
bool
transferFrom(from: address, to: address, amount: uint256) nonpayable
dev: Moves `amount` tokens from `from` to `to` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.

Parameters

Name Type Description
from address
to address
amount uint256

Returns

Name Type Description
bool
transferOwnership(newOwner: address) nonpayable
dev: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

Parameters

Name Type Description
newOwner address

Events

Approval(owner: address, spender: address, value: uint256)
Name Type Indexed Description
owner address
spender address
value uint256
DelegateChanged(delegator: address, fromDelegate: address, toDelegate: address)
Name Type Indexed Description
delegator address
fromDelegate address
toDelegate address
DelegateVotesChanged(delegate: address, previousBalance: uint256, newBalance: uint256)
Name Type Indexed Description
delegate address
previousBalance uint256
newBalance uint256
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
Transfer(from: address, to: address, value: uint256)
Name Type Indexed Description
from address
to address
value uint256