AlchemicTokenV2
This is the contract for version two alchemic tokens.
Functions
constructor
function constructor() public;setFlashFee
function setFlashFee(uint256 newFee) external;Sets the flash minting fee.
This function reverts if msg.sender is not an admin.
Parameters:
newFee
uint256
The new flash mint fee.
mint
function mint(
address recipient,
uint256 amount
) external;Mints tokens to a recipient.
This function reverts if msg.sender is not whitelisted. This function reverts if msg.sender is paused.
Parameters:
recipient
address
The address to mint the tokens to.
amount
uint256
The amount of tokens to mint.
setWhitelist
Sets minter as whitelisted to mint.
This function reverts if msg.sender is not an admin.
Parameters:
minter
address
The account to permit to mint.
state
bool
A flag indicating if the minter should be able to mint.
setSentinel
Sets sentinel as a sentinel.
This function reverts if msg.sender is not an admin.
Parameters:
sentinel
address
The address to set as a sentinel.
pauseMinter
Pauses minter from minting tokens.
This function reverts if msg.sender is not a sentinel.
Parameters:
minter
address
The address to set as paused or unpaused.
state
bool
A flag indicating if the minter should be paused or unpaused.
burn
Burns amount tokens from msg.sender.
Parameters:
amount
uint256
The amount of tokens to be burned.
burnFrom
Destroys amount tokens from account, deducting from the caller's allowance.
Parameters:
account
address
The address the burn tokens from.
amount
uint256
The amount of tokens to burn.
setMaxFlashLoan
Adjusts the maximum flashloan amount.
Parameters:
_maxFlashLoanAmount
uint256
The maximum flashloan amount.
maxFlashLoan
Gets the maximum amount to be flash loaned of a token.
Parameters:
token
address
The address of the token.
Return Values:
The
uint256
maximum amount of token that can be flashed loaned.
flashFee
Gets the flash loan fee of amount of token.
Parameters:
token
address
The address of the token.`
amount
uint256
The amount of token to flash mint.
Return Values:
The
uint256
flash loan fee.
flashLoan
Performs a flash mint (called flash loan to confirm with ERC3156 standard).
Parameters:
receiver
contract IERC3156FlashBorrower
The address which will receive the flash minted tokens.
token
address
The address of the token to flash mint.
amount
uint256
How much to flash mint.
data
bytes
ABI encoded data to pass to the receiver.
Return Values:
If
bool
the flash loan was successful.
Events
Paused
An event which is emitted when a minter is paused from minting.
Parameters:
minter
address
The address of the minter which was paused.
## SetFlashMintFee
```solidity
event SetFlashMintFee(
)
An event which is emitted when the max flash loan is updated.
Parameters:
maxFlashLoan
uint256
The new max flash loan.
Last updated