import json


def fetch_abi(erc721=False):
    """
    Fetch ABI of a given contract, if it is verified
    Return default ABI, otherwise
    :param erc721: if the contract is ERC721
    :type erc721: bool
    :return: ABI of the contract
    :type: dict
    """
    if erc721:
        with open('app/abi/default-erc721.json') as abi:
            return json.load(abi)

    with open('app/abi/default-erc20.json') as abi:
        return json.load(abi)