diff --git a/contracts/DapperWalletCollections.cdc b/contracts/DapperWalletCollections.cdc index 5e38789..fe6784b 100644 --- a/contracts/DapperWalletCollections.cdc +++ b/contracts/DapperWalletCollections.cdc @@ -1,27 +1,29 @@ -pub contract DapperWalletCollections { - pub let StoragePath: StoragePath +access(all) contract DapperWalletCollections { + access(all) let StoragePath: StoragePath - pub event TypeChanged(identifier: String, added: Bool) + access(all) entitlement Owner + + access(all) event TypeChanged(identifier: String, added: Bool) access(self) let types: {Type: Bool} - pub resource Admin { - pub fun addType(_ t: Type) { + access(all) resource Admin { + access(Owner) fun addType(_ t: Type) { DapperWalletCollections.types.insert(key: t, true) emit TypeChanged(identifier: t.identifier, added: true) } - pub fun removeType( _ t: Type) { + access(Owner) fun removeType( _ t: Type) { DapperWalletCollections.types.remove(key: t) emit TypeChanged(identifier: t.identifier, added: false) } } - pub fun containsType(_ t: Type): Bool { + access(all) fun containsType(_ t: Type): Bool { return self.types.containsKey(t) } - pub fun getTypes(): [Type] { + access(all) fun getTypes(): [Type] { return self.types.keys } @@ -29,6 +31,6 @@ pub contract DapperWalletCollections { self.types = {} self.StoragePath = /storage/dapperWalletCollections - self.account.save(<- create Admin(), to: self.StoragePath) + self.account.storage.save(<- create Admin(), to: self.StoragePath) } } \ No newline at end of file diff --git a/flow.json b/flow.json index 924bb61..de828d5 100644 --- a/flow.json +++ b/flow.json @@ -11,23 +11,23 @@ "key": "7b560c9a75bc0bd9f2921145b6a7e6b341b2adfcafe9870bcd455f61c74d10d1" }, "testnet": { - "address": "0x6d9ae43184a7ad9f", + "address": "0xe4f4d5fcff8e1524", "key": { "type": "google-kms", "index": 0, "signatureAlgorithm": "ECDSA_P256", "hashAlgorithm": "SHA2_256", - "resourceID": "projects/flowty-contracts/locations/global/keyRings/contracts/cryptoKeys/dapper-wallet-collections/cryptoKeyVersions/1" + "resourceID": "projects/flowty-test/locations/global/keyRings/flow/cryptoKeys/dapper-wallet-collections/cryptoKeyVersions/1" } }, "mainnet": { - "address": "0x42a54b4f70e7dc81", + "address": "0x662881e32a6728b5", "key": { "type": "google-kms", "index": 0, "signatureAlgorithm": "ECDSA_P256", "hashAlgorithm": "SHA2_256", - "resourceID": "projects/flowty-contracts/locations/global/keyRings/contracts/cryptoKeys/dapper-wallet-collections-mainnet/cryptoKeyVersions/1" + "resourceID": "projects/flowty-prod/locations/global/keyRings/flow/cryptoKeys/dapper-wallet-collections/cryptoKeyVersions/1" } } },