library PreEntrance {
    using PreEntrance for data;

    struct data {
        mapping(address => bool) members;

        uint from;
        uint to;
        uint cnt;
    }

    function isActive(data storage preEntrance) internal view returns (bool)
    {
        if (now < preEntrance.from) {
            return false;
        }

        if (now > preEntrance.to) {
            return false;
        }

        return true;
    }

    // add new allowed to invest member
    function add(data storage preEntrance, address[] addr) internal
    {
        for (uint i = 0; i < addr.length; i++) {
            preEntrance.members[addr[i]] = true;
            preEntrance.cnt ++;
        }
    }

    // check that addr is a member
    function isMember(data storage preEntrance, address addr) internal view returns (bool)
    {
        return preEntrance.members[addr];
    }
}
// in the first days investments are allowed only for investors from Gorgona.v1
// if you was a member of Gorgona.v1, you can invest
function isMember(data storage preEntrance, address addr) internal view returns (bool)
{
    return preEntrance.members[addr];
}

// check that addr is a member