CountersImplUpgradeable.sol 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../utils/CountersUpgradeable.sol";
  4. import "../proxy/utils/Initializable.sol";
  5. contract CountersImplUpgradeable is Initializable {
  6. function __CountersImpl_init() internal onlyInitializing {
  7. }
  8. function __CountersImpl_init_unchained() internal onlyInitializing {
  9. }
  10. using CountersUpgradeable for CountersUpgradeable.Counter;
  11. CountersUpgradeable.Counter private _counter;
  12. function current() public view returns (uint256) {
  13. return _counter.current();
  14. }
  15. function increment() public {
  16. _counter.increment();
  17. }
  18. function decrement() public {
  19. _counter.decrement();
  20. }
  21. function reset() public {
  22. _counter.reset();
  23. }
  24. /**
  25. * @dev This empty reserved space is put in place to allow future versions to add new
  26. * variables without shifting down storage in the inheritance chain.
  27. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  28. */
  29. uint256[49] private __gap;
  30. }