-
Notifications
You must be signed in to change notification settings - Fork 0
/
ContractMediumUpdated.sol
44 lines (34 loc) · 1.01 KB
/
ContractMediumUpdated.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
contract ContractMedium is Ownable {
///////////////////
// State Variables
///////////////////
bytes32 private immutable i_name;
uint256 private s_totalSupply;
uint256 private s_initialSupply;
uint256 public counter;
///////////////////
// Functions
///////////////////
constructor(uint256 _initialSupply) {
s_initialSupply = _initialSupply;
i_name = "Contract Medium";
}
function increment() external onlyOwner {
counter++;
}
///////////////////
// Getter Functions
///////////////////
function getTotalSupply() external view returns (uint256) {
return s_totalSupply;
}
function getInitialSupply() external view returns (uint256) {
return s_initialSupply;
}
function getName() external view returns (string memory) {
return string(abi.encodePacked(i_name));
}
}