zellic-audit
Initial commit
f998fcd
raw
history blame
1.73 kB
// This contract is part of Zellic’s smart contract dataset, which is a collection of publicly available contract code gathered as of March 2023.
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.19;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;}}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;}
modifier nonReentrant() {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
_;
_status = _NOT_ENTERED;}}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());}
function owner() public view virtual returns (address) {
return _owner;}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);}}