1 | # `remix-core`
|
2 |
|
3 | Provides:
|
4 |
|
5 | ```javascript
|
6 | {
|
7 | code: {
|
8 | CodeManager: CodeManager,
|
9 | BreakpointManager: BreakpointManager
|
10 | },
|
11 | storage: {
|
12 | StorageViewer: StorageViewer,
|
13 | StorageResolver: StorageResolver
|
14 | },
|
15 | trace: {
|
16 | TraceManager: TraceManager
|
17 | }
|
18 | }
|
19 | ```
|
20 |
|
21 |
|
22 | TraceManager is a convenient way to access a VM Trace and resolve some value from it.
|
23 |
|
24 | `TraceManager()` :
|
25 |
|
26 | `function resolveTrace(stepIndex, tx)`
|
27 |
|
28 | `function init(stepIndex, tx)`
|
29 |
|
30 | `function inRange(stepIndex, tx)`
|
31 |
|
32 | `function isLoaded(stepIndex, tx)`
|
33 |
|
34 | `function getLength(stepIndex, tx)`
|
35 |
|
36 | `function accumulateStorageChanges(stepIndex, tx)`
|
37 |
|
38 | `function getAddresses(stepIndex, tx)`
|
39 |
|
40 | `function getCallDataAt(stepIndex, tx)`
|
41 |
|
42 | `function getCallStackAt(stepIndex, tx)`
|
43 |
|
44 | `function getStackAt(stepIndex, tx)`
|
45 |
|
46 | `function getLastCallChangeSince(stepIndex, tx)`
|
47 |
|
48 | `function getCurrentCalledAddressAt(stepIndex, tx)`
|
49 |
|
50 | `function getContractCreationCode(stepIndex, tx)`
|
51 |
|
52 | `function getMemoryAt(stepIndex, tx)`
|
53 |
|
54 | `function getCurrentPC(stepIndex, tx)`
|
55 |
|
56 | `function getReturnValue(stepIndex, tx)`
|
57 |
|
58 | `function getCurrentStep(stepIndex, tx)`
|
59 |
|
60 | `function getMemExpand(stepIndex, tx)`
|
61 |
|
62 | `function getStepCost(stepIndex, tx)`
|
63 |
|
64 | `function getRemainingGas(stepIndex, tx)`
|
65 |
|
66 | `function getStepCost(stepIndex, tx)`
|
67 |
|
68 | `function isCreationStep(stepIndex, tx)`
|
69 |
|
70 | `function findStepOverBack(stepIndex, tx)`
|
71 |
|
72 | `function findStepOverForward(stepIndex, tx)`
|
73 |
|
74 | `function findStepOverBack(stepIndex, tx)`
|
75 |
|
76 | `function findNextCall(stepIndex, tx)`
|
77 |
|
78 | `function findStepOut(stepIndex, tx)`
|
79 |
|
80 | `function checkRequestedStep(stepIndex, tx)`
|
81 |
|
82 | `function waterfall(stepIndex, tx)`
|
83 |
|
84 |
|
85 | - - - -
|
86 |
|
87 | `CodeManager(_traceManager)` :
|
88 |
|
89 | `function getCode(stepIndex, tx)` :
|
90 | Resolve the code of the given @arg stepIndex and trigger appropriate event
|
91 |
|
92 | `function resolveStep(address, cb)` :
|
93 | Retrieve the code located at the given @arg address
|
94 |
|
95 | `function getFunctionFromStep(stepIndex, sourceMap, ast)` :
|
96 | Retrieve the called function for the current vm step
|
97 |
|
98 | `function getInstructionIndex(address, step, callback)` :
|
99 | Retrieve the instruction index of the given @arg step
|
100 |
|
101 | `function getFunctionFromPC(address, pc, sourceMap, ast)` :
|
102 | Retrieve the called function for the given @arg pc and @arg address
|
103 |
|
104 | - - - -
|
105 |
|
106 | `BreakpointManager(_ethdebugger, _locationToRowConverter)` :
|
107 |
|
108 | `function jumpNextBreakpoint(defaultToLimit)` :
|
109 | start looking for the next breakpoint
|
110 |
|
111 | `function jumpPreviousBreakpoint(defaultToLimit)` :
|
112 | start looking for the previous breakpoint
|
113 |
|
114 | `function jump(direction, defaultToLimit)` :
|
115 | start looking for the previous or next breakpoint
|
116 |
|
117 | `function hasBreakpointAtLine((fileIndex, line)` :
|
118 | check the given pair fileIndex/line against registered breakpoints
|
119 |
|
120 | `function hasBreakpoint()` :
|
121 | return true if current manager has breakpoint
|
122 |
|
123 | `function add(sourceLocation)` :
|
124 | add a new breakpoint to the manager
|
125 |
|
126 | `function remove(sourceLocation)` :
|
127 | remove a breakpoint from the manager
|
128 |
|
129 | - - - -
|
130 |
|
131 | `StorageViewer(_context, _storageResolver, _traceManager)` :
|
132 |
|
133 | `function storageRange(defaultToLimit)` :
|
134 | return the storage for the current context (address and vm trace index)
|
135 |
|
136 | `function storageSlot(defaultToLimit)` :
|
137 | return a slot value for the current context (address and vm trace index)
|
138 |
|
139 | `function isComplete(direction, defaultToLimit)` :
|
140 | return True if the storage at @arg address is complete
|
141 |
|
142 | `function initialMappingsLocation((fileIndex, line)` :
|
143 | return all the possible mappings locations for the current context (cached) do not return state changes during the current transaction
|
144 |
|
145 | `function mappingsLocation()` :
|
146 | return all the possible mappings locations for the current context (cached) and current mapping slot. returns state changes during the current transaction
|
147 |
|
148 | `function extractMappingsLocationChanges(sourceLocation)` :
|
149 | retrieve mapping location changes from the storage changes.
|
150 |
|
151 | - - - -
|
152 |
|
153 | `StorageResolver()` :
|
154 |
|
155 | `function storageRange(tx, stepIndex, address, callback)` :
|
156 | return the storage for the current context (address and vm trace index)
|
157 |
|
158 | `function initialPreimagesMappings(tx, stepIndex, address, callback)` :
|
159 | return a slot value for the current context (address and vm trace index)
|
160 |
|
161 | `function storageSlot(slot, tx, stepIndex, address, callback)` :
|
162 | return True if the storage at @arg address is complete
|
163 |
|
164 | `function isComplete(address)` :
|
165 | return all the possible mappings locations for the current context (cached) do not return state changes during the current transaction
|