1

I have created a smart contract with the "standard" openzeppelin library for an ERC721 token (It has not been deployed yet). I would like to make my contract upgradeable. Can I simply install openzeppelin-contracts-upgradeable in my project (instead of the @openzeppelin/contracts one) and import its modules as they are in my smart contract (besides being careful to change any constructor to an initializer in my own smart contract)? Does the openzeppelin-contracts-upgradeable library contain all the same functions as the @openzeppelin/contracts one?

Thank you. J

1 Answer 1

0

First, to use the openzeppelin's upgradable contract you have to install the OpenZeppelin Contracts Upgradeable library:

npm install @openzeppelin/contracts-upgradeable

and then import it into your contract like so:

import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";

For your second question, he openzeppelin-contracts-upgradeable library does not contain all the same functions as the @openzeppelin/contracts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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