The U.S. dollar was created by the Constitution and defined by the Coinage Act of 1792. It specified a "dollar" to be based in the Spanish milled dollar and of 371 grains and 4 sixteenths part of a grain of pure or 416 grains (27.0 g) of standard silver and an "eagle" to be 247 and 4 eighths of a grain or 270 grains (17 g) of gold (again depending on purity). The choice of the value 371 grains arose from Alexander Hamilton's decision to base the new American unit on the average weight of a selection of worn Spanish dollars. Hamilton got the treasury to weigh a sample of Spanish dollars and the average weight came out to be 371 grains. A new Spanish dollar was usually about 377 grains in weight, and so the new U.S. dollar was at a slight discount in relation to the Spanish dollar.