const ENSJS = require("ethereum-ens");

module.exports = {
  getNewENSJS: function(provider) {
    return new ENSJS(provider);
  },

  resolveNameToAddress: function(name, ensjs) {
    return ensjs.resolver(name).addr();
  },

  convertENSNames: function(inputArgs, methodABI, web3) {
    if (methodABI.inputs.length === 0) return inputArgs;
    const { isAddress } = web3.utils;
    const ensjs = this.getNewENSJS(web3.currentProvider);

    const convertedNames = inputArgs.map((argument, index) => {
      if (methodABI.inputs[index].type === "address") {
        // Check all address arguments for ENS names
        const argIsAddress = isAddress(argument);
        if (argIsAddress) return argument;
        return this.resolveNameToAddress(argument, ensjs);
      } else {
        return argument;
      }
    });
    return Promise.all(convertedNames);
  },

  convertENSParamsNames: async function(params, web3) {
    const { isAddress } = web3.utils;
    if (params.from && !isAddress(params.from)) {
      const ensjs = this.getNewENSJS(web3.currentProvider);
      const newFrom = await this.resolveNameToAddress(params.from, ensjs);
      return Object.assign({}, params, { from: newFrom });
    } else {
      return params;
    }
  }
};

@@ -501,24 +501,106 @@
  %7B%0A      if 
+(index + 1 %3E= methodABI.inputs.length) %7B%0A        return argument;%0A      %7D else if 
 (methodABI.i

Add extra check in ens module