The pact was adopted at the opening of the two-day Summit of the Future called by UN secretary-general Antonio Guterres.