Section 38. The proceeds of the sale, after paying all damages, costs, expenses and charges for advertising and selling the beasts, shall be deposited in the town treasury for the use of the owner, upon proof of his right thereto within two years from the sale.