diff --git a/address/address_special.go b/address/address_special.go index 9d455d8..94a5df4 100644 --- a/address/address_special.go +++ b/address/address_special.go @@ -17,12 +17,20 @@ const ( // RewardingProtocol is the rewarding protocol address RewardingProtocol = "io154mvzs09vkgn0hw6gg3ayzw5w39jzp47f8py9v" + + // PollProtocol is the poll protocol address + PollProtocol = "io1ze4hg0pvrftuj0pw90p7z6wj3wae7mdrwws6d5" + + // RollDPoSProtocol is the Roll-DPoS protocol address + RollDPoSProtocol = "io1qsfhpcq2wywds8dpjx8suj2ytx4d4egwxzqsg3" ) // 20-byte protocol address hash var ( StakingProtocolAddrHash = hash160b([]byte("staking")) RewardingProtocolAddrHash = hash160b([]byte("rewarding")) + PollProtocolAddrHash = hash160b([]byte("poll")) + RollDPoSProtocolAddrHash = hash160b([]byte("rolldpos")) ) // hash160b returns 160-bit (20-byte) hash of input diff --git a/address/address_special_test.go b/address/address_special_test.go new file mode 100644 index 0000000..688220b --- /dev/null +++ b/address/address_special_test.go @@ -0,0 +1,19 @@ +package address + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestAddressSpecial(t *testing.T) { + r := require.New(t) + + poll, err := FromBytes(PollProtocolAddrHash[:]) + r.NoError(err) + r.Equal(PollProtocol, poll.String()) + + rolldpos, err := FromBytes(RollDPoSProtocolAddrHash[:]) + r.NoError(err) + r.Equal(RollDPoSProtocol, rolldpos.String()) +}