curvefi/curve-js

resolver or addr is not configured for ENS name

Opened this issue · 3 comments

Hi, I'm trying to run the example from here https://github.com/curvefi/curve-js#router-exchange server-side using Alchemy web3 provider but I get the error below when calling routerExchange. Any help is greatly appreciated.

await curve.routerExchange('DAI', 'CRV', '1000');
Error: resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.6.1)
    REDACTED {
  reason: 'resolver or addr is not configured for ENS name',
  code: 'INVALID_ARGUMENT',
  argument: 'name',
  value: ''
}

I think it's because you need signer for exchange tx. Alchemy provider is "read only" for now

@Macket I got the same issue, trying to get data in ts code (backend), but got Error: resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.7.0)

await curve.init(
   'JsonRpc',
   {
       url: 'RPC_URL',
   });
Macket commented

@quan-unizen can't even init? This code definitely works for me

await curve.init('JsonRpc', { url: RPC_URL }, { gasPrice: 0 });