IBondingCurveBase_v1.sol
Last updated
Last updated
Buy tokens on behalf of a specified receiver address.
Redirects to the internal function _buyOrder
by passing the receiver address and deposit amount.
Parameters
_receiver
address
The address that will receive the bought tokens.
_depositAmount
uint256
The amount of collateral token deposited.
_minAmountOut
uint256
The minimum acceptable amount the user expects to receive from the transaction.
Buy tokens for the sender's address.
Redirects to the internal function _buyOrder
by passing the sender's address and deposit amount.
Parameters
_depositAmount
uint256
The amount of collateral token depoisited.
_minAmountOut
uint256
The minimum acceptable amount the user expects to receive from the transaction.
Opens the buying functionality for the token.
Only callable by the {Orchestrator_v1} admin. Reverts if buying is already open.
Closes the buying functionality for the token.
Only callable by the {Orchestrator_v1} admin. Reverts if buying is already closed.
Sets the fee percentage for buying tokens, payed in collateral.
Only callable by the {Orchestrator_v1} admin. The fee cannot exceed 10000 basis points. Reverts if an invalid fee is provided.
Parameters
_fee
uint256
The fee in basis points.
Calculates and returns the static price for buying the issuance token.
Returns
<none>
uint256
uint The static price for buying the issuance token.
Calculates the amount of tokens to be minted based on a given deposit amount.
This function takes into account any applicable buy fees before computing the token amount to be minted. Revert when _depositAmount
is zero.
Parameters
_depositAmount
uint256
The amount of tokens deposited by the user.
Returns
mintAmount
uint256
The amount of new tokens that will be minted as a result of the deposit.
Withdraw project collateral fee to the receiver address.
Parameters
_receiver
address
The address that will receive the fee.
_amount
uint256
The amount of fee to withdraw.
Returns the amount of fee in collateral token collected by the project.
Returns the address of the issuance token.
Event emitted when buying is opened.
Event emitted when buying is closed.
Event emitted when buy fee is updated.
Event emitted when the issuance token is updated.
Event emitted when project collateral fee is withdrawn.
Event emitted when project collateral fee is added.
Event emitted when tokens have been succesfully issued.
Parameters
receiver
address
The address that will receive the issued tokens.
depositAmount
uint256
The amount of collateral token deposited.
receivedAmount
uint256
The amount of issued token received.
buyer
address
The address that initiated the buy order.
Event emitted when the decimals of the issuance token are updated.
Parameters
oldDecimals
uint8
The old decimals of the issuance token.
newDecimals
uint8
The new decimals of the issuance token.
Event emitted when protocol fee has been minted to the treasury.
Parameters
token
address
The token minted as protocol fee.
treasury
address
The protocol treasury address receiving the token fee amount.
feeAmount
uint256
The fee amount minted to the treasury.
Percentage amount is bigger than 100%, i.e. 10_000.
Deposit amount has to be larger than zero.
Buying functionalities are set to closed.
Receiver address can not be zero address or. Bonding Curve Funding Manager itself.
Actual buy amount is lower than the minimum acceptable amount.
The combination of protocol fee and workflow fee cant be higher than 100%.
Withdrawl amount is bigger than project fee collected.
Buy amount in relation to fee percentage to small, results in round down fee amount to zero.
The minimum amount out cannot be zero.
Struct used to store information about the issuance token.
Properties
name
string
The name of the issuance token.
symbol
string
The symbol of the issuance token.
decimals
uint8
The decimals used within the issuance token.
maxSupply
uint256
The maximum supply of the issuance token.