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

Fix Debug implementation of InteractionData #460

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

MartinquaXD
Copy link
Contributor

@MartinquaXD MartinquaXD commented Aug 18, 2022

The Debug implementation of InteractionData was not doing what it was supposed to. It was clearly intended to print the call_data as 0x123.... although Kibana shows it currently being logged as [1, 2, 3, ...] instead.

To enable the #[derivative(...)] override macros on the members of the struct the struct also has to use the #[derivative(TRAIT_TO_OVERRIDE)] macro as a whole.

Test Plan

CI
verified the fixed Debug output with a temporary local test:

InteractionData { target: 0xffffffffffffffffffffffffffffffffffffffff, value: 0, call_data: 0x01020304, inputs: [TokenAmount { amount: 9999, token: 0x0101010101010101010101010101010101010101 }], outputs: [TokenAmount { amount: 2000, token: 0x0202020202020202020202020202020202020202 }, TokenAmount { amount: 3000, token: 0x0303030303030303030303030303030303030303 }], exec_plan: Some(Internal) }

@MartinquaXD MartinquaXD requested a review from a team as a code owner August 18, 2022 09:59
@MartinquaXD MartinquaXD merged commit 9143a0a into main Aug 18, 2022
@MartinquaXD MartinquaXD deleted the fix-debug-print-of-interaction-data branch August 18, 2022 10:04
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants