Honey

Berachain ERC-20 Token

0xfcbd14dc51f0a4d49d5e53c2e0950e0bc26d0dce

Proxy 实现合约: 0x96b1a552a97da5503343d0f9ff2766c616e62905

Solidity v0.8.26+commit.8a97fa7a

Fungible token following the ERC-20 standard.

🤖
通过你的 AI 查询此合约
引用: 0xfcbd14dc51f0a4d49d5e53c2e0950e0bc26d0dce
示例提示词: "Tell me the current state of berachain/0xfcbd14dc51f0a4d49d5e53c2e0950e0bc26d0dce"
还没有接入 AI?→ mcp.smarts.md
Berachain 在 Smarts 上是仅文档链:源代码和 ABI 已索引,但当前不提供实时链上数据(状态、最新事件、管理员画像)。AI 代理仍可通过 MCP 调用 get_contract_info 和 get_contract_source。

概览

读取函数
23
写入函数
21
事件
12

读取函数

CANCEL_AUTHORIZATION_TYPEHASH() view

Return the EIP-712 type hash used for canceling authorizations.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 EIP-712 type hash for the CancelAuthorization struct used to verify cancel signatures.✨ AI
DEFAULT_ADMIN_ROLE() view

Returns the role identifier used for the contract's default admin role.✨ AI

返回值

名称 类型 描述
bytes32 A bytes32 identifier that represents the DEFAULT_ADMIN_ROLE constant.✨ AI
DOMAIN_SEPARATOR() view

Returns the contract's EIP-712 domain separator used to build typed-data signatures.✨ AI

开发者: Returns the EIP-712 domain separator for the EIP-2612 permit.

返回值

名称 类型 描述
result bytes32 EIP-712 domain separator (bytes32) used when encoding or verifying permit and other typed-data signatures.✨ AI
PERMIT_TYPEHASH() view

Returns the EIP-712 type hash used for permit signatures.✨ AI

返回值

名称 类型 描述
bytes32 EIP-712 PERMIT type hash (bytes32) used to construct the permit signature digest.✨ AI
RECEIVE_WITH_AUTHORIZATION_TYPEHASH() view

Return the EIP-712 type hash used for ReceiveWithAuthorization messages.✨ AI

返回值

名称 类型 描述
bytes32 The bytes32 EIP-712 type hash for the ReceiveWithAuthorization struct.✨ AI
TRANSFER_WITH_AUTHORIZATION_TYPEHASH() view

Returns the EIP-712 type hash used for authorized token transfers.✨ AI

返回值

名称 类型 描述
bytes32 The keccak256 EIP-712 type hash for transferWithAuthorization messages (bytes32).✨ AI
UPGRADE_INTERFACE_VERSION() view

Return the contract's upgrade interface version string.✨ AI

返回值

名称 类型 描述
string A string identifying the upgrade interface version supported by this contract.✨ AI
allowance(owner: address, spender: address) view

Returns the remaining number of tokens that spender is allowed to transfer from owner.✨ AI

开发者: Returns the amount of tokens that `spender` can spend on behalf of `owner`.

参数

名称 类型 描述
owner address Address of the token owner.✨ AI
spender address Address authorized to spend the owner's tokens.✨ AI

返回值

名称 类型 描述
result uint256 Remaining allowance as a uint256 representing token units.✨ AI
authorizationState(authorizer: address, nonce: bytes32) view

Returns the state of an authorization

开发者: Nonces are randomly generated 32-byte data unique to the authorizer's address

参数

名称 类型 描述
authorizer address Authorizer's address
nonce bytes32 Nonce of the authorization

返回值

名称 类型 描述
bool True if the nonce is used
balanceOf(owner: address) view

Returns the token balance of the specified account.✨ AI

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

参数

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

返回值

名称 类型 描述
result uint256 The token balance of the specified address as a uint256 amount.✨ AI
decimals() view

Returns the number of decimals used by the token.✨ AI

开发者: Returns the decimals places of the token.

返回值

名称 类型 描述
uint8 The number of decimal places the token uses (uint8).✨ AI
factory() view

Returns the address of the factory contract that deployed or manages this token.✨ AI

返回值

名称 类型 描述
address The factory contract address associated with this token.✨ 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.✨ AI

返回值

名称 类型 描述
bytes32 Admin role identifier (bytes32) that controls the given role.✨ AI
hasRole(role: bytes32, account: address) view

Check whether an account holds a specific role in the contract.✨ AI

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

参数

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

返回值

名称 类型 描述
bool True if the account has the specified role; otherwise false.✨ AI
isBlacklistedWallet(wallet: address) view

Checks whether the given wallet address is marked as blacklisted in the token contract.✨ AI

参数

名称 类型 描述
wallet address Address to check for blacklist status.✨ AI

返回值

名称 类型 描述
blacklisted bool True if the wallet is blacklisted and subject to restrictions; otherwise false.✨ AI
name() pure

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

开发者: Returns the name of the token.

返回值

名称 类型 描述
string A human-readable name for the token as a string.✨ AI
nonces(owner: address) view

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

开发者: Returns the current nonce for `owner`. This value is used to compute the signature for EIP-2612 permit.

参数

名称 类型 描述
owner address Address of the account whose nonce is being queried.✨ AI

返回值

名称 类型 描述
result uint256 The current nonce (uint256) for the owner, used to validate and prevent replay of permits.✨ AI
paused() view

Indicates whether token transfers are currently paused.✨ AI

开发者: Returns true if the contract is paused, and false otherwise.

返回值

名称 类型 描述
bool True if the contract is paused (token transfers disabled), otherwise false.✨ AI
proxiableUUID() view

Return the contract's proxiable UUID used to identify the implementation storage slot.✨ AI

开发者: Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.

返回值

名称 类型 描述
bytes32 Bytes32 UUID that identifies the storage slot used for the contract implementation (per UUPS/EIP-1822/EIP-1967).✨ AI
supportsInterface(interfaceId: bytes4) view

Check whether the contract implements the interface with the given interfaceId.✨ AI

开发者: See {IERC165-supportsInterface}.

参数

名称 类型 描述
interfaceId bytes4 Interface identifier (bytes4), typically the first 4 bytes of keccak256 of the interface's signatures.✨ AI

返回值

名称 类型 描述
bool True if the contract implements the interface specified by interfaceId (ERC-165 semantics), otherwise false.✨ AI
symbol() pure

Returns the token symbol for the Honey ERC-20 token.✨ AI

开发者: Returns the symbol of the token.

返回值

名称 类型 描述
string The token's short symbol (e.g., HNY).✨ AI
totalSupply() view

Returns the total number of Honey tokens in existence.✨ AI

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

返回值

名称 类型 描述
result uint256 Total supply as a uint256, expressed in the token's smallest base unit.✨ AI
version() pure

Version string for the EIP712 domain separator

返回值

名称 类型 描述
string Version string

写入函数

approve(spender: address, amount: uint256) nonpayable

Approve a spender to transfer up to a specified amount of tokens on the caller's behalf.✨ AI

开发者: Sets `amount` as the allowance of `spender` over the caller's tokens. Emits a {Approval} event.

参数

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

返回值

名称 类型 描述
bool True if the approval operation succeeded, otherwise false.✨ AI
burn(from: address, amount: uint256) nonpayable

Burn Honey from an account.

开发者: Only the factory can call this function.

参数

名称 类型 描述
from address The account to burn Honey from.
amount uint256 The amount of Honey to burn.
cancelAuthorization(authorizer: address, nonce: bytes32, v: uint8, r: bytes32, s: bytes32) nonpayable

Cancel an authorization previously issued by an address.✨ AI

开发者: Override to add whenNotPaused check.

参数

名称 类型 描述
authorizer address Address that issued the original authorization.✨ AI
nonce bytes32 Unique nonce identifying the specific authorization to cancel.✨ AI
v uint8
r bytes32
s bytes32
cancelAuthorization(authorizer: address, nonce: bytes32, signature: bytes) nonpayable

Cancel an authorization previously issued by an address.✨ AI

开发者: Override to add whenNotPaused check.

参数

名称 类型 描述
authorizer address Address that issued the original authorization.✨ AI
nonce bytes32 Unique nonce identifying the specific authorization to cancel.✨ AI
signature bytes Signature bytes proving the authorizer authorized this cancellation.✨ AI
grantRole(role: bytes32, account: address) nonpayable

Grants a specific role to an account, updating the contract's access control state.✨ 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. May emit a {RoleGranted} event.

参数

名称 类型 描述
role bytes32 Role identifier as a bytes32 value (typically a keccak256 hash or declared constant).✨ AI
account address Address that will receive the specified role.✨ AI
initialize(_governance: address, _factory: address) nonpayable

Initialize the token's governance and factory addresses and configure the contract's initial state.✨ AI

参数

名称 类型 描述
_governance address Address assigned as governance that receives administrative permissions.✨ AI
_factory address Address of the factory contract authorized to interact with or mint tokens.✨ AI
initializeV1Update() nonpayable

Initialize the V1 upgrade to migrate contract state and enable the updated token behavior.✨ AI

mint(to: address, amount: uint256) nonpayable

Mint Honey to the receiver.

开发者: Only the factory can call this function.

参数

名称 类型 描述
to address The receiver address.
amount uint256 The amount of Honey to mint.
permit(owner: address, spender: address, value: uint256, deadline: uint256, signature: bytes) nonpayable

Allow a spender to use the owner's tokens via an off-chain signature (EIP-2612 permit) before the deadline.✨ AI

开发者: Override to add whenNotPaused check.

参数

名称 类型 描述
owner address Token owner who produced and signed the permit.✨ AI
spender address Address granted permission to spend the owner's tokens.✨ AI
value uint256 Amount of tokens the spender is allowed to use (in the token's smallest unit).✨ AI
deadline uint256 Unix timestamp after which the permit is no longer valid.✨ AI
signature bytes
permit(owner: address, spender: address, value: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32) nonpayable

Allow a spender to use the owner's tokens via an off-chain signature (EIP-2612 permit) before the deadline.✨ AI

开发者: Override to add whenNotPaused check.

参数

名称 类型 描述
owner address Token owner who produced and signed the permit.✨ AI
spender address Address granted permission to spend the owner's tokens.✨ AI
value uint256 Amount of tokens the spender is allowed to use (in the token's smallest unit).✨ AI
deadline uint256 Unix timestamp after which the permit is no longer valid.✨ AI
v uint8 Recovery byte of the owner's ECDSA signature.✨ AI
r bytes32 First 32 bytes of the owner's ECDSA signature.✨ AI
s bytes32 Second 32 bytes of the owner's ECDSA signature.✨ AI
receiveWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, signature: bytes) nonpayable

Receive a transfer with a signed authorization from the payer

开发者: This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.

参数

名称 类型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
signature bytes
receiveWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, v: uint8, r: bytes32, s: bytes32) nonpayable

Receive a transfer with a signed authorization from the payer

开发者: This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.

参数

名称 类型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
v uint8 v of the signature
r bytes32 r of the signature
s bytes32 s of the signature
renounceRole(role: bytes32, callerConfirmation: address) nonpayable

Renounce a role you hold by confirming with your account address.✨ 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 revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `callerConfirmation`. May emit a {RoleRevoked} event.

参数

名称 类型 描述
role bytes32 The role identifier to renounce, provided as a bytes32 value.✨ AI
callerConfirmation address Your address used to confirm the renunciation; must be equal to msg.sender.✨ AI
revokeRole(role: bytes32, account: address) nonpayable
开发者: Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.

参数

名称 类型 描述
role bytes32
account address
setBlacklisted(wallet: address, status: bool) nonpayable

Allows to pause transfer of Honey for a specific wallet

参数

名称 类型 描述
wallet address
status bool
setPaused(pause: bool) nonpayable

Allows to pause transfer of Honey

参数

名称 类型 描述
pause bool
transfer(to: address, amount: uint256) nonpayable
开发者: Transfer `amount` tokens from the caller to `to`. Requirements: - `from` must at least have `amount`. Emits a {Transfer} event.

参数

名称 类型 描述
to address
amount uint256

返回值

名称 类型 描述
bool
transferFrom(from: address, to: address, amount: uint256) nonpayable
开发者: Transfers `amount` tokens from `from` to `to`. Note: Does not update the allowance if it is the maximum uint256 value. Requirements: - `from` must at least have `amount`. - The caller must have at least `amount` of allowance to transfer the tokens of `from`. Emits a {Transfer} event.

参数

名称 类型 描述
from address
to address
amount uint256

返回值

名称 类型 描述
bool
transferWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, signature: bytes) nonpayable

Execute a transfer with a signed authorization

开发者: Override this function in derived contracts to add custom validation.

参数

名称 类型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
signature bytes
transferWithAuthorization(from: address, to: address, value: uint256, validAfter: uint256, validBefore: uint256, nonce: bytes32, v: uint8, r: bytes32, s: bytes32) nonpayable

Execute a transfer with a signed authorization

开发者: Override this function in derived contracts to add custom validation.

参数

名称 类型 描述
from address Payer's address (Authorizer)
to address Payee's address
value uint256 Amount to be transferred
validAfter uint256 The time after which this is valid (unix time)
validBefore uint256 The time before which this is valid (unix time)
nonce bytes32 Unique nonce
v uint8 v of the signature
r bytes32 r of the signature
s bytes32 s of the signature
upgradeToAndCall(newImplementation: address, data: bytes) payable
开发者: Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

参数

名称 类型 描述
newImplementation address
data bytes

事件

Approval(owner: address, spender: address, amount: uint256)
名称 类型 已索引 描述
owner address
spender address
amount uint256
AuthorizationCanceled(authorizer: address, nonce: bytes32)
名称 类型 已索引 描述
authorizer address
nonce bytes32
AuthorizationUsed(authorizer: address, nonce: bytes32)
名称 类型 已索引 描述
authorizer address
nonce bytes32
BlacklistedStatusChanged(wallet: address, status: bool)

Emitted when the fee receiver address is set.

名称 类型 已索引 描述
wallet address
status bool
Initialized(version: uint64)
名称 类型 已索引 描述
version uint64
Paused(account: address)
名称 类型 已索引 描述
account address
RoleAdminChanged(role: bytes32, previousAdminRole: bytes32, newAdminRole: bytes32)
名称 类型 已索引 描述
role bytes32
previousAdminRole bytes32
newAdminRole bytes32
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
Transfer(from: address, to: address, amount: uint256)
名称 类型 已索引 描述
from address
to address
amount uint256
Unpaused(account: address)
名称 类型 已索引 描述
account address
Upgraded(implementation: address)
名称 类型 已索引 描述
implementation address