There are already a lot of products and services created to block adult material. Instead of wasting millions of dollars and thousands of hours of human power, they could've made a law to opt-in to these services at the service provider level.
For example, in this situation, nearly all blocking services would block 4chan.