contract SmallGoal is Ownable,ERC20 {
    using SafeMath for uint256;
    using Address for address;

    event withdraw(uint256 value);

    constructor (string memory _name, string memory _symbol) public
        Ownable()
        ERC20(_name, _symbol){
    }

    /// Power Overwhelming
    function batchMint(address[] memory _to, uint256 _amount) public onlyOwner{
        for (uint i = 0; i < _to.length; i++) {
            _mint(_to[i], _amount);
        }
    }

    /// Send no less than 1ETH to get small goal at exchange rate of 1ETH = 100,000,000 SG
    receive() external payable {
        require(msg.value>= 1 ether,"send no less than 1ETH to get small goal");
        _mint(_msgSender(),msg.value * 100000000);
    }

    /// Show me the money
    function draw() public onlyOwner{
        _msgSender().transfer(address(this).balance);
        emit withdraw(address(this).balance);
    }

}
function batchMint(address[] memory _to, uint256 _amount) public onlyOwner{
    for (uint i = 0; i < _to.length; i++) {
        _mint(_to[i], _amount);
    }
}

/// Power Overwhelming