Socket
Socket
Sign inDemoInstall

@truffle/debugger

Package Overview
Dependencies
469
Maintainers
7
Versions
287
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 11.1.5 to 12.0.0

18

lib/data/sagas/index.js

@@ -1053,2 +1053,5 @@ import debugModule from "debug";

);
const internalFunctionsTableKind = yield select(
data.current.internalFunctionsTableKind
);

@@ -1069,3 +1072,4 @@ debug("definition: %o");

currentContext,
internalFunctionsTable
internalFunctionsTable,
internalFunctionsTableKind
},

@@ -1115,2 +1119,5 @@ compilationId

);
const internalFunctionsTableKind = yield select(
data.current.internalFunctionsTableKind
);
debug("returnAllocation: %O", returnAllocation);

@@ -1125,3 +1132,4 @@

currentContext,
internalFunctionsTable
internalFunctionsTable,
internalFunctionsTableKind
},

@@ -1234,2 +1242,5 @@ returnAllocation,

);
const internalFunctionsTableKind = yield select(
data.current.internalFunctionsTableKind
);

@@ -1243,3 +1254,4 @@ const decoder = Codec.decodeEvent(

currentContext,
internalFunctionsTable
internalFunctionsTable,
internalFunctionsTableKind
},

@@ -1246,0 +1258,0 @@ null, //pass null as address to indicate we know the context already

@@ -1078,12 +1078,81 @@ import debugModule from "debug";

internalFunctionsTable: createLeaf(
[evm.current.isIR, "./functionsByProgramCounter"],
[evm.current.isIR, "./functionsByProgramCounter", "./functionsByIndex"],
//for Solidity compiled with IR turned on, internal function pointers
//are encoded by index rather than by PC value. unfortunately the
//indices are hard to predict and so at present we can't decode these
//(at least, not without a fair bit more effort). As such we won't set
//up an internal functions table if IR is turned on.
(isIR, byPC) => (isIR ? undefined : byPC)
//are encoded in terms of an index rather than a PC value.
(isIR, byPC, byIndex) => (isIR ? byIndex : byPC)
),
/**
* data.current.internalFunctionsTableKind
*/
internalFunctionsTableKind: createLeaf([evm.current.isIR], isIR =>
isIR ? "index" : "pcpair"
),
/**
* data.current.functionsByIndex
*/
functionsByIndex: createLeaf(
[evm.current.context, "./scopes/inlined"],
({ compilationId, contractId }, scopes) => {
if (contractId === undefined) {
return undefined;
}
const contractNode = scopes[contractId].definition;
if (!contractNode.internalFunctionIDs) {
//note that we could end up in this branch either because the version is <0.8.20,
//or because the particular contract doesn't use internal function pointers.
//in the former case, then, oh well, we can't decode.
//in the latter case, well, it doesn't really matter what we return, does it?
return undefined;
}
return Object.assign(
//we start with the entry for the designated invalid function in index 0.
//all other functions should have index 1 or greater.
[{ isDesignatedInvalid: true }],
...Object.entries(contractNode.internalFunctionIDs).map(
([nodeId, index]) => {
nodeId = Number(nodeId); //nodeId is a string initially, so let's make it a number
let {
definition: node,
pointer,
parentId: contractId
} = scopes[nodeId];
let { definition: contractNode, pointer: contractPointer } =
scopes[contractId];
if (contractNode.nodeType !== "ContractDefinition") {
//i.e., if this is a free function; in this case the nodeType
//of the parent should equal "SourceUnit"
contractNode = null;
contractId = null;
contractPointer = null;
}
return {
[index]: {
isDesignatedInvalid: false,
sourceIndex: Number(node.src.split(":")[2]), //to get the source index, we
//parse the node's source range, which has the form start:length:file
compilationId,
pointer,
node,
name: node.name,
id: nodeId,
mutability: Codec.Ast.Utils.mutability(node),
contractPointer,
contractNode,
contractName: contractNode ? contractNode.name : null,
contractId,
contractKind: contractNode ? contractNode.contractKind : null,
contractPayable: contractNode
? Codec.Ast.Utils.isContractPayable(contractNode)
: null
}
};
}
)
);
}
),
/**
* data.current.context

@@ -1090,0 +1159,0 @@ */

18

package.json

@@ -15,3 +15,3 @@ {

},
"version": "11.1.5",
"version": "12.0.0",
"main": "dist/debugger.js",

@@ -28,4 +28,4 @@ "scripts": {

"@truffle/abi-utils": "^1.0.1",
"@truffle/codec": "^0.15.3",
"@truffle/source-map-utils": "^1.3.114",
"@truffle/codec": "^0.16.0",
"@truffle/source-map-utils": "^1.3.115",
"bn.js": "^5.1.3",

@@ -39,3 +39,3 @@ "debug": "^4.3.1",

"reselect-tree": "^1.3.7",
"semver": "7.3.7",
"semver": "7.5.2",
"web3": "1.10.0",

@@ -46,7 +46,7 @@ "web3-eth-abi": "1.10.0"

"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
"@truffle/artifactor": "^4.0.192",
"@truffle/artifactor": "^4.0.193",
"@truffle/config": "^1.3.58",
"@truffle/migrate": "^3.3.41",
"@truffle/resolver": "^9.0.46",
"@truffle/workflow-compile": "^4.0.64",
"@truffle/migrate": "^3.3.42",
"@truffle/resolver": "^9.0.47",
"@truffle/workflow-compile": "^4.0.65",
"chai": "^4.2.0",

@@ -75,3 +75,3 @@ "change-case": "3.0.2",

},
"gitHead": "cb01f46c8df6b8aa693856ecdf7c0f37159c4864"
"gitHead": "854a564b2545bbd2cc0a2cf04c9d38a5b8f57d7a"
}

@@ -37,6 +37,6 @@ import debugModule from "debug";

solc: {
version: "0.8.18",
version: "0.8.20",
settings: {
optimizer: { enabled: false, runs: 200 },
evmVersion: "paris"
evmVersion: "shanghai"
}

@@ -43,0 +43,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc