"He did the righteousness (tzedakah) of the L-rd": What kind of tzedakah did he do with Israel? All the forty years that Israel were in the desert, the well (of Miriam) rose up for them, and the manna descended for them, and the quail abounded for them, and the clouds of glory surrounded them! But (the tzedakah was that) he taught Torah to Israel, viz. (Devarim 6:25) "And it shall be (accounted) tzedakah to us if we observe to do all the words of this Torah."
Variantly: "He did the tzedakah of the L-rd and His judgments": We are hereby taught that tzedakah is bound up with justice (mishpat) under the throne of glory, viz. (Psalms 89:15) "Tzedek and mishpat are the foundation of Your throne."