-
Notifications
You must be signed in to change notification settings - Fork 58
Description
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
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
const sign = didJWT.ES256KSigner(didJWT.hexToBytes(privateKey))
const ethrDid = new EthrDID({provider: provider, identifier: registry, chainNameOrId: chainNameOrId})
const privateNetworkConfig = [ {
name: "0x539",
rpcUrl: rpcUrl,
chainId: 1337,
registry: registry,
address: issuerAddress
}]
const ethrDidResolver = getResolver({networks: privateNetworkConfig})
const didResolver = new Resolver(ethrDidResolver)
const resolved = await didResolver.resolve(ethrDid.did)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.