Error: resolver or addr is not configured for ENS name

import { useWeb3Contract } from "react-moralis"
import { achieverAbi, wethAbi, wethAddress, achieverAddress, mutualsAbi, mutualsAddress } from "../constants"
import { Form } from "web3uikit"
import { ethers } from "ethers"

export default function JumpForm() {
    const { runContractFunction } = useWeb3Contract()
    let approveOptions = {
        abi: achieverAbi,
        contractAddress: achieverAddress,
        functionName: "approve",
    }
    let stakeOptions = {
        abi: mutualsAbi,
        contractAddress: mutualsAddress,
        functionName: "swap",
    }

    async function handleStakeSubmit(data) {
        const amountToApprove = data.data[0].inputResult
        approveOptions.params = {
            spender: ethers.utils.parseUnits(amountToApprove, "ether").toString(),
            amount: mutualsAddress,
        }
        console.log("Approving...")
        const tx = await runContractFunction({
            params: approveOptions,
            onError: (error) => console.log(error),
            onSuccess: () => {
                handleApproveSuccess(approveOptions.params.amount)
            },
        })
    }

    async function handleApproveSuccess(amountToStakeFormatted) {
        stakeOptions.params = {
            amount: amountToStakeFormatted,
        }
        console.log(`Staking ${stakeOptions.params.amount} WETH Token...`)
        const tx = await runContractFunction({
            params: stakeOptions,
            onError: (error) => console.log(error),
        })
        await tx.wait(1)
        console.log("Transaction has been confirmed by 1 block")
    }

    return (
        <div>
            <Form
                onSubmit={handleStakeSubmit}
                data={[
                    {
                        inputWidth: "50%",
                        name: "Amount to stake (in ACH)",
                        type: "number",
                        value: "",
                        key: "amountToStake",
                    },
                ]}
                title="Let's Swap!"
            ></Form>
        </div>
    )
}

I ran into the following error when submitting the form on Rinkeby network. Could anyone help look into this issue? Thanks.

Error: resolver or addr is not configured for ENS name (argument=“name”, value=“1000000000000000000”, code=INVALID_ARGUMENT, version=contracts/5.6.0)
at Logger.makeError (index.js?dd68:219:1)
at Logger.throwError (index.js?dd68:228:1)
at Logger.throwArgumentError (index.js?dd68:231:1)
at eval (index.js?b70c:50:1)
at Generator.next ()
at fulfilled (index.js?b70c:5:43)

Is this for handleStakeSubmit? Double check all your options and params you’re using. E.g. it looks like you’ve mixed up what you passed into spender and amount (based on the variable names).

I can’t thank you all in this edifying forum. You’re right, glad. I mixed them up. With that it has also alerted me with other error returning form submissions and have them fixed likewise. God bless you richly and have a wonderful weekend.

1 Like