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:

Name
Type
Description

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:

Name
Type
Description

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:

Name
Type
Description

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:

Name
Type
Description

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:

Name
Type
Description

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:

Name
Type
Description

amount

uint256

The amount of tokens to be burned.

burnFrom

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

Parameters:

Name
Type
Description

account

address

The address the burn tokens from.

amount

uint256

The amount of tokens to burn.

setMaxFlashLoan

Adjusts the maximum flashloan amount.

Parameters:

Name
Type
Description

_maxFlashLoanAmount

uint256

The maximum flashloan amount.

maxFlashLoan

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

Parameters:

Name
Type
Description

token

address

The address of the token.

Return Values:

Name
Type
Description

The

uint256

maximum amount of token that can be flashed loaned.

flashFee

Gets the flash loan fee of amount of token.

Parameters:

Name
Type
Description

token

address

The address of the token.`

amount

uint256

The amount of token to flash mint.

Return Values:

Name
Type
Description

The

uint256

flash loan fee.

flashLoan

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

Parameters:

Name
Type
Description

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:

Name
Type
Description

If

bool

the flash loan was successful.

Events

Paused

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

Parameters:

Name
Type
Description

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:

Name
Type
Description

maxFlashLoan

uint256

The new max flash loan.

Last updated