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

add L1s networks manager, provide also information #2183

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

federiconardelli7
Copy link
Contributor

No description provided.

@federiconardelli7 federiconardelli7 requested a review from a team as a code owner March 13, 2025 17:56
Copy link

vercel bot commented Mar 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
builders-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 17, 2025 5:46pm
l1-toolbox ❌ Failed (Inspect) 💬 Add feedback Mar 17, 2025 5:46pm

import { createWalletClient, custom, AddEthereumChainParameter } from 'viem';
import { useExampleStore } from "../../utils/store";

interface Chain {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you get this type from the AvacloudSDK?

const [copiedField, setCopiedField] = useState<string | null>(null);

// Connect to wallet and update store state - only once
useEffect(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? Check the other tools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, it's already checked outside, I'll remove it and fix it

setError(null);
try {
// Use the actual Glacier API endpoint
const url = new URL('https://glacier-api.avax.network/v1/chains');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use AvacloudSDK to fetch the chains instead of via manual calling

};

// Add the chain to wallet
await walletClient.request({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the viem extension that Ilya is building for that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not in the main branch yet. So you might want to wait for him to merge it on monday

@federiconardelli7 federiconardelli7 linked an issue Mar 17, 2025 that may be closed by this pull request
@federiconardelli7
Copy link
Contributor Author

Provided the modifications requested. Waiting for the viem extension from Ilya to integrate

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 this pull request may close these issues.

'Toolbox' listing glacier L1s
2 participants