bera.buzz Docs
  • πŸ‘‹Welcome to bera.buzz: The Future of Token Launches
  • 🐝bera.buzz
    • πŸš€Revolutionizing Token Launches
    • 🐻Why Berachain?
    • πŸ’ΉOne-Click Token Launches
      • Exponential Bonding Curve
    • πŸ€”How to Launch on bera.buzz
    • πŸ”“Token Locks and Vesting
    • πŸ“ΈHighlights & Hivemaster
    • πŸ«‚Threads
    • πŸ‘¨β€πŸ¦±User Profiles
    • 🀝Meme & Govern
    • πŸ’ΉFlash Loan Looping on $NECT Pairs
    • πŸ’±Ooga Booga Swaps
  • 🍯Honey Hustle Game
    • πŸ”ŽEngage & Earn
  • 🧸Berabator
    • πŸ’―Your Gateway to Success on Berachain
      • Pre-Launch
      • During the Launch
      • Post-Launch
      • A Powerful Network, Tailored to your Project
  • ♻️Ecosystem
    • πŸ₯›Milkbag: The Beginning
    • πŸ€‘Affiliate System: Earn Platform Fees
    • πŸ‡«πŸ‡·The Future of bera.buzz: Continuous Innovation
  • ✍️Resources
    • πŸ–‡οΈOfficial Links
    • 🀝Key Partners
    • πŸ•΅οΈSmart Contract Audits
    • πŸ«‚Team Members
    • πŸ–ŒοΈBrand Kit
      • πŸ–ΌοΈLogos
      • 🎨Brand Colors
      • πŸ” Typography
  • πŸ€“FOR DEVELOPERS
    • πŸ’»ABIs & Contract Addresses
    • ♾️Subgraph Endpoint
Powered by GitBook
On this page
  • Contract Addresses
  • Contract Interfaces & ABIs
  • Vault (Exponential Vault)
  • ABI
  • buy
  • buyNative
  • sell
  • quote
  • Fee Manager
  • ABI
  • listingFee
  • Token Factory
  • ABI
  • createToken
  • Referral Manager
  • ABI
  • getReferralRewardFor
  • payoutThreshold
  • claimReferralReward
  • Highlights Manager
  • ABI
  • quote
  • highlightToken
  1. FOR DEVELOPERS

ABIs & Contract Addresses

PreviousTypographyNextSubgraph Endpoint

Last updated 3 months ago

Contract Addresses

The following contracts have been deployed on Berachain Mainnet - Chain id: 80094

Contract Name
Contract Address

0xF5faB8Ffa777A3c4c346F374E8169952d9767AFb

0xD259E64b260D902A76CB767A5B66C801f32F7ff6

0x168c44a987771D87434DdF54383bf7818dFfAA2d

0xD774C1C1c0b9cab6a18577160A34504990F53004

0x093aC276A4D8a52C3CcebF4A61258f24C6f56732

0xE088cf94c8C0200022E15e86fc4F9f3A4B2F6e5c

0x00940060EBaFD5690dce1436b51Ae3Add09C45cc

Contract Interfaces & ABIs

Vault (Exponential Vault)

The following functions are applicable to the Exponential Vault.

ABI

buy

function buy(address token, uint256 baseAmountuint256 minTokensOut, address affiliate, address recipient) external payable;

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.

Parameters

Name
Type
Description

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


buyNative

function buyNative(address token, uint256 minTokensOut, address affiliate, address recipient) external payable

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.

Parameters

Name
Type
Description

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


sell

function sell(address token, uint256 tokenAmount, uint256 minAmountOut, address affiliate, address recipient, bool unwrap) external

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.

Parameters

Name
Type
Description

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.


quote

function quote(address token, uint256 amount, bool isBuyOrder) external view virtual returns (uint256 amountOut);

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.

Parameters

Name
Type
Description

token

address

The token address

amount

uint256

The amount of tokens or Bera

isBuyOrder

bool

True if buying tokens, false if

selling tokens

Returned Values

Name
Type
Description

amountOut

address

The amount of tokens or Bera that will be bought or sold


Fee Manager

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.

ABI

listingFee

function listingFee() external returns (uint256)

Function to get the current listing fee that needs to be passed as value when calling createTokenin the TokenFactory contract

Returned values

Name
Type
Description

listingFee

uint256

The listing fee in wei, in native currency


Token Factory

New tokens are deployed from the Token Factory contract.

ABI

createToken

function createToken(string[2] calldata metadata, address[2] calldata addr, uint256[2] calldata raiseData, uint256 baseAmount, bytes32 salt) external payable (address token)

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.

Parameters

Name
Type
Description

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

Returned Values

Name
Type
Description

token

address

The address of the token that was deployed


Referral Manager

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

ABI

getReferralRewardFor

function getReferralRewardFor(address user, address token) external view returns (uint256 reward)

Returns the referral rewards for a user in a specific token

Parameters

Name
Type
Description

user

address

The user address

token

address

The token address

Returned Values

Name
Type
Description

reward

uint256

The reward amount


payoutThreshold

function payoutThreshold(address) external view returns (uint256);

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.

Parameters

Name
Type
Description

token

address

The token address

Returned Values

Name
Type
Description

payoutThreshold

uint256

The threshold for the specific token

claimReferralReward

function claimReferralReward(address token) external;

Claims the referral reward for a given base token for the msg.sender.

Parameters

Name
Type
Description

token

address

The token address to claim the rewards for

Highlights Manager

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.

ABI

quote

function quote(uint256 duration) public view returns (uint256 fee);

Quotes the fee for highlighting a token for a given duration

Parameters

Name
Type
Description

duration

uint256

The duration in seconds

Returned Values

Name
Type
Description

fee

uint256

The fee in bera, in wei

highlightToken

function highlightToken(address token, uint256 duration) external payable;

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.

Parameters

Name
Type
Description

token

address

The token to highlight

duration

uint256

The duration in seconds

πŸ€“
πŸ’»
Referral Manager
Fee Manager
Highlights Manager
Token Factory
Exponential Vault
Bex Liquidity Manager
Token Vesting Contract
11KB
expVault.abi.json
7KB
FeeManager.abi.json
12KB
Factory.abi.json
12KB
referralManager.abi.json
9KB
highlightsManager.abi.json