-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: add optional call to ERC20Handler and NativeTokenHandler execute #266
Merged
Conversation
This file contains 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
lastperson
changed the title
Add optional call to ERC20Handler execute
feat: add optional call to ERC20Handler execute
Aug 21, 2024
Closed
3 tasks
lastperson
changed the title
feat: add optional call to ERC20Handler execute
feat: add optional call to ERC20Handler and NativeTokenHandler execute
Aug 27, 2024
3 tasks
MakMuftic
requested changes
Sep 6, 2024
mpetrun5
requested changes
Sep 6, 2024
sadiq1971
reviewed
Sep 6, 2024
sadiq1971
reviewed
Sep 9, 2024
Closed
3 tasks
saadahmsiddiqui
added a commit
to sygmaprotocol/sygma-sdk
that referenced
this pull request
Sep 10, 2024
…act Call (#504) ## Implementation details With the introduction of the new `ERC20Handler`, the SDK needs to be updated to handle the enhanced functionality that supports both ERC20 token transfers and optional contract calls in a single transaction. [New ERC20Handler PR](sygmaprotocol/sygma-solidity#266) - Modify the SDK to work with the updated `ERC20Handler` by allowing it to handle additional data that encodes contract calls alongside ERC20 transfers. - Maintain compatibility with existing handlers and workflows that do not involve contract calls, ensuring that the SDK remains functional for all users. ## Closes: #493 ## Testing details - **Unit Tests**: Develop unit tests that cover scenarios where both ERC20 transfers and contract calls are involved. - **Compatibility Tests**: Ensure that existing functionality remains unaffected by the changes. - **Error Handling**: Test how the SDK handles invalid or failed contract calls within the transaction flow. ## Acceptance Criteria - [ ] The SDK supports interactions with the new `ERC20Handler`, allowing for both ERC20 transfers and optional contract calls within the same transaction. - [ ] The SDK maintains backward compatibility and continues to function as expected with existing handlers. - [ ] All new functionality is covered by tests, ensuring reliable and consistent behavior.
mpetrun5
approved these changes
Sep 10, 2024
The code LGTM. |
Merged
3 tasks
Co-authored-by: Oleksii Matiiasevych <[email protected]>
@mpetrun5 tests added. |
MakMuftic
approved these changes
Sep 20, 2024
mpetrun5
approved these changes
Sep 20, 2024
saadahmsiddiqui
added a commit
to sygmaprotocol/sygma-sdk
that referenced
this pull request
Sep 26, 2024
#545) # Implementation details With [PR#266](sygmaprotocol/sygma-solidity#266), we introduced the ability to define contract calls together with native deposit. As SDK didn't integrate the initial implementation of native handlers, it needs to be expanded so it can be used to create: Deposit of native currency (tokens) Deposit of native currency (tokens) + contract call definition The Native flow differs slightly from regular ERC20/721/1155, as the deposit transaction should not land on Bridge.sol but on NativeAdapter.sol contract. We have already expanded the testnet [shared configuration to have this as a new property of the domain](https://github.com/sygmaprotocol/sygma-shared-configuration/blob/main/testnet/shared-config-test.json#L10) - nativeTokenAdapter. ## Closes: #521 # Testing details Unit Tests: Develop unit tests that cover scenarios where both Native transfers and contract calls are involved. Error Handling: Test how the SDK handles invalid or failed contract calls within the transaction flow. # Acceptance Criteria - [ ] The SDK supports interactions with the new NativeAdapter->NativeHandler, allowing for both Native transfers and optional contract calls within the same transaction. - [ ] The SDK maintains backward compatibility and continues to function as expected with existing handlers. - [ ] All new functionality is covered by tests, ensuring reliable and consistent behavior.
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.
Description
This change introduces a backward compatible extension to ERC20Handler that allows including optional message to be called on the token recipient address.
In general it is expected that the recipient of such call would be an intermediate proxy (like the one currently developed for Across) which will unpack the message into an array of actions (similar to how LiFi executor does).
Related Issue Or Context
Closes: #264 #265
How Has This Been Tested? Testing details.
Tests are WIP.
Types of changes
Checklist: