lib/web3/events/decoder.js
function (address, addressToNameMap) {
    const lcAddress = String(address).toLowerCase();
    if (!addressToNameMap || !( addressToNameMap[address] || addressToNameMap[lcAddress] )) {
      return coreAddresses.getContractNameFor(address);
    }
    return addressToNameMap[address] || addressToNameMap[lcAddress];
  }
function (address, addressToNameMap) {
    const lcAddress = String(address).toLowerCase();
    if (!addressToNameMap || !( addressToNameMap[address] || addressToNameMap[lcAddress] )) {
      return coreAddresses.getContractNameFor(address);
    }
    return addressToNameMap[address] || addressToNameMap[lcAddress];
  }
function ( address , addressToNameMap ) { const lcAddress = String ( address ) . toLowerCase ( ) ; if ( ! addressToNameMap || ! ( addressToNameMap [ address ] || addressToNameMap [ lcAddress ] ) ) { return coreAddresses . getContractNameFor ( address ) ; } return addressToNameMap [ address ] || addressToNameMap [ lcAddress ] ; }
Get contract name for an particular address

@param {string} address - address of the contract from which the event is raised
@param {object} addressToNameMap - Address to name map

@return {string} - returns the name of the contract from the address - returns
null for contracts which are not recognized
Get contract name for an particular address