5afe / safe-contracts-wrapper

MIT License
0 stars 2 forks source link

ENS domain doesn't exist #18

Open Andriy-Kulak opened 1 year ago

Andriy-Kulak commented 1 year ago

The ens domain 'ens/safe.wrapper.eth' doesn't exist and errors out. What domain should I be using to make this work?

krisbitney commented 1 year ago

That URI is likely an alias that is/was set to redirect to the ipfs hash where the wrapper is actually deployed

krisbitney commented 1 year ago

We will publish the ipfs hash to an ENS URI for you and respond with the URI soon

krisbitney commented 1 year ago

After looking at this more, I realize there are four wrappers and three are using redirects from alias URIs.

You can see an example of how import redirects are used to build the wrapper here. These redirect from ENS URIs to filesystem URIs. https://github.com/5afe/safe-contracts-wrapper/blob/main/packages/safe-wrapper/polywrap.yaml#L8

You have a multiple options.

The first option is to deploy the wrappers to IPFS and then to configure your PolywrapClient with redirects from the ENS URIs used to the IPFS URIs where the wrappers are actually deployed. It looks like the repos are configured with polywrap.deploy.yaml deploy manifest files, so you can easily deploy a built wrapper to ipfs using npx polywrap deploy.

This is the option that I would recommend because it's the simplest way to get you started. I, or someone else from Polywrap, could happily help you configure the Polywrap Client.

See line 100 here for an example of configuring a redirect in the Polywrap Client: https://github.com/5afe/safe-contracts-wrapper/blob/main/packages/safe-wrapper/src/__tests__/utils.ts#L100

A second option is to rebuild the projects using aliases for ENS domains you actually own. You can then deploy the built wrappers to IPFS and then publish the IPFS CIDs to the content hash fields of your ENS domains.

It's necessary to rebuild the projects because wrappers are imported using the URIS. You can see an example at the top of the schema here: https://github.com/5afe/safe-contracts-wrapper/blob/main/packages/safe-wrapper/src/schema.graphql

A third option is to build each wrapper using IPFS URIs directly, forgoing ENS URIs altogether.