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 optional chain argument to starknet.id hooks #420

Open
rsodre opened this issue Mar 21, 2024 · 7 comments
Open

Add optional chain argument to starknet.id hooks #420

rsodre opened this issue Mar 21, 2024 · 7 comments
Assignees

Comments

@rsodre
Copy link

rsodre commented Mar 21, 2024

For a better testnet dapp experience, and to enable access to starknet.id on L3s, it is required to fetch starknet.id from mainnet instead of the connected chain.

Suggestion: Add an optional chainId argument (e.g. SN_MAIN) to useStarkAddress (), useStarkName () and useStarkProfile()

@fracek
Copy link
Contributor

fracek commented Mar 22, 2024

Yes, happy to accept a contribution for this. The hooks should accept a new optional argument chainId?: bigint and use that to lookup which contracts to use.

@raizo07
Copy link

raizo07 commented Mar 23, 2024

Hello @fracek I'm open to work on this.

@fracek
Copy link
Contributor

fracek commented Mar 24, 2024

Hey @raizo07 I assigned the issue to you.

@raizo07
Copy link

raizo07 commented Mar 25, 2024 via email

@raizo07
Copy link

raizo07 commented Mar 25, 2024

Hi @fracek based on this documentation chainId is to be a string. "A 0x-prefixed hexadecimal string".

But in the comment above you suggested we use a bigint. Should I proceed with a bigint or a string

@fracek
Copy link
Contributor

fracek commented Mar 26, 2024

Hey, yes starknet-react uses a bigint as chainid because IMHO it works much better than hex-encoded values. To test the hook you can use a chainid from @starknet-react/chains, e.g. mainnet.id.

@rsodre
Copy link
Author

rsodre commented May 24, 2024

is there any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants