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 Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


    constructor() {
        _transferOwnership(_msgSender());
    }

  
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    function owner() public view virtual returns (address) {
        return _owner;
    }

    function _checkOwner() internal view virtual {
        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);
    }
}

contract Whitelist is Ownable {
    address[] public whiteList;

    function addWhitelist(address[] calldata wallets) external onlyOwner {
		for(uint i=0;i<wallets.length;i++)
            whiteList.push(wallets[i]);
	}

    function checkWallet(address wallet) external view returns (bool){
        for(uint i=0;i<whiteList.length;i++){
            if(whiteList[i]==wallet) 
                return true;
        }
        return false;
    }

    function count() external view returns (uint256){
        return whiteList.length;
    }

    function index(uint256 i) external view returns (address){
        if(i > whiteList.length)  return address(0);
       return whiteList[i];
    }
}