Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support importing standard contracts #753

Open
sisyphusSmiling opened this issue Nov 7, 2023 · 0 comments
Open

Support importing standard contracts #753

sisyphusSmiling opened this issue Nov 7, 2023 · 0 comments
Labels

Comments

@sisyphusSmiling
Copy link

sisyphusSmiling commented Nov 7, 2023

Description

Currently, I need to copy+paste all contracts into my playground project which can make building even a simple contract on top of common standard contracts tedious and bloat a single file contract dapp into a 4+ contract suite. This can lead to issue when trying to build on FlowToken, which seems to be a protected contract in the playground namespace.

Suggested solution

It would be very helpful to have access to at least standard contracts via aliases, especially if those contracts are already running in the supporting emulator. Contracts that would be helpful to include are:

  • FungibleToken
  • FlowToken
  • NonFungibleToken
  • ViewResolver
  • MetadataViews
  • FungibleTokenMetadataViews
  • ExampleNFT

All of these contracts, with the exception of FungibleTokenMetadataViews are deployed when running flow emulator --contracts.

This would allow for rapid prototyping and promote composability and best practices while doing so. If implemented, it would also be helpful to inform users of the ability to import these contracts, how to do so (alias or import syntax - #751), and link to more info on each. Doing so would not only educate users about the feature, but would also serve as another pointer to commonly used and requested contracts.

Alternatives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant