Various reports assess the attack was planned long ago - months, a year, maybe longer. Same goes for training. The funds you're on about would have been irrelevant. Either way, it would not have cost anywhere near that sum. If to be extravagant $20-25 million, probably much less. Peanuts for Iran on a slow day, manageable for Hamas without foreign aid, even.