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

fix(starknetid): fix issue where starknet ID does not resolve #358

Merged
merged 33 commits into from
Dec 8, 2024

Conversation

metalboyrick
Copy link
Collaborator

@metalboyrick metalboyrick commented Nov 21, 2024

Task name here

Fixed issue where starknet ID does not resolve. Note that this was tested on mainnet.

Types of change

  • Feature
  • Bug
  • Enhancement

Comments (optional)

image

NEEDS YARN INSTALL to import starknet ID sdk. Starknet React does not work for some reason and I've decided to work around using starknet id SDK, as well as to introduce conditional functioning to the hook.

@Nadai2010
Copy link
Collaborator

Perfect, I will test it with a Sepolia account.

Thank you for your support

@metalboyrick
Copy link
Collaborator Author

@Nadai2010 do you know how to get a name in sepolia?

@Nadai2010
Copy link
Collaborator

@metalboyrick Yes, you can go to sepolia.starknet.id and create one, if this trick still works.

https://sepolia.app.starknet.id/

@metalboyrick
Copy link
Collaborator Author

@metalboyrick Yes, you can go to sepolia.starknet.id and create one, if this trick still works.

https://sepolia.app.starknet.id/

works!

@Nadai2010
Copy link
Collaborator

Nadai2010 commented Nov 21, 2024

Hi @metalboyrick, I'm testing directly from your branch, and Starknet.Id doesn't load and the address is undefined (in Sepolia with Braavos).

imagen

  • In Starknet.id is ok

imagen

@metalboyrick
Copy link
Collaborator Author

communicating with starknet.id team for assistance

@0xquantum3labs
Copy link
Collaborator

👀 @metalboyrick

@metalboyrick
Copy link
Collaborator Author

@Nadai2010 @0xquantum3labs sepolia should work now
image

@Nadai2010
Copy link
Collaborator

Nadai2010 commented Dec 6, 2024

Hi, I see some strange functions... in devnet I get the Connected Address as undefined...undefined

imagen

In Sepolia the Starknet ID profile works fine, but it gives me several errors, also the pre-deployed tokens of ETH and STRK give me some errors (no contract address, no found contracts...Some possible due to API rate limits)

image

Some of the commented errors:

imagen
imagen

@metalboyrick
Copy link
Collaborator Author

@Nadai2010 @0xquantum3labs @jrcarlos2000 fixed, but with the catch of not being able to fetch pfp yet

Uploading image.png…

@metalboyrick
Copy link
Collaborator Author

UPDATE: if you pulled this PR and tested it before, kindly do another yarn install since i removed starknet id SDK. I changed the approach to use their REST APIs instead since it does not involve direct contract calls from the front end

@metalboyrick
Copy link
Collaborator Author

Parsing PFP might be difficult, i think not a pressing issue (or we can make it into an OD issue):

see user_data field:

{
    "id": "0x00000000000000000000000000000000000000000000000000000071f3be1792",
    "owner": "0x02d0e2c634d55149e62a092fc56c1ccb4e9604d6ebd716728c94a4f92c6e0e05",
    "main": true,
    "creation_date": 1732208508,
    "domain": {
        "domain": "zmsrick.stark",
        "migrated": true,
        "root": true,
        "creation_date": 1732208508,
        "expiry": 1826816508,
        "resolver": null,
        "legacy_address": null,
        "rev_address": null
    },
    "user_data": [
        {
            "field": "0x00000000000000000000000000000000000000000065766d2d61646472657373",
            "data": "0x0000000000000000000000004a3f30f65c43225fea4b11a55aec82581c13f22f"
        }
    ],
    "verifier_data": [
        {
            "verifier": "0x00000154bc2e1af9260b9e66af0e9c46fc757ff893b3ff6a85718a810baf1474",
            "field": "0x000000000000000000000000000000000000000000000000000000006e616d65",
            "data": "0x0146abdcf5045c822c9e22a1df0a960a459ec91b2ab18ab030b604f64751ef15"
        }
    ],
    "extended_verifier_data": []
}

packages/nextjs/app/page.tsx Outdated Show resolved Hide resolved
packages/nextjs/contracts/deployedContracts.ts Outdated Show resolved Hide resolved
packages/nextjs/scaffold.config.ts Outdated Show resolved Hide resolved
packages/nextjs/app/page.tsx Outdated Show resolved Hide resolved
packages/nextjs/app/page.tsx Outdated Show resolved Hide resolved
@jrcarlos2000 jrcarlos2000 merged commit 07e8a56 into main Dec 8, 2024
2 checks passed
@jrcarlos2000 jrcarlos2000 deleted the fix/starknetid-issue branch December 8, 2024 10:06
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.

4 participants