Open jribbink opened 9 months ago
What are the core contracts in this definition. I would treat contracts that every developer are likely to interface against differntly. Th LS snd tools needs to be able to know about these. Like NFT/FT and the view stuff.
Also as long as there is a way to see the effective state and look at it that is also good.
Issue To Be Solved
Since core contracts are guaranteed to be available by the FVM, it would be useful to have these automatically be recognized by flowkit/added to the state.
For packages depending on flowkit & using the state to resolve imports (i.e. Flow CLI, Cadence Language Server), they would be able to resolve these contracts via the new import syntax (i.e.
import "MetadataViews"
)(Optional): Suggest A Solution
Add the contracts with their aliases to
Contracts()
in the flowkit state by default.Pros
Cons (most of the cons are related to potentially obfuscating the underlying source code)
config.Contract
type. Since there would not besource
file path in theconfig.Contract
definition. Packages using flowkit may need a way to resolve the source code & this may mean flowkit needs to export this code fromflow-go
and expose it somehowThis may also be solved/greatly simplified by contract manager and this issue could become obsolete (see https://github.com/onflow/flow-cli/issues/929)