Skip to main content

Read All Editions

Gets all the Edition structs.

Note: This will eventually be long.

Returns: [AllDay.EditionData] - An array of All Day Edition Data structs.

import AllDay from 0xALLDAYADDRESS

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