-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to setup capabilities on minter account from locker account
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import TopShot from 0xTOPSHOTADDRESS | ||
import TopShotShardedCollection from 0xSHARDEDADDRESS | ||
import NonFungibleToken from 0xNFTADDRESS | ||
|
||
/* | ||
This transaction creates a capability on the minter account | ||
that links it to the locker room account. | ||
For example, on testnet: | ||
minter account = 0x70dff4d1005824db | ||
locker account = 0xd80d84b4b0a88782 | ||
*/ | ||
|
||
|
||
transaction() { | ||
|
||
prepare(minter: auth(Storage, Capabilities) &Account, locker: auth(Storage, Capabilities) &Account) { | ||
|
||
minter.storage.save( | ||
locker.capabilities.storage.issue<auth(NonFungibleToken.Withdraw) &TopShotShardedCollection.ShardedCollection>(/storage/TopShotShardedCollection), | ||
to: /storage/lockerTSShardedCollection2 | ||
) | ||
|
||
minter.storage.save( | ||
locker.capabilities.storage.issue<auth(NonFungibleToken.Withdraw) &TopShot.Collection>(/storage/MomentCollection), | ||
to: /storage/lockerTSCollection2 | ||
) | ||
} | ||
} |