ABIs & Contract Addresses
Last updated
Last updated
The following contracts have been deployed on Berachain Mainnet - Chain id: 80094
0xF5faB8Ffa777A3c4c346F374E8169952d9767AFb
0xD259E64b260D902A76CB767A5B66C801f32F7ff6
0x168c44a987771D87434DdF54383bf7818dFfAA2d
0xD774C1C1c0b9cab6a18577160A34504990F53004
0x093aC276A4D8a52C3CcebF4A61258f24C6f56732
0xE088cf94c8C0200022E15e86fc4F9f3A4B2F6e5c
0x00940060EBaFD5690dce1436b51Ae3Add09C45cc
The following functions are applicable to the Exponential Vault.
This function is used to purchase tokens from a bonding curve using the base token (ERC20). It should be called within the Exponential vault smart contract, which manages the bonding curve for the specific token you want to buy.
Before calling this function, make sure you have given an ERC20 approval on the baseToken contract for the Vault contract with the specified baseAmount.
token
address
The token address
baseAmount
address
The amount of base tokens to be used to buy tokens with
minTokensOut
uint256
The minimum amount of tokens to buy, will revert if slippage exceeds this value.
affiliate
address
The affiliate address, zero address if none
recipient
address
The recipient address of the tokens, usually the same address calling this function
This function is used to purchase tokens from a bonding curve using BERA. The base token of the token must be WBERA, otherwise execution will revert. You need to send the appropriate bera value when calling the function, which would be used to purchase the token.
This function can only be used when the base token is WBERA.
token
address
The token address
minTokensOut
uint256
The minimum amount of tokens to buy, will revert if slippage exceeds this value.
affiliate
address
The affiliate address, zero address if none
recipient
address
The recipient address of the tokens, usually the same address calling this function
Use this function to sell tokens back to the bonding curve for base tokens. This function should be called within the vault smart contract that manages the bonding curve for the specific token you want to sell.
Before calling this function, make sure you have given an ERC20 approval on the token contract for the Vault contract with the specified baseAmount.
token
address
The token address
tokenAmount
uint256
The amount of tokens to sell
minAmountOut
uint256
The minimum amount of base tokens to receive, will revert if slippage exceeds this value
affiliate
address
The affiliate address, zero address if none
recipient
address
The recipient address of the tokens, usually the same address calling this function
unwrap
boolean
Whether to unwrap the WBERA tokens that will be sent to the recipient to BERA, this is only applicable if base token is WBERA. Set to false otherwise.
Calculates and returns a quote of the amount of tokens that will be bought or sold at the current curve. This function should be called within the vault smart contract that manages the bonding curve for the specific token you want to get a quote for.
token
address
The token address
amount
uint256
The amount of tokens or Bera
isBuyOrder
bool
True if buying tokens, false if
selling tokens
amountOut
address
The amount of tokens or Bera that will be bought or sold
The Fee Manager contract manages the fee collection across bera.buzz. You can use the Fee Manager contract to get the listingFee when creating a new token.
Function to get the current listing fee that needs to be passed as value when calling createToken
in the TokenFactory contract
listingFee
uint256
The listing fee in wei, in native currency
New tokens are deployed from the Token Factory contract.
Function to create a new token. A listing fee needs to be paid in native currency (Bera) as msg.value. Optionally, the deployer can choose to purchase the newly deployed token using base tokens. If the base token is WBERA, the deployer can pass additional bera as value that will be used to purchase the newly deployed token.
Msg.value should be greater or equal to the listing fee. If purchasing the token using base tokens, don't forget to set an allowance to the factory contract for the specified baseAmount, unless bera is used and passed as value.
metadata
string[2]
A string array containing the name and symbol of the token
addr
address[2]
An address array containing the addresses for baseToken and vault
raiseData
uint256[2]
An array containing the reserve data for the token (initial reserves and final reserves)
baseAmount
uint256
The amount of base token used to buy the new token after deployment. Optional, pass 0 if no tokens will be used to buy the token at deployment.
salt
bytes32
A bytes32 salt that will determine the contract address
token
address
The address of the token that was deployed
The Referral Manager contract manages the referral rewards for the users. Referral rewards are received in base tokens (WBera, iBGT, NECT). Users can use the referral manager contract to view their rewards, and claim them if they are above the withdrawal threshold
Returns the referral rewards for a user in a specific token
user
address
The user address
token
address
The token address
reward
uint256
The reward amount
Returns the payout threshold for a specific token. If the user's rewards for that token are below the threshold, they cannot be withdrawn until their rewards exceeds the threshold.
token
address
The token address
payoutThreshold
uint256
The threshold for the specific token
Claims the referral reward for a given base token for the msg.sender.
token
address
The token address to claim the rewards for
The Highlights Manager contract is used to highlight a token on Bera.buzz using Bera. The user gets a quote for the desired highlight duration by calling the quote() function and then calls highlightToken(), passing the fee returned from the quote() function as value. The minimum duration for a token to be highlighted is 60 seconds, and the maximum 1 hour. The price increases linearly for the first 10 minutes, after which it increases exponentially, therefore it is not recommended to highlight a token for a period higher than 10 minutes. Once a token has been highlighted, there is a 24-hour cooldown period during which the same token cannot be highlighted again.
Quotes the fee for highlighting a token for a given duration
duration
uint256
The duration in seconds
fee
uint256
The fee in bera, in wei
Allows msg.sender to highlight a token for a given duration, paying the fee in native currency(Bera)
This function is payable, and the fee needs to be passed as value. Excess fees are refunded back to the user.
token
address
The token to highlight
duration
uint256
The duration in seconds