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

Feature: Capture token transfer taxes. #125

Merged
merged 7 commits into from
Sep 25, 2023

Conversation

tyler-smith
Copy link

@tyler-smith tyler-smith commented Sep 23, 2023

  • Defer CallFrame property serialization until marshaling. This allows us to utilize this data between instantiation and serialization.
  • Split DecodeCallFrame into DecodeCallFrameStart, called before a call is executed, and DecodeCallFrameEnd, after a call is executed.
  • In DecodeCallFrameStart, we capture the balances of transfer recipients and contracts as well as the decoded transfer call which tells us the expected change.
  • In DecodeCallFrameEnd we check if the recipient balance changed as we expected. If does we do nothing. If it's more than we expect we do nothing. If it's less than we expect then we check if the contract balance increased and if it did we add a Transfer from the sender to the contract. If there is still an amount left over, we add a Transfer to the zero address.

@tyler-smith tyler-smith changed the title Feature: Account for token taxes. Feature: Capture token transfer taxes. Sep 23, 2023
@tyler-smith tyler-smith merged commit 82c99ca into mempool-feed-stage Sep 25, 2023
1 check passed
@tyler-smith tyler-smith deleted the TS_token_taxes branch October 9, 2023 02:26
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

Successfully merging this pull request may close these issues.

1 participant