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

Allow saving of types and capabilities into contracts/resources in Playground #373

Closed
MaxStalker opened this issue Sep 14, 2020 · 2 comments · Fixed by #374
Closed

Allow saving of types and capabilities into contracts/resources in Playground #373

MaxStalker opened this issue Sep 14, 2020 · 2 comments · Fixed by #374
Assignees
Labels
Bug Something isn't working Feedback

Comments

@MaxStalker
Copy link
Contributor

Instructions

NFT or contract could have a field specified on them, which gives a hint on type to cast the reference.

Problem

Playground doesn't seem to support this at the moment.

Steps to Reproduce

Here is Playground with test case:
https://play.onflow.org/603a8982-9198-4be7-9f55-0cc91ae29f6f

  • Deploy FungibleToken contract from 0x01
  • Try to deploy CustomVault contract from 0x02 - Playground will throw GraphQL error: internal system error
@turbolent
Copy link
Member

turbolent commented Sep 14, 2020

The error message is cannot export value of type interpreter.TypeValue, which comes from runtime.exportValueWithInterpreter.

This function is used by the Playground to show the account state, so the problem is only there – storage of type values is supported and should work in the emulator and on networks.

Related is #259, which added support for exporting links and references. I had listed the value type which still need to be added here #259 (comment), but it looks like the closing PR didn't add support for type values.

@turbolent turbolent changed the title Allow saving of Types into contracts/resources Allow saving of Types into contracts/resources in Playground Sep 14, 2020
@turbolent turbolent changed the title Allow saving of Types into contracts/resources in Playground Allow saving of types and capabilities into contracts/resources in Playground Sep 28, 2020
@turbolent
Copy link
Member

The cause for this is the missing support for exporting types and capabilities to JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants