Topological states in quasicrystals