Skip to content

Commit

Permalink
Update abiRegistry types type
Browse files Browse the repository at this point in the history
  • Loading branch information
maximechbt authored Jul 12, 2022
1 parent ac715a6 commit f93599d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/smartcontracts/typesystem/abiRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export class AbiRegistry {
readonly interfaces: ContractInterface[] = [];
readonly customTypes: CustomType[] = [];

static create(json: { name: string; endpoints: any[]; types: any[] }): AbiRegistry {
static create(json: { name: string; endpoints: any[]; types: Record<string, any> }): AbiRegistry {
let registry = new AbiRegistry().extend(json);
let remappedRegistry = registry.remapToKnownTypes();
return remappedRegistry;
}

private extend(json: { name: string; endpoints: any[]; types: any[] }): AbiRegistry {
private extend(json: { name: string; endpoints: any[]; types: Record<string, any> }): AbiRegistry {
json.types = json.types || {};

// The "endpoints" collection is interpreted by "ContractInterface".
Expand Down

0 comments on commit f93599d

Please sign in to comment.