Skip to content

Commit 30c3ec4

Browse files
committed
Add a hash prefix for ARCs-related hashes
This is to allow ARCs (github.com/algorandfoundation/ARCs) to have their own hash prefix without risk of collision.
1 parent 29a10da commit 30c3ec4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

protocol/hash.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ type HashID string
2323
// Hash IDs for specific object types, in lexicographic order.
2424
// Hash IDs must be PREFIX-FREE (no hash ID is a prefix of another).
2525
const (
26-
AppIndex HashID = "appID"
26+
AppIndex HashID = "appID"
27+
28+
// ARCReserved is used to reserve prefixes starting with `arc` to
29+
// ARCs-related hashes https://github.com/algorandfoundation/ARCs
30+
// The prefix for ARC-XXXX should start with:
31+
// "arcXXXX" (where "XXXX" is the 0-padded number of the ARC)
32+
// For example ARC-0003 can use any prefix starting with "arc0003"
33+
ARCReserved HashID = "arc"
34+
2735
AuctionBid HashID = "aB"
2836
AuctionDeposit HashID = "aD"
2937
AuctionOutcomes HashID = "aO"

0 commit comments

Comments
 (0)