diff --git a/src.ts/abi/interface.ts b/src.ts/abi/interface.ts index 113364c3c8..2dcee74f1c 100644 --- a/src.ts/abi/interface.ts +++ b/src.ts/abi/interface.ts @@ -1255,7 +1255,12 @@ export class Interface { // JSON if (typeof(value) === "string") { return new Interface(JSON.parse(value)); } - // Maybe an interface from an older version, or from a symlinked copy + // An Interface; possibly from another v6 instance + if (typeof((value).formatJson) === "function") { + return new Interface((value).formatJson()); + } + + // A legacy Interface; from an older version if (typeof((value).format) === "function") { return new Interface((value).format("json")); }