The vedas are the scripture of authority the highest. So do the vedas has a law or constitution that every one must follow to achieve salvation(Moksha) . Please give reference from vedas and upanishad only.
Is there a divine law in Hinduism?
That divine law is called karma. Various verses in the Upanishads declare the fruits of various good and bad actions. For example:
Chhandogya Upanishad 5.10.7 - Those whose conduct has been good here will shortly get birth such as a brahmana, a kshatriya, or a vaishya. But those whose conduct has been evil will be born in evil births shortly such as the birth of a dog, or as a pig, or a chandala.
Then there are also references to the path of moksha:
Isha Upanishad verse 3 - There are the worlds of the Asuras covered by blind darkness. Those who have destroyed their self (who perform works, without having arrived at a knowledge of the true Self ), go to those worlds after death.
Chhandogya Upanishad last verse - ... he who behaves thus all his life, reaches the world of Brahman, and does not return, truly, he does not return.
Kaushitaki Upanishad - For he Brahman makes him, the Jivatma, whom he wishes to lead up from these worlds, do a good deed; and he also makes him, whom he wishes to lead down from these worlds, do a bad deed.
So there is definitely a divine law in Hinduism. The divine law governs which births one takes based on good and bad actions, as well as the path to moksha.