Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ lerna-debug.log*
# emulator datastore
flowdb
coverage.json

keys
20 changes: 0 additions & 20 deletions build.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions cadence/__test__/src/nftcatalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export const sendAdminProxyCapability = async (ownerAccount) => {
return sendTransaction({ name, args, signers });
}

export const proposeNFTToCatalog = async (account, collectionIdentifier, contractName, contractAddress, nftTypeIdentifier, storagePathIdentifier, publicPathIdentifier, privatePathIdentifier, publicLinkedTypeIdentifier, publicLinkedTypeRestrictions, privateLinkedTypeIdentifier, privateLinkedTypeRestrictions, collectionName, collectionDescription, externalURL, squareURL, squareMediaType, bannerURL, bannerMediaType, socials, message) => {
export const proposeNFTToCatalog = async (account, collectionIdentifier, contractName, contractAddress, nftTypeIdentifier, storagePathIdentifier, publicPathIdentifier, publicLinkedTypeIdentifier, publicLinkedTypeRestrictions, collectionName, collectionDescription, externalURL, squareURL, squareMediaType, bannerURL, bannerMediaType, socials, message) => {
const name = 'propose_nft_to_catalog';
const args = [collectionIdentifier, contractName, contractAddress, nftTypeIdentifier, storagePathIdentifier, publicPathIdentifier, privatePathIdentifier, publicLinkedTypeIdentifier, publicLinkedTypeRestrictions, privateLinkedTypeIdentifier, privateLinkedTypeRestrictions, collectionName, collectionDescription, externalURL, squareURL, squareMediaType, bannerURL, bannerMediaType, socials, message];
const args = [collectionIdentifier, contractName, contractAddress, nftTypeIdentifier, storagePathIdentifier, publicPathIdentifier, publicLinkedTypeIdentifier, publicLinkedTypeRestrictions, collectionName, collectionDescription, externalURL, squareURL, squareMediaType, bannerURL, bannerMediaType, socials, message];
const signers = [account];

return sendTransaction({ name, args, signers });
Expand Down
3 changes: 0 additions & 3 deletions cadence/__test__/test/nftcatalog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,11 +804,8 @@ const proposeNFTToCatalogWithData = async (
nftTypeIdentifier,
struct.NFTCollectionData.storagePath.identifier,
struct.NFTCollectionData.publicPath.identifier,
struct.NFTCollectionData.privatePath.identifier,
struct.NFTCollectionData.publicLinkedType.type.type.typeID,
buildRestrictions(struct.NFTCollectionData.publicLinkedType.type),
struct.NFTCollectionData.privateLinkedType.type.type.typeID,
buildRestrictions(struct.NFTCollectionData.privateLinkedType.type),
struct.NFTCollectionDisplay.collectionName,
struct.NFTCollectionDisplay.collectionDescription,
struct.ExternalURL.externalURL,
Expand Down
12 changes: 12 additions & 0 deletions cadence/scripts/check_for_links.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import "MetadataViews"

/*
Script to check for the implementation of all recommended MetadataViews.
*/
access(all) fun main(ownerAddress: Address, collectionPublicPath: String): {String: Bool} {
let owner = getAccount(ownerAddress)
return {
"MetadataViews": owner.getCapability<&AnyResource{MetadataViews.ResolverCollection}>(PublicPath(identifier: collectionPublicPath)!).check(),
"AnyResource": owner.getCapability<&AnyResource>(PublicPath(identifier: collectionPublicPath)!).check()
}
}
8 changes: 8 additions & 0 deletions cadence/scripts/gen_tx.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import "TransactionGeneration"
access(all) fun main(tx: String, collectionIdentifier: String, vaultIdentifier: String, merchantAddress: String) : String {
return TransactionGeneration.getTx(tx: tx, params: {
"collectionIdentifier": collectionIdentifier,
"vaultIdentifier": vaultIdentifier,
"merchantAddress": merchantAddress
})!
}
6 changes: 0 additions & 6 deletions cadence/scripts/get_nft_and_views_in_account.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ access(all) struct NFT {
access(all) let externalURL: String
access(all) let storagePath: StoragePath
access(all) let publicPath: PublicPath
access(all) let privatePath: PrivatePath
access(all) let publicLinkedType: Type
access(all) let privateLinkedType: Type
access(all) let collectionName: String
access(all) let collectionDescription: String
access(all) let collectionSquareImage: String
Expand All @@ -46,9 +44,7 @@ access(all) struct NFT {
externalURL: String,
storagePath: StoragePath,
publicPath: PublicPath,
privatePath: PrivatePath,
publicLinkedType: Type,
privateLinkedType: Type,
collectionName: String,
collectionDescription: String,
collectionSquareImage: String,
Expand All @@ -64,9 +60,7 @@ access(all) struct NFT {
self.externalURL = externalURL
self.storagePath = storagePath
self.publicPath = publicPath
self.privatePath = privatePath
self.publicLinkedType = publicLinkedType
self.privateLinkedType = privateLinkedType
self.collectionName = collectionName
self.collectionDescription = collectionDescription
self.collectionSquareImage = collectionSquareImage
Expand Down
6 changes: 0 additions & 6 deletions cadence/scripts/get_nft_in_account_from_path.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,16 @@ access(all) struct ExternalURLView {
access(all) struct NFTCollectionDataView {
access(all) let storagePath : StoragePath
access(all) let publicPath : PublicPath
access(all) let privatePath: PrivatePath
access(all) let publicLinkedType: Type
access(all) let privateLinkedType: Type

init (
storagePath : StoragePath,
publicPath : PublicPath,
privatePath : PrivatePath,
publicLinkedType : Type,
privateLinkedType : Type,
) {
self.storagePath = storagePath
self.publicPath = publicPath
self.privatePath = privatePath
self.publicLinkedType = publicLinkedType
self.privateLinkedType = privateLinkedType
}
}

Expand Down
4 changes: 0 additions & 4 deletions cadence/scripts/get_nfts_in_account.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ access(all) struct NFT {
externalURL: String,
storagePath: StoragePath,
publicPath: PublicPath,
privatePath: PrivatePath,
publicLinkedType: Type,
privateLinkedType: Type,
collectionName: String,
collectionDescription: String,
collectionSquareImage: String,
Expand All @@ -44,9 +42,7 @@ access(all) struct NFT {
self.externalURL = externalURL
self.storagePath = storagePath
self.publicPath = publicPath
self.privatePath = privatePath
self.publicLinkedType = publicLinkedType
self.privateLinkedType = privateLinkedType
self.collectionName = collectionName
self.collectionDescription = collectionDescription
self.collectionSquareImage = collectionSquareImage
Expand Down
4 changes: 4 additions & 0 deletions cadence/scripts/get_supported_generated_scripts.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import "TransactionGeneration"
access(all) fun main() : [String] {
return TransactionGeneration.getSupportedScripts()
}
5 changes: 5 additions & 0 deletions cadence/scripts/get_supported_generated_transactions.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import "TransactionGeneration"

access(all) fun main() : [String] {
return TransactionGeneration.getSupportedTx()
}
File renamed without changes.
File renamed without changes.
52 changes: 47 additions & 5 deletions flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,33 @@
"testnet": "0x324c34e1c517e4db",
"mainnet": "0x49a7cda3a1eecc29"
}
},
"TransactionGeneration": {
"source": "",
"aliases": {
"previewnet": "0xd5a5e5c94f9cdb36",
"testing": "0x0000000000000007",
"testnet": "0x44051d81c4720882",
"mainnet": "0xe52522745adf5c34"
}
},
"TransactionGenerationUtils": {
"source": "",
"aliases": {
"previewnet": "0xd5a5e5c94f9cdb36",
"testing": "0x0000000000000007",
"testnet": "0x44051d81c4720882",
"mainnet": "0xe52522745adf5c34"
}
},
"TransactionTemplates": {
"source": "",
"aliases": {
"previewnet": "0xd5a5e5c94f9cdb36",
"testing": "0x0000000000000007",
"testnet": "0x44051d81c4720882",
"mainnet": "0xe52522745adf5c34"
}
}
},
"networks": {
Expand All @@ -100,23 +127,38 @@
"accounts": {
"emulator-account": {
"address": "0xf8d6e0586b0a20c7",
"key": "bac3b8f568b9d39bac8ccfc23b3cf340840cbf4db186f4eb1bb24b8924d65e62"
"key": {
"type": "file",
"location": "./keys/emulator.pkey"
}
},
"catalog-previewnet-account": {
"address": "0xd5a5e5c94f9cdb36",
"key": "ff735bbeae75401fbd8cd05c0b5f154038642bc226103eddc987c7e35bacb96d"
"key": {
"type": "file",
"location": "./keys/testnet.pkey"
}
},
"catalog-testnet-account": {
"address": "0x324c34e1c517e4db",
"key": "ff735bbeae75401fbd8cd05c0b5f154038642bc226103eddc987c7e35bacb96d"
"key": {
"type": "file",
"location": "./keys/testnet.pkey"
}
},
"examplenft-testnet-account": {
"address": "0xa60cf32e8369f919",
"key": "ff735bbeae75401fbd8cd05c0b5f154038642bc226103eddc987c7e35bacb96d"
"key": {
"type": "file",
"location": "./keys/testnet.pkey"
}
},
"examplenft-testnet-holder-account": {
"address": "0x5f151d59c7128d8e",
"key": "ff735bbeae75401fbd8cd05c0b5f154038642bc226103eddc987c7e35bacb96d"
"key": {
"type": "file",
"location": "./keys/testnet.pkey"
}
},
"mainnet-nft-catalog-account": {
"address": "0x49a7cda3a1eecc29",
Expand Down
33 changes: 0 additions & 33 deletions index.js

This file was deleted.

Loading