Keacy Carty's 170-run masterclass and a strong bowling performance secured a decisive win in Dublin, setting the stage for their upcoming series against England.