Who Wrote the 2nd Amendment?

The second amendment is the right to keep and bear arms. It was believed to be written by James Madison although it was present in most of the state constitutions and was common law.