Helper function to check if any function is payable
| 391 | |
| 392 | // Helper function to check if any function is payable |
| 393 | bool hasPayableFunctions(ContractDefinition const& _contract) |
| 394 | { |
| 395 | if (_contract.receiveFunction()) |
| 396 | return true; |
| 397 | |
| 398 | FunctionDefinition const* fallback = _contract.fallbackFunction(); |
| 399 | if (fallback && fallback->isPayable()) |
| 400 | return true; |
| 401 | |
| 402 | for (auto const& it: _contract.interfaceFunctions()) |
| 403 | if (it.second->isPayable()) |
| 404 | return true; |
| 405 | |
| 406 | return false; |
| 407 | } |
| 408 | |
| 409 | } |
| 410 |
no test coverage detected