Honey Berachain
Note: Link to existing contract ABI's can be found on Github here.
Inherits: IERC20
Authors: Berachain Team, Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)
This is the ERC20 token representation of Berachain's native stablecoin, Honey.
State Variables
erc20BankModule
IERC20BankModule private immutable erc20BankModule = IERC20BankModule(0x0000000000000000000000000000000000696969);
IERC20BankModule private immutable erc20BankModule = IERC20BankModule(0x0000000000000000000000000000000000696969);
bankModule
IBankModule private immutable bankModule = IBankModule(0x4381dC2aB14285160c808659aEe005D51255adD7);
IBankModule private immutable bankModule = IBankModule(0x4381dC2aB14285160c808659aEe005D51255adD7);
allowance
mapping(address => mapping(address => uint256)) public allowance;
mapping(address => mapping(address => uint256)) public allowance;
nonces
mapping(address => uint256) public nonces;
mapping(address => uint256) public nonces;
Functions
name
name is a public view method for reading the sdk.Coin
name for this erc20.
function name() public pure returns (string memory);
function name() public pure returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | string the sdk.Coin name for this erc20. |
symbol
symbol is a public view method for reading the sdk.Coin
symbol for this erc20.
function symbol() public pure returns (string memory);
function symbol() public pure returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | string the sdk.Coin symbol for this erc20. |
decimals
decimals is a public view method for reading the sdk.Coin
decimals for this erc20.
function decimals() public pure returns (uint8);
function decimals() public pure returns (uint8);
Returns
Name | Type | Description |
---|---|---|
<none> | uint8 | uint8 the sdk.Coin decimals for this erc20. |
totalSupply
totalSupply is a public view method for reading the sdk.Coin
total supply for this erc20.
function totalSupply() public view returns (uint256);
function totalSupply() public view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 the sdk.Coin total supply for this erc20. |
balanceOf
balanceOf is a public view method for reading the sdk.Coin
balance of a given address for this erc20.
function balanceOf(address user) public view returns (uint256);
function balanceOf(address user) public view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
user | address | the address of the user to get the balance of. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | uint256 the sdk.Coin balance of the given address for this erc20. |
approve
approve is a public method for approving a given address to spend a given amount of tokens.
function approve(address spender, uint256 amount) public virtual returns (bool);
function approve(address spender, uint256 amount) public virtual returns (bool);
Parameters
Name | Type | Description |
---|---|---|
spender | address | the address to approve to spend tokens. |
amount | uint256 | the amount of tokens to approve the given address to spend. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool true if the approval was successful. |
transfer
transfer is a public method for transferring tokens to a given address.
function transfer(address to, uint256 amount) public virtual returns (bool);
function transfer(address to, uint256 amount) public virtual returns (bool);
Parameters
Name | Type | Description |
---|---|---|
to | address | the address to transfer tokens to. |
amount | uint256 | the amount of tokens to transfer. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool true if the transfer was successful. |
transferFrom
transferFrom is a public method for transferring tokens from one address to another.
function transferFrom(address from, address to, uint256 amount) public virtual returns (bool);
function transferFrom(address from, address to, uint256 amount) public virtual returns (bool);
Parameters
Name | Type | Description |
---|---|---|
from | address | the address to transfer tokens from. |
to | address | the address to transfer tokens to. |
amount | uint256 | the amount of tokens to transfer. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool true if the transfer was successful. |
permit
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
public
virtual;
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
public
virtual;
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() public view virtual returns (bytes32);
function DOMAIN_SEPARATOR() public view virtual returns (bytes32);
computeDomainSeparator
function computeDomainSeparator() internal view virtual returns (bytes32);
function computeDomainSeparator() internal view virtual returns (bytes32);