BGT
Berachain ERC-20 Token0x656b95e550c07a9ffe548bd4085c72418ceb1dba
Solidity v0.8.26+commit.8a97fa7a
Fungible token following the ERC-20 standard.
概览
读取函数
Returns the token's clock mode identifier string for consumers and integrations.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | String identifier describing the contract's clock mode used by external tools and time logic.✨ AI |
Returns the activate boost delay.
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint32 | The activate boost delay. |
Returns the remaining number of tokens that spender is allowed to transfer from owner.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Token holder address whose allowance is being queried.✨ AI |
| spender | address | Address authorized to spend tokens on behalf of the owner.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Remaining allowance as a uint256 representing the number of token units spender may transfer from owner.✨ AI |
Returns the token balance of the specified account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address to query the token balance for.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The token balance of the account as a uint256.✨ AI |
Return the token's current terms and conditions text.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | A single string containing the token's human-readable terms and conditions.✨ AI |
Returns the amount of BGT used by an account to boost a validator.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account boosting. |
| pubkey | bytes | The pubkey of the validator being boosted. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint128 |
Returns the amount of BGT queued up to be used by an account to boost a validator.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account boosting. |
| pubkey | bytes | The pubkey of the validator being boosted. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| blockNumberLast | uint32 | |
| balance | uint128 |
Returns the amount of BGT attributed to the validator for boosts.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| pubkey | bytes | The pubkey of the validator being boosted. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint128 |
Returns the amount of BGT used by an account for boosts.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account boosting. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint128 |
Returns the checkpoint data for an account at the specified index.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose checkpoint to retrieve.✨ AI |
| pos | uint32 | Index of the checkpoint to read (0-based).✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | tuple | fromBlock: block number when this checkpoint became effective (uint32).✨ AI |
Returns the contract's current internal clock value.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint48 | The current internal clock value as a uint48.✨ AI |
Returns the number of decimal places used by the token.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint8 | Number of decimals used by the token for display and arithmetic (uint8).✨ AI |
Returns the address that a token holder has delegated their voting power to.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the token holder whose delegate is queried.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The delegatee address currently assigned to the given account; zero address if none.✨ AI |
Returns the drop boost delay.
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint32 | The drop boost delay. |
Returns the amount of BGT queued up by an account to drop boost from a validator.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account dropping boost. |
| pubkey | bytes | The pubkey of the validator to drop boost for. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| blockNumberLast | uint32 | |
| balance | uint128 |
Returns the EIP-712 domain parameters used for typed data signing.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| fields | bytes1 | Bitmap/discriminator byte indicating which EIP-712 domain fields are present.✨ AI |
| name | string | Human-readable domain name used in EIP-712 signing (typically token or contract name).✨ AI |
| version | string | EIP-712 domain version string.✨ AI |
| chainId | uint256 | Chain identifier (chainId) used for domain replay protection.✨ AI |
| verifyingContract | address | Contract address that acts as the verifying contract in the domain.✨ AI |
| salt | bytes32 | 32-byte domain salt for additional domain separation or entropy.✨ AI |
| extensions | uint256[] | List of uint256 extension values for custom or future domain parameters.✨ AI |
Return the token total supply as of a specified past timepoint.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| timepoint | uint256 | Past timepoint (timestamp or block number used by the contract) to query historical supply.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Total token supply (uint256) recorded at the given past timepoint.✨ AI |
Return the voting power an account had at a specific block number.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account to query.✨ AI |
| timepoint | uint256 | The block number at which to retrieve the account's votes.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | The number of votes the account held at the given block number.✨ AI |
Return the current number of votes assigned to an account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose current voting power to query.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Current number of votes assigned to the account.✨ AI |
Checks whether a given address is allowed to send tokens.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| sender | address | Address to check for send permissions.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the address is whitelisted to send tokens, otherwise false.✨ AI |
Public variable that represents the caller of the mint method.
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address |
Returns the ERC-20 token name used for user interfaces.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The token name string (e.g., "BGT").✨ AI |
Returns the current replay-protection nonce for an address used with permit signatures.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| owner | address | Address whose current permit nonce is queried.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Current uint256 nonce for owner; increments after each successful permit to prevent replays.✨ AI |
Returns the normalized boost power for the validator given outstanding boosts.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| pubkey | bytes | The pubkey of the boosted validator. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 |
Return the number of checkpoints recorded for an account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | Address whose checkpoint count will be returned.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint32 | The number of checkpoints (uint32) associated with the account.✨ AI |
Returns the contract owner's address.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address currently designated as the contract owner.✨ AI |
Returns the amount of BGT queued up to be used by an account for boosts.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account boosting. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint128 |
Returns the BGT staker contract address.
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address of the staker. |
Returns the token's short symbol displayed in wallets and user interfaces.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | string | The token's short symbol string, for example BGT.✨ AI |
Returns the total boosts for all validators.
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint128 |
Returns the total number of BGT tokens in existence.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Total number of BGT tokens in existence, expressed as a uint256 in the token's smallest unit.✨ AI |
Returns the unboosted balance of an account.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| account | address | The address of the account. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 |
写入函数
Boost the validator with an amount of BGT from `user`.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| user | address | The address of the user boosting. |
| pubkey | bytes | The pubkey of the validator to be boosted. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | bool False if amount is zero or if enough time has not passed, otherwise true. |
Approve spender to transfer up to amount of your BGT tokens from your account.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| spender | address | Address authorized to spend tokens on your behalf.✨ AI |
| amount | uint256 | Maximum token amount the spender is allowed to transfer.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | true if the allowance was set successfully, otherwise false.✨ AI |
Burns the excess BERA held by this contract to redeem BGTs.
Cancels a queued boost of the validator removing an amount of BGT for `msg.sender`.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| pubkey | bytes | The pubkey of the validator to cancel boost for. |
| amount | uint128 | The amount of BGT to remove from the queued boost. |
Cancels a queued drop boost of the validator removing an amount of BGT for sender.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| pubkey | bytes | The pubkey of the validator to cancel drop boost for. |
| amount | uint128 | The amount of BGT to remove from the queued drop boost. |
Delegate the caller's voting power to the specified address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| delegatee | address | Address that will receive the caller's delegated voting power.✨ AI |
Delegate voting power to an address using an off-chain EIP-712 signature.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| delegatee | address | Address receiving the delegated voting power.✨ AI |
| nonce | uint256 | Signed nonce to prevent replay of the delegation.✨ AI |
| expiry | uint256 | Timestamp after which the signature becomes invalid.✨ AI |
| v | uint8 | Recovery byte of the ECDSA signature.✨ AI |
| r | bytes32 | First 32 bytes of the ECDSA signature.✨ AI |
| s | bytes32 | Second 32 bytes of the ECDSA signature.✨ AI |
Drops an amount of BGT from an existing boost of validator by user.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| user | address | The address of the user to drop boost from. |
| pubkey | bytes | The pubkey of the validator to remove boost from. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | bool False if amount is zero or if enough time has not passed, otherwise true. |
Initializes the BGT contract.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _owner | address |
Mint BGT to the distributor.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| distributor | address | The address of the distributor. |
| amount | uint256 | The amount of BGT to mint. |
Execute multiple encoded calls in a single transaction and return each call's result.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| data | bytes[] | Array of encoded function call payloads to execute sequentially within the multicall.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes[] | Array of raw returned bytes from each executed call, in the same order as the input array.✨ AI |
Queues a new boost of the validator with an amount of BGT from `msg.sender`.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| pubkey | bytes | The pubkey of the validator to be boosted. |
| amount | uint128 | The amount of BGT to use for the queued boost. |
Queues a drop boost of the validator removing an amount of BGT for sender.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| pubkey | bytes | The pubkey of the validator to remove boost from. |
| amount | uint128 | The amount of BGT to remove from the boost. |
Redeem the BGT token for the native token at a 1:1 rate.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| receiver | address | The receiver's address who will receive the native token. |
| amount | uint256 | The amount of BGT to redeem. |
Renounces ownership of the contract, setting the owner to the zero address.✨ AI
Set the activate boost delay.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _activateBoostDelay | uint32 | The new delay for activating boosts. |
Set the BGT terms and conditions.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _bgtTermsAndConditions | string |
Set the drop boost delay.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _dropBoostDelay | uint32 | The new delay for dropping boosts. |
Set the minter address.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _minter | address | The address of the minter. |
Set the BGT staker contract address.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| _staker | address | The address of the staker. |
Transfer tokens from the caller to a recipient and return true on success.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| to | address | Recipient address.✨ AI |
| amount | uint256 | Number of tokens to transfer.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the transfer succeeded.✨ AI |
Transfers tokens from one address to another using the caller's allowance.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| from | address | Address of the token holder to transfer tokens from.✨ AI |
| to | address | Address that will receive the tokens.✨ AI |
| amount | uint256 | Amount of tokens to transfer, denominated in the token's smallest unit.✨ AI |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool | True if the transfer succeeds.✨ AI |
Transfers contract ownership to a new owner address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| newOwner | address | Address that will become the new contract owner.✨ AI |
Approve an address to send BGT or approve another address to transfer BGT from it.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| sender | address | The address of the sender. |
| approved | bool | Whether the sender is approved or not. |
事件
Emitted when sender activates a new boost for a validator
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| sender | address | ✓ | The address of the sender. |
| user | address | ✓ | The address of the user boosting. |
| pubkey | bytes | ✓ | The pubkey of the validator to be activated for the queued boosts. |
| amount | uint128 | The amount of BGT to boost with. |
Emitted when the activate boost delay is changed.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| newDelay | uint32 | The new delay for activating boosts. |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| owner | address | ✓ | |
| spender | address | ✓ | |
| value | uint256 |
Emitted when the BGT terms and conditions are changed.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| newTermsAndConditions | string | The new terms and conditions. |
Emitted when sender cancels a queued boost for a validator with an amount of BGT
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| user | address | ✓ | The address of the user. |
| pubkey | bytes | ✓ | The pubkey of the validator to be canceled from queued boosts. |
| amount | uint128 | The amount of BGT to cancel from queued boosts. |
Emitted when an user cancels a queued drop boost for a validator.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| user | address | ✓ | The address of the user. |
| pubkey | bytes | ✓ | The pubkey of the validator to cancel drop boost for. |
| amount | uint128 | The amount of BGT boost to cancel. |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| delegator | address | ✓ | |
| fromDelegate | address | ✓ | |
| toDelegate | address | ✓ |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| delegate | address | ✓ | |
| previousVotes | uint256 | ||
| newVotes | uint256 |
Emitted when sender removes an amount of BGT boost from a validator
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| sender | address | ✓ | The address of the sender. |
| user | address | ✓ | The address of the user dropping boost. |
| pubkey | bytes | ✓ | The pubkey of the validator to remove boost from. |
| amount | uint128 | The amount of BGT boost to remove. |
Emitted when the drop boost delay is changed.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| newDelay | uint32 | The new delay for dropping boosts. |
Emitted when the native token exceeding reserves are burnt.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| caller | address | The address of the caller. | |
| amount | uint256 | The amount of BERA burnt. |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| version | uint64 |
Emitted when the minter address is changed.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| previous | address | ✓ | The address of the previous minter. |
| current | address | ✓ | The address of the current minter. |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
Emitted when sender queues a new boost for a validator with an amount of BGT
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| user | address | ✓ | The address of the user. |
| pubkey | bytes | ✓ | The pubkey of the validator to be queued for boost. |
| amount | uint128 | The amount of BGT enqueued for boosting during function call. |
Emitted when an user queues a drop boost for a validator.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| user | address | ✓ | The address of the user. |
| pubkey | bytes | ✓ | The pubkey of the validator to remove boost from. |
| amount | uint128 | The amount of BGT boost enqueued for dropping boost during function call. |
Emitted when the BGT token is redeemed for the native token.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| from | address | ✓ | The address of the redeemer. |
| receiver | address | ✓ | The address of the receiver. |
| amount | uint256 | The amount of redeemed BGT (and thus, of received BERA). |
Emitted when an address is approved to send BGT.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| sender | address | ✓ | The address of the sender. |
| approved | bool | Whether the sender is approved or not. |
Emitted when the Staker address is changed.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| previous | address | ✓ | The address of the previous Staker. |
| current | address | ✓ | The address of the current Staker. |
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| from | address | ✓ | |
| to | address | ✓ | |
| value | uint256 |