convex icon indicating copy to clipboard operation
convex copied to clipboard

Keep CVM log when forking context with a different address

Open helins opened this issue 3 years ago • 1 comments

Is there any reason not to keep the current CVM log when using Context.forkWithAddress()?

In the Convex Shell, forkWithAddress() would be useful for switching accounts while minimizing any other state.

helins avatar Sep 12 '22 20:09 helins

I believe the only reason it doesn't do that currently is that it was originally intended for testing purposes where you want a new "fresh" context (i.e. just with the same state, otherwise similar to what you would have at the start of a transaction). It's very dangerous to change address otherwise so this isn't intended for production on-chain usage.

No reason why we can't have a separate version that keeps the log though. It's all fine for off-chain usage.

mikera avatar Sep 13 '22 09:09 mikera