Skip to content

LoadStateHandler

LoadStateHandler: (params) => Promise<LoadStateResult>

Loads a previously dumped state into the VM

State can be dumped as follows

Examples

const {state} = await tevm.dumpState()
fs.writeFileSync('state.json', JSON.stringify(state))

And then loaded as follows

const state = JSON.parse(fs.readFileSync('state.json'))
await tevm.loadState({state})

Parameters

params: LoadStateParams

Returns

Promise<LoadStateResult>

Source

packages/actions/src/LoadState/LoadStateHandlerType.ts:21