After Moses broke the first set of tablets, according to the Midrash:
God told [Moses]: Do not feel bad about the first tablets, for they only contained the Ten Commandments. However, the second set of tablets I am giving you will also have halakhot, Midrash and Aggadot. אֲנִי נוֹתֵן לְךָ שֶׁיְהֵא בָהֶם הֲלָכוֹת מִדְרָשׁ וְאַגָּדוֹת [Shemot Rabbah 46:1]
But the halakhot, Midrash and Aggadot were in the Oral Law. How could they be contained in the written tablets?