BGT

Berachain ERC-20 Token

0x656b95e550c07a9ffe548bd4085c72418ceb1dba

Solidity v0.8.26+commit.8a97fa7a

Fungible token following the ERC-20 standard.

🤖
Query this contract from your AI
Reference: 0x656b95e550c07a9ffe548bd4085c72418ceb1dba
Sample prompt: "Tell me the current state of berachain/0x656b95e550c07a9ffe548bd4085c72418ceb1dba"
No AI wired up yet? → mcp.smarts.md
Berachain is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
32
Write Functions
24
Events
21

Read Functions

CLOCK_MODE() view

Returns

Name Type Description
string
activateBoostDelay() view

Returns the activate boost delay.

Returns

Name Type Description
uint32 The activate boost delay.
allowance(owner: address, spender: address) view
dev: See {IERC20-allowance}.

Parameters

Name Type Description
owner address
spender address

Returns

Name Type Description
uint256
balanceOf(account: address) view
dev: See {IERC20-balanceOf}.

Parameters

Name Type Description
account address

Returns

Name Type Description
uint256
bgtTermsAndConditions() view

Returns

Name Type Description
string
boosted(account: address, pubkey: bytes) view

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
boostedQueue(account: address, pubkey: bytes) view

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
boostees(pubkey: bytes) view

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
boosts(account: address) view

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
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
clock() view
dev: Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).

Returns

Name Type Description
uint48
decimals() view
dev: 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 default value returned by this function, unless it's overridden. 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}.

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
dropBoostDelay() view

Returns the drop boost delay.

Returns

Name Type Description
uint32 The drop boost delay.
dropBoostQueue(account: address, pubkey: bytes) view

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
eip712Domain() view
dev: See {IERC-5267}.

Returns

Name Type Description
fields bytes1
name string
version string
chainId uint256
verifyingContract address
salt bytes32
extensions uint256[]
getPastTotalSupply(timepoint: uint256) view
dev: Returns the total supply of votes available at a specific moment in the past. If the `clock()` is configured to use block numbers, this will return the value at the end of the corresponding block. 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. Requirements: - `timepoint` must be in the past. If operating using block numbers, the block must be already mined.

Parameters

Name Type Description
timepoint uint256

Returns

Name Type Description
uint256
getPastVotes(account: address, timepoint: uint256) view
dev: Returns the amount of votes that `account` had at a specific moment in the past. If the `clock()` is configured to use block numbers, this will return the value at the end of the corresponding block. Requirements: - `timepoint` must be in the past. If operating using block numbers, the block must be already mined.

Parameters

Name Type Description
account address
timepoint 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
isWhitelistedSender(sender: address) view

Parameters

Name Type Description
sender address

Returns

Name Type Description
bool
minter() view

Public variable that represents the caller of the mint method.

dev: This is going to be the BlockRewardController contract at first.

Returns

Name Type Description
address
name() pure
dev: Returns the name of the token.

Returns

Name Type Description
string
nonces(owner: address) view
dev: Returns the next unused nonce for an address.

Parameters

Name Type Description
owner address

Returns

Name Type Description
uint256
normalizedBoost(pubkey: bytes) view

Returns the normalized boost power for the validator given outstanding boosts.

dev: Used by distributor get validator boost power.

Parameters

Name Type Description
pubkey bytes The pubkey of the boosted validator.

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
dev: Returns the address of the current owner.

Returns

Name Type Description
address
queuedBoost(account: address) view

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
staker() view

Returns the BGT staker contract address.

Returns

Name Type Description
address The address of the staker.
symbol() pure
dev: Returns the symbol of the token, usually a shorter version of the name.

Returns

Name Type Description
string
totalBoosts() view

Returns the total boosts for all validators.

Returns

Name Type Description
uint128
totalSupply() view
dev: See {IERC20-totalSupply}.

Returns

Name Type Description
uint256
unboostedBalanceOf(account: address) view

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

activateBoost(user: address, pubkey: bytes) nonpayable

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.
approve(spender: address, amount: uint256) nonpayable
dev: Only allows approve if the caller is an approved sender.

Parameters

Name Type Description
spender address
amount uint256

Returns

Name Type Description
bool
burnExceedingReserves() nonpayable

Burns the excess BERA held by this contract to redeem BGTs.

dev: Since CL at deployment is minting to this contract a quantity of native token sufficient to redeem the upper bound of BGT production range, this contract may hold excess BERA. Can burn BERA exceeding BGT.totalSupply() + outstanding rewards.
cancelBoost(pubkey: bytes, amount: uint128) nonpayable

Cancels a queued boost of the validator removing an amount of BGT for `msg.sender`.

dev: Reverts if `msg.sender` does not have enough queued balance to cover amount.

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.
cancelDropBoost(pubkey: bytes, amount: uint128) nonpayable

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.
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
dropBoost(user: address, pubkey: bytes) nonpayable

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.
initialize(_owner: address) nonpayable

Initializes the BGT contract.

dev: Used instead of a constructor to make the `CREATE2` address independent of constructor arguments.

Parameters

Name Type Description
_owner address
mint(distributor: address, amount: uint256) nonpayable

Mint BGT to the distributor.

dev: This can only be called by the minter address, which is set by governance.

Parameters

Name Type Description
distributor address The address of the distributor.
amount uint256 The amount of BGT to mint.
multicall(data: bytes[]) payable
dev: Apply `delegatecall` with the current contract to each calldata in `data`, and store the `abi.encode` formatted results of each `delegatecall` into `results`. If any of the `delegatecall`s reverts, the entire context is reverted, and the error is bubbled up. By default, this function directly returns the results and terminates the call context. If you need to add before and after actions to the multicall, please override this function.

Parameters

Name Type Description
data bytes[]

Returns

Name Type Description
bytes[]
queueBoost(pubkey: bytes, amount: uint128) nonpayable

Queues a new boost of the validator with an amount of BGT from `msg.sender`.

dev: Reverts if `msg.sender` does not have enough unboosted balance to cover amount.

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.
queueDropBoost(pubkey: bytes, amount: uint128) nonpayable

Queues a drop boost of the validator removing an amount of BGT for sender.

dev: Reverts if `user` does not have enough boosted balance to cover amount.

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(receiver: address, amount: uint256) nonpayable

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.
renounceOwnership() nonpayable
dev: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
setActivateBoostDelay(_activateBoostDelay: uint32) nonpayable

Set the activate boost delay.

Parameters

Name Type Description
_activateBoostDelay uint32 The new delay for activating boosts.
setBgtTermsAndConditions(_bgtTermsAndConditions: string) nonpayable

Set the BGT terms and conditions.

dev: Only the owner can set the terms and conditions.

Parameters

Name Type Description
_bgtTermsAndConditions string
setDropBoostDelay(_dropBoostDelay: uint32) nonpayable

Set the drop boost delay.

Parameters

Name Type Description
_dropBoostDelay uint32 The new delay for dropping boosts.
setMinter(_minter: address) nonpayable

Set the minter address.

dev: This can only be called by the governance module.

Parameters

Name Type Description
_minter address The address of the minter.
setStaker(_staker: address) nonpayable

Set the BGT staker contract address.

Parameters

Name Type Description
_staker address The address of the staker.
transfer(to: address, amount: uint256) nonpayable
dev: Only allows transfer if the caller is an approved sender and has enough unboosted balance.

Parameters

Name Type Description
to address
amount uint256

Returns

Name Type Description
bool
transferFrom(from: address, to: address, amount: uint256) nonpayable
dev: It spends the allowance of the caller.

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
whitelistSender(sender: address, approved: bool) nonpayable

Approve an address to send BGT or approve another address to transfer BGT from it.

dev: BGT should be soul bound to EOAs and only transferable by approved senders.

Parameters

Name Type Description
sender address The address of the sender.
approved bool Whether the sender is approved or not.

Events

ActivateBoost(sender: address, user: address, pubkey: bytes, amount: uint128)

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.
ActivateBoostDelayChanged(newDelay: uint32)

Emitted when the activate boost delay is changed.

Name Type Indexed Description
newDelay uint32 The new delay for activating boosts.
Approval(owner: address, spender: address, value: uint256)
Name Type Indexed Description
owner address
spender address
value uint256
BgtTermsAndConditionsChanged(newTermsAndConditions: string)

Emitted when the BGT terms and conditions are changed.

Name Type Indexed Description
newTermsAndConditions string The new terms and conditions.
CancelBoost(user: address, pubkey: bytes, amount: uint128)

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.
CancelDropBoost(user: address, pubkey: bytes, amount: uint128)

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.
DelegateChanged(delegator: address, fromDelegate: address, toDelegate: address)
Name Type Indexed Description
delegator address
fromDelegate address
toDelegate address
DelegateVotesChanged(delegate: address, previousVotes: uint256, newVotes: uint256)
Name Type Indexed Description
delegate address
previousVotes uint256
newVotes uint256
DropBoost(sender: address, user: address, pubkey: bytes, amount: uint128)

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.
DropBoostDelayChanged(newDelay: uint32)

Emitted when the drop boost delay is changed.

Name Type Indexed Description
newDelay uint32 The new delay for dropping boosts.
EIP712DomainChanged()
ExceedingReservesBurnt(caller: address, amount: uint256)

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.
Initialized(version: uint64)
Name Type Indexed Description
version uint64
MinterChanged(previous: address, current: address)

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.
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
QueueBoost(user: address, pubkey: bytes, amount: uint128)

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.
QueueDropBoost(user: address, pubkey: bytes, amount: uint128)

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.
Redeem(from: address, receiver: address, amount: uint256)

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).
SenderWhitelisted(sender: address, approved: bool)

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.
StakerChanged(previous: address, current: address)

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.
Transfer(from: address, to: address, value: uint256)
Name Type Indexed Description
from address
to address
value uint256