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

Specifying the RPC URL for the burner #26

Closed
carletex opened this issue Jan 3, 2025 · 2 comments · Fixed by #27
Closed

Specifying the RPC URL for the burner #26

carletex opened this issue Jan 3, 2025 · 2 comments · Fixed by #27

Comments

@carletex
Copy link
Member

carletex commented Jan 3, 2025

This might be too niche, but I'm in a situation where I need to specify the RPC for the burner connector.

Currently, it's using the [0] first default RPC from the chain: /~https://github.com/scaffold-eth/burner-connector/blob/main/packages/burner-connector/src/burnerConnector/burner.ts#L56

@technophile-04
Copy link
Collaborator

technophile-04 commented Jan 9, 2025

Make sense, since we need to handle case for multiple chains it should be object:

Plain wagmi:

const rpcUrls = { 11155420 : 'https://sepolia.optimism.io/' };

export const config = createConfig({
  chains: [mainnet, base],
  connectors: [burner({ rpcUrls })],
  transports: {
    [mainnet.id]: http(),
    [base.id]: http(),
  },
});

While using rainbowkit wallet:

import { rainbowkitBurnerWallet } from "burner-connector";
rainbowkitBurnerWallet.useSessionStorage = true;
rainbowkitBurnerWallet.rpcUrls = { 11155420 : 'https://sepolia.optimism.io/' };

Will tinker with this later 🙌

@carletex
Copy link
Member Author

carletex commented Jan 9, 2025

Make sense!! Thanks Shiv

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

Successfully merging a pull request may close this issue.

2 participants