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

chore(evm): refactor evm utils #322

Merged
merged 13 commits into from
Jul 27, 2024
Merged

chore(evm): refactor evm utils #322

merged 13 commits into from
Jul 27, 2024

Conversation

npty
Copy link
Member

@npty npty commented Jul 26, 2024

Description

https://axelarnetwork.atlassian.net/browse/AXE-3980

This PR extracts non-EVM related utility functions from evm/utils.js into common/utils.js.

Changes

  • Moved generic utilities to common/utils.js
  • Re-exported functions in evm/*-utils.js files
  • Maintained existing import paths in evm scripts to minimize code changes

This approach centralizes generic utilities while avoiding manual updates to import statements across the codebase, reducing potential errors.

Todo

Here're the list of non-evm utility functions (let me know if there're any generic functions missing in this list):

  • loadConfig,
  • saveConfig,
  • writeJSON,
  • printInfo,
  • printWarn,
  • printError,
  • printLog,
  • copyObject
  • httpGet
  • httpPost
  • isString
  • isNonEmptyString
  • isStringArray
  • isNumber
  • isValidNumber
  • isValidDecimal
  • isNumberArray
  • isNonEmptyStringArray
  • parseArgs
  • sleep
  • isValidTimeFormat
  • dateToEta
  • etaToDate
  • getCurrentTimeInSeconds
  • prompt
  • findProjectRoot
  • toBigNumberString
  • timeout

@npty npty self-assigned this Jul 26, 2024
@npty npty marked this pull request as ready for review July 26, 2024 10:17
@npty npty requested review from a team as code owners July 26, 2024 10:17
@milapsheth milapsheth merged commit 14654c3 into main Jul 27, 2024
4 checks passed
@milapsheth milapsheth deleted the chore/refactor-evm-utils branch July 27, 2024 22:11
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.

4 participants