What was Adam Smith’s purpose in writing The Wealth of Nations?

What was Adam Smith’s purpose in writing The Wealth of Nations?