-
Notifications
You must be signed in to change notification settings - Fork 60
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
The ethr-did-resolver is unable to resolve a DID created using EthrDID. Receiving a call revert exception #107
Comments
The DIDs you are creating seem to have the right format. The first thing that comes to mind is that maybe the registry wasn't deployed, or you are pointing to a different address. There are some things I'd change about your configuration:
I am assuming that the I hope this helps. |
The registry variable in actually the address of the DID that I am trying to control. This is a valid address on my Ganache blockchain. I am new to this did & blockchain stuff and so maybe I am missing some step. To resolve a DID, does it need a smart contract to be actually deployed? How do I find out the registry address? |
I see. In the case of did:ethr, it does require the registry contract to be deployed. Ganache creates a local blockchain, that only lives on your machine and is meant to be used only for testing. The reason that the contract needs to be deployed first is because of how did:ethr works. When you resolve a did:ethr, the resolver has no way of knowing in advance if the DID document for that DID has been updated or not; it needs to ask somewhere. The place where it checks to see if a DID has any updates is the registry contract. |
Thanks, the above helped me advance a bit though the resolve on this DID continues to fail. I created a smart contract and deployed to my local ganache blockchain. I used the contract address as shown in the migration script output. I also sent some transactions from the identifier account to this registry which went through successfully. My code is like below. The registry variable holds my deployed smart contract address. The issuerAddress is the identifier whose DID I want to control. It continues to fail with same error below. I do see the eth_call method in Ganache's logs.
|
This is puzzling. From your description, you are doing everything right. Do you happen to have a project that is manifesting this behavior so that I can try to debug? |
I was in a really similar situation and I fixed the problem by deploying the contract as follows: $ npx hardhat run scripts/deploy.ts --network localhost After starting the network, as described here: NomicFoundation/hardhat#1566 |
Current Behavior
I am using Ganache to run a local ethereum blockchain network. I am trying to create a DID using EthrDID from the ethr-did package (v2.3.6). I am trying to use the ethr-did-resolver providing the network configuration for Ganache network.
I expect to resolve to a DID document as per documentation in this project's README. The DID generated is like
did:ethr:0x539:0xc753...
Expected Behavior
I do see a eth_call in the Ganache logs when the resolve is being called which. But if fails to resolve and get a call revert exception with code=CALL_EXCEPTION. I have already referred to https://docs.ethers.org/v5/troubleshooting/errors/ with not much details.
Failure Information
The error is:
call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="changed(address)", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
Steps to Reproduce
Here is a code snippet used to create a DID and trying to resolve using ethr-did-resolver
I expect the resolve to resolve to a DID document. The DID generated is like
did:ethr:0x539:0xc753...
Environment Details
I installed Ganache to run a local blockchain network and my provider config uses the RPC URL as shown on the Ganache network. My chainId is 1337.
The text was updated successfully, but these errors were encountered: