BitmapMock.sol 555 B

123456789101112131415161718192021222324252627
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../utils/structs/BitMaps.sol";
  4. contract BitMapMock {
  5. using BitMaps for BitMaps.BitMap;
  6. BitMaps.BitMap private _bitmap;
  7. function get(uint256 index) public view returns (bool) {
  8. return _bitmap.get(index);
  9. }
  10. function setTo(uint256 index, bool value) public {
  11. _bitmap.setTo(index, value);
  12. }
  13. function set(uint256 index) public {
  14. _bitmap.set(index);
  15. }
  16. function unset(uint256 index) public {
  17. _bitmap.unset(index);
  18. }
  19. }