Smart Contract
AFLUpgradeAdmin
A.8f9231920da9af6d.AFLUpgradeAdmin
1import AFLUpgradeExchange from 0x8f9231920da9af6d
2
3access(all) contract AFLUpgradeAdmin {
4 access(all) resource UpgradeAdmin {
5
6 access(all) fun addUpgradePath(oldTemplateId: UInt64, newTemplateId: UInt64, requirements: [AFLUpgradeExchange.Requirement]) {
7 AFLUpgradeExchange.addUpgradePath(oldTemplateId: oldTemplateId, newTemplateId: newTemplateId, requirements: requirements)
8 }
9
10 access(all) fun updateUpgradePath(oldTemplateId: UInt64, newTemplateId: UInt64, requirements: [AFLUpgradeExchange.Requirement]) {
11 AFLUpgradeExchange.updateUpgradePath(oldTemplateId: oldTemplateId, newTemplateId: newTemplateId, requirements: requirements)
12 }
13
14 access(all) fun removeUpgradePath(oldTemplateId: UInt64) {
15 AFLUpgradeExchange.removeUpgradePath(oldTemplateId: oldTemplateId)
16 }
17
18 access(all) fun createUpgradeAdmin(): @UpgradeAdmin {
19 return <- create UpgradeAdmin()
20 }
21 }
22
23 init() {
24 AFLUpgradeAdmin.account.storage.save(<- create UpgradeAdmin(), to: /storage/AFLUpgradeAdmin)
25 }
26}