I want to implement the callback function for simplicity's sake, so people can just send ether without calling a function.
However, I'm worried my callback function will require too much gas. It:
* records how much that address invested (in a mapping) * adds address to an array * increments a counter * sends funds to collection wallet * triggers an Event
1) I know the contract would run out of gas when getting called by another contract. Is it the same when someone manually sends ether from their account?
2) I've tested the fallback function on Rinkeby and it works fine. Is it safe to assume it'll work fine on the main net as well?
3) If not, what's a better way of collecting funds for an ICO?
4) Just to confirm: the fallback function is atomic right, so if the last operation runs out of gas, nothing writes and ether is not sent?