Skip to content

Merge of #582 breaks the ability to use generic types for Contracts as the contractName field type is now a hard-coded string. #601

@MHarris021

Description

@MHarris021

Merge of #582 breaks the ability to use generic types for Contracts as the contractName field type is now a hard-coded string.

Previously an ERC20 that implemented IERC20 could be used in a function that declared , i.e...

export async function getTokensTotalSupplies(tokens: IERC20Metadata[]) { 
  tokenNumberGuard(tokens);
  return Promise.all(tokens.map(token => token.totalSupply())); 
}

would work for any Contract that could be Typecast into an @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol . Now it doesn't work.

changing the contractName field to include string as a possible type seems to fix the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions