imp(staking): change the validator address in the events from string type to address type #2053
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In #2030, you recommend use address instead of string for validator address in events. I think this is a good idea. Using address instead of string would make it easier for developers to track the corresponding validator, because use string type the recorded value would be keccak256(validatorAddress). Moreover, it would be difficult to decode events and determine which validator the hash corresponds to if string type is used. Therefore, I have updated the string type validator address in other events to address type.
Here is an example of a Delegate event before and after the update
Before Delegate event with validator address as string
keeack256("evmosvaloper1hajh6rhhkjqkwet6wqld3lgx8ur4y3khljfx82")
-->
"0xc30b39324ec8e945bd2d238ee3e5475a8108e9d0c37e1278c4b0ec30283fdacf"
Afte Delegate event with validator address as address type
bech32 "evmosvaloper1hajh6rhhkjqkwet6wqld3lgx8ur4y3khljfx82"
<-->
hex "0xbf657D0ef7b48167657A703Ed8Fd063F075246D7"