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

leverage omnichain features [APE-1138] #4

Open
banteg opened this issue Jun 28, 2023 · 0 comments
Open

leverage omnichain features [APE-1138] #4

banteg opened this issue Jun 28, 2023 · 0 comments

Comments

@banteg
Copy link

banteg commented Jun 28, 2023

"wallet_switchEthereumChain",

newer frame versions connect to all added networks, so we don't need to switch to a network to send requests.

the docs are lacking but from what i can tell, there are at least two methods available:

  1. found here. we can add a chainId parameter to any request and it will be processed on the corresponding chain. this seems very simple to implement and looks like a preferred way to go.

  2. found here and loosely based on caip-27. here a request is wrapped into wallet_request structure:

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "wallet_request",
    "params": {
        "chainId": "eip155:1",
        "request": {
            "method": "eth_blockNumber",
            "params": [],
        },
    },
}

both seem to work but the first option sounds way easier. the only thing to clarify is whether frame plans to keep support for it.

@vany365 vany365 changed the title leverage omnichain features leverage omnichain features [APE-1138] Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant