Fix guides for 5.0 (#4654)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
(cherry picked from commit e12511b53e)
This commit is contained in:
Francisco
2023-10-04 22:37:11 -03:00
committed by Francisco Giordano
parent 228013d232
commit bd25a0a26f
7 changed files with 50 additions and 94 deletions

View File

@ -0,0 +1,17 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {Ownable} from "../../access/Ownable.sol";
contract MyContract is Ownable {
constructor(address initialOwner) Ownable(initialOwner) {}
function normalThing() public {
// anyone can call this normalThing()
}
function specialThing() public onlyOwner {
// only the owner can call specialThing()!
}
}