There is no public solution until now, Dev Team has already unlocked and jailbreaked iPhone 4 but they still testing and cleaning up the solution just wait.
Be patient if you got an iPhone 4 locked just wait solution will come out soon and then u will enjoyt it.