Skip to content

Updates batch bridge transactions to also execute arbitrary calls #190

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

Open
wants to merge 3 commits into
base: flip-318
Choose a base branch
from

Conversation

joshuahannan
Copy link
Member

@joshuahannan joshuahannan commented May 7, 2025

Works towards onflow/fcl-js#2340 and onflow/fcl-js#2339

Description

Updates the batch bridge to EVM transaction to all take an arbitrary amount of calldata so that the caller can do any EVM calls in the same transaction.

I wanted to just update the existing transaction so that we don't have to copy code and to make it a little easier to illustrate to developers the ability to do many things in one atomic transaction.


For contributor use:

  • Targeted PR against flip-318 branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Re-reviewed Files changed in the Github PR explorer

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.46%. Comparing base (31a091f) to head (597473b).

Additional details and impacted files
@@            Coverage Diff            @@
##           flip-318     #190   +/-   ##
=========================================
  Coverage     81.46%   81.46%           
=========================================
  Files            24       24           
  Lines          1597     1597           
=========================================
  Hits           1301     1301           
  Misses          296      296           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshuahannan
Copy link
Member Author

joshuahannan commented May 7, 2025

@sisyphusSmiling For now I just updated the existing transaction so we don't have to copy code and to make it a little easier to illustrate to developers the ability to do many things in one atomic transaction, but if you think that it should be a separate transaction, I'm totally fine with that and can make a new one.

Also how, do you feel about me making the same changes to the fungible token transaction?

Copy link

@jribbink jribbink left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you! This will work perfectly for my purposes

@joshuahannan joshuahannan changed the title Updates batch bridge transaction to also execute arbitrary calls Updates batch bridge transactions to also execute arbitrary calls May 13, 2025
@joshuahannan joshuahannan requested a review from jribbink May 13, 2025 20:14
@joshuahannan
Copy link
Member Author

@jribbink @sisyphusSmiling I added a transaction for fungible tokens also and made sure each transaction was new instead of modifying the existing transaction. Let me know if you need any other changes!

Copy link
Contributor

@sisyphusSmiling sisyphusSmiling left a comment

Choose a reason for hiding this comment

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

I can see the UFix64 param value being an issue for programmatic value transfer due to the relative restriction on decimal precision. IMO the param type should be updated but might require changes to the types in the upstream hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants