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

feat(evm): Expanding SDK to support Native transfer with optional con… #545

Merged
merged 10 commits into from
Sep 26, 2024

Conversation

saadahmsiddiqui
Copy link
Member

@saadahmsiddiqui saadahmsiddiqui commented Sep 19, 2024

Implementation details

With PR#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 - 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.

@saadahmsiddiqui saadahmsiddiqui requested review from Lykhoyda and wainola and removed request for Lykhoyda September 24, 2024 15:13
@LyonSsS
Copy link

LyonSsS commented Sep 25, 2024

Tested by QA on testnet - works as expected
Tests executed here at "Implement fungible EVM transfers for NATIVE"
https://docs.google.com/spreadsheets/d/13SRvdjjrnSIjhD26eFG3xV0pcGsBtq9SV1Dc_lUkACM/edit?gid=2049882071#gid=2049882071

LyonSsS
LyonSsS previously approved these changes Sep 25, 2024
Copy link

@LyonSsS LyonSsS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA tested and passed on testnet

wainola
wainola previously approved these changes Sep 25, 2024
Copy link

@LyonSsS LyonSsS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested on this last commit - regular Native transfer and Native + contract call have passed

@saadahmsiddiqui saadahmsiddiqui merged commit eb57424 into main Sep 26, 2024
3 checks passed
@saadahmsiddiqui saadahmsiddiqui deleted the saadjhk/native-transfer-contract-call branch September 26, 2024 13:26
saadahmsiddiqui pushed a commit that referenced this pull request Sep 26, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.3.0](core-v1.2.3...core-v1.3.0)
(2024-09-26)


### Features

* **evm:** Expanding SDK to support Native transfer with optional con…
([#545](#545))
([eb57424](eb57424))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
saadahmsiddiqui pushed a commit that referenced this pull request Sep 26, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.4.0](evm-v1.3.3...evm-v1.4.0)
(2024-09-26)


### Features

* **evm:** Expanding SDK to support Native transfer with optional con…
([#545](#545))
([eb57424](eb57424))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Expand SDK to support Native transfer with optional contract call
3 participants