You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Defined in [state/stateManager.ts:538](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L538)*
234
+
*Defined in [state/stateManager.ts:572](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L572)*
224
235
225
236
Checks if the `account` corresponding to `address` is empty as defined in EIP-161 ([https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md))
226
237
@@ -244,7 +255,7 @@ ___
244
255
245
256
▸ **checkpoint**(cb: *`any`*): `void`
246
257
247
-
*Defined in [state/stateManager.ts:304](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L304)*
258
+
*Defined in [state/stateManager.ts:338](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L338)*
248
259
249
260
Checkpoints the current state of the StateManager instance. State changes that follow can then be committed by calling `commit` or `reverted` by calling rollback.
250
261
@@ -267,7 +278,7 @@ ___
267
278
268
279
▸ **cleanupTouchedAccounts**(cb: *`any`*): `void`
269
280
270
-
*Defined in [state/stateManager.ts:561](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L561)*
281
+
*Defined in [state/stateManager.ts:595](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L595)*
271
282
272
283
Removes accounts form the state trie that have been touched, as defined in EIP-161 ([https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md)](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md)).
*Defined in [state/stateManager.ts:484](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L484)*
392
+
*Defined in [state/stateManager.ts:518](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L518)*
382
393
383
394
Generates a canonical genesis state on the instance based on the configured chain parameters. Will error if there are uncommitted checkpoints on the instance.
*Defined in [state/stateManager.ts:80](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L80)*
439
+
*Defined in [state/stateManager.ts:82](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L82)*
429
440
430
441
Gets the [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account) associated with `address`. Returns an empty account if the account does not exist.
*Defined in [state/stateManager.ts:234](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L234)*
513
+
514
+
Caches the storage value associated with the provided `address` and `key` on first invocation, and returns the cached (original) value from then onwards. This is used to get the original value of a storage slot for computing gas costs according to EIP-1283.
515
+
516
+
**Parameters:**
517
+
518
+
| Name | Type | Description |
519
+
| ------ | ------ | ------ |
520
+
| address |`Buffer`| Address of the account to get the storage for |
521
+
| key |`Buffer`| Key in the account's storage to get the value for |
522
+
| cb |`any`|
523
+
524
+
**Returns:**`void`
525
+
494
526
___
495
527
<aid="getstateroot"></a>
496
528
497
529
### getStateRoot
498
530
499
531
▸ **getStateRoot**(cb: *`any`*): `void`
500
532
501
-
*Defined in [state/stateManager.ts:372](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L372)*
533
+
*Defined in [state/stateManager.ts:406](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L406)*
502
534
503
535
Gets the state-root of the Merkle-Patricia trie representation of the state of this StateManager. Will error if there are uncommitted checkpoints on the instance.
504
536
@@ -521,7 +553,7 @@ ___
521
553
522
554
▸ **hasGenesisState**(cb: *`any`*): `void`
523
555
524
-
*Defined in [state/stateManager.ts:471](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L471)*
556
+
*Defined in [state/stateManager.ts:505](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L505)*
525
557
526
558
Checks whether the current instance has the canonical genesis state for the configured chain parameters.
*Defined in [state/stateManager.ts:396](https://github.com/ethereumjs/ethereumjs-vm/blob/de4d574/lib/state/stateManager.ts#L396)*
678
+
*Defined in [state/stateManager.ts:430](https://github.com/ethereumjs/ethereumjs-vm/blob/2fcfe31/lib/state/stateManager.ts#L430)*
647
679
648
680
Sets the state of the instance to that represented by the provided `stateRoot`. Will error if there are uncommitted checkpoints on the instance or if the state root does not exist in the state trie.
0 commit comments