The method should allow using any state and return the respective storage changes of the closure afterwards.
API
fn with_state_drain(exec: F) -> Result<(R, StorageChanges), Error>
where F: FnOnce() -> R {}
fn with_state_at_drain(at: BlockId, exec: F) -> Result<(R, StorageChanges), Error>
where F: FnOnce() -> R {}
The method should allow using any state and return the respective storage changes of the closure afterwards.
API