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
--> 656a0a0720cad094c2cb1f14a6a3feb5e3815c962905e3073521e24121c7e79b:3:2
|
3 | signer.contracts.update__experimental(name: name, code: code.decodeHex())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: value of type `&FlowToken.Vault?` has no member `balance`
--> a10dde51240c1ec7.Gomoku:83:61
|
83 | let flowBet <- vault!.withdraw(amount: vault.balance)
| ^^^^^^^ type is optional, consider optional-chaining: ?.balance
error: cannot destroy value: not a resource
--> a10dde51240c1ec7.Gomoku:84:24
|
84 | destroy vault
| ^^^^^
error: loss of resource
--> a10dde51240c1ec7.Gomoku:79:20
|
79 | let placeholderVault: @FlowToken.Vault? <- FlowToken.createEmptyVault() as! @FlowToken.Vault
| ^^^^^^^^^^^^^^^^