How to create Flash loans with Aave — Part 2
Using Truffle to deploy and execute the flash loan
To learn something well it is advisable to apply the knowledge. “Active-learning” is the best way to learn, Vitalik mentions this too
The easiest way for us to go about “playing” with the previous part is to use Truffle to deploy & verify the contract. We need to verify it so that we can easily execute it in our browser
First, create a folder for this project
mkdir flashloan && cd flashloan
next, invoke this truffle (at the time of writing, my version is v5.1.40
) command to create a flash loan contract for us
truffle unbox aave/flashloan-box
Our flash loan contract is in contracts/Flashloan.sol
. No surprises here, it looks exactly like the one from the previous part
To be able to deploy the contract to the Ropsten network, we need to ensure that our Ethereum address (we are using Metamask browser extension to provide us with an address) has…