sol-dbg 0.6.13 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifacts/helpers.d.ts +3 -3
- package/dist/artifacts/helpers.d.ts.map +1 -1
- package/dist/artifacts/helpers.js +17 -53
- package/dist/artifacts/helpers.js.map +1 -1
- package/dist/artifacts/solc.d.ts +1 -8
- package/dist/artifacts/solc.d.ts.map +1 -1
- package/dist/debug/abi.d.ts +11 -41
- package/dist/debug/abi.d.ts.map +1 -1
- package/dist/debug/abi.js +60 -294
- package/dist/debug/abi.js.map +1 -1
- package/dist/debug/artifact_manager/artifact_manager.d.ts +17 -42
- package/dist/debug/artifact_manager/artifact_manager.d.ts.map +1 -1
- package/dist/debug/artifact_manager/artifact_manager.js +82 -21
- package/dist/debug/artifact_manager/artifact_manager.js.map +1 -1
- package/dist/debug/artifact_manager/bytecode_templates.d.ts +1 -1
- package/dist/debug/artifact_manager/bytecode_templates.d.ts.map +1 -1
- package/dist/debug/artifact_manager/bytecode_templates.js +3 -2
- package/dist/debug/artifact_manager/bytecode_templates.js.map +1 -1
- package/dist/debug/artifact_manager/index.d.ts +1 -0
- package/dist/debug/artifact_manager/index.d.ts.map +1 -1
- package/dist/debug/artifact_manager/index.js +1 -0
- package/dist/debug/artifact_manager/index.js.map +1 -1
- package/dist/debug/artifact_manager/types.d.ts +129 -0
- package/dist/debug/artifact_manager/types.d.ts.map +1 -0
- package/dist/debug/artifact_manager/types.js +12 -0
- package/dist/debug/artifact_manager/types.js.map +1 -0
- package/dist/debug/decoding/calldata/index.d.ts +2 -0
- package/dist/debug/decoding/calldata/index.d.ts.map +1 -0
- package/dist/debug/decoding/calldata/index.js +6 -0
- package/dist/debug/decoding/calldata/index.js.map +1 -0
- package/dist/debug/decoding/calldata/view.d.ts +74 -0
- package/dist/debug/decoding/calldata/view.d.ts.map +1 -0
- package/dist/debug/decoding/calldata/view.js +397 -0
- package/dist/debug/decoding/calldata/view.js.map +1 -0
- package/dist/debug/decoding/exp_types.d.ts +46 -0
- package/dist/debug/decoding/exp_types.d.ts.map +1 -0
- package/dist/debug/decoding/exp_types.js +202 -0
- package/dist/debug/decoding/exp_types.js.map +1 -0
- package/dist/debug/decoding/general.d.ts +5 -9
- package/dist/debug/decoding/general.d.ts.map +1 -1
- package/dist/debug/decoding/general.js +25 -103
- package/dist/debug/decoding/general.js.map +1 -1
- package/dist/debug/decoding/index.d.ts +1 -0
- package/dist/debug/decoding/index.d.ts.map +1 -1
- package/dist/debug/decoding/index.js +1 -0
- package/dist/debug/decoding/index.js.map +1 -1
- package/dist/debug/decoding/memory/index.d.ts +2 -0
- package/dist/debug/decoding/memory/index.d.ts.map +1 -0
- package/dist/debug/decoding/memory/index.js +6 -0
- package/dist/debug/decoding/memory/index.js.map +1 -0
- package/dist/debug/decoding/memory/view.d.ts +44 -0
- package/dist/debug/decoding/memory/view.d.ts.map +1 -0
- package/dist/debug/decoding/memory/view.js +183 -0
- package/dist/debug/decoding/memory/view.js.map +1 -0
- package/dist/debug/decoding/stack/index.d.ts +2 -0
- package/dist/debug/decoding/stack/index.d.ts.map +1 -0
- package/dist/debug/decoding/stack/index.js +6 -0
- package/dist/debug/decoding/stack/index.js.map +1 -0
- package/dist/debug/decoding/stack/view.d.ts +29 -0
- package/dist/debug/decoding/stack/view.d.ts.map +1 -0
- package/dist/debug/decoding/stack/view.js +116 -0
- package/dist/debug/decoding/stack/view.js.map +1 -0
- package/dist/debug/decoding/storage/index.d.ts +2 -0
- package/dist/debug/decoding/storage/index.d.ts.map +1 -0
- package/dist/debug/decoding/storage/index.js +6 -0
- package/dist/debug/decoding/storage/index.js.map +1 -0
- package/dist/debug/decoding/storage/view.d.ts +90 -0
- package/dist/debug/decoding/storage/view.d.ts.map +1 -0
- package/dist/debug/decoding/storage/view.js +465 -0
- package/dist/debug/decoding/storage/view.js.map +1 -0
- package/dist/debug/decoding/utils.d.ts +17 -0
- package/dist/debug/decoding/utils.d.ts.map +1 -0
- package/dist/debug/decoding/utils.js +43 -0
- package/dist/debug/decoding/utils.js.map +1 -0
- package/dist/debug/decoding/value.d.ts +50 -0
- package/dist/debug/decoding/value.d.ts.map +1 -0
- package/dist/debug/decoding/value.js +106 -0
- package/dist/debug/decoding/value.js.map +1 -0
- package/dist/debug/decoding/view.d.ts +20 -0
- package/dist/debug/decoding/view.d.ts.map +1 -0
- package/dist/debug/decoding/view.js +15 -0
- package/dist/debug/decoding/view.js.map +1 -0
- package/dist/debug/foundry_cheatcodes.js +6 -6
- package/dist/debug/foundry_cheatcodes.js.map +1 -1
- package/dist/debug/layout.d.ts +4 -6
- package/dist/debug/layout.d.ts.map +1 -1
- package/dist/debug/layout.js +13 -77
- package/dist/debug/layout.js.map +1 -1
- package/dist/debug/opcode_interposing.js +3 -3
- package/dist/debug/opcode_interposing.js.map +1 -1
- package/dist/debug/opcodes.d.ts.map +1 -1
- package/dist/debug/opcodes.js +3 -1
- package/dist/debug/opcodes.js.map +1 -1
- package/dist/debug/tracers/sol_debugger.d.ts.map +1 -1
- package/dist/debug/tracers/sol_debugger.js +2 -1
- package/dist/debug/tracers/sol_debugger.js.map +1 -1
- package/dist/debug/tracers/transformers/basic_info.d.ts.map +1 -1
- package/dist/debug/tracers/transformers/basic_info.js +4 -3
- package/dist/debug/tracers/transformers/basic_info.js.map +1 -1
- package/dist/debug/tracers/transformers/events.js +2 -2
- package/dist/debug/tracers/transformers/events.js.map +1 -1
- package/dist/debug/tracers/transformers/exc_info.d.ts +15 -0
- package/dist/debug/tracers/transformers/exc_info.d.ts.map +1 -0
- package/dist/debug/tracers/transformers/exc_info.js +39 -0
- package/dist/debug/tracers/transformers/exc_info.js.map +1 -0
- package/dist/debug/tracers/transformers/ext_stack.d.ts.map +1 -1
- package/dist/debug/tracers/transformers/ext_stack.js +11 -26
- package/dist/debug/tracers/transformers/ext_stack.js.map +1 -1
- package/dist/debug/tracers/transformers/index.d.ts +1 -0
- package/dist/debug/tracers/transformers/index.d.ts.map +1 -1
- package/dist/debug/tracers/transformers/index.js +1 -0
- package/dist/debug/tracers/transformers/index.js.map +1 -1
- package/dist/debug/tracers/transformers/int_stack.d.ts.map +1 -1
- package/dist/debug/tracers/transformers/int_stack.js +5 -13
- package/dist/debug/tracers/transformers/int_stack.js.map +1 -1
- package/dist/debug/tracers/transformers/keccak256_invert.js +4 -4
- package/dist/debug/tracers/transformers/keccak256_invert.js.map +1 -1
- package/dist/debug/tracers/transformers/ret_info.d.ts +1 -1
- package/dist/debug/tracers/transformers/ret_info.d.ts.map +1 -1
- package/dist/debug/tracers/transformers/ret_info.js +46 -32
- package/dist/debug/tracers/transformers/ret_info.js.map +1 -1
- package/dist/debug/types.d.ts +63 -22
- package/dist/debug/types.d.ts.map +1 -1
- package/dist/debug/types.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/misc.d.ts +16 -11
- package/dist/utils/misc.d.ts.map +1 -1
- package/dist/utils/misc.js +37 -49
- package/dist/utils/misc.js.map +1 -1
- package/dist/utils/pp.d.ts +3 -1
- package/dist/utils/pp.d.ts.map +1 -1
- package/dist/utils/pp.js +10 -27
- package/dist/utils/pp.js.map +1 -1
- package/dist/utils/solidity.d.ts +11 -0
- package/dist/utils/solidity.d.ts.map +1 -0
- package/dist/utils/solidity.js +69 -0
- package/dist/utils/solidity.js.map +1 -0
- package/dist/utils/test_runner.d.ts +5 -2
- package/dist/utils/test_runner.d.ts.map +1 -1
- package/dist/utils/test_runner.js +11 -7
- package/dist/utils/test_runner.js.map +1 -1
- package/dist/utils/trace.d.ts +5 -1
- package/dist/utils/trace.d.ts.map +1 -1
- package/dist/utils/trace.js +16 -0
- package/dist/utils/trace.js.map +1 -1
- package/dist/utils/types.d.ts +9 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +3 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +8 -4
- package/dist/debug/decoding/calldata.d.ts +0 -6
- package/dist/debug/decoding/calldata.d.ts.map +0 -1
- package/dist/debug/decoding/calldata.js +0 -244
- package/dist/debug/decoding/calldata.js.map +0 -1
- package/dist/debug/decoding/memory.d.ts +0 -4
- package/dist/debug/decoding/memory.d.ts.map +0 -1
- package/dist/debug/decoding/memory.js +0 -216
- package/dist/debug/decoding/memory.js.map +0 -1
- package/dist/debug/decoding/stack.d.ts +0 -9
- package/dist/debug/decoding/stack.d.ts.map +0 -1
- package/dist/debug/decoding/stack.js +0 -84
- package/dist/debug/decoding/stack.js.map +0 -1
- package/dist/debug/decoding/storage.d.ts +0 -7
- package/dist/debug/decoding/storage.d.ts.map +0 -1
- package/dist/debug/decoding/storage.js +0 -393
- package/dist/debug/decoding/storage.js.map +0 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Decode a generic value expressed as a `DataView` (i.e. a tuple of type and location) given
|
|
7
|
-
* the dbg state `state` at some step.
|
|
8
|
-
*/
|
|
9
|
-
export declare function decodeValue(view: DataView, state: StepState, infer: InferType, mapKeys?: MapKeys): any;
|
|
1
|
+
import { MapKeys } from "../tracers/transformers/keccak256_invert";
|
|
2
|
+
import { StepState } from "../types";
|
|
3
|
+
import { View } from "./view";
|
|
4
|
+
import { Value } from "./value";
|
|
5
|
+
export declare function decodeView(v: View, state: StepState, mapKeys?: MapKeys): Value;
|
|
10
6
|
//# sourceMappingURL=general.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../src/debug/decoding/general.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../src/debug/decoding/general.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,0CAA0C,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAMhC,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,CA+B9E"}
|
|
@@ -1,113 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return __1.DataLocationKind.Memory;
|
|
17
|
-
}
|
|
18
|
-
return loc;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Helper to dispatch the decoding of a given type `typ` at a given data location `loc` in a given `state`.
|
|
22
|
-
* to the proper decoding logic (memory, calldata, storage, stack)
|
|
23
|
-
*/
|
|
24
|
-
function decodeValInt(typ, loc, state, infer, mapKeys) {
|
|
25
|
-
if (loc.kind === __1.DataLocationKind.Memory) {
|
|
26
|
-
const res = (0, memory_1.mem_decodeValue)(typ, loc, state.memory, infer);
|
|
27
|
-
return res === undefined ? res : res[0];
|
|
28
|
-
}
|
|
29
|
-
if (loc.kind === __1.DataLocationKind.CallData) {
|
|
30
|
-
const lastExtFrame = (0, transformers_1.topExtFrame)(state);
|
|
31
|
-
let abiType;
|
|
32
|
-
try {
|
|
33
|
-
abiType = infer.toABIEncodedType(typ, abi_1.ABIEncoderVersion.V2);
|
|
3
|
+
exports.decodeView = decodeView;
|
|
4
|
+
const misc_1 = require("../../utils/misc");
|
|
5
|
+
const ext_stack_1 = require("../tracers/transformers/ext_stack");
|
|
6
|
+
const view_1 = require("./view");
|
|
7
|
+
const view_2 = require("./stack/view");
|
|
8
|
+
const view_3 = require("./memory/view");
|
|
9
|
+
const view_4 = require("./calldata/view");
|
|
10
|
+
const view_5 = require("./storage/view");
|
|
11
|
+
function decodeView(v, state, mapKeys) {
|
|
12
|
+
if (v instanceof view_2.BaseStackView) {
|
|
13
|
+
const res = v.decode(state.evmStack);
|
|
14
|
+
if (res instanceof view_1.View) {
|
|
15
|
+
return decodeView(res, state, mapKeys);
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
const res = (0, calldata_1.cd_decodeValue)(abiType, typ, loc, lastExtFrame.msgData, BigInt(4), infer);
|
|
39
|
-
return res === undefined ? res : res[0];
|
|
17
|
+
return res;
|
|
40
18
|
}
|
|
41
|
-
if (
|
|
42
|
-
return
|
|
19
|
+
if (v instanceof view_3.BaseMemoryView) {
|
|
20
|
+
return v.decode(state.memory);
|
|
43
21
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
typ.to instanceof solc_typed_ast_1.ArrayType &&
|
|
50
|
-
typ.location === solc_typed_ast_1.DataLocation.CallData &&
|
|
51
|
-
typ.to.size === undefined);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Decode a generic value expressed as a `DataView` (i.e. a tuple of type and location) given
|
|
55
|
-
* the dbg state `state` at some step.
|
|
56
|
-
*/
|
|
57
|
-
function decodeValue(view, state, infer, mapKeys) {
|
|
58
|
-
const typ = view.type;
|
|
59
|
-
const loc = view.loc;
|
|
60
|
-
/**
|
|
61
|
-
* The only case where a pointer from one area of the state crosses into another
|
|
62
|
-
* area of the state are pointers in the stack. All other pointers stay in their
|
|
63
|
-
* own memory region
|
|
64
|
-
*/
|
|
65
|
-
if (typ instanceof solc_typed_ast_1.PointerType && loc.kind === __1.DataLocationKind.Stack) {
|
|
66
|
-
const off = (0, stack_1.st_decodeInt)(__2.uint256, loc, state.evmStack);
|
|
67
|
-
if (off === undefined) {
|
|
68
|
-
return undefined;
|
|
69
|
-
}
|
|
70
|
-
const kind = solLocToDataKind(typ.location);
|
|
71
|
-
let pointedToLoc;
|
|
72
|
-
if (isCalldataType2Slots(typ)) {
|
|
73
|
-
const lastExtFrame = (0, transformers_1.topExtFrame)(state);
|
|
74
|
-
let abiType;
|
|
75
|
-
try {
|
|
76
|
-
abiType = infer.toABIEncodedType(typ, abi_1.ABIEncoderVersion.V2);
|
|
77
|
-
}
|
|
78
|
-
catch (e) {
|
|
79
|
-
return undefined;
|
|
80
|
-
}
|
|
81
|
-
(0, solc_typed_ast_1.assert)(abiType instanceof solc_typed_ast_1.PointerType && abiType.to instanceof solc_typed_ast_1.ArrayType, `InternalError`);
|
|
82
|
-
const len = (0, stack_1.st_decodeInt)(__2.uint256, { kind: loc.kind, offsetFromTop: loc.offsetFromTop - 1 }, state.evmStack);
|
|
83
|
-
if (len === undefined) {
|
|
84
|
-
return undefined;
|
|
85
|
-
}
|
|
86
|
-
if (len > __2.MAX_ARR_DECODE_LIMIT) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
const res = (0, calldata_1.cd_decodeArrayContents)(abiType.to, typ.to, off, Number(len), lastExtFrame.msgData, infer);
|
|
90
|
-
return res === undefined ? res : res[0];
|
|
91
|
-
}
|
|
92
|
-
if (kind === __1.DataLocationKind.Storage) {
|
|
93
|
-
pointedToLoc = {
|
|
94
|
-
kind,
|
|
95
|
-
address: off,
|
|
96
|
-
endOffsetInWord: 32
|
|
97
|
-
};
|
|
22
|
+
if (v instanceof view_4.BaseCalldataView) {
|
|
23
|
+
const lastExtFrame = (0, ext_stack_1.topExtFrame)(state);
|
|
24
|
+
const res = v.decode(lastExtFrame.msgData);
|
|
25
|
+
if (res instanceof view_1.View) {
|
|
26
|
+
return decodeView(res, state, mapKeys);
|
|
98
27
|
}
|
|
99
|
-
else {
|
|
100
|
-
pointedToLoc = {
|
|
101
|
-
kind,
|
|
102
|
-
address: off
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
const res = decodeValInt(typ.to, pointedToLoc, state, infer, mapKeys);
|
|
106
|
-
//console.error(`decodeValue: res ${res}`);
|
|
107
28
|
return res;
|
|
108
29
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
30
|
+
if (v instanceof view_5.BaseStorageView) {
|
|
31
|
+
return v.decode(state.storage, mapKeys);
|
|
32
|
+
}
|
|
33
|
+
(0, misc_1.nyi)(`View ${v.pp()}`);
|
|
112
34
|
}
|
|
113
35
|
//# sourceMappingURL=general.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../src/debug/decoding/general.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"general.js","sourceRoot":"","sources":["../../../src/debug/decoding/general.ts"],"names":[],"mappings":";;AAWA,gCA+BC;AA1CD,2CAAuC;AACvC,iEAAgE;AAGhE,iCAA8B;AAE9B,uCAA6C;AAC7C,wCAA+C;AAC/C,0CAAmD;AACnD,yCAAiD;AAEjD,SAAgB,UAAU,CAAC,CAAO,EAAE,KAAgB,EAAE,OAAiB;IACnE,IAAI,CAAC,YAAY,oBAAa,EAAE,CAAC;QAC7B,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAErC,IAAI,GAAG,YAAY,WAAI,EAAE,CAAC;YACtB,OAAO,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,IAAI,CAAC,YAAY,qBAAc,EAAE,CAAC;QAC9B,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,YAAY,uBAAgB,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,IAAA,uBAAW,EAAC,KAAK,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAE3C,IAAI,GAAG,YAAY,WAAI,EAAE,CAAC;YACtB,OAAO,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED,IAAI,CAAC,YAAY,sBAAe,EAAE,CAAC;QAC/B,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,IAAA,UAAG,EAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debug/decoding/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/debug/decoding/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./general"), exports);
|
|
|
19
19
|
__exportStar(require("./memory"), exports);
|
|
20
20
|
__exportStar(require("./stack"), exports);
|
|
21
21
|
__exportStar(require("./storage"), exports);
|
|
22
|
+
__exportStar(require("./exp_types"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/debug/decoding/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/debug/decoding/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/debug/decoding/memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMemoryView = void 0;
|
|
4
|
+
var view_1 = require("./view");
|
|
5
|
+
Object.defineProperty(exports, "makeMemoryView", { enumerable: true, get: function () { return view_1.makeMemoryView; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/debug/decoding/memory/index.ts"],"names":[],"mappings":";;;AAAA,+BAAwC;AAA/B,sGAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AddressType, ArrayType, BoolType, BytesType, FixedBytesType, IntType, PointerType, StringType, TypeNode } from "solc-typed-ast";
|
|
2
|
+
import { Memory } from "../../types";
|
|
3
|
+
import { View } from "../view";
|
|
4
|
+
import { DecodingFailure, Struct, Value } from "../value";
|
|
5
|
+
import { Address } from "@ethereumjs/util";
|
|
6
|
+
import { ExpStructType, MissingType } from "../exp_types";
|
|
7
|
+
export declare abstract class BaseMemoryView<Val extends Value, Type extends TypeNode = TypeNode> extends View<Memory, Val, bigint, Type> {
|
|
8
|
+
protected readMemAt(off: bigint, calldata: Memory, len: bigint | number): Uint8Array | DecodingFailure;
|
|
9
|
+
protected decodeIntAt(off: bigint, type: IntType, state: Memory): bigint | DecodingFailure;
|
|
10
|
+
protected decodeBytesAt(loc: bigint, state: Memory): Uint8Array | DecodingFailure;
|
|
11
|
+
pp(): string;
|
|
12
|
+
}
|
|
13
|
+
export declare class IntMemView extends BaseMemoryView<bigint, IntType> {
|
|
14
|
+
decode(state: Memory): bigint | DecodingFailure;
|
|
15
|
+
}
|
|
16
|
+
export declare class AddressMemView extends BaseMemoryView<Address, AddressType> {
|
|
17
|
+
decode(state: Memory): Address | DecodingFailure;
|
|
18
|
+
}
|
|
19
|
+
export declare class BoolMemView extends BaseMemoryView<boolean, BoolType> {
|
|
20
|
+
decode(state: Memory): boolean | DecodingFailure;
|
|
21
|
+
}
|
|
22
|
+
export declare class FixedBytesMemView extends BaseMemoryView<Uint8Array, FixedBytesType> {
|
|
23
|
+
decode(state: Memory): Uint8Array | DecodingFailure;
|
|
24
|
+
}
|
|
25
|
+
export declare class BytesMemView extends BaseMemoryView<Uint8Array, BytesType> {
|
|
26
|
+
decode(state: Memory): Uint8Array | DecodingFailure;
|
|
27
|
+
}
|
|
28
|
+
export declare class StringMemView extends BaseMemoryView<string, StringType> {
|
|
29
|
+
decode(state: Memory): string | DecodingFailure;
|
|
30
|
+
}
|
|
31
|
+
export declare class ArrayMemView extends BaseMemoryView<Value[], ArrayType> {
|
|
32
|
+
decode(state: Memory): Value[] | DecodingFailure;
|
|
33
|
+
}
|
|
34
|
+
export declare class StructMemView extends BaseMemoryView<Struct, ExpStructType> {
|
|
35
|
+
decode(state: Memory): Struct;
|
|
36
|
+
}
|
|
37
|
+
export declare class PointerMemView extends BaseMemoryView<Value, PointerType> {
|
|
38
|
+
decode(state: Memory): Value | DecodingFailure;
|
|
39
|
+
}
|
|
40
|
+
export declare class MissingMemView extends BaseMemoryView<Value, MissingType> {
|
|
41
|
+
decode(): DecodingFailure;
|
|
42
|
+
}
|
|
43
|
+
export declare function makeMemoryView(type: TypeNode, loc: bigint): BaseMemoryView<Value, TypeNode>;
|
|
44
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/debug/decoding/memory/view.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,cAAc,EACd,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAS1D,OAAO,EAAE,OAAO,EAAe,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG1D,8BAAsB,cAAc,CAChC,GAAG,SAAS,KAAK,EACjB,IAAI,SAAS,QAAQ,GAAG,QAAQ,CAClC,SAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC;IACrC,SAAS,CAAC,SAAS,CACf,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GAAG,MAAM,GACrB,UAAU,GAAG,eAAe;IAa/B,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,eAAe;IAwB1F,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,eAAe;IAcjF,EAAE,IAAI,MAAM;CAGf;AAED,qBAAa,UAAW,SAAQ,cAAc,CAAC,MAAM,EAA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C,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CA0C3F"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MissingMemView = exports.PointerMemView = exports.StructMemView = exports.ArrayMemView = exports.StringMemView = exports.BytesMemView = exports.FixedBytesMemView = exports.BoolMemView = exports.AddressMemView = exports.IntMemView = exports.BaseMemoryView = void 0;
|
|
4
|
+
exports.makeMemoryView = makeMemoryView;
|
|
5
|
+
const solc_typed_ast_1 = require("solc-typed-ast");
|
|
6
|
+
const view_1 = require("../view");
|
|
7
|
+
const value_1 = require("../value");
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
9
|
+
const util_1 = require("@ethereumjs/util");
|
|
10
|
+
const exp_types_1 = require("../exp_types");
|
|
11
|
+
const utils_2 = require("../utils");
|
|
12
|
+
class BaseMemoryView extends view_1.View {
|
|
13
|
+
readMemAt(off, calldata, len) {
|
|
14
|
+
const res = (0, utils_1.readMem)(off, len, calldata);
|
|
15
|
+
if (!res) {
|
|
16
|
+
// OoB access
|
|
17
|
+
return new value_1.DecodingFailure(`OoB access at ${off}:${off + BigInt(len)} in memory of size ${calldata.length}`);
|
|
18
|
+
}
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
decodeIntAt(off, type, state) {
|
|
22
|
+
const bytes = this.readMemAt(off, state, 32);
|
|
23
|
+
if ((0, utils_2.isFailure)(bytes)) {
|
|
24
|
+
return bytes;
|
|
25
|
+
}
|
|
26
|
+
let res = (0, utils_1.bigEndianBufToBigint)(bytes);
|
|
27
|
+
// Convert signed negative 2's complement values
|
|
28
|
+
if (type.signed && (res & (BigInt(1) << BigInt(type.nBits - 1))) !== BigInt(0)) {
|
|
29
|
+
// Mask out any 1's above the number's size
|
|
30
|
+
res = res & ((BigInt(1) << BigInt(type.nBits)) - BigInt(1));
|
|
31
|
+
res = -((BigInt(1) << BigInt(type.nBits)) - res);
|
|
32
|
+
}
|
|
33
|
+
if (!(0, utils_1.fits)(res, type)) {
|
|
34
|
+
return new value_1.DecodingFailure(`Decoded value ${res} doesn't fit in expected type ${type.pp()}`);
|
|
35
|
+
}
|
|
36
|
+
return res;
|
|
37
|
+
}
|
|
38
|
+
decodeBytesAt(loc, state) {
|
|
39
|
+
const len = this.decodeIntAt(loc, utils_1.uint256, state);
|
|
40
|
+
if ((0, utils_2.isFailure)(len)) {
|
|
41
|
+
return len;
|
|
42
|
+
}
|
|
43
|
+
if (len >= utils_1.MAX_ARR_DECODE_LIMIT) {
|
|
44
|
+
return new value_1.DecodingFailure(`Bytes to decode too large - ${len}`);
|
|
45
|
+
}
|
|
46
|
+
return this.readMemAt(loc + 32n, state, len);
|
|
47
|
+
}
|
|
48
|
+
pp() {
|
|
49
|
+
return `<${this.type.pp()}@${this.loc} in memory>`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.BaseMemoryView = BaseMemoryView;
|
|
53
|
+
class IntMemView extends BaseMemoryView {
|
|
54
|
+
decode(state) {
|
|
55
|
+
return this.decodeIntAt(this.loc, this.type, state);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.IntMemView = IntMemView;
|
|
59
|
+
class AddressMemView extends BaseMemoryView {
|
|
60
|
+
decode(state) {
|
|
61
|
+
const m = this.readMemAt(this.loc + 12n, state, 20);
|
|
62
|
+
return (0, utils_2.isFailure)(m) ? m : new util_1.Address(m);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.AddressMemView = AddressMemView;
|
|
66
|
+
class BoolMemView extends BaseMemoryView {
|
|
67
|
+
decode(state) {
|
|
68
|
+
const m = this.readMemAt(this.loc, state, 32);
|
|
69
|
+
return (0, utils_2.isFailure)(m) ? m : (0, utils_1.bigEndianBufToBigint)(m) !== 0n;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.BoolMemView = BoolMemView;
|
|
73
|
+
class FixedBytesMemView extends BaseMemoryView {
|
|
74
|
+
decode(state) {
|
|
75
|
+
return this.readMemAt(this.loc, state, this.type.size);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.FixedBytesMemView = FixedBytesMemView;
|
|
79
|
+
class BytesMemView extends BaseMemoryView {
|
|
80
|
+
decode(state) {
|
|
81
|
+
return this.decodeBytesAt(this.loc, state);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.BytesMemView = BytesMemView;
|
|
85
|
+
class StringMemView extends BaseMemoryView {
|
|
86
|
+
decode(state) {
|
|
87
|
+
const bytes = this.decodeBytesAt(this.loc, state);
|
|
88
|
+
return (0, utils_2.isFailure)(bytes) ? bytes : (0, util_1.bytesToUtf8)(bytes);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.StringMemView = StringMemView;
|
|
92
|
+
class ArrayMemView extends BaseMemoryView {
|
|
93
|
+
decode(state) {
|
|
94
|
+
let sizeBigint;
|
|
95
|
+
let addr = this.loc;
|
|
96
|
+
if (this.type.size === undefined) {
|
|
97
|
+
sizeBigint = this.decodeIntAt(addr, utils_1.uint256, state);
|
|
98
|
+
if ((0, utils_2.isFailure)(sizeBigint)) {
|
|
99
|
+
return sizeBigint;
|
|
100
|
+
}
|
|
101
|
+
addr += 32n;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
sizeBigint = this.type.size;
|
|
105
|
+
}
|
|
106
|
+
if (sizeBigint >= utils_1.MAX_ARR_DECODE_LIMIT) {
|
|
107
|
+
return new value_1.DecodingFailure(`Array too large to decode: ${sizeBigint}`);
|
|
108
|
+
}
|
|
109
|
+
const size = Number(sizeBigint);
|
|
110
|
+
const res = [];
|
|
111
|
+
for (let i = 0; i < size; i++) {
|
|
112
|
+
const view = makeMemoryView(this.type.elementT, addr);
|
|
113
|
+
res.push(view.decode(state));
|
|
114
|
+
addr += 32n;
|
|
115
|
+
}
|
|
116
|
+
return res;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.ArrayMemView = ArrayMemView;
|
|
120
|
+
class StructMemView extends BaseMemoryView {
|
|
121
|
+
decode(state) {
|
|
122
|
+
const entries = [];
|
|
123
|
+
let offset = this.loc;
|
|
124
|
+
for (const [name, type] of this.type.fields) {
|
|
125
|
+
const view = makeMemoryView(type, offset);
|
|
126
|
+
entries.push([name, view.decode(state)]);
|
|
127
|
+
offset += 32n;
|
|
128
|
+
}
|
|
129
|
+
return new value_1.Struct(entries);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.StructMemView = StructMemView;
|
|
133
|
+
class PointerMemView extends BaseMemoryView {
|
|
134
|
+
decode(state) {
|
|
135
|
+
const offset = this.decodeIntAt(this.loc, utils_1.uint256, state);
|
|
136
|
+
if ((0, utils_2.isFailure)(offset)) {
|
|
137
|
+
return offset;
|
|
138
|
+
}
|
|
139
|
+
const view = makeMemoryView(this.type.to, offset);
|
|
140
|
+
return view.decode(state);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.PointerMemView = PointerMemView;
|
|
144
|
+
class MissingMemView extends BaseMemoryView {
|
|
145
|
+
decode() {
|
|
146
|
+
return new value_1.DecodingFailure(`${this.type.rawTypeName ? this.type.rawTypeName.type : "<unknown>"}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.MissingMemView = MissingMemView;
|
|
150
|
+
function makeMemoryView(type, loc) {
|
|
151
|
+
if (type instanceof solc_typed_ast_1.IntType) {
|
|
152
|
+
return new IntMemView(type, loc);
|
|
153
|
+
}
|
|
154
|
+
if (type instanceof solc_typed_ast_1.BoolType) {
|
|
155
|
+
return new BoolMemView(type, loc);
|
|
156
|
+
}
|
|
157
|
+
if (type instanceof solc_typed_ast_1.AddressType) {
|
|
158
|
+
return new AddressMemView(type, loc);
|
|
159
|
+
}
|
|
160
|
+
if (type instanceof solc_typed_ast_1.FixedBytesType) {
|
|
161
|
+
return new FixedBytesMemView(type, loc);
|
|
162
|
+
}
|
|
163
|
+
if (type instanceof exp_types_1.ExpStructType) {
|
|
164
|
+
return new StructMemView(type, loc);
|
|
165
|
+
}
|
|
166
|
+
if (type instanceof solc_typed_ast_1.BytesType) {
|
|
167
|
+
return new BytesMemView(type, loc);
|
|
168
|
+
}
|
|
169
|
+
if (type instanceof solc_typed_ast_1.StringType) {
|
|
170
|
+
return new StringMemView(type, loc);
|
|
171
|
+
}
|
|
172
|
+
if (type instanceof solc_typed_ast_1.ArrayType) {
|
|
173
|
+
return new ArrayMemView(type, loc);
|
|
174
|
+
}
|
|
175
|
+
if (type instanceof solc_typed_ast_1.PointerType) {
|
|
176
|
+
return new PointerMemView(type, loc);
|
|
177
|
+
}
|
|
178
|
+
if (type instanceof exp_types_1.MissingType) {
|
|
179
|
+
return new MissingMemView(type, loc);
|
|
180
|
+
}
|
|
181
|
+
(0, utils_1.nyi)(`makeMemoryView(${type.pp()})`);
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/debug/decoding/memory/view.ts"],"names":[],"mappings":";;;AAwMA,wCA0CC;AAlPD,mDAUwB;AAExB,kCAA+B;AAC/B,oCAA0D;AAC1D,0CAOwB;AACxB,2CAAwD;AACxD,4CAA0D;AAC1D,oCAAqC;AAErC,MAAsB,cAGpB,SAAQ,WAA+B;IAC3B,SAAS,CACf,GAAW,EACX,QAAgB,EAChB,GAAoB;QAEpB,MAAM,GAAG,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,aAAa;YACb,OAAO,IAAI,uBAAe,CACtB,iBAAiB,GAAG,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,QAAQ,CAAC,MAAM,EAAE,CACnF,CAA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IAED,IAAI,IAAI,YAAY,2BAAU,EAAE,CAAC;QAC7B,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,IAAI,YAAY,0BAAS,EAAE,CAAC;QAC5B,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,IAAI,YAAY,4BAAW,EAAE,CAAC;QAC9B,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,IAAI,YAAY,uBAAW,EAAE,CAAC;QAC9B,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,IAAA,WAAG,EAAC,kBAAkB,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/debug/decoding/stack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeStackView = void 0;
|
|
4
|
+
var view_1 = require("./view");
|
|
5
|
+
Object.defineProperty(exports, "makeStackView", { enumerable: true, get: function () { return view_1.makeStackView; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/debug/decoding/stack/index.ts"],"names":[],"mappings":";;;AAAA,+BAAuC;AAA9B,qGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AddressType, BoolType, FixedBytesType, IntType, PointerType, TypeNode } from "solc-typed-ast";
|
|
2
|
+
import { Stack } from "../../types";
|
|
3
|
+
import { DecodingFailure, Value } from "../value";
|
|
4
|
+
import { View } from "../view";
|
|
5
|
+
import { Address } from "@ethereumjs/util";
|
|
6
|
+
export declare abstract class BaseStackView<Val extends Value, Type extends TypeNode> extends View<Stack, Val, number, Type> {
|
|
7
|
+
fetchStackWord(offsetFromTop: number, state: Stack): Uint8Array | DecodingFailure;
|
|
8
|
+
decodeIntAt(offsetFromTop: number, typ: IntType, state: Stack): bigint | DecodingFailure;
|
|
9
|
+
pp(): string;
|
|
10
|
+
}
|
|
11
|
+
export declare class IntStackView extends BaseStackView<bigint, IntType> {
|
|
12
|
+
decode(state: Stack): bigint | DecodingFailure;
|
|
13
|
+
}
|
|
14
|
+
export declare class BoolStackView extends BaseStackView<boolean, BoolType> {
|
|
15
|
+
decode(state: Stack): boolean | DecodingFailure;
|
|
16
|
+
}
|
|
17
|
+
export declare class AddressStackView extends BaseStackView<Address, AddressType> {
|
|
18
|
+
decode(state: Stack): Address | DecodingFailure;
|
|
19
|
+
}
|
|
20
|
+
export declare class FixedBytesStackView extends BaseStackView<Uint8Array, FixedBytesType> {
|
|
21
|
+
decode(state: Stack): Uint8Array | DecodingFailure;
|
|
22
|
+
}
|
|
23
|
+
type PointerValue = View<any, Value, any, TypeNode>;
|
|
24
|
+
export declare class PointerStackView extends BaseStackView<PointerValue, PointerType> {
|
|
25
|
+
decode(state: Stack): PointerValue | DecodingFailure;
|
|
26
|
+
}
|
|
27
|
+
export declare function makeStackView(type: TypeNode, loc: number): BaseStackView<Value, TypeNode>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../../src/debug/decoding/stack/view.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EAEX,QAAQ,EAER,cAAc,EACd,OAAO,EACP,WAAW,EACX,QAAQ,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAA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CAAC;IAC1E,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,GAAG,eAAe;CAmCvD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAsBzF"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PointerStackView = exports.FixedBytesStackView = exports.AddressStackView = exports.BoolStackView = exports.IntStackView = exports.BaseStackView = void 0;
|
|
4
|
+
exports.makeStackView = makeStackView;
|
|
5
|
+
const solc_typed_ast_1 = require("solc-typed-ast");
|
|
6
|
+
const value_1 = require("../value");
|
|
7
|
+
const view_1 = require("../view");
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
9
|
+
const storage_1 = require("../storage");
|
|
10
|
+
const utils_2 = require("../utils");
|
|
11
|
+
const view_2 = require("../calldata/view");
|
|
12
|
+
const memory_1 = require("../memory");
|
|
13
|
+
class BaseStackView extends view_1.View {
|
|
14
|
+
fetchStackWord(offsetFromTop, state) {
|
|
15
|
+
const len = state.length;
|
|
16
|
+
if (len <= offsetFromTop) {
|
|
17
|
+
return new value_1.DecodingFailure(`${offsetFromTop} OoB in stack of length ${len}`);
|
|
18
|
+
}
|
|
19
|
+
return state[len - offsetFromTop - 1];
|
|
20
|
+
}
|
|
21
|
+
decodeIntAt(offsetFromTop, typ, state) {
|
|
22
|
+
const word = this.fetchStackWord(offsetFromTop, state);
|
|
23
|
+
if ((0, utils_2.isFailure)(word)) {
|
|
24
|
+
return word;
|
|
25
|
+
}
|
|
26
|
+
let res = (0, utils_1.bigEndianBufToBigint)(word);
|
|
27
|
+
// Convert signed negative 2's complement values
|
|
28
|
+
if (typ.signed && (res & (BigInt(1) << BigInt(typ.nBits - 1))) !== BigInt(0)) {
|
|
29
|
+
// Mask out any 1's above the number's size
|
|
30
|
+
res = res & ((BigInt(1) << BigInt(typ.nBits)) - BigInt(1));
|
|
31
|
+
res = -((BigInt(1) << BigInt(typ.nBits)) - res);
|
|
32
|
+
}
|
|
33
|
+
if (!(0, utils_1.fits)(res, typ)) {
|
|
34
|
+
return new value_1.DecodingFailure(`${res} doesnt fit in type ${typ.pp()}`);
|
|
35
|
+
}
|
|
36
|
+
return res;
|
|
37
|
+
}
|
|
38
|
+
pp() {
|
|
39
|
+
return `<${this.type.pp()}@${this.loc} in stack>`;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.BaseStackView = BaseStackView;
|
|
43
|
+
class IntStackView extends BaseStackView {
|
|
44
|
+
decode(state) {
|
|
45
|
+
return this.decodeIntAt(this.loc, this.type, state);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.IntStackView = IntStackView;
|
|
49
|
+
class BoolStackView extends BaseStackView {
|
|
50
|
+
decode(state) {
|
|
51
|
+
const res = this.decodeIntAt(this.loc, utils_1.uint256, state);
|
|
52
|
+
return (0, utils_2.isFailure)(res) ? res : res === 1n;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.BoolStackView = BoolStackView;
|
|
56
|
+
class AddressStackView extends BaseStackView {
|
|
57
|
+
decode(state) {
|
|
58
|
+
const w = this.fetchStackWord(this.loc, state);
|
|
59
|
+
return (0, utils_2.isFailure)(w) ? w : (0, utils_1.wordToAddress)(w);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.AddressStackView = AddressStackView;
|
|
63
|
+
class FixedBytesStackView extends BaseStackView {
|
|
64
|
+
decode(state) {
|
|
65
|
+
const w = this.fetchStackWord(this.loc, state);
|
|
66
|
+
return (0, utils_2.isFailure)(w) ? w : w.slice(0, this.type.size);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.FixedBytesStackView = FixedBytesStackView;
|
|
70
|
+
class PointerStackView extends BaseStackView {
|
|
71
|
+
decode(state) {
|
|
72
|
+
const off = this.decodeIntAt(this.loc, utils_1.uint256, state);
|
|
73
|
+
if ((0, utils_2.isFailure)(off)) {
|
|
74
|
+
return off;
|
|
75
|
+
}
|
|
76
|
+
if ((0, utils_2.isCalldataArrayType)(this.type)) {
|
|
77
|
+
// Calldata Array slice - fetch 2 words from stack
|
|
78
|
+
const len = this.decodeIntAt(this.loc - 1, utils_1.uint256, state);
|
|
79
|
+
if ((0, utils_2.isFailure)(len)) {
|
|
80
|
+
return len;
|
|
81
|
+
}
|
|
82
|
+
return new view_2.ArraySliceCalldataView(this.type.to, off, len);
|
|
83
|
+
}
|
|
84
|
+
if (this.type.location === solc_typed_ast_1.DataLocation.CallData) {
|
|
85
|
+
return (0, view_2.makeCalldataView)(this.type.to, off, 0n);
|
|
86
|
+
}
|
|
87
|
+
if (this.type.location === solc_typed_ast_1.DataLocation.Memory) {
|
|
88
|
+
return (0, memory_1.makeMemoryView)(this.type.to, off);
|
|
89
|
+
}
|
|
90
|
+
if (this.type.location === solc_typed_ast_1.DataLocation.Storage ||
|
|
91
|
+
this.type.location === solc_typed_ast_1.DataLocation.Transient) {
|
|
92
|
+
return (0, storage_1.makeStorageView)(this.type.to, [off, 32]);
|
|
93
|
+
}
|
|
94
|
+
(0, utils_1.nyi)(`Stack pointer to ${this.type.location}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.PointerStackView = PointerStackView;
|
|
98
|
+
function makeStackView(type, loc) {
|
|
99
|
+
if (type instanceof solc_typed_ast_1.IntType) {
|
|
100
|
+
return new IntStackView(type, loc);
|
|
101
|
+
}
|
|
102
|
+
if (type instanceof solc_typed_ast_1.AddressType) {
|
|
103
|
+
return new AddressStackView(type, loc);
|
|
104
|
+
}
|
|
105
|
+
if (type instanceof solc_typed_ast_1.FixedBytesType) {
|
|
106
|
+
return new FixedBytesStackView(type, loc);
|
|
107
|
+
}
|
|
108
|
+
if (type instanceof solc_typed_ast_1.BoolType) {
|
|
109
|
+
return new BoolStackView(type, loc);
|
|
110
|
+
}
|
|
111
|
+
if (type instanceof solc_typed_ast_1.PointerType) {
|
|
112
|
+
return new PointerStackView(type, loc);
|
|
113
|
+
}
|
|
114
|
+
(0, utils_1.nyi)(`makeStackView(${type.pp()}, ${loc})`);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=view.js.map
|