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:

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:

setWhitelist

    function setWhitelist(
        address minter,
        bool state
    ) external;

Sets minter as whitelisted to mint.

This function reverts if msg.sender is not an admin.

Parameters:

setSentinel

    function setSentinel(address sentinel) external;

Sets sentinel as a sentinel.

This function reverts if msg.sender is not an admin.

Parameters:

pauseMinter

    function pauseMinter(
        address minter,
        bool state
    ) external;

Pauses minter from minting tokens.

This function reverts if msg.sender is not a sentinel.

Parameters:

burn

    function burn(uint256 amount) external;

Burns amount tokens from msg.sender.

Parameters:

burnFrom

    function burnFrom(
        address account,
        uint256 amount
    ) external;

Destroys amount tokens from account, deducting from the caller's allowance.

Parameters:

setMaxFlashLoan

    function setMaxFlashLoan(uint256 _maxFlashLoanAmount) external;

Adjusts the maximum flashloan amount.

Parameters:

maxFlashLoan

    function maxFlashLoan(address token) public returns (uint256);

Gets the maximum amount to be flash loaned of a token.

Parameters:

Return Values:

flashFee

    function flashFee(
        address token,
        uint256 amount
    ) public returns (uint256);

Gets the flash loan fee of amount of token.

Parameters:

Return Values:

flashLoan

    function flashLoan(
        contract IERC3156FlashBorrower receiver,
        address token,
        uint256 amount,
        bytes data
    ) external returns (bool);

Performs a flash mint (called flash loan to confirm with ERC3156 standard).

Parameters:

Return Values:

Events

Paused

event Paused(
    address minter,
    bool state
)

An event which is emitted when a minter is paused from minting.

Parameters:

uint256 fee

)

An event which is emitted when the flash mint fee is updated.



### Parameters:
| Name                           | Type          | Description                                    |
| :----------------------------- | :------------ | :--------------------------------------------- |
|`fee`| uint256 | The new flash mint fee. |
## SetMaxFlashLoan
```solidity
event SetMaxFlashLoan(
    uint256 maxFlashLoan
)

An event which is emitted when the max flash loan is updated.

Parameters:

Last updated