OpenZeppelin / docs.openzeppelin.com

Source for the OpenZeppelin documentation site
https://docs.openzeppelin.com
45 stars 87 forks source link

Updating example code on Access Control #309

Closed svskaushik closed 2 years ago

svskaushik commented 2 years ago

The code example at https://docs.openzeppelin.com/contracts/2.x/access-control imports Ownable.sol in the following fashion:

import "@openzeppelin/contracts/ownership/Ownable.sol";

I believe to be in line with the current structure of OpenZeppelin contracts the import should be done as below:

import "@openzeppelin/contracts/access/Ownable.sol";

frangio commented 2 years ago

The page you link is for versions 2.x of OpenZeppelin Contracts. The latest can be found at https://docs.openzeppelin.com/contracts/4.x/access-control.