A municipality may enter into any contracts necessary to the execution of the powers granted it and for the purposes provided by this chapter.