Skip to main content
Git Source Inherits: FactoryBase Author: @oscarsernarosero @mpetersoCode55 @cirsteve creates the pools in an automated and permissioned fashion

State Variables

altbcBytecode

bytes altbcBytecode;

isByteCodeImmutable

bool public isByteCodeImmutable;

VERSION

string public constant VERSION = "v1.0.0";

Functions

onlyIfByteCodeNotImmutable

modifier onlyIfByteCodeNotImmutable();

constructor

constructor receives and saves the ALTBCPool byte code to bypass contract side limit
constructor();

createPool

Only allowed deployers can deploy pools and only allowed yTokens are allowed deploys an ALTBC pool
function createPool(
    address _xToken,
    address _yToken,
    uint16 _lpFee,
    ALTBCInput memory _tbcInput,
    uint256 _xAdd,
    uint256 _wInactive
) external onlyAllowedDeployers onlyAllowedYTokens(_yToken) returns (address deployedPool);
Parameters
NameTypeDescription
_xTokenaddressaddress of the X token (x axis)
_yTokenaddressaddress of the Y token (y axis)
_lpFeeuint16percentage of the fees in percentage basis points
_tbcInputALTBCInputinput data for the pool
_xAdduint256the initial liquidity of xTokens that will be transferred to the pool
_wInactiveuint256
Returns
NameTypeDescription
deployedPooladdressthe address of the deployed pool

setByteCode

function setByteCode(bytes calldata _byteCode) external onlyOwner onlyIfByteCodeNotImmutable;

makeByteCodeImmutable

function makeByteCodeImmutable() external onlyOwner onlyIfByteCodeNotImmutable;