useWeb3ExecuteFunction fetch function expects two argument params without name

hey guys. question. I am using useWeb3ExecuteFunction . But this time around I am setting the hook config, and later on the fetch method is asking for two arguments but they are left without name on the abi config, so cant use the params option to set the name and value for them.

abi looks like this

{
     "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "nftContractAuctions"
}
  1. end up with this error ' is required', ' is required'] when calling fetch without params
      nftContractAuctions.fetch({
        params: {
          // abi does not specify name so can't use this sytnax
          one: "ok",
          two: "ok",
        },)

I can change to the webAPI.Contract api but the idea is to keep using the hook pattern.

you have to modify the abi (not the contract) to give name to those parameters that don’t have name now

thanks! @cryptokid will do

2 Likes