BLBIO

BLB Initial Offering

Simple Summary

here's the initial offering contract that sells BLB.

Features

the token fee can be paid in BNB and BUSD(USDT).

the main price is in USD but it can be calculated to the corresponding BNB in every buy transaction via the chainlink price feed aggregator.

there two sale plan; public sale price for small amounts and private sale price for large amounts of blb.

the contract is controlled by an owner using openzeppelin ownable standard interface.

External Functions API:

Ownable:

to see the pre-built APIs, visit openzeppelin Ownable functions API

main:

external function
/**
 * @return BLB address of the token contract.
 */
function BLB()
external function
/**
 * @return BUSD address of the token contract.
 */
function BLB()
external function
/**
 * @return price of the token in USD.
 * @notice the private and public price are calculated automatically.
 * @notice multiplied by 10^18.
 */
function priceInUSD()
external function
/**
 * @return price of the token in BNB corresponding to the USD price.
 * @notice the private and public price are calculated automatically.
 * @notice multiplied by 10^18.
 */
function priceInBNB()
external function
/**
 * @dev buy BLB Token paying in BNB.
 *
 * @notice multiplied by 10^18.
 * @notice maximum tolerance 2%.
 *
 * @notice requirement:
 *   - there must be sufficient BLB tokens in ICO.
 *   - required amount must be paid in BNB.
 *
 * @notice emits a BuyInBNB event
 */
function buyInBNB(uint256 amount)
external function
/**
 * @dev buy BLB Token paying in BUSD(pegUSDT).
 *
 * @notice multiplied by 10^18.
 *
 * @notice requirement:
 *   - there must be sufficient BLB tokens in ICO.
 *   - Buyer must approve the ICO to spend the required BUSD.
 *
 * @notice emits a BuyInBUSD event
 */
function buyInBUSD(uint256 amount)

event
/**
 * @dev emits when a user buys BLB, paying in BNB.
 */
event BuyInBNB(uint256 indexed amountBLB, uint256 indexed amountBNB);
event
/**
 * @dev emits when a user buys BLB, paying in BUSD.
 */
event BuyInBUSD(uint256 indexed amountBLB, uint256 indexed amountBUSD);

administration:

external function
/**
 * @return amount of the token in which the price decreases from retail to bulk.
 *
 * @notice multiplied by 10^18.
 */
function retailLimit()
external function
/**
 * @return price of the token in USD in bulk purchase.
 *
 * @notice multiplied by 10^18.
 */
function privatePriceInUSD()
external function
/**
 * @return price of the token in USD in retail purchase.
 *
 * @notice multiplied by 10^18.
 */
function publicPriceInUSD()
external function
/**
 * @dev set retail limit;
 *
 * @notice multiplied by 10^18.
 *
 * @notice requirement:
 *   - only owner of the contract can call this function.
 *
 * @notice emits a SetPriceInUSD event
 */
function setRetailLimit(uint256 _retailLimit)
external function
/**
 * @dev set ticket price in USD for public sale and private sale;
 *
 * @notice multiplied by 10^18.
 *
 * @notice requirement:
 *   - only owner of the contract can call this function.
 *
 * @notice emits a SetPriceInUSD event
 */
function setPriceInUSD(uint256 _publicPrice, uint256 _privatePrice)
external function
/**
 * @dev withdraw ERC20 tokens from the contract.
 *
 * @notice requirement:
 *   - only owner of the contract can call this function.
 *
 * @notice emits a Withdraw event
 */
function withdrawERC20(address tokenAddr, uint256 amount)
external function
/**
 * @dev withdraw BNB from the contract.
 *
 * @notice requirement:
 *   - only owner of the contract can call this function.
 *
 * @notice emits a Withdraw event(address zero as the BNB token)
 */
function withdraw(uint256 amount)

event
    /**
     * @dev emits when the owner sets a new retail limit.
     */
    event SetRetailLimit(uint256 indexed _retailLimit);
event
/**
 * @dev emits when the owner sets new prices for private and public blb sale (in USD).
 */
event SetPriceInUSD(uint256 indexed publicPrice, uint256 indexed privatePrice);
event
/**
 * @dev emits when the owner withdraws any amount of BNB or ERC20 token.
 *  
 * @notice if the withdrawing token is BNB, tokenAddr equals address zero.
 */
event Withdraw(address indexed tokenAddr, uint256 indexed amount);

Last updated