Whoops! 😨 Something unexpected happened...
[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
--> 517261b8400346824c85a868517af38166d38c36b0925db865d24f9753845b62:4:14
|
4 | acct.contracts.add(name: name, code: code.decodeHex())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cannot find variable in this scope: `arrayToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:12:19
|
12 | return arrayToJSONString(value as! [AnyStruct])
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `dictToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:16:19
|
16 | return dictToJSONString(dict: value as! {String: AnyStruct}, excludedNames: nil)
| ^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:88:36
|
88 | let serializedElement = tryToJSONString(element)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:113:34
|
113 | let serializedValue = tryToJSONString(dict[key]!)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:117:51
|
117 | serializedDict = serializedDict.concat(tryToJSONString(key)!).concat(": ").concat(serializedValue!)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `serializeFromDisplays`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:146:22
|
146 | let display = serializeFromDisplays(nftDisplay: nftDisplay, collectionDisplay: collectionDisplay)
| ^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `serializeNFTTraitsAsAttributes`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:150:25
|
150 | let attributes = serializeNFTTraitsAsAttributes(traits ?? MetadataViews.Traits([]))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:199:37
|
199 | .concat(name).concat(tryToJSONString(nftDisplay!.name)!).concat(", ")
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:200:44
|
200 | .concat(description).concat(tryToJSONString(nftDisplay!.description)!).concat(", ")
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:201:38
|
201 | .concat(image).concat(tryToJSONString(nftDisplay!.thumbnail.uri())!)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:205:48
|
205 | .concat(externalURL).concat(tryToJSONString(collectionDisplay!.externalURL.url)!)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:215:33
|
215 | .concat(name).concat(tryToJSONString(collectionDisplay!.name)!).concat(", ")
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:216:40
|
216 | .concat(description).concat(tryToJSONString(collectionDisplay!.description)!).concat(", ")
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:217:34
|
217 | .concat(image).concat(tryToJSONString(collectionDisplay!.squareImage.file.uri())!).concat(", ")
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:218:41
|
218 | .concat(externalLink).concat(tryToJSONString(collectionDisplay!.externalURL.url)!)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:234:24
|
234 | let value = tryToJSONString(trait.value)
| ^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `tryToJSONString`
--> 118a7b5d3ff8b83e.NFTMetadataSerializer:239:51
|
239 | .concat("\"trait_type\": ").concat(tryToJSONString(trait.name)!)
| ^^^^^^^^^^^^^^^ not found in this scope