Skip to main content

Read All Editions

Read All Editions

Gets all the Edition structs.

Note: This will eventually be long.

Returns: [Golazos.EditionData] - An array of Golazos Edition Data structs.

import Golazos from 0xGOLAZOSADDRESS

pub fun main(): [Golazos.EditionData] {
let editions: [Golazos.EditionData] = []
var id: UInt64 = 1
// Note < , as nextEditionID has not yet been used
while id < Golazos.nextEditionID {
editions.append(Golazos.getEditionData(id: id)!)
id = id + 1
}
return editions
}