0xPolygonID / issuer-node

Polygon ID Self-Hosted Issuer Node
Apache License 2.0
83 stars 73 forks source link

Getting Errors while publishing did on chain using ethereum network and sepolia chain. #659

Closed varshney565 closed 2 months ago

varshney565 commented 2 months ago

WHAT I HAVE DONE

I have filled the env file with suitable parameters including setting the Ethereum node URL,Ethereum contract address, ISSUER_API_IDENTITY_METHOD=polygonid,ISSUER_API_IDENTITY_BLOCKCHAIN=eth,ISSUER_API_IDENTITY_NETWORK=sepolia(as I am using sepolia network) ISSUER_API_UI_KEY_TYPE=ETH. after that i have run the rhs service locally as mentioned in the polygonid docs about rhs. after that I have done make up and set up the vault and generate the issuer_did and does make run.

ISSUE THAT I AM FACING

I am getting the below error while publishing the id to on chain and generating the claim, PUBLISHING DID ON CHAIN p1 GENERATING THE CLAIM, p2 WHAT IT IS SHOWING ON ALCHEMY ABOUT PUBLISHING DID ON CHAIN. a1

DSHIVAAY-23 commented 2 months ago

yes i am getting exactly the same issue @martinsaporiti

martinsaporiti commented 2 months ago

Hi, ISSUER_API_IDENTITY METHOD, ISSUER_API_IDENTITY BLOCKCHAIN, ISSUER_API_IDENTITY_NETWORK variables are not used when you run the core API (running on port 3001). The command make run runs the core API. So if you are running the core API and you want to use ETH identity you have to:

{ "credentialSchema":"https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json", "type": "KYCAgeCredential", "credentialSubject": { "id": "did:polygonid:polygon:amoy:2qRsnkYbUHM3Cwx3WAowTjyUmH65zhhLmj88uGAfMM", "birthday": 19960424, "documentType": 2 }, "expiration": 202511092354 }


If you want to use the sepolia network you must have published the **State Contract** on that network.
varshney565 commented 2 months ago

I am sharing with you the screen recording of the flow in which I am getting the error doing the same thing as you are doing.

https://github.com/0xPolygonID/issuer-node/assets/87566789/49b341d5-0610-4fd3-a19d-6341b6b18171

martinsaporiti commented 2 months ago

Yeap, it seems to be right. Have you changed the ISSUER_ETHEREUM_CONTRACT_ADDRESS with your state contract in Sepolia?

ilya-korotya commented 2 months ago

@varshney565 thank you for the issue. Wait for this PR to be added to the main branch, or add this line and deploy the state contract again. It should help.

saiharish-1029 commented 2 months ago

i am also facing the same issue.

varshney565 commented 2 months ago

Yeap, it seems to be right. Have you changed the ISSUER_ETHEREUM_CONTRACT_ADDRESS with your state contract in Sepolia?

yes i have changed that address

ilya-korotya commented 2 months ago

Hi @varshney565 @saiharish-1029 @DSHIVAAY-23. Could you please try redeploying the state contract again? But first of all, pull the latest changes for the contract repository.

DSHIVAAY-23 commented 2 months ago

Hi @ilya-korotya yes we have redeployed the state contract and its working fine now we are not getting that error , Thankyou for support

ilya-korotya commented 2 months ago

@varshney565 @saiharish-1029 @DSHIVAAY-23. I'm going to close the issue because it's resolved. Feel free to open it again.