stakewithus / defi-by-example

556 stars 235 forks source link

Error: The send transactions "from" field must be defined! #13

Open ValerioNeriGit opened 2 years ago

ValerioNeriGit commented 2 years ago

Hi,

I have downloaded the repo and set the infura key but I am getting this error where executing npx truffle test --network mainnet_fork test/test-uniswap.js:

Contract: TestUniswap
  1) "before each" hook for "should pass"

0 passing (608ms)
1 failing

1) Contract: TestUniswap
     "before each" hook for "should pass":
   Error: Returned error: base fee exceeds gas limit
    at Context.<anonymous> (test/test-uniswap.js:22:40)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

How do I solve it?

Thank you

Marzel7 commented 2 years ago

You can add the gas limit in the transaction call. In hardhat it's let tx = await compoundERC20.supply(8, {gasLimit: 500000}); Pretty sure Truffle does allows the same.