onflow/cadence-tools

[LS] Support for resolving access(account)

benbackend opened this issue · 2 comments

Currently, when we use access modifier access(account), vscode extention will treat all these contracts to be deployed in separate accounts and report error.

As the contracts should already be defined in flow.json, it should be possible to resolve whether the contracts are going to be under the same account?

Adding this feature can help a lot!
Thank you.

This must likely be implemented in the language server and should probably take into account the flow.json configuration.

The type checker already supports this through a custom handler (sema.Config.MemberAccountAccessHandler)

@Bamthelearner @turbolent this is now implemented.