0

I am trying to Create Token and Initial Coin Offering Contracts Using Truffle + Zeppelin Solidity. so i installed openZeppelin , truffle , node js , and solidity.

The following veresions of these softwares installed

Truffle: v5.4.30 
Solidity: v0.5.16 (solc-js)
Node: v16.13.2
Web3.js: v1.5.3
openzeppelin:v4.4.2

so now i'am trying to import the following files

"DetailedERC20.sol";
"MintableToken.sol";
"PausableToken.sol";

but i did not see any of these files in my node_modules/openzepplein directory as you can see in the image attached below

Following files are present there.

ERC-20 files in openzeppelin v3.0.0

and when i read the documentation and search for these files i found these files are deprecated after the release of v3 of openZeppelin.

So what should i do know if i want to use the following function of these files
MintableToken,
PausableToken,
DetailedERC20

i am continuously searching for these files but i did not find anything.

is there any possible solution for these files how to use their functions.

1 Answer 1

1
  • For PausableToken use the ERC20Pausable.sol one.
  • For MintableToken if you use the wizard they suggest a combination of the ERC20.sol and the Ownable.sol the one.
  • For DetailedERC20 there is no replacement because they merged that with the ERC20.sol so just with using ERC20.sol you're using DetailedERC20.

If you still want to use the originals you can check their repo on the v2.5 version and just use whatever code you need from there.

1
  • i will try to implement according to the explanation that you provided , will let you know soon. Thank you so much for answering.
    – Umar Raza
    Commented Jan 31, 2022 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.