You a pretty well right on the chorus:
Hearties = Hearty fellows ... good, sturdy friends
and the last line ends: ... bound down in iron chains.
As you comment, there are "many versions". I tend to see them all as descendants of the original (c. 1833) poem by "Frank the Poet", writing about John (Jack) Donahoe, who was shot dead by troopers in 1829.
However, the song's various versions have spread back across the English-speaking world and attached to all sorts of local heros, villains and outright myths. (And, thus, been claimed by all sorts of secondary re-writers!)