The treasurer shall receive and safely keep all moneys, warrants, books, bonds and obligations entrusted to his care, and shall pay over all moneys, bonds or other obligations of the city on warrants or orders, duly drawn, passed or ordered by the board of aldermen, and signed by the mayor and attested by the city clerk, and having the seal of the city affixed thereto, and not otherwise; and shall perform such other duties as may be required of him by ordinance. Before entering upon the duties of his office he shall give bond in such sum as may be required by ordinance.