BAL

Ethereum ERC-20 Token 浏览链

0xba100000625a3754423978a60c9317c58a424e3d

Solidity v0.6.8+commit.0bbfe453

Fungible token following the ERC-20 standard.

🤖
通过你的 AI 查询此合约
引用: bal-eth 0xba100000625a3754423978a60c9317c58a424e3d
示例提示词: "Tell me the current state of bal-eth"
还没有接入 AI?→ mcp.smarts.md · 浏览链

管理与风险

谁能修改规则?

Detected mintable and role based controls from the verified ABI.

Mintable Role Based

概览

读取函数
19
写入函数
13
事件
5

读取函数

Block #25,493,682 · 46s ago
DEFAULT_ADMIN_ROLE() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Return the bytes32 identifier for the DEFAULT_ADMIN_ROLE.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 identifier for the default admin role, used with AccessControl checks.✨ AI
DOMAIN_SEPARATOR() view → 0x0f7e6db4bd29f5b0743e892c53690ee939ed780f756e0d021b93ed86993b03f4

Returns the domain separator used for EIP-712 typed data signing.✨ AI

返回值

名称 类型 描述
bytes32 The EIP-712 domain separator as a bytes32 value used to scope typed signatures.✨ AI
MINTER_ROLE() view → 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6

Returns the role identifier for the minter role.✨ AI

返回值

名称 类型 描述
bytes32 bytes32 role identifier for the minter role, used to grant or revoke minting rights via AccessControl✨ AI
PERMIT_TYPEHASH() view → 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9

Returns the EIP-712 PERMIT type hash used to construct permit signature digests.✨ AI

返回值

名称 类型 描述
bytes32 The PERMIT_TYPEHASH constant (bytes32) used in EIP-712 digest construction for permit signatures.✨ AI
SNAPSHOT_ROLE() view → 0x5fdbd35e8da83ee755d5e62a539e5ed7f47126abede0b8b10f9ea43dc6eed07f

Return the role identifier that authorizes snapshot creation.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 role identifier for SNAPSHOT_ROLE used by access control to permit snapshot operations.✨ AI
allowance(owner: address, spender: address) view

Return the remaining token allowance that an owner granted to a spender.✨ AI

开发者: 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.

参数

名称 类型 描述
owner address Address of the token holder who granted the allowance.✨ AI
spender address Address allowed to spend tokens on behalf of the owner.✨ AI

返回值

名称 类型 描述
uint256 Remaining allowance as a uint256 representing how many tokens spender may transfer from owner.✨ AI
balanceOf(account: address) view

Returns the token balance of the given account.✨ AI

开发者: Returns the amount of tokens owned by `account`.

参数

名称 类型 描述
account address Address whose token balance will be returned.✨ AI

返回值

名称 类型 描述
uint256 The account's token balance in the token's smallest units (uint256).✨ AI
balanceOfAt(account: address, snapshotId: uint256) view

Returns the token balance of an account at a specific snapshot.✨ AI

开发者: Retrieves the balance of `account` at the time `snapshotId` was created.

参数

名称 类型 描述
account address Address whose balance is queried.✨ AI
snapshotId uint256 Snapshot id at which to read the balance.✨ AI

返回值

名称 类型 描述
uint256 The account's token balance at the given snapshot as a uint256.✨ AI
decimals() view → 18

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

开发者: Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.

返回值

名称 类型 描述
uint8 The token's decimals as a uint8, representing how many decimal places to display balances and amounts.✨ AI
getRoleAdmin(role: bytes32) view

Returns the admin role that controls the specified role.✨ AI

开发者: Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

参数

名称 类型 描述
role bytes32 Role identifier (bytes32) to query the admin for.✨ AI

返回值

名称 类型 描述
bytes32 Admin role (bytes32) that can grant or revoke the specified role.✨ AI
getRoleMember(role: bytes32, index: uint256) view

Return the address of the account that holds a specific role at the given index.✨ AI

开发者: Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.

参数

名称 类型 描述
role bytes32 Role identifier (bytes32) whose member to query.✨ AI
index uint256 Zero-based index of the member within the role's enumerable set.✨ AI

返回值

名称 类型 描述
address Address of the role member at the specified index.✨ AI
getRoleMemberCount(role: bytes32) view

Return the number of accounts that currently hold the specified role.✨ AI

开发者: Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.

参数

名称 类型 描述
role bytes32 Role identifier (bytes32) used to look up members.✨ AI

返回值

名称 类型 描述
uint256 The number of accounts currently assigned to the role.✨ AI
hasRole(role: bytes32, account: address) view

Checks whether an account holds a specific role and returns true if it does.✨ AI

开发者: Returns `true` if `account` has been granted `role`.

参数

名称 类型 描述
role bytes32 Role identifier as a bytes32 value (usually a keccak256 hash).✨ AI
account address Address of the account to check for the role.✨ AI

返回值

名称 类型 描述
bool True if the account has the specified role, otherwise false.✨ AI
name() view → Balancer

Returns the token's name.✨ AI

开发者: Returns the name of the token.

返回值

名称 类型 描述
string The human-readable name of the token.✨ AI
nonces(address) view

Returns the current permit nonce for the given address.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
uint256 The uint256 nonce used for permits (EIP-2612) for that address, preventing signature replay.✨ AI
symbol() view → BAL

Returns the token's symbol.✨ AI

开发者: Returns the symbol of the token, usually a shorter version of the name.

返回值

名称 类型 描述
string The ERC-20 token symbol (short identifier, e.g. "BAL").✨ AI
totalSupply() view → 72,372,044.84 BAL

Returns the total number of tokens in circulation for the BalancerGovernanceToken.✨ AI

开发者: Returns the amount of tokens in existence.

返回值

名称 类型 描述
uint256 The total token supply as a uint256, representing the current number of tokens in existence.✨ AI
totalSupplyAt(snapshotId: uint256) view

Get the total token supply recorded at a past snapshot.✨ AI

开发者: Retrieves the total supply at the time `snapshotId` was created.

参数

名称 类型 描述
snapshotId uint256 Identifier of the snapshot (block number when the snapshot was taken).✨ AI

返回值

名称 类型 描述
uint256 Total token supply at the given snapshot, expressed in the token's smallest unit.✨ AI
version() view → 1

Returns the token contract's version string.✨ AI

返回值

名称 类型 描述
string A human-readable string containing the contract version (e.g., "1.0.0").✨ AI

写入函数

approve(spender: address, amount: uint256) nonpayable

Approve spender to transfer up to amount of your tokens from your account.✨ AI

开发者: 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.

参数

名称 类型 描述
spender address Address allowed to spend the tokens.✨ AI
amount uint256 Maximum number of tokens the spender is allowed to transfer.✨ AI

返回值

名称 类型 描述
bool True if the approval succeeded and the allowance was set, otherwise false.✨ AI
burn(amount: uint256) nonpayable

Burns a specified amount of the caller's tokens, decreasing the caller's balance and the total supply.✨ AI

参数

名称 类型 描述
amount uint256 Number of tokens to burn from the caller's balance.✨ AI
burnFrom(account: address, amount: uint256) nonpayable

Burns tokens from the given account using the caller's allowance and reduces total supply.✨ AI

参数

名称 类型 描述
account address Address to burn tokens from.✨ AI
amount uint256 Number of tokens to burn, expressed in the token's smallest unit (wei-like).✨ AI
decreaseAllowance(spender: address, subtractedValue: uint256) nonpayable

Decrease the caller's ERC-20 allowance for spender by subtractedValue.✨ AI

开发者: 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`.

参数

名称 类型 描述
spender address Address allowed to spend tokens whose allowance will be reduced.✨ AI
subtractedValue uint256 Amount of tokens to subtract from the spender's current allowance.✨ AI

返回值

名称 类型 描述
bool Boolean indicating whether the allowance was successfully decreased.✨ AI
grantRole(role: bytes32, account: address) nonpayable

Grants a role to an account.✨ AI

开发者: Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.

参数

名称 类型 描述
role bytes32 Role identifier as a bytes32 value.✨ AI
account address Address that will receive the role.✨ AI
increaseAllowance(spender: address, addedValue: uint256) nonpayable

Increase spender's allowance by addedValue and return true.✨ AI

开发者: 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.

参数

名称 类型 描述
spender address Address permitted to spend tokens on the caller's behalf.✨ AI
addedValue uint256 Number of tokens to add to spender's existing allowance.✨ AI

返回值

名称 类型 描述
bool True if the allowance was successfully increased.✨ AI
mint(to: address, amount: uint256) nonpayable

Mint new tokens and assign them to a specified address.✨ AI

参数

名称 类型 描述
to address Address that will receive the newly minted tokens.✨ AI
amount uint256 Number of tokens to mint, specified in the token's smallest unit.✨ AI
permit(owner: address, spender: address, value: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable

Permit a spender to use the owner's tokens using an off-chain EIP-2612 signature.✨ AI

参数

名称 类型 描述
owner address Address granting the allowance.✨ AI
spender address Address receiving the allowance.✨ AI
value uint256 Amount of tokens to approve (in smallest unit).✨ AI
deadline uint256 Unix timestamp after which the signature is invalid.✨ AI
v uint8 Signature recovery id component.✨ AI
r bytes32 Signature r component.✨ AI
s bytes32 Signature s component.✨ AI
renounceRole(role: bytes32, account: address) nonpayable

Allows an account to renounce a role it currently holds.✨ AI

开发者: Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.

参数

名称 类型 描述
role bytes32 Role identifier as a bytes32 value.✨ AI
account address Account address that will renounce the role; must be the caller (msg.sender).✨ AI
revokeRole(role: bytes32, account: address) nonpayable

Revokes a granted role from the specified account.✨ AI

开发者: Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.

参数

名称 类型 描述
role bytes32 The role identifier (bytes32) to revoke.✨ AI
account address The account address to remove the role from.✨ AI
snapshot() nonpayable

Create a new snapshot that records current balances and total supply for governance and historical queries.✨ AI

transfer(recipient: address, amount: uint256) nonpayable
开发者: Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.

参数

名称 类型 描述
recipient address
amount uint256

返回值

名称 类型 描述
bool
transferFrom(sender: address, recipient: address, amount: uint256) nonpayable
开发者: Moves `amount` tokens from `sender` to `recipient` 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.

参数

名称 类型 描述
sender address
recipient address
amount uint256

返回值

名称 类型 描述
bool

事件

Approval(owner: address, spender: address, value: uint256)
名称 类型 已索引 描述
owner address
spender address
value uint256
RoleGranted(role: bytes32, account: address, sender: address)
名称 类型 已索引 描述
role bytes32
account address
sender address
RoleRevoked(role: bytes32, account: address, sender: address)
名称 类型 已索引 描述
role bytes32
account address
sender address
Snapshot(id: uint256)
名称 类型 已索引 描述
id uint256
Transfer(from: address, to: address, value: uint256)
名称 类型 已索引 描述
from address
to address
value uint256