[Error Code: 1101] error caused by: 1 error occurred: * transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed: error: cannot deploy invalid contract --> 1767cd2794459d0d85393f6bf1b96c619e88ea9df77315f6ad3beddab1316f03:4:14 | 4 | acct.contracts.add(name: name, code: code.decodeHex()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: cannot find variable in this scope: `arrayToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:11:19 | 11 | return arrayToJSONString(value as! [AnyStruct]) | ^^^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `dictToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:15:19 | 15 | return dictToJSONString(dict: value as! {String: AnyStruct}, excludedNames: nil) | ^^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:86:36 | 86 | let serializedElement = tryToJSONString(element) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:110:34 | 110 | let serializedValue = tryToJSONString(dict[key]!) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:114:51 | 114 | serializedDict = serializedDict.concat(tryToJSONString(key)!).concat(": ").concat(serializedValue!) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `serializeFromDisplays` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:142:22 | 142 | let display = serializeFromDisplays(nftDisplay: nftDisplay, collectionDisplay: collectionDisplay) | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `serializeNFTTraitsAsAttributes` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:146:25 | 146 | let attributes = serializeNFTTraitsAsAttributes(traits ?? MetadataViews.Traits([])) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:194:37 | 194 | .concat(name).concat(tryToJSONString(nftDisplay!.name)!).concat(", ") | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:195:44 | 195 | .concat(description).concat(tryToJSONString(nftDisplay!.description)!).concat(", ") | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:196:38 | 196 | .concat(image).concat(tryToJSONString(nftDisplay!.thumbnail.uri())!) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:200:48 | 200 | .concat(externalURL).concat(tryToJSONString(collectionDisplay!.externalURL.url)!) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:210:33 | 210 | .concat(name).concat(tryToJSONString(collectionDisplay!.name)!).concat(", ") | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:211:40 | 211 | .concat(description).concat(tryToJSONString(collectionDisplay!.description)!).concat(", ") | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:212:34 | 212 | .concat(image).concat(tryToJSONString(collectionDisplay!.squareImage.file.uri())!).concat(", ") | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:213:41 | 213 | .concat(externalLink).concat(tryToJSONString(collectionDisplay!.externalURL.url)!) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:228:24 | 228 | let value = tryToJSONString(trait.value) | ^^^^^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `tryToJSONString` --> 118a7b5d3ff8b83e.NFTMetadataSerializer:233:51 | 233 | .concat("\"trait_type\": ").concat(tryToJSONString(trait.name)!) | ^^^^^^^^^^^^^^^ not found in this scope
Happy diving into the flow Remember to test your contracts in 1.0 here on testnet