Skip to content

Update adcs.ts#14

Open
An-tol wants to merge 1 commit intoRivalz-ai:mainfrom
An-tol:patch-1
Open

Update adcs.ts#14
An-tol wants to merge 1 commit intoRivalz-ai:mainfrom
An-tol:patch-1

Conversation

@An-tol
Copy link

@An-tol An-tol commented Jan 28, 2025

I optimized the code to make it more readable, reusable, and structured:

Added a check for the absence of ADCSCoordinator before any contract-related action. Created a helper function processOracles to handle registering and deregistering oracles to avoid code duplication. Removed redundant checks by moving them to the initialization stage or the beginning of the loop. Added logical comments to better understand where each part of the process occurs.

I optimized the code to make it more readable, reusable, and structured:

Added a check for the absence of ADCSCoordinator before any contract-related action.
Created a helper function processOracles to handle registering and deregistering oracles to avoid code duplication.
Removed redundant checks by moving them to the initialization stage or the beginning of the loop.
Added logical comments to better understand where each part of the process occurs.
@KelvinThai KelvinThai requested a review from doclt March 21, 2025 12:02
Copy link
Member

@doclt doclt left a comment

Choose a reason for hiding this comment

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

Thank for contributing with us,

Your code look good, but it will be better when you format code and set the type for variable(we are using prettier and eslint). I just push a branch to review your PR. Please take a look

Review PR 14

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.

2 participants