I deployed a smart contract in ropsten test network. Now when I try to verify the source code, I am getting some error.
What if I do not verify it?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
Mostly it is useful for public domain projects like tokens, crowdsale etc.
When you are doing a project in which smart contract is playing a great role in handling data and you are promising the users transparency, you make the contract public (on github or on product website). But there is always a doubt that source code of presented contract can be different from the one deployed on the network. Verifying contract on Etherscan ensures that contract you are having locally is same as the one which deployed (which is also good for you) and Etherscan displays the source code to the user after verification which increases its transparency.
You can read the public values of the contract directly from Etherscan. (which can also be good for a public domain project)
You can also change the state of contract by connecting to Metamask by using its 'Write Contract' feature. (Although this is in beta).
If helpful, you use sol-verifier npm package for this.