Skip to content

Instantly share code, notes, and snippets.

@bjartek
Created December 8, 2023 22:43
Show Gist options
  • Save bjartek/54cbe20708ee6c37d750460c5b2b64a3 to your computer and use it in GitHub Desktop.
Save bjartek/54cbe20708ee6c37d750460c5b2b64a3 to your computer and use it in GitHub Desktop.
import "BasicNFT"
transaction(name: String) {
prepare(signer: auth(StorageCapabilities) &Account) {
signer.capabilities.storage.forEachController(
forPath:BasicNFT.minterPath,
revokeWithTag(tag: name)
)
}
}
access(all)
fun revokeWithTag(tag:String) : fun(&StorageCapabilityController): Bool {
return fun(scc: &StorageCapabilityController) : Bool {
if scc.tag == tag {
scc.delete()
return false
}
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment