ERC20Detailed.sol file is missing?

“openzeppelin-solidity” library doesn’t have ERC20Detailed.sol file but it is a dependancy for deploying smart contract on harmony blockchain. How do I install ERC20Detailed.sol and why is it not present in openzeppelin-solidity library ?
Thanks in advance :slight_smile:


It might be due to the breaking change introduced in OpenZeppelin contracts v3.0.0 which removed ERC20Detailed:

If you’re using the ERC20 or ERC721 tokens however, you’ll have to remove all references to optional extensions ( ERC20Detailed , ERC721Enumerable , etc.) - these have been included in the base contracts.

So if you really need ERC20Detailed due to a dependency, and can’t just use the base ERC20, you’ll have to use an earlier version of OpenZeppelin.

1 Like

Hi @crypto-programmer,

Welcome to the community :wave:

As per @PreciousChicken (:pray: @PreciousChicken) the change was made in OpenZeppelin Contracts 3.x.
You can install OpenZeppelin Contracts 2.5 using npm i openzeppelin-solidity@2.5.1

If the example is from the team at Harmony, I suggest asking them to update it to use OpenZeppelin Contracts 3.x and the npm package name @openzeppelin/contracts (openzeppelin-solidity is the older name).

1 Like