feat: add support for v3.1 in validators#265
Merged
Conversation
spsjvc
commented
Apr 29, 2025
src/getValidators.ts
Outdated
|
|
||
| const setValidatorABI = getAbiItem({ abi: rollupABI, name: 'setValidator' }); | ||
| const setValidatorFunctionSelector = getFunctionSelector(setValidatorABI); | ||
| const setValidatorPreV3Dot1ABI = getAbiItem({ abi: rollupV2Dot1ABI, name: 'setValidator' }); |
Member
Author
There was a problem hiding this comment.
doesn't change
Suggested change
| const setValidatorPreV3Dot1ABI = getAbiItem({ abi: rollupV2Dot1ABI, name: 'setValidator' }); | |
| const setValidatorABI = getAbiItem({ abi: rollupV3Dot1ABI, name: 'setValidator' }); |
spsjvc
commented
Apr 30, 2025
src/getValidators.ts
Outdated
| }; | ||
| } | ||
|
|
||
| return await getValidatorsPreV3Dot1(publicClient, { rollup }, blockNumber); |
Member
Author
There was a problem hiding this comment.
Suggested change
| return await getValidatorsPreV3Dot1(publicClient, { rollup }, blockNumber); | |
| return getValidatorsPreV3Dot1(publicClient, { rollup }, blockNumber); |
src/getValidators.ts
Outdated
Comment on lines
+235
to
+241
| const v3Dot1ValidatorsSetEvents = await getLogsWithBatching(publicClient, { | ||
| address: rollup, | ||
| event: validatorsSetEventAbi, | ||
| fromBlock: blockNumber, | ||
| }); | ||
|
|
||
| const validatorsFromV3Dot1Events = v3Dot1ValidatorsSetEvents |
Member
Author
There was a problem hiding this comment.
don't think we need to mention the version here since this is gonna be the standard going forward
Suggested change
| const v3Dot1ValidatorsSetEvents = await getLogsWithBatching(publicClient, { | |
| address: rollup, | |
| event: validatorsSetEventAbi, | |
| fromBlock: blockNumber, | |
| }); | |
| const validatorsFromV3Dot1Events = v3Dot1ValidatorsSetEvents | |
| const validatorsSetEvents = await getLogsWithBatching(publicClient, { | |
| address: rollup, | |
| event: validatorsSetEventAbi, | |
| fromBlock: blockNumber, | |
| }); | |
| const validatorsFromEvents = validatorsSetEvents |
fionnachan
approved these changes
Apr 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes FS-1235.