Hi @EvilJordan,
Glad you were able to resolve.
With upgradeable contracts we need to import OpenZeppelin Contracts Ethereum Package which is the version created for upgrades.
If we wanted to use Ownable we would need to initialize Ownable UpgradeSafe:
Box.sol
// contracts/Box.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
// Import Ownable from the OpenZeppelin Contracts Ethereum Package library
import "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol";
// Make Box inherit from the Ownable contract
contract Box is OwnableUpgradeSafe {
uint256 private value;
event ValueChanged(uint256 newValue);
function initialize() public initializer {
OwnableUpgradeSafe.__Ownable_init();
}
// The onlyOwner modifier restricts who can call the store function
function store(uint256 newValue) public onlyOwner {
value = newValue;
emit ValueChanged(newValue);
}
function retrieve() public view returns (uint256) {
return value;
}
}