Detect un-indexed ERC20 event parameters in a given contract.
        :param contract: The contract to check ERC20 events for un-indexed parameters in.
        :return: A list of tuple(event, parameter) of parameters which should be indexed.

def detect_erc20_unindexed_event_params(contract):
        """
        Detect un-indexed ERC20 event parameters in a given contract.
        :param contract: The contract to check ERC20 events for un-indexed parameters in.
        :return: A list of tuple(event, parameter) of parameters which should be indexed.
        """
        # Create our result array
        results = []

        # If this contract isn't an ERC20 token, we return our empty results.
        if not contract.is_erc20():
            return results

        # Loop through all events to look for poor form.
        for event in contract.events:

            # Only handle events which are declared in this contract.
            if event.contract != contract:
                continue

            # If this is transfer/approval events, expect the first two parameters to be indexed.
            if event.full_name in ["Transfer(address,address,uint256)",
                                   "Approval(address,address,uint256)"]:
                if not event.elems[0].indexed:
                    results.append((event, event.elems[0]))
                if not event.elems[1].indexed:
                    results.append((event, event.elems[1]))

        # Return the results.
        return results