-
Notifications
You must be signed in to change notification settings - Fork 23
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
FLIP 316: FCL Ethereum Provider for Cross-VM Apps #317
base: main
Are you sure you want to change the base?
Conversation
c8abcaf
to
5d9c097
Compare
gasLimit: gasLimit, | ||
value: valueBalance | ||
) | ||
assert(callResult.status == EVM.Status.successful, message: "Call failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here also fail case should be ok
Co-authored-by: Giovanni Sanchez <[email protected]>
( I don't know much of EVM wallet flow, may be totally wrong here. ) If I understood correctly, eth provider is injected after FCL login. But I think injecting provider before can be better option. The flow I see on kitty punch, If I click login, it is popping up me a wallet selection dialog. Now if I add updated FCL I have to first login user with non-evm Flow Wallet to have provider in this list. ( I may be wrong on this assumption, but it seems provider is created on current user ) I think it may be better, if provider is in this list ( as we detect in discovery ) let's say BlueWallet ( hypothetical non-erm flow wallet extension ) and another provider maybe something like ( Other Flow Wallets ) which redirects to discovery. So when I click BlueWallet it can directly authenticate with FCL ( extension pop up ) and I can use it transparently. ( via just initializing FCL ) |
Thank you for the feedback @bluesign and I can clarify a bit on the timing of the provider creation.
Apologies if it's not clear in the proposal, but the intended use is actually as you describe: the provider is supposed constructed before the user has authenticated with FCL. So for the KittyPunch/"Blue Wallet" example, it would be as follows:
I'll see if I can make some diagrams & add a better description to make this more clear. |
thanks @jribbink for this is great explanation. It all makes sense now, I think this is a great idea and very useful for filling the current gap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: how do we ensure that evm developers are aware that they can perform evm method calls and use that result in a cadence transaction without the need to hit javascript in the middle.
Atm that is the world they are used to. Do some calls to get data then do one tx and then maybe some more calls.
|
||
It will be assumed that the user’s COA is stored at the path `/storage/evm`. | ||
|
||
The FCL Ethereum provider will be compatible with all FCL-compatible wallets. Some Cadence-aware wallets already include an integrated Ethereum JSON-RPC API (e.g. Flow Wallet). However, for wallets which do not include this API, the FCL Ethereum provider can behave as a compatibility adapter to interact with Flow EVM tooling & applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will flow wallet use this new way if it used or their existing solution? Just wondering how to debug this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For apps using an FCL EVM adapter, yeah this would be the case. For those not using the adapter, they would continue to interact with Flow Wallet through it's integrated Ethereum JSON-RPC API.
Co-authored-by: Bjarte S. Karlsen <[email protected]>
I think this is a necessary education piece which will also tie into @briandoyle81 's work. As part of this effort, we would create some sort of exemplar application/guide in addition to any necessary reference docs. Existing documentation on Interacting with EVM using Cadence should be adjusted to highlight a clearer integration path for a prodcution application. |
Closes #316