Keep the proposal index in Cardano governance action IDs

A single Cardano transaction can submit more than one governance action. A database keyed only by transaction ID will overwrite the second action or attach votes to the wrong one.

Decode the full action identifier

Use a CIP-129-aware decoder for the gov_action Bech32 form. Extract the transaction ID and governance action index and use the pair as the key. Preserve the network separately in cross-network services.

transaction T, proposal index 0 → action T#0
transaction T, proposal index 1 → action T#1

In this example the same transaction T creates two separate actions. Resolve their proposal data at the respective positions. A voting procedure for T#1 applies to the second action even if a viewer links both to the same transaction page.

Distinguish action index from output index

An action number and a UTxO output number both appear after a transaction ID in some human-readable tools. They address different collections. Carry the identifier type explicitly through your API instead of accepting any transaction-plus-number string. cips.cardano.org Cardano CIP-129