-
Notifications
You must be signed in to change notification settings - Fork 5
Upgrade contracts3 update #171
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
Conversation
@@ -73,6 +73,10 @@ export const decodeUpdateParameters = (updateParameters: string): DecodedUpdateP | |||
['uint256', 'int224', 'uint256'], | |||
updateParameters | |||
); | |||
// 2 characters for the '0x' preamble + 3 parameters, 32 * 2 hexadecimals for 32 bytes each | |||
if (updateParameters.length !== 2 + 3 * (32 * 2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user (AirseekerRegistry owner) can specify updateParameters
of arbitrary length, which is why it is important to check this imo. I check it after the decoding attempt because the error message for it will probably be more descriptive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. We should definitely do this.
* Update deterministic address * Expose data feed ID for local test configuration * Update contract function naming in local test configuration * Improve readability of comment * Check against unexpected update parameters format
* Update to AirseekerRegistry contract * Properly rename dAPIs to data feeds * Finish contract migration * Fix e2e tests * Handle the case when the data feed is not registered and log warning * Fix wrong function parameter name, edit fixtures * Finish renaming * Rename diagram * Upgrade contracts3 update (#171) * Update deterministic address * Expose data feed ID for local test configuration * Update contract function naming in local test configuration * Improve readability of comment * Check against unexpected update parameters format * Bump api3dao/dapi-management dependency commit * Update tests * Update tests a bit more * Update decode update parameters in local-test folder --------- Co-authored-by: Burak Benligiray <[email protected]>
I made two changes to AirseekerRegistry:
activeDataFeed()
also returndataFeedId
. The current airseeker-v2 implementation derives the data feed ID fromdataFeedDetails
, which is fine to keep as is.