@truffle/abi-utils
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -33,3 +33,3 @@ "use strict"; | ||
}), TypeRecord()) | ||
.map(([{ name }, type]) => (Object.assign({ name }, type))); | ||
.map(([{ name }, type]) => ({ name, ...type })); | ||
exports.Parameter = Parameter; | ||
@@ -41,3 +41,3 @@ const EventParameter = () => fc | ||
}), TypeRecord()) | ||
.map(([{ name, indexed }, type]) => (Object.assign({ name, indexed }, type))); | ||
.map(([{ name, indexed }, type]) => ({ name, indexed, ...type })); | ||
exports.EventParameter = EventParameter; | ||
@@ -85,7 +85,8 @@ const EventEntry = () => fc.record({ | ||
return includeLegacy && includeModern | ||
? Object.assign(Object.assign({}, modern), legacy) : includeModern | ||
? modern | ||
: legacy; | ||
? { ...modern, ...legacy } | ||
: includeModern | ||
? modern | ||
: legacy; | ||
})) | ||
.map(records => records.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {})) | ||
.map(records => records.reduce((a, b) => ({ ...a, ...b }), {})) | ||
.filter(entry => { | ||
@@ -115,7 +116,8 @@ const { inputs, outputs = [] } = entry; | ||
return includeLegacy && includeModern | ||
? Object.assign(Object.assign({}, modern), legacy) : includeModern | ||
? modern | ||
: legacy; | ||
? { ...modern, ...legacy } | ||
: includeModern | ||
? modern | ||
: legacy; | ||
})) | ||
.map(([{ type }, mutabilityFields]) => (Object.assign({ type }, mutabilityFields))); | ||
.map(([{ type }, mutabilityFields]) => ({ type, ...mutabilityFields })); | ||
exports.FallbackEntry = FallbackEntry; | ||
@@ -137,8 +139,12 @@ const ConstructorEntry = () => fc | ||
return includeLegacy && includeModern | ||
? Object.assign(Object.assign({}, modern), legacy) : includeModern | ||
? modern | ||
: legacy; | ||
? { ...modern, ...legacy } | ||
: includeModern | ||
? modern | ||
: legacy; | ||
})) | ||
.map(([{ type, inputs }, mutabilityFields]) => (Object.assign({ type, | ||
inputs }, mutabilityFields))); | ||
.map(([{ type, inputs }, mutabilityFields]) => ({ | ||
type, | ||
inputs, | ||
...mutabilityFields | ||
})); | ||
exports.ConstructorEntry = ConstructorEntry; | ||
@@ -145,0 +151,0 @@ const Abi = () => fc |
@@ -29,3 +29,6 @@ "use strict"; | ||
// we also include all the definitions, in case the subschema references those | ||
const withDefinitions = (schema) => (Object.assign({ definitions: abiSchema.definitions }, schema)); | ||
const withDefinitions = (schema) => ({ | ||
definitions: abiSchema.definitions, | ||
...schema | ||
}); | ||
const arbitraries = { | ||
@@ -32,0 +35,0 @@ Parameter: { |
@@ -11,3 +11,7 @@ "use strict"; | ||
} | ||
const entry = Object.assign(Object.assign(Object.assign({}, looseEntry), normalizeStateMutability(looseEntry)), { type: looseEntry.type || "function" }); | ||
const entry = { | ||
...looseEntry, | ||
...normalizeStateMutability(looseEntry), | ||
type: looseEntry.type || "function" | ||
}; | ||
if (entry.type === "function") { | ||
@@ -14,0 +18,0 @@ entry.outputs = entry.outputs || []; |
{ | ||
"name": "@truffle/abi-utils", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "Utilities for working with ABIs", | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "cbbdad403808aba996b37237c277e302ee99353b" | ||
"gitHead": "017e84fbad1f53f62db00483cb07fad0471e750f" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48383
658