Fields
| Field | Type | Description |
|---|---|---|
data | Uint8Array | Raw memory bytes |
length | number | Memory length |
EVM memory state capture
import * as MemoryDump from 'voltaire-effect/MemoryDump'
import { Effect } from 'effect'
// From Uint8Array
const dump = Effect.runSync(MemoryDump.from(new Uint8Array([0, 1, 2, 3])))
// From object with explicit length
const dump2 = Effect.runSync(MemoryDump.from({
data: new Uint8Array([0, 1, 2, 3]),
length: 4
}))
console.log(dump.length) // 4
console.log(dump.data) // Uint8Array
| Field | Type | Description |
|---|---|---|
data | Uint8Array | Raw memory bytes |
length | number | Memory length |
const result = Effect.runSync(Effect.either(
MemoryDump.from({ data: 'invalid' as any })
))
// Left(MemoryDumpError)