Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate refactoring use of DataDecodedParamHelper #1547

Open
iamacook opened this issue May 15, 2024 · 0 comments
Open

Investigate refactoring use of DataDecodedParamHelper #1547

iamacook opened this issue May 15, 2024 · 0 comments

Comments

@iamacook
Copy link
Member

iamacook commented May 15, 2024

Description

When mapping ERC-20/721 transfers, we extract the values of the sender, recipient, etc. from the decodedData of a given transaction.

Each transaction that transfers tokens also has a transfers array that seemingly contains all the information of the above and using that would simply a lot of the above.

Requirements

As the mapping is only of ERC-20/721 token, the transaction types are that of MultisigTransaction | ModuleTransaction:

  1. Investigate if both transaction types always return transfers array.
  2. If so, add transfers array to validation schemas.
  3. Replace DataDecodedParamHelper['getFromParam' | 'getToParam' | 'getValueParam'] with transfers value(s).
  4. Update associated tests.

Additional information

This transfers array does not exist in the MultisigTransaction | ModuleTransaction types despite being returned by the Transaction Service. (As the above was implemented early in the project, it may not have existed then.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant