TODO: Convert this into a generic helper for getting optional form a map
| 358 | |
| 359 | // TODO: Convert this into a generic helper for getting optional form a map |
| 360 | std::optional<u256> gasOrNullopt(std::map<std::string, u256> const& _map, std::string const& _key) |
| 361 | { |
| 362 | auto it = _map.find(_key); |
| 363 | if (it == _map.end()) |
| 364 | return std::nullopt; |
| 365 | |
| 366 | return it->second; |
| 367 | } |
| 368 | |
| 369 | } |
| 370 |
no test coverage detected