This adds support for eip3326, calling wallet_switchEthereumChain. It will allow a dapp to request a chain switch for a user with a eip1193 transport (such as metamask).
There are other methods that go alongside this method, but I'm not sure if this is the canonical way to implement this into rust-web3, so I only implemented the smallest (simplest) method first.
To check the functionality (where 0x01 is the hexadecimal chain id for ethereum):
let transport = Eip1193::new(self.provider.clone());
transport.switch_chain("0x01")
I'm not sure if the return values are ideomatic to your api either. Any guidance would be helpful as these functions are critical for any user wishing to develop web3 dapps in rust with a eip1193 transport.
This adds support for eip3326, calling
wallet_switchEthereumChain
. It will allow a dapp to request a chain switch for a user with a eip1193 transport (such as metamask).There are other methods that go alongside this method, but I'm not sure if this is the canonical way to implement this into
rust-web3
, so I only implemented the smallest (simplest) method first.To check the functionality (where 0x01 is the hexadecimal chain id for ethereum):
I'm not sure if the return values are ideomatic to your api either. Any guidance would be helpful as these functions are critical for any user wishing to develop web3 dapps in rust with a eip1193 transport.