Skip to content

Instantly share code, notes, and snippets.

@bjartek
Created December 8, 2023 22:42
Show Gist options
  • Save bjartek/7b360e70c9aacd1d3093caf98ca93408 to your computer and use it in GitHub Desktop.
Save bjartek/7b360e70c9aacd1d3093caf98ca93408 to your computer and use it in GitHub Desktop.
import "BasicNFT"
transaction(provider:Address, name:String) {
prepare(signer: auth(ClaimInboxCapability, SaveValue) &Account) {
//we get the capability from our inbox
let capability = signer.inbox.claim<&BasicNFT.Minter>(name, provider:provider)!
//we then save the capability to our storage so we can retrieve it
signer.storage.save(capability, to: BasicNFT.minterPath)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment