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: cannot access `borrow`: function requires `Storage | BorrowValue` authorization, but reference is unauthorized
--> 506ce15840818283bd7d60cbe32550aa1bf9d515f0f293cc6703074556a4a10e:13:36
|
13 | self.stakingCollectionRef = account.storage.borrow<&FlowStakingCollection.StakingCollection>(from: FlowStakingCollection.StakingCollectionStoragePath)
| ^^^^^^^^^^^^^^^^^^^^^^
error: cannot access `registerDelegator`: function requires `CollectionOwner` authorization, but reference is unauthorized
--> 506ce15840818283bd7d60cbe32550aa1bf9d515f0f293cc6703074556a4a10e:18:8
|
18 | self.stakingCollectionRef.registerDelegator(nodeID: id, amount: amount)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^