Get an account, given the address.
    Returns the account row on success
    Returns None if not found

def namedb_get_account(cur, address, token_type):
    """
    Get an account, given the address.
    Returns the account row on success
    Returns None if not found
    """
    sql = 'SELECT * FROM accounts WHERE address = ? AND type = ? ORDER BY block_id DESC, vtxindex DESC LIMIT 1;'
    args = (address,token_type)

    rows = namedb_query_execute(cur, sql, args)
    row = rows.fetchone()
    if row is None:
        return None

    ret = {}
    ret.update(row)
    return ret