Skip to main content

MockBondingCurve

Functions

constructor

function constructor(
bool _atScale,
uint256 price
) public

Parameters

NameTypeDescription
_atScalebool
priceuint256

setScale

function setScale(
bool _atScale
) public

Parameters

NameTypeDescription
_atScalebool

setCurrentPrice

function setCurrentPrice(
uint256 price
) public

Parameters

NameTypeDescription
priceuint256

allocate

function allocate() public

purchase

function purchase(
address ,
uint256
) public returns (uint256 amountOut)

Parameters

NameTypeDescription
``address
``uint256

getAmountOut

function getAmountOut(
uint256 amount
) public returns (uint256)

Parameters

NameTypeDescription
amountuint256

getAverageUSDPrice

function getAverageUSDPrice(
uint256
) public returns (struct Decimal.D256)

Parameters

NameTypeDescription
``uint256