forge-std icon indicating copy to clipboard operation
forge-std copied to clipboard

Support for multiple TXs when testing

Open Maurechi opened this issue 3 years ago • 2 comments

Would be nice to have the ability to have tests perform more than 1 tx if needed. Some testing scenarios require this, and using vm.warp or vm.roll/rollFork haven't really worked in this way. Currently depending on hardhat for these things.

function testSomething() public { 
  vm.sendTX(
    token.transfer(xxxx)
    market.borrow()
  )
  vm.sendTX(market.repayBorrow)
}

Maurechi avatar Aug 11 '22 08:08 Maurechi

Can you concretely describe why roll and warp don't suffice?

brockelmore avatar Aug 11 '22 14:08 brockelmore

ping @Maurechi

have a feeling this is a misconception of what is available to the programmer - if i dont get a response in a couple more days going to close

brockelmore avatar Aug 15 '22 16:08 brockelmore

Hey @brockelmore . I'm sory for the delay, currently under deadlines and haven't been able to come to this again.

I'll try to test thoroughly and see if I can find a foundry native way to fix my issue. If not i'll try and bring an easy to reproduce example and reopen the issue.

Maurechi avatar Aug 16 '22 11:08 Maurechi