Skip to content

Commit

Permalink
use correct interface types in linking
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Mar 27, 2023
1 parent 61fa554 commit c37116f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lib/go/templates/internal/assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion transactions/shardedCollection/setup_sharded_collection.cdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import TopShot from 0xTOPSHOTADDRESS
import TopShotShardedCollection from 0xSHARDEDADDRESS
import NonFungibleToken from 0xNFTADDRESS

// This transaction creates and stores an empty moment collection
// and creates a public capability for it.
Expand All @@ -25,7 +26,7 @@ transaction(numBuckets: UInt64) {
acct.unlink(/public/MomentCollection)
}

acct.link<&{TopShot.MomentCollectionPublic}>(/public/MomentCollection, target: /storage/ShardedMomentCollection)
acct.link<&{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, TopShot.MomentCollectionPublic}>(/public/MomentCollection, target: /storage/ShardedMomentCollection)
} else {

panic("Sharded Collection already exists!")
Expand Down
4 changes: 2 additions & 2 deletions transactions/user/setup_account.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ transaction {
acct.save(<-collection, to: /storage/MomentCollection)

// create a public capability for the collection
acct.link<&{NonFungibleToken.CollectionPublic, TopShot.MomentCollectionPublic, MetadataViews.ResolverCollection}>(/public/MomentCollection, target: /storage/MomentCollection)
acct.link<&{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, TopShot.MomentCollectionPublic, MetadataViews.ResolverCollection}>(/public/MomentCollection, target: /storage/MomentCollection)
}
}
}
}

0 comments on commit c37116f

Please sign in to comment.