Whoops! 😨 Something unexpected happened...
[Error Code: 1101] cadence runtime error Execution failed:
error: mismatched types
--> de7f0150a051a92c.TokenLendingPlace:165:24
|
165 | return &self.lendingCollection[address] as! &TokenLendingCollection
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `TokenLendingPlace.TokenLendingCollection`, got `TokenLendingPlace.TokenLendingCollection?`
error: cannot find type in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:17:21
|
17 | if (acct.borrow<&TokenLendingPlace.UserCertificate>(from: TokenLendingPlace.CertificateStoragePath) == nil) {
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:17:62
|
17 | if (acct.borrow<&TokenLendingPlace.UserCertificate>(from: TokenLendingPlace.CertificateStoragePath) == nil) {
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot infer type parameter: `T`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:17:8
|
17 | if (acct.borrow<&TokenLendingPlace.UserCertificate>(from: TokenLendingPlace.CertificateStoragePath) == nil) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:18:23
|
18 | let userCertificate <- TokenLendingPlace.createCertificate()
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:19:33
|
19 | acct.save(<-userCertificate, to: TokenLendingPlace.CertificateStoragePath)
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find type in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:20:11
|
20 | acct.link<&TokenLendingPlace.UserCertificate>(TokenLendingPlace.CertificatePrivatePath, target: TokenLendingPlace.CertificateStoragePath)
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:20:46
|
20 | acct.link<&TokenLendingPlace.UserCertificate>(TokenLendingPlace.CertificatePrivatePath, target: TokenLendingPlace.CertificateStoragePath)
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:20:96
|
20 | acct.link<&TokenLendingPlace.UserCertificate>(TokenLendingPlace.CertificatePrivatePath, target: TokenLendingPlace.CertificateStoragePath)
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot infer type parameter: `T`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:20:0
|
20 | acct.link<&TokenLendingPlace.UserCertificate>(TokenLendingPlace.CertificatePrivatePath, target: TokenLendingPlace.CertificateStoragePath)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:22:7
|
22 | if TokenLendingPlace.borrowCollection(address: acct.address) == nil {
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find type in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:23:49
|
23 | let userCertificateCap = acct.getCapability<&TokenLendingPlace.UserCertificate>(TokenLendingPlace.CertificatePrivatePath)
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:23:84
|
23 | let userCertificateCap = acct.getCapability<&TokenLendingPlace.UserCertificate>(TokenLendingPlace.CertificatePrivatePath)
| ^^^^^^^^^^^^^^^^^ not found in this scope
error: cannot find variable in this scope: `TokenLendingPlace`
--> ea652b81c998a36495a5123011a8cfb401fd5f482ca08b06fdaf01288a343d72:25:8
|
25 | TokenLendingPlace.createTokenLendingCollection(_cer: userCertificateCap)
| ^^^^^^^^^^^^^^^^^ not found in this scope