framework
framework copied to clipboard
Add testing utility to set initial state for tests
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"));
});