We could make use of the DelegateScenario enum to parameterize and thus combine create_metadata_delegate_v1 and create_holder_delegate_v1, and then simplify the optional role arguments for create_pda_account into one.
Similarly we could combine revoke_metadata_delegate_v1 and revoke_holder_delegate_v1, as well as close_metadata_delegate_record and close_holder_delegate_record.
The revoke changes refactor a bit to avoid some logic duplication.
Idea
DelegateScenario
enum to parameterize and thus combinecreate_metadata_delegate_v1
andcreate_holder_delegate_v1
, and then simplify the optionalrole
arguments forcreate_pda_account
into one.revoke_metadata_delegate_v1
andrevoke_holder_delegate_v1
, as well asclose_metadata_delegate_record
andclose_holder_delegate_record
.revoke
changes refactor a bit to avoid some logic duplication.