mirror of openzeppelin-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
openzeppelin-contracts/contracts/mocks/EnumerableSetMock.sol

33 lines
791 B

pragma solidity ^0.6.0;
import "../utils/EnumerableSet.sol";
contract EnumerableSetMock {
using EnumerableSet for EnumerableSet.AddressSet;
event OperationResult(bool result);
EnumerableSet.AddressSet private _set;
function contains(address value) public view returns (bool) {
return _set.contains(value);
}
function add(address value) public {
bool result = _set.add(value);
emit OperationResult(result);
}
function remove(address value) public {
bool result = _set.remove(value);
emit OperationResult(result);
}
function length() public view returns (uint256) {
return _set.length();
}
function at(uint256 index) public view returns (address) {
return _set.at(index);
}
}