-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add hybrid custody support for emulator #14
Comments
Thought I'd paste some extra notes around exposing HybridCustody on the emulator:
But I think the easiest and the most preferred way to do that now is to just use a hybrid custody scaffold: https://github.com/onflow/hybrid-custody-scaffold. Of course, this is mostly a valid solution when starting a new project. |
@bartolomej How about adding some buttons to the Flowview page that allow users to 'click to deploy'? For instance, there could be a 'HybridCustody' button. When a user clicks it, HybridCustody would be deployed to the emulator service account. In terms of dependencies, any that are omitted would also be deployed to the service account. |
@LanfordCai That would also work but seems like it could require a bit more work to get implemented. I think most importantly we should probably handle the errors gracefully first (e.g. display them to the user) and then follow-up with an improvement that offers a fix for the received errors, as the one you mentioned. The one slight issue with "deploy HybridCustody" action is that it won't update the flow.json config in the user's project folder, which is not ideal for local development (e.g. transactions with new import syntax won't work). I wonder if we should either:
|
@bartolomej I have updated https://emulator.flowview.app. Could you please check the hc pages? |
@LanfordCai I can see the pages are now visible for the emulator mode and you can configure the hybrid custody contract address. That's great, thanks for that! Follow-up things that could be nice to have:
|
@bartolomej Thank you for your feedback! Now you can edit the contract address by clicking the cog button at the top-right of the page! As for the API, now there is no API for flowview and it would be great to know you are going to implement it! Thank you! |
I can see that the Hybrid custody feature is disabled for the emulator network:
flowview/components/common/Siderbar.js
Lines 64 to 69 in 1c73975
I believe that's because hybrid custody contracts aren't available (deployed) on the emulator network by default, so the scripts won't work.
I wonder if we could enable emulator support, but just make sure to handle errors appropriately (I saw that errors are currently just ignored), to let the users know why the hybrid custody doesn't work (in case they don't have that contract deployed).
Context:
We are thinking of integrating flow-view to Flowser app (likely by embedding a deployed or locally hosted version in an iframe window) to reuse existing hybrid custody features already supported in flow-view. I think the basic support would already work if we enabled hybrid custody for the emulator.
There is still a question of how to make it easy for users to setup hybrid custody contracts locally (I just spend quite some time doing that myself, so I don't think it's easy to do that now), but that can be solved separately.
The text was updated successfully, but these errors were encountered: