Solidity API

B3TR

This contract governs the issuance and management of B3TR fungible tokens within the VeBetter ecosystem, allowing for minting under a capped total supply.

Extends ERC20 Token Standard with capping, pausing, and access control functionalities to manage B3TR tokens in the VeBetter ecosystem.

MINTER_ROLE

bytes32 MINTER_ROLE

PAUSER_ROLE

bytes32 PAUSER_ROLE

constructor

constructor(address _admin, address _defaultMinter, address _pauser) public

Initializes the contract with specified cap, token details, and admin roles

Parameters

Name Type Description
_admin address The address that will be granted the default admin role
_defaultMinter address The address that will be granted the minter role initially
_pauser address The address that will be granted the pauser role initially

pause

function pause() external

Pauses all token transfers and minting actions

Accessible only by accounts with the default admin role

unpause

function unpause() external

Resumes all token transfers and minting actions

Accessible only by accounts with the default admin role

mint

function mint(address to, uint256 amount) external

Mints new tokens to a specified address

The caller must have the MINTER_ROLE, and the total token supply after minting must not exceed the cap

Parameters

Name Type Description
to address The address that will receive the minted tokens
amount uint256 The amount of tokens to be minted

tokenDetails

function tokenDetails() external view returns (string, string, uint8, uint256, uint256)

Retrieves token details in a single call

Return Values

Name Type Description
[0] string name The name of the token
[1] string symbol The symbol of the token
[2] uint8 decimals The number of decimals the token uses
[3] uint256 totalSupply The total supply of the tokens
[4] uint256 cap The cap on the token’s total supply

_update

function _update(address from, address to, uint256 value) internal

This function overrides ERC20Capped and ERC20Pausable to ensure proper hook chaining

Internal function to update state during token transfers and burns

Parameters

Name Type Description
from address The address from which tokens are being transferred or burned
to address The address to which tokens are being transferred
value uint256 The amount of tokens being transferred or burned