Destroys amount
tokens from account
, deducting from the caller's
allowance.
the EVM style address of the account to burn from
the uint256 amount of the token
the optional limit for gas units that can be consumed
an array of TransactionReceipt objects
Atomically decreases the allowance granted to spender
by the caller.
This is an alternative to approve that can be used as a mitigation for problems described in approve.
Emits an Approval event indicating the updated allowance.
Requirements:
spender
cannot be the zero address.spender
must have allowance for the caller of at least
amount
.Returns the fee applied when doing flash loans. This function calls the {_flashFee} function which returns the fee applied when doing flash loans.
The token to be flash loaned.
The amount of tokens to be loaned.
The fees applied to the corresponding flash loan.
Performs a flash loan. New tokens are minted and sent to the
receiver
, who is required to implement the {IERC3156FlashBorrower}
interface. By the end of the flash loan, the receiver is expected to own
amount + fee tokens and have them approved back to the token contract itself so
they can be burned.
The receiver of the flash loan. Should implement the {IERC3156FlashBorrower-onFlashLoan} interface.
The token to be flash loaned. Only address(this)
is
supported.
The amount of tokens to be loaned.
An arbitrary datafield that is passed to the receiver.
an array of TransactionReceipt objects
Atomically increases the allowance granted to spender
by the caller.
This is an alternative to approve that can be used as a mitigation for problems described in approve.
Emits an Approval event indicating the updated allowance.
Requirements:
spender
cannot be the zero address.Perform sendtocontract
The contract method to send to
The arguments to use
Optional
value: stringThe amount to send to the contract
Optional
gasLimit: numberThe amount of gas units allowed
Optional
gasPrice: numberThe satoshi price per gas
see Result
Moves amount
tokens from sender
to recipient
using the
allowance mechanism. amount
is then deducted from the caller's
allowance.
Emits a Transfer event.
Returns the remaining number of tokens that
spender
will be allowed to spend on behalf ofowner
through transferFrom. This is zero by default. This value changes when approve or transferFrom are called.