blockchain-lab-um / masca

Snap for managing VCs and DIDs in MetaMask
https://masca.io
Apache License 2.0
53 stars 16 forks source link

[bug](snap): getting error while resolving a did:ethr on sepolia #543

Closed radleylewis closed 7 months ago

radleylewis commented 8 months ago

Describe the bug

Issue Overview

When resolving a did did:ethr:sepolia using the masca resolveDID rpc method, the following error is returned:

"Error: 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)"

Other Context

This error indicates that the did does not exist/has not been created. However, when instantiating the Veramo agent within a nodejs runtime, it resolves.

To Reproduce

Invoke masca rpc resolveDid

Expected behavior

The rpc call should resolve the provided did document.

martines3000 commented 8 months ago

Hi. Thank you for reporting the issue.

With which version of Veramo did you test this ?

radleylewis commented 8 months ago

Hey, thanks for your response. I am using the below veramo version:

"@veramo/did-comm": "5.5.4-next.32"

I have raised a PR with the fix (#545). The thing is, while this will resolve a did, it does not resolve dids that have been amended (in this specific case, a serviceEndpoint added). This however appears to be an issue with the provider. This fix still addresses the registry address.

martines3000 commented 8 months ago

Hi. We are using the latest Veramo version 5.5.3.

I updated the all the Veramo package versions yesterday (to 5.5.4-next.32), but I still need to test if everything works correctly now. If I don't encounter any new issues, I will create a new beta release of Masca today.

I will ping you when the release is done 😄 .

radleylewis commented 8 months ago

Appreciate it. Thanks @martines3000! Just on the other issue I mentioned above with respect to resolving changed dids, I will raise another issue as it is related but ultimately a separate issue.

martines3000 commented 7 months ago

Hey @radleylewis. I created a new release (v1.2.0-beta.2) available here:

https://www.npmjs.com/package/@blockchain-lab-um/masca/v/1.2.0-beta.2

You will need MetaMask Flask for this version. You can test it on our beta dapp