Skip to content

Conversation

@vgorkavenko
Copy link
Contributor

No description provided.

@vgorkavenko vgorkavenko force-pushed the feat/set-csm-vetted-gate-tree branch from d0245a4 to 22036b7 Compare June 3, 2025 14:16
@vgorkavenko vgorkavenko changed the title [WIP] feat: factory for setting tree in CSM's VettedGate feat: factory for setting tree in CSM's VettedGate Jun 4, 2025
@vgorkavenko vgorkavenko marked this pull request as ready for review June 4, 2025 09:06
@vgorkavenko vgorkavenko requested a review from a team as a code owner June 4, 2025 09:06
@vgorkavenko vgorkavenko requested review from dgusakov and skhomuti June 4, 2025 09:07
@vgorkavenko vgorkavenko requested a review from dgusakov June 4, 2025 09:25
@vgorkavenko vgorkavenko requested review from Psirex and bulbozaur June 5, 2025 07:57
string memory treeCid
) private pure {
require(treeRoot != bytes32(0), ERROR_TREE_ROOT);
require(bytes(treeCid).length > 0, ERROR_TREE_CID);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@vgorkavenko vgorkavenko requested a review from Psirex June 13, 2025 09:13
Copy link
Contributor

@Psirex Psirex left a comment

Choose a reason for hiding this comment

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

The new factory contract looks good!

I would recommend adding an integration or scenario test (using mock for VettedGate is fine while the new contracts are not yet deployed). This would serve as a usage example for the factory and help demonstrate the expected permissions setup.

raise ValueError("Factory name cannot be empty")
if not isinstance(factory_name, str):
raise TypeError("Factory name must be a string")
if len(factory_name) > 32:
Copy link
Contributor

Choose a reason for hiding this comment

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

With this constraint, a factory named IdentifiedCommunityStakerSetTreeParams cannot be deployed, as its name exceeds the 32-character limit

Copy link
Contributor

Choose a reason for hiding this comment

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

We can use ICSSetTreeParams

Copy link
Contributor

Choose a reason for hiding this comment

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

That’s OK, but the name "IdentifiedCommunityStakerSetTreeParams" was used in the test and mentioned in a comment in the contract. If the deploy script doesn’t actually allow creating a factory with that name, it can be a bit misleading.

Copy link
Contributor Author

@vgorkavenko vgorkavenko Jun 16, 2025

Choose a reason for hiding this comment

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

We will remove the restriction from the deploy script

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Psirex Added scenario test and removed the restriction

@vgorkavenko vgorkavenko requested a review from Psirex June 16, 2025 11:19
Copy link
Contributor

@Psirex Psirex left a comment

Choose a reason for hiding this comment

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

LGTM👍🏻

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.

6 participants