Smart Contract

BurnRegistry

A.30cf5dcf6ea8d379.BurnRegistry

Deployed

1d ago
Feb 26, 2026, 09:43:51 PM UTC

Dependents

0 imports
1//This is not in use because of complexity issues, we cannot access playEditions if it is too large
2pub contract BurnRegistry {
3
4	access(self) let playEditions : {UInt64: [UInt64]}
5
6
7	access(account) fun burnEdition(playId: UInt64, edition: UInt64){
8		if self.playEditions[edition] != nil{
9			self.playEditions[edition]!.append(edition)
10			return
11		}
12		self.playEditions[edition] = [edition]
13	}
14
15	pub fun getBurnRegistry() : {UInt64:[UInt64]} {
16		return self.playEditions
17	}
18
19	pub fun getNumbersBurned(_ playId:UInt64) : Int {
20		if let burned = self.playEditions[playId] {
21			return burned.length
22		}
23		return 0
24	}
25
26	pub fun getBurnedEditions(_ playId:UInt64) : [UInt64] {
27		return self.playEditions[playId] ?? []
28	}
29
30	init() {
31		self.playEditions={}
32
33	}
34
35
36}
37