BGT
Berachain ERC-20 Token0x656b95e550c07a9ffe548bd4085c72418ceb1dba
Solidity v0.8.26+commit.8a97fa7a
Fungible token following the ERC-20 standard.
Overview
Read Functions
Returns
| Name | Type | Description |
|---|---|---|
| — | string |
Returns the activate boost delay.
Returns
| Name | Type | Description |
|---|---|---|
| — | uint32 | The activate boost delay. |
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | |
| spender | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Parameters
| Name | Type | Description |
|---|---|---|
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | string |
Returns the amount of BGT used by an account to boost a validator.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account boosting. |
| pubkey | bytes | The pubkey of the validator being boosted. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint128 |
Returns the amount of BGT queued up to be used by an account to boost a validator.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account boosting. |
| pubkey | bytes | The pubkey of the validator being boosted. |
Returns
| Name | Type | Description |
|---|---|---|
| blockNumberLast | uint32 | |
| balance | uint128 |
Returns the amount of BGT attributed to the validator for boosts.
Parameters
| Name | Type | Description |
|---|---|---|
| pubkey | bytes | The pubkey of the validator being boosted. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint128 |
Returns the amount of BGT used by an account for boosts.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account boosting. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint128 |
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| pos | uint32 |
Returns
| Name | Type | Description |
|---|---|---|
| — | tuple |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint48 |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint8 |
Parameters
| Name | Type | Description |
|---|---|---|
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns the drop boost delay.
Returns
| Name | Type | Description |
|---|---|---|
| — | uint32 | The drop boost delay. |
Returns the amount of BGT queued up by an account to drop boost from a validator.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account dropping boost. |
| pubkey | bytes | The pubkey of the validator to drop boost for. |
Returns
| Name | Type | Description |
|---|---|---|
| blockNumberLast | uint32 | |
| balance | uint128 |
Returns
| Name | Type | Description |
|---|---|---|
| fields | bytes1 | |
| name | string | |
| version | string | |
| chainId | uint256 | |
| verifyingContract | address | |
| salt | bytes32 | |
| extensions | uint256[] |
Parameters
| Name | Type | Description |
|---|---|---|
| timepoint | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| timepoint | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Parameters
| Name | Type | Description |
|---|---|---|
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Parameters
| Name | Type | Description |
|---|---|---|
| sender | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Public variable that represents the caller of the mint method.
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | string |
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Returns the normalized boost power for the validator given outstanding boosts.
Parameters
| Name | Type | Description |
|---|---|---|
| pubkey | bytes | The pubkey of the boosted validator. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Parameters
| Name | Type | Description |
|---|---|---|
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint32 |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns the amount of BGT queued up to be used by an account for boosts.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account boosting. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint128 |
Returns the BGT staker contract address.
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address of the staker. |
Returns
| Name | Type | Description |
|---|---|---|
| — | string |
Returns the total boosts for all validators.
Returns
| Name | Type | Description |
|---|---|---|
| — | uint128 |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Returns the unboosted balance of an account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 |
Write Functions
Boost the validator with an amount of BGT from `user`.
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | The address of the user boosting. |
| pubkey | bytes | The pubkey of the validator to be boosted. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | bool False if amount is zero or if enough time has not passed, otherwise true. |
Parameters
| Name | Type | Description |
|---|---|---|
| spender | address | |
| amount | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
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`.
Parameters
| Name | Type | Description |
|---|---|---|
| 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.
Parameters
| Name | Type | Description |
|---|---|---|
| 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. |
Parameters
| Name | Type | Description |
|---|---|---|
| delegatee | address |
Parameters
| Name | Type | Description |
|---|---|---|
| delegatee | address | |
| nonce | uint256 | |
| expiry | uint256 | |
| v | uint8 | |
| r | bytes32 | |
| s | bytes32 |
Drops an amount of BGT from an existing boost of validator by user.
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | The address of the user to drop boost from. |
| pubkey | bytes | The pubkey of the validator to remove boost from. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | bool False if amount is zero or if enough time has not passed, otherwise true. |
Initializes the BGT contract.
Parameters
| Name | Type | Description |
|---|---|---|
| _owner | address |
Mint BGT to the distributor.
Parameters
| Name | Type | Description |
|---|---|---|
| distributor | address | The address of the distributor. |
| amount | uint256 | The amount of BGT to mint. |
Parameters
| Name | Type | Description |
|---|---|---|
| data | bytes[] |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes[] |
Queues a new boost of the validator with an amount of BGT from `msg.sender`.
Parameters
| Name | Type | Description |
|---|---|---|
| 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.
Parameters
| Name | Type | Description |
|---|---|---|
| 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.
Parameters
| Name | Type | Description |
|---|---|---|
| receiver | address | The receiver's address who will receive the native token. |
| amount | uint256 | The amount of BGT to redeem. |
Set the activate boost delay.
Parameters
| Name | Type | Description |
|---|---|---|
| _activateBoostDelay | uint32 | The new delay for activating boosts. |
Set the BGT terms and conditions.
Parameters
| Name | Type | Description |
|---|---|---|
| _bgtTermsAndConditions | string |
Set the drop boost delay.
Parameters
| Name | Type | Description |
|---|---|---|
| _dropBoostDelay | uint32 | The new delay for dropping boosts. |
Set the minter address.
Parameters
| Name | Type | Description |
|---|---|---|
| _minter | address | The address of the minter. |
Set the BGT staker contract address.
Parameters
| Name | Type | Description |
|---|---|---|
| _staker | address | The address of the staker. |
Parameters
| Name | Type | Description |
|---|---|---|
| to | address | |
| amount | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Parameters
| Name | Type | Description |
|---|---|---|
| from | address | |
| to | address | |
| amount | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address |
Approve an address to send BGT or approve another address to transfer BGT from it.
Parameters
| Name | Type | Description |
|---|---|---|
| sender | address | The address of the sender. |
| approved | bool | Whether the sender is approved or not. |
Events
Emitted when sender activates a new boost for a validator
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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.
| Name | Type | Indexed | Description |
|---|---|---|---|
| newDelay | uint32 | The new delay for activating boosts. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| owner | address | ✓ | |
| spender | address | ✓ | |
| value | uint256 |
Emitted when the BGT terms and conditions are changed.
| Name | Type | Indexed | Description |
|---|---|---|---|
| newTermsAndConditions | string | The new terms and conditions. |
Emitted when sender cancels a queued boost for a validator with an amount of BGT
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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.
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| delegator | address | ✓ | |
| fromDelegate | address | ✓ | |
| toDelegate | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| delegate | address | ✓ | |
| previousVotes | uint256 | ||
| newVotes | uint256 |
Emitted when sender removes an amount of BGT boost from a validator
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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.
| Name | Type | Indexed | Description |
|---|---|---|---|
| newDelay | uint32 | The new delay for dropping boosts. |
Emitted when the native token exceeding reserves are burnt.
| Name | Type | Indexed | Description |
|---|---|---|---|
| caller | address | The address of the caller. | |
| amount | uint256 | The amount of BERA burnt. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| version | uint64 |
Emitted when the minter address is changed.
| Name | Type | Indexed | Description |
|---|---|---|---|
| previous | address | ✓ | The address of the previous minter. |
| current | address | ✓ | The address of the current minter. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
Emitted when sender queues a new boost for a validator with an amount of BGT
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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.
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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.
| Name | Type | Indexed | Description |
|---|---|---|---|
| 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.
| Name | Type | Indexed | Description |
|---|---|---|---|
| sender | address | ✓ | The address of the sender. |
| approved | bool | Whether the sender is approved or not. |
Emitted when the Staker address is changed.
| Name | Type | Indexed | Description |
|---|---|---|---|
| previous | address | ✓ | The address of the previous Staker. |
| current | address | ✓ | The address of the current Staker. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| from | address | ✓ | |
| to | address | ✓ | |
| value | uint256 |