There is no constructor
, so you can't fund the contract in the deploy because by default constructor
is not payable
. You can add the following line:
constructor() public payable {}
About Constructor:
A constructor is an optional function declared with the constructor
keyword which is executed upon contract creation, and where you can
run contract initialisation code.
[...]
If there is no constructor, the contract will assume the default
constructor, which is equivalent to constructor() public {}.
Fallback function works fine.
About Fallback function:
A contract can have exactly one unnamed function. This function cannot
have arguments, cannot return anything and has to have external
visibility. It is executed on a call to the contract if none of the
other functions match the given function identifier (or if no data was
supplied at all).