0

I ran into a nonce error on the last leg of this tutorial : https://www.trufflesuite.com/boxes/flashloan-box

I also supplemented the tutorial with this video on yt(fyi b/c some of the code comes from there as well) : https://www.youtube.com/watch?v=aYSGeVkCWXU&t=1s

*note that I funded the contract prior

truffle(kovan)> amount = web3.utils.toWei('1000')
'1000000000000000000000'

set the asset variable to the txn hash of the curreny DAI coin

truffle(kovan)> asset = '0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD' 

Everything was going stellar until I tried to execute the flashloan itself:

truffle(kovan)> f.flashloan(asset, amount)
Uncaught:
{
  code: -32010,
  message: 'Transaction nonce is too low. Try incrementing the nonce.'
}
truffle(kovan)> 

How should I address the nonce issue? I read in some post from 2020 that there was an advanced user option in the works to manipulate it, but I didn't find any follow up on that.

Thank you for your time

*Edit I updated the migration file and then forked a branch from the main net using the following command: ganache-cli --fork https://mainnet.infura.io/v3/YOUR_INFURA_KEY -i 1

This solves the primary issue of this thread so I will close it

2
  • How are you connecting to kovan? Perhaps through Infura. – Ismael Apr 22 at 2:48
  • Hey, thanks for the response. Yes, I am using infura. I tried using the >> ganache-cli --fork mainnet.infura.io/v3/YOUR_INFURA_KEY -i 1 and updated my migration files just to be certain, but now I can't find a RESERVE_ADDRESS that will work with my flashloan call – arelius Apr 22 at 18:31
1

updated the migration file and then forked a branch from the main net using the following command:

ganache-cli --fork https://mainnet.infura.io/v3/YOUR_INFURA_KEY -i 1

This fixed the primary issue of this thread

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.