Skip to content

feat: add support for v3.1 in validators#265

Merged
spsjvc merged 14 commits intomainfrom
feat-fix-validators-batch-posters
Apr 30, 2025
Merged

feat: add support for v3.1 in validators#265
spsjvc merged 14 commits intomainfrom
feat-fix-validators-batch-posters

Conversation

@spsjvc
Copy link
Member

@spsjvc spsjvc commented Apr 25, 2025

Closes FS-1235.

@spsjvc spsjvc changed the title feat: add support for v3.1 in validators and batch posters getters feat: add support for v3.1 in validators and batch posters Apr 25, 2025
@fionnachan fionnachan self-assigned this Apr 28, 2025
@fionnachan fionnachan changed the title feat: add support for v3.1 in validators and batch posters feat: add support for v3.1 in validators Apr 29, 2025

const setValidatorABI = getAbiItem({ abi: rollupABI, name: 'setValidator' });
const setValidatorFunctionSelector = getFunctionSelector(setValidatorABI);
const setValidatorPreV3Dot1ABI = getAbiItem({ abi: rollupV2Dot1ABI, name: 'setValidator' });
Copy link
Member Author

Choose a reason for hiding this comment

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

doesn't change

Suggested change
const setValidatorPreV3Dot1ABI = getAbiItem({ abi: rollupV2Dot1ABI, name: 'setValidator' });
const setValidatorABI = getAbiItem({ abi: rollupV3Dot1ABI, name: 'setValidator' });

};
}

return await getValidatorsPreV3Dot1(publicClient, { rollup }, blockNumber);
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
return await getValidatorsPreV3Dot1(publicClient, { rollup }, blockNumber);
return getValidatorsPreV3Dot1(publicClient, { rollup }, blockNumber);

Comment on lines +235 to +241
const v3Dot1ValidatorsSetEvents = await getLogsWithBatching(publicClient, {
address: rollup,
event: validatorsSetEventAbi,
fromBlock: blockNumber,
});

const validatorsFromV3Dot1Events = v3Dot1ValidatorsSetEvents
Copy link
Member Author

Choose a reason for hiding this comment

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

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

@spsjvc spsjvc marked this pull request as ready for review April 30, 2025 13:02
@spsjvc spsjvc requested a review from fionnachan April 30, 2025 13:33
@spsjvc spsjvc merged commit 6a8dd89 into main Apr 30, 2025
6 checks passed
@spsjvc spsjvc deleted the feat-fix-validators-batch-posters branch April 30, 2025 13:33
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