Closed ghost closed 2 years ago
I don't believe so. I usually get an error with reverted due to not enough profit to pay for the Aave Flash Loan fees. Can you give the entire error message here?
how many matic is needed to use flash loan?
I tried to deploy the contract and got this error
TypeError: Cannot read properties of undefined (reading 'eth')
at main (C:\Users\Administrator\Crypto-Arbitrage-Price-Bot\src\scripts\deploy.js:9:31)
at Object.
Looks like you are having an issue potentially getting the accounts from hardhat. You need to ensure you are overriding the default accounts in hardhat during the deploy. But, you may also need to run npm install to install all of the packages. The error seems to suggest that hardhat has not been installed via npm potentially.
I did numerous tests, and after commenting out lines 9 and 18 of the function in the deploy.js code it looked like this
npx hardhat run scripts/deploy.js --network hardhat AaveFlashLoanV3Factory deployed to: 0xa513902CE47191a5D4b63deFBa4f337347C512BE
it seems to me that the error is in getting the contract address aaveFlashLoanV3
now this error is displayed
sometimes it presents this error... is it normal?
Flash Loan execution error { code: -32000, message: 'execution reverted' }