Error: invalid address or ENS name (argument="name", value=2, code=INVALID_ARGUMENT, version=contracts/5.6.0)

My transfer function was working perfectly before today. Now I get this error
Error: invalid address or ENS name (argument=β€œname”, value=2, code=INVALID_ARGUMENT, version=contracts/5.6.0)

const options = {
        type: 'erc20',
        amount: Moralis.Units.Token(amount, '9'),
        receiver: addressTo,
        contractAddress: '*****************************',
      };

const transaction = await Moralis.transfer(options);

it should be related to the parameters somehow, are you sure that the error is from this function?

try to log the parameters

1 Like

Thanks for attention. It was my fault , I found a problem.

1 Like

how do you solve this issue. got the same error

what is the code that you are using?

You can try to add some logging to see if the parameters have the expected value