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
--> 6405716118dd9955ec14cc4b1958b03f6ace7dd29da86dc5d7f2b36deb68f3ad: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
--> 6405716118dd9955ec14cc4b1958b03f6ace7dd29da86dc5d7f2b36deb68f3ad:18:8
|
18 | self.stakingCollectionRef.registerDelegator(nodeID: id, amount: amount)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^