Decode uniswap ETH to token swaps#1864
Draft
jadzeidan wants to merge 1 commit into
Draft
Conversation
Add decoding of Ethereum mainnet to ERC20 token swaps for Uniswap V2/V3 so amounts are verifiable on device. Note, decoding of ERC20 token amounts limited to the ones listed in the firmware.
Contributor
Author
|
@Tomasvrba have a look if you would like to test :) Note, only native ETH to ERC20 tokens (listed in firmware) are decoded. Did not manage to get ERC20 to ETH or ERC20 to ERC20 swaps to work (seems to be limited by the protocol since token “Swap from / Swap to min” amounts are not in the call data?) |
Collaborator
|
will take a look |
Collaborator
|
Please report how many bytes the firmware binary is increased by this PR. |
Collaborator
|
haven't tested yet, but code should definitely be moved out of ethereum/sign.rs, probably should have a separate file for each contract we would add for clear signing or the eth signing file will explode |
Collaborator
|
Can scrap this PR in favor of adopting ERC-7730 for clear signing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add decoding of Ethereum mainnet to ERC20 token swaps for
Uniswap V2/V3 so amounts are verifiable on device.
Note, decoding of ERC20 token amounts limited the
ones listed in the firmware.