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

refactor:[SMR-2725] util functions #1738

Merged
merged 28 commits into from
May 8, 2024
Merged

Conversation

Benjimmutable
Copy link
Contributor

@Benjimmutable Benjimmutable commented May 7, 2024

Summary

Move util functions for fetching particular bridge-related addresses into a separate file
Also remove some duplicate code by splitting it out into a new function.

Detail and impact of the change

Added

  • getAddresses function for reading from a Record from network to address.

Changed

  • In the following functions, use the new getAddresses:
    • getChildETH
    • getRootIMX
    • getChildAdaptor
    • getRootAdaptor
    • getChildchain
    • getAxelarGateway
    • getAxelarEndpoint
    • getTenderlyEndpoint
  • Move these functions into lib/utils.ts

@Benjimmutable Benjimmutable changed the base branch from main to smr-2718-create-validateGetFee May 7, 2024 00:17
@Benjimmutable Benjimmutable changed the title Smr 2725 util functions refactor:[SMR-2725] util functions May 7, 2024
Comment on lines +65 to +68

export const exportedForTesting = {
getAddresses,
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what we think about the export and test pattern here but LMK opinions

@Benjimmutable Benjimmutable marked this pull request as ready for review May 7, 2024 03:48
@Benjimmutable Benjimmutable requested a review from a team as a code owner May 7, 2024 03:48
Base automatically changed from smr-2718-create-validateGetFee to main May 7, 2024 04:25
@Benjimmutable Benjimmutable changed the base branch from main to smr-2722-calculate-gas-fee-moved May 7, 2024 04:54
@Benjimmutable Benjimmutable changed the base branch from smr-2722-calculate-gas-fee-moved to smr-2719-tenderlysimulation-type May 7, 2024 04:55
ermyas
ermyas previously approved these changes May 7, 2024
Copy link
Contributor

@ermyas ermyas left a comment

Choose a reason for hiding this comment

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

Nice!

Base automatically changed from smr-2719-tenderlysimulation-type to main May 7, 2024 05:09
@Benjimmutable Benjimmutable dismissed ermyas’s stale review May 7, 2024 05:09

The base branch was changed.

@Benjimmutable Benjimmutable requested a review from ermyas May 7, 2024 06:00
ermyas
ermyas previously approved these changes May 7, 2024
@Benjimmutable Benjimmutable dismissed ermyas’s stale review May 7, 2024 06:06

The merge-base changed after approval.

@Benjimmutable Benjimmutable added this pull request to the merge queue May 8, 2024
Merged via the queue into main with commit 20c0e27 May 8, 2024
11 checks passed
@Benjimmutable Benjimmutable deleted the smr-2725-util-functions branch May 8, 2024 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants