Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
``` pragma solidity 0.6.12; import { FlashLoanReceiverBase } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/FlashLoanReceiverBase.sol"; import { ILendingPool } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPool.sol"; import { ILendingPoolAddressesProvider } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPoolAddressesProvider.sol"; import { IERC20 } from "https://github.com/alcueca/ERC3156/blob/main/contracts/ERC20.sol"; /** !!! Never keep funds permanently on your FlashLoanReceiverBase contract as they could be exposed to a 'griefing' attack, where the stored funds are used by an attacker. !!! */ contract MyV2FlashLoan is FlashLoanReceiverBase { /** This function is called after your contract has received the flash loaned amount */ function executeOperation( address[] calldata assets, uint256[] calldata amounts, uint256[] calldata premiums, address initiator, bytes calldata params ) external override returns (bool) { // // This contract now has the funds requested. // Your logic goes here. //
``` pragma solidity 0.6.12; import { FlashLoanReceiverBase } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/FlashLoanReceiverBase.sol"; import { ILendingPool } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPool.sol"; import { ILendingPoolAddressesProvider } from "https://github.com/aave/flashloan-box/blob/Remix/contracts/aave/ILendingPoolAddressesProvider.sol"; import { IERC20 } from "https://github.com/alcueca/ERC3156/blob/main/contracts/ERC20.sol"; /** !!! Never keep funds permanently on your FlashLoanReceiverBase contract as they could be exposed to a 'griefing' attack, where the stored funds are used by an attacker. !!! */ contract MyV2FlashLoan is FlashLoanReceiverBase { /** This function is called after your contract has received the flash loaned amount */ function executeOperation( address[] calldata assets, uint256[] calldata amounts, uint256[] calldata premiums, address initiator, bytes calldata params ) external override returns (bool) { // // This contract now has the funds requested. // Your logic goes here. //
not found https://github.com/OpenZeppelin/openzeppelincontracts/blob/master/contracts/token/ERC20/SafeERC20.sol