How to use the @truffle/codec.Utils.Definition function in @truffle/codec

To help you get started, we’ve selected a few @truffle/codec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trufflesuite / truffle / packages / debugger / lib / data / selectors / index.js View on Github external
.filter(variable => {
                //HACK: let's filter out those constants we don't know
                //how to read.  they'll just clutter things up.
                debug("variable %O", variable);
                let definition = inlined[variable.id].definition;
                return (
                  !definition.constant ||
                  CodecUtils.Definition.isSimpleConstant(definition.value)
                );
              });
github trufflesuite / truffle / packages / debugger / lib / data / selectors / index.js View on Github external
node =>
          node.nodeType === "FunctionDefinition" &&
          CodecUtils.Definition.functionKind(node) === "constructor"
      );
github trufflesuite / truffle / packages / debugger / lib / helpers / index.js View on Github external
export function isSkippedNodeType(node) {
  const otherSkippedTypes = ["VariableDeclarationStatement", "Mapping"];
  return (
    isDeliberatelySkippedNodeType(node) ||
    otherSkippedTypes.includes(node.nodeType) ||
    node.nodeType.includes("TypeName") || //HACK
    //skip string literals too -- we'll handle that manually
    (node.typeDescriptions !== undefined && //seems this sometimes happens?
      Utils.Definition.typeClass(node) === "stringliteral")
  );
}