Skip to content

leverage omnichain features [APE-1138] #4

@banteg

Description

@banteg

"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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions