framework icon indicating copy to clipboard operation
framework copied to clipboard

Add testing utility to set initial state for tests

Open rpanic opened this issue 2 months ago • 0 comments

Currently, when we want some initial state to be set for some tests that involve runtime or protocol functionality, we send custom-crafted transactions to prepare. This is cumbersome and slow. We should offer some utility that does this for us. Something like

await appchain.initializeState((runtime) => {
   const balances = runtime.resolve("Balances");
   balances.balances.set(key1, UInt("100"));
});

rpanic avatar Nov 14 '25 13:11 rpanic