It might be possible to be charged with conspiracy, even though the transfer laws only apply to the seller/transferor. Every sale requires a co-conspirator.

At the least, the gun could be seized.

There's also the possibility that the gun was stolen (especially where you don't have any idea how the friend came into possession.) The record of sale database would be a good defense for you, if you were charged with receiving stolen property. A surprising number of "friends" develop amnesia once criminal charges are in the air, looking for someone to settle on.