Skip to content

Commit 6727262

Browse files
committed
style: improve doc notes
1 parent d3ed4d2 commit 6727262

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/vm/lib/runCall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface RunCallOpts {
1818
value?: BN
1919
data?: Buffer
2020
/**
21-
* This is for CALLCODE where the code to load is different than the code from the to account
21+
* This is for CALLCODE where the code to load is different than the code from the `opts.to` address.
2222
*/
2323
code?: Buffer
2424
depth?: number

packages/vm/lib/runCode.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ This is the core of the Ethereum Virtual Machine (EVM or just VM).
44
55
NOTES:
66
7-
stack items are lazily duplicated.
8-
So you must never directly change a buffer from the stack,
9-
instead you should `copy` it first
7+
1. Stack items are lazily duplicated, so you must never directly change a buffer
8+
from the stack, instead you should `copy` it first.
9+
10+
2. Not all stack items are 32 bytes, so if the operation relies on the stack
11+
item length then you must use `utils.pad(<item>, 32)` first.
1012
11-
not all stack items are 32 bytes, so if the operation relies on the stack
12-
item length then you must use utils.pad(<item>, 32) first.
1313
*/
1414
import { Address, BN } from 'ethereumjs-util'
1515
import { Block } from '@ethereumjs/block'
@@ -23,7 +23,7 @@ import { default as EVM, ExecResult } from './evm/evm'
2323
*/
2424
export interface RunCodeOpts {
2525
/**
26-
* The [`Block`](https://github.com/ethereumjs/ethereumjs-block) the `tx` belongs to. If omitted a blank block will be used
26+
* The `@ethereumjs/block` the `tx` belongs to. If omitted a default blank block will be used.
2727
*/
2828
block?: Block
2929
evm?: EVM

packages/vm/lib/runTx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import TxContext from './evm/txContext'
1212
*/
1313
export interface RunTxOpts {
1414
/**
15-
* The block to which the `tx` belongs
15+
* The `@ethereumjs/block` the `tx` belongs to. If omitted a default blank block will be used.
1616
*/
1717
block?: Block
1818
/**
19-
* An [`@ethereumjs/tx`](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/tx) to run
19+
* An `@ethereumjs/tx` to run
2020
*/
2121
tx: Transaction
2222
/**

0 commit comments

Comments
 (0)