Skip to content

Commit

Permalink
remove view, add getIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Jan 12, 2024
1 parent 30ef48a commit 2c9be03
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion contracts/ExampleNFT.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ access(all) contract ExampleNFT: ViewResolver {
self.publicPath = PublicPath(identifier: identifier)!
}

access(all) view fun getNFTCollectionDataView(): AnyStruct {
access(all) fun getNFTCollectionDataView(): AnyStruct {
return ExampleNFT.resolveContractView(Type<MetadataViews.NFTCollectionData>())
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/NonFungibleToken.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ access(all) contract NonFungibleToken {

/// Return the NFT CollectionData View
/// has to be AnyStruct and cast to the view later to avoid circular dependency issues
access(all) view fun getNFTCollectionDataView(): AnyStruct
access(all) fun getNFTCollectionDataView(): AnyStruct

/// Normally we would require that the collection specify
/// a specific dictionary to store the NFTs, but this isn't necessary any more
Expand Down
2 changes: 1 addition & 1 deletion contracts/UniversalCollection.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ access(all) contract UniversalCollection {
access(self) var storagePath: StoragePath
access(self) var publicPath: PublicPath

access(all) view fun getNFTCollectionDataView(): AnyStruct {
access(all) fun getNFTCollectionDataView(): AnyStruct {
return MetadataViews.NFTCollectionData(
storagePath: StoragePath(identifier: self.identifier)!,
publicPath: PublicPath(identifier: self.identifier)!,
Expand Down
2 changes: 1 addition & 1 deletion contracts/utility/FungibleToken.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ access(all) contract FungibleToken {

/// Returns the FTVaultData view for this Vault, which contains
/// all relevant paths, types, and create vault function
access(all) view fun getFTVaultDataView(): AnyStruct
access(all) fun getFTVaultDataView(): AnyStruct

/// withdraw subtracts `amount` from the Vault's balance
/// and returns a new Vault with the subtracted balance
Expand Down
18 changes: 9 additions & 9 deletions lib/go/contracts/internal/assets/assets.go

Large diffs are not rendered by default.

0 comments on commit 2c9be03

Please sign in to comment.