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
--> a5620ee2a25a32378a4cec4429fadf82a84a3f00161f49631d07c8a0d45eff3f:4:3
|
4 | signer.contracts.add(name: name, code: code.utf8 )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: mismatched types
--> 3529e36191e5955d.MessagingContract:15:49
|
15 | let senderAddress = getAccount(provider: AuthAccount).address
| ^^^^^^^^^^^ expected `Address`, got `((payer: AuthAccount): AuthAccount)`
error: incorrect argument label
--> 3529e36191e5955d.MessagingContract:15:39
|
15 | let senderAddress = getAccount(provider: AuthAccount).address
| ^^^^^^^^^ expected no label, got `provider`
error: too many arguments
--> 3529e36191e5955d.MessagingContract:16:22
|
16 | let message = Message(sender: senderAddress, recipient: to, timestamp: getCurrentBlock().timestamp, content: content)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected up to 0, got 4
error: cannot find variable in this scope: `send`
--> 3529e36191e5955d.MessagingContract:18:8
|
18 | send(to, <-[message])
| ^^^^ not found in this scope
error: invalid move operation for non-resource
--> 3529e36191e5955d.MessagingContract:18:17
|
18 | send(to, <-[message])
| ^^^ unexpected `<-`
error: missing initializer for field `sender` in type `MessagingContract.Message`
--> 3529e36191e5955d.MessagingContract:7:16
|
7 | pub var sender: Address
| ^^^^^^