Whoops! 😨 Something unexpected happened...
[Error Code: 1101] error caused by: 1 error occurred:
* transaction preprocess failed: [Error Code: 1101] cadence runtime error: Execution failed:
error: mismatched types
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:58:66
|
58 | self.oldMarketplaceSaleCollectionRef = account.storage.borrow<auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?>(from: /storage/AFLSaleCollection)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&Any`, got `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?`
error: mismatched types
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:58:43
|
58 | self.oldMarketplaceSaleCollectionRef = account.storage.borrow<auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?>(from: /storage/AFLSaleCollection)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?`, got `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection??`
error: mismatched types
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:59:66
|
59 | self.newMarketplaceSaleCollectionRef = account.storage.borrow<auth(AFLMarketplaceV2.Owner) &AFLMarketplaceV2.SaleCollection?>(from: /storage/AFLSaleCollection2)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&Any`, got `auth(AFLMarketplaceV2.Owner) &AFLMarketplaceV2.SaleCollection?`
error: mismatched types
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:59:43
|
59 | self.newMarketplaceSaleCollectionRef = account.storage.borrow<auth(AFLMarketplaceV2.Owner) &AFLMarketplaceV2.SaleCollection?>(from: /storage/AFLSaleCollection2)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `auth(AFLMarketplaceV2.Owner) &AFLMarketplaceV2.SaleCollection?`, got `auth(AFLMarketplaceV2.Owner) &AFLMarketplaceV2.SaleCollection??`
error: cannot find variable in this scope: `account`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:75:23
|
75 | destroy <- account.storage.load<@AnyResource>(from: /storage/AFLSaleCollection2)
| ^^^^^^^ not found in this scope
error: cannot find variable in this scope: `account`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:76:12
|
76 | account.capabilities.unpublish(/public/AFLSaleCollection)
| ^^^^^^^ not found in this scope
error: value of type `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?` has no member `getIDs`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:82:57
|
82 | let oldsIds = self.oldMarketplaceSaleCollectionRef.getIDs().slice(from: 0, upTo: self.oldMarketplaceSaleCollectionRef.getIDs().length < TRANSFER_LIMIT ? self.oldMarketplaceSaleCollectionRef.getIDs().length : TRANSFER_LIMIT);
| ^^^^^^ type is optional, consider optional-chaining: ?.getIDs
error: value of type `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?` has no member `getIDs`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:82:124
|
82 | let oldsIds = self.oldMarketplaceSaleCollectionRef.getIDs().slice(from: 0, upTo: self.oldMarketplaceSaleCollectionRef.getIDs().length < TRANSFER_LIMIT ? self.oldMarketplaceSaleCollectionRef.getIDs().length : TRANSFER_LIMIT);
| ^^^^^^ type is optional, consider optional-chaining: ?.getIDs
error: value of type `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?` has no member `getIDs`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:82:196
|
82 | let oldsIds = self.oldMarketplaceSaleCollectionRef.getIDs().slice(from: 0, upTo: self.oldMarketplaceSaleCollectionRef.getIDs().length < TRANSFER_LIMIT ? self.oldMarketplaceSaleCollectionRef.getIDs().length : TRANSFER_LIMIT);
| ^^^^^^ type is optional, consider optional-chaining: ?.getIDs
error: cannot infer type: requires an explicit type annotation
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:82:87
|
82 | let oldsIds = self.oldMarketplaceSaleCollectionRef.getIDs().slice(from: 0, upTo: self.oldMarketplaceSaleCollectionRef.getIDs().length < TRANSFER_LIMIT ? self.oldMarketplaceSaleCollectionRef.getIDs().length : TRANSFER_LIMIT);
| ^
error: value of type `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?` has no member `getPrice`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:84:67
|
84 | let price: UFix64 = self.oldMarketplaceSaleCollectionRef.getPrice(tokenID: tokenID)!
| ^^^^^^^^ type is optional, consider optional-chaining: ?.getPrice
error: value of type `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?` has no member `withdraw`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:85:73
|
85 | let token: @AFLNFT.NFT <- self.oldMarketplaceSaleCollectionRef.withdraw(tokenID: tokenID)
| ^^^^^^^^ type is optional, consider optional-chaining: ?.withdraw
error: value of type `auth(AFLMarketplace.Owner) &AFLMarketplace.SaleCollection?` has no member `getIDs`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:88:47
|
88 | if (self.oldMarketplaceSaleCollectionRef.getIDs().length == 0) {
| ^^^^^^ type is optional, consider optional-chaining: ?.getIDs
error: cannot find variable in this scope: `account`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:89:21
|
89 | destroy <- account.storage.load<@AnyResource>(from: /storage/AFLSaleCollection)
| ^^^^^^^ not found in this scope
error: cannot find variable in this scope: `account`
--> bfa01a6c4abff54c10a9984a4a3be2ee5b6beb3e5f86188fc536391fca2dff72:90:10
|
90 | account.capabilities.unpublish(/public/AFLSaleCollection)
| ^^^^^^^ not found in this scope