chore(sequencer): refactor address base prefix checks #2015
+466
−629
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.
Summary
Pulls address base prefix checks for each action into a separate trait.
Background
It's easy to miss checks which we should be performing when writing a new action's
check_and_execute
trait method. This change pulls the address base prefix checks for each action into a separate trait so that they can be automatically performed for every action upon execution as well as tested in a more streamlined way.Changes
ActionHandler
impls.address_check
toaddress
, with traitsAddresses
andAddressCheck: Addresses
. Added impls of these for all existing actions.AddressCheck::check_addresses()
inaction_handler::transaction::check_execute_and_pay_fees()
.Testing
check_addresses()
is called underexecute_transaction()
.Changelogs
No updates required.
Related Issues
closes #2014