Socket
Socket
Sign inDemoInstall

@truffle/codec

Package Overview
Dependencies
Maintainers
7
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@truffle/codec - npm Package Compare versions

Comparing version 0.14.17 to 0.14.18-visual-debugger.0

dist/docs/interfaces/_truffle_codec.Format.Utils.Inspect.ResultInspectorOptions.html

16

dist/lib/export.d.ts

@@ -5,4 +5,4 @@ /// <reference types="node" />

import type { CalldataDecoding, LogDecoding, ReturndataDecoding, AbiArgument } from "./types";
import { ResultInspector, unsafeNativize, unsafeNativizeVariables, InspectOptions, nativizeAccessList } from "./format/utils/inspect";
export { ResultInspector, unsafeNativize, unsafeNativizeVariables, nativizeAccessList };
import { ResultInspector, unsafeNativize, unsafeNativizeVariables, InspectOptions, ResultInspectorOptions, nativizeAccessList } from "./format/utils/inspect";
export { ResultInspector, ResultInspectorOptions, unsafeNativize, unsafeNativizeVariables, nativizeAccessList };
declare type NumberFormatter = (n: BigInt) => any;

@@ -84,3 +84,4 @@ /**

decoding: CalldataDecoding;
constructor(decoding: CalldataDecoding);
options: ResultInspectorOptions;
constructor(decoding: CalldataDecoding, options?: ResultInspectorOptions);
/**

@@ -100,3 +101,4 @@ * @dev non-standard alternative interface name used by browser-util-inspect

decoding: LogDecoding;
constructor(decoding: LogDecoding);
options: ResultInspectorOptions;
constructor(decoding: LogDecoding, options?: ResultInspectorOptions);
/**

@@ -115,3 +117,4 @@ * @dev non-standard alternative interface name used by browser-util-inspect

decoding: ReturndataDecoding;
constructor(decoding: ReturndataDecoding);
options: ResultInspectorOptions;
constructor(decoding: ReturndataDecoding, options?: ResultInspectorOptions);
/**

@@ -127,2 +130,3 @@ * @dev non-standard alternative interface name used by browser-util-inspect

*/
export declare function formatFunctionLike(header: string, values: AbiArgument[], options: InspectOptions, suppressType?: boolean, indent?: number): string;
export declare function formatFunctionLike(header: string, values: AbiArgument[], options: InspectOptions, suppressType?: boolean, indent?: number, //for use by debug-utils
inspectorOptions?: ResultInspectorOptions): string;

@@ -238,4 +238,5 @@ "use strict";

class CalldataDecodingInspector {
constructor(decoding) {
constructor(decoding, options) {
this.decoding = decoding;
this.options = options || {};
}

@@ -292,3 +293,3 @@ /**

else {
return `Sent raw data to ${this.decoding.class.typeName}: ${util_1.default.inspect(new inspect_1.ResultInspector(codecValue), options)}`;
return `Sent raw data to ${this.decoding.class.typeName}: ${util_1.default.inspect(new inspect_1.ResultInspector(codecValue, this.options), options)}`;
}

@@ -334,4 +335,5 @@ case "unknown":

class LogDecodingInspector {
constructor(decoding) {
constructor(decoding, options) {
this.decoding = decoding;
this.options = options || {};
}

@@ -365,4 +367,5 @@ /**

class ReturndataDecodingInspector {
constructor(decoding) {
constructor(decoding, options) {
this.decoding = decoding;
this.options = options || {};
}

@@ -393,3 +396,3 @@ /**

};
const dataString = util_1.default.inspect(new inspect_1.ResultInspector(codecValue), options);
const dataString = util_1.default.inspect(new inspect_1.ResultInspector(codecValue, this.options), options);
return `Returned raw data: ${dataString}`;

@@ -417,3 +420,3 @@ case "selfdestruct":

const prefix = paddedPrefixes[index];
const formatted = indentExcludingFirstLine(util_1.default.inspect(new inspect_1.ResultInspector(value.value), options), maxLength);
const formatted = indentExcludingFirstLine(util_1.default.inspect(new inspect_1.ResultInspector(value.value, this.options), options), maxLength);
return prefix + formatted;

@@ -458,4 +461,4 @@ });

*/
function formatFunctionLike(header, values, options, suppressType = false, indent = 2 //for use by debug-utils
) {
function formatFunctionLike(header, values, options, suppressType = false, indent = 2, //for use by debug-utils
inspectorOptions) {
if (values.length === 0) {

@@ -468,3 +471,3 @@ return `${header}()`;

const prefix = namePrefix + indexedPrefix;
const displayValue = util_1.default.inspect(new inspect_1.ResultInspector(value), options);
const displayValue = util_1.default.inspect(new inspect_1.ResultInspector(value, inspectorOptions), options);
const typeString = suppressType

@@ -481,3 +484,3 @@ ? ""

exports.formatFunctionLike = formatFunctionLike;
function formatMulticall(fullName, decodings, options, additionalParameterName, additionalParameterValue) {
function formatMulticall(fullName, decodings, options, additionalParameterName, additionalParameterValue, inspectorOptions) {
if (decodings.length === 0) {

@@ -490,3 +493,3 @@ return `${fullName}()`;

? "<decoding error>"
: util_1.default.inspect(new CalldataDecodingInspector(decoding), options);
: util_1.default.inspect(new CalldataDecodingInspector(decoding, inspectorOptions), options);
return formattedDecoding + (index < decodings.length - 1 ? "," : "");

@@ -499,3 +502,3 @@ });

}
function formatAggregate(fullName, calls, options, additionalParameterName, additionalParameterValue) {
function formatAggregate(fullName, calls, options, additionalParameterName, additionalParameterValue, inspectorOptions) {
if (calls.length === 0) {

@@ -509,3 +512,3 @@ return `${fullName}()`;

: util_1.default
.inspect(new CalldataDecodingInspector(decoding), options)
.inspect(new CalldataDecodingInspector(decoding, inspectorOptions), options)
.replace(".", `(${options.stylize(address, "number")}).`); //HACK: splice in the address

@@ -512,0 +515,0 @@ return formattedCall + (index < calls.length - 1 ? "," : "");

@@ -10,2 +10,10 @@ /// <reference types="node" />

}
export interface ResultInspectorOptions {
/**
* This flag, if set, causes mappings to be rendered via objects
* rather than Maps. This is intended for compatibility and not
* recommended for normal use.
*/
renderMappingsViaObjects?: boolean;
}
/**

@@ -42,3 +50,4 @@ * This class is meant to be used with Node's

result: Format.Values.Result;
constructor(result: Format.Values.Result);
options: ResultInspectorOptions;
constructor(result: Format.Values.Result, options?: ResultInspectorOptions);
/**

@@ -45,0 +54,0 @@ * @dev non-standard alternative interface name used by browser-util-inspect

@@ -73,4 +73,5 @@ "use strict";

class ResultInspector {
constructor(result) {
constructor(result, options) {
this.result = result;
this.options = options || {};
}

@@ -124,9 +125,19 @@ /**

}
return util_1.default.inspect(coercedResult.value.map(element => new ResultInspector(element)), options);
return util_1.default.inspect(coercedResult.value.map(element => new ResultInspector(element, this.options)), options);
}
case "mapping":
return util_1.default.inspect(new Map(this.result.value.map(({ key, value }) => [
new ResultInspector(key),
new ResultInspector(value)
])), options);
if (!this.options.renderMappingsViaObjects) {
//normal case
return util_1.default.inspect(new Map(this.result.value.map(({ key, value }) => [
new ResultInspector(key, this.options),
new ResultInspector(value, this.options)
])), options);
}
else {
//compatibility case
return util_1.default.inspect(Object.assign({}, ...this.result.value.map(({ key, value }) => ({
//need to stringify key
[util_1.default.inspect(new ResultInspector(key, this.options), options)]: new ResultInspector(value, this.options)
}))), options);
}
case "struct": {

@@ -138,3 +149,3 @@ let coercedResult = this.result;

return util_1.default.inspect(Object.assign({}, ...coercedResult.value.map(({ name, value }) => ({
[name]: new ResultInspector(value)
[name]: new ResultInspector(value, this.options)
}))), options);

@@ -145,3 +156,3 @@ }

const coercedResult = (this.result);
const inspectOfUnderlying = util_1.default.inspect(new ResultInspector(coercedResult.value), options);
const inspectOfUnderlying = util_1.default.inspect(new ResultInspector(coercedResult.value, this.options), options);
return `${typeName}.wrap(${inspectOfUnderlying})`; //note only the underlying part is stylized

@@ -156,7 +167,7 @@ }

return util_1.default.inspect(Object.assign({}, ...coercedResult.value.map(({ name, value }) => ({
[name]: new ResultInspector(value)
[name]: new ResultInspector(value, this.options)
}))), options);
}
else {
return util_1.default.inspect(coercedResult.value.map(({ value }) => new ResultInspector(value)), options);
return util_1.default.inspect(coercedResult.value.map(({ value }) => new ResultInspector(value, this.options)), options);
}

@@ -169,3 +180,3 @@ }

return util_1.default.inspect(Object.assign({}, ...this.result.value.map(({ name, value }) => ({
[name]: new ResultInspector(value)
[name]: new ResultInspector(value, this.options)
}))), options);

@@ -178,3 +189,5 @@ case "enum": {

case "magic":
return util_1.default.inspect(Object.assign({}, ...Object.entries(this.result.value).map(([key, value]) => ({ [key]: new ResultInspector(value) }))), options);
return util_1.default.inspect(Object.assign({}, ...Object.entries(this.result.value).map(([key, value]) => ({
[key]: new ResultInspector(value, this.options)
}))), options);
case "enum": {

@@ -240,3 +253,3 @@ return enumFullName(this.result); //not stylized

case "WrappedError":
return util_1.default.inspect(new ResultInspector(errorResult.error.error), options);
return util_1.default.inspect(new ResultInspector(errorResult.error.error, this.options), options);
case "UintPaddingError":

@@ -243,0 +256,0 @@ return `Uint has incorrect padding (expected padding: ${errorResult.error.paddingType}) (raw value ${errorResult.error.raw})`;

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

},
"version": "0.14.17",
"version": "0.14.18-visual-debugger.0",
"main": "dist/lib/index.js",

@@ -29,4 +29,4 @@ "files": [

"dependencies": {
"@truffle/abi-utils": "^0.3.9",
"@truffle/compile-common": "^0.9.4",
"@truffle/abi-utils": "^0.3.10-visual-debugger.0",
"@truffle/compile-common": "^0.9.5-visual-debugger.0",
"big.js": "^6.0.3",

@@ -42,3 +42,3 @@ "bn.js": "^5.1.3",

"devDependencies": {
"@truffle/contract-schema": "^3.4.13",
"@truffle/contract-schema": "^3.4.14-visual-debugger.0",
"@types/big.js": "^6.0.2",

@@ -69,3 +69,3 @@ "@types/bn.js": "^5.1.0",

},
"gitHead": "2c3ec3c44eaa2f791d429e85ef181ac918679233"
"gitHead": "16365cc592b2c381ae597b7c0d51b67839fa8f62"
}

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc