Refactor: Spoke => Spoke, SpokeHandler and SpokeRegistry#778
Closed
Refactor: Spoke => Spoke, SpokeHandler and SpokeRegistry#778
Conversation
2e05280 to
4399d27
Compare
lemunozm
commented
Feb 16, 2026
| using RequestCallbackMessageLib for *; | ||
|
|
||
| ISpoke public spoke; | ||
| ISpokeRegistry public spokeRegistry; |
Contributor
Author
There was a problem hiding this comment.
We can also do spoke.spokeRegistry() to remove this extra dependency, but should save more gas if we have both
lemunozm
commented
Apr 8, 2026
|
|
||
| /// @inheritdoc IBalanceSheet | ||
| function file(bytes32 what, address data) external auth { | ||
| if (what == "spoke") spoke = ISpoke(data); |
Contributor
Author
There was a problem hiding this comment.
Note for myself: needs to be called "spoke" to have the same bytecode as v3.1.0
| /// @inheritdoc IVaultRegistry | ||
| function file(bytes32 what, address data) external auth { | ||
| if (what == "spoke") spoke = ISpoke(data); | ||
| if (what == "spokeRegistry") spokeRegistry = ISpokeRegistry(data); |
Contributor
Author
There was a problem hiding this comment.
Not applies if we remove VaultRegistry
| /// @inheritdoc IMerkleProofManagerFactory | ||
| function newManager(PoolId poolId) external returns (IMerkleProofManager) { | ||
| require(balanceSheet.spoke().isPoolActive(poolId), InvalidPoolId()); | ||
| require(balanceSheet.spokeRegistry().isPoolActive(poolId), InvalidPoolId()); |
Contributor
Author
There was a problem hiding this comment.
Should be called spoke() but maybe not need it as this contract will be also deprecated
| function spoke() external view returns (ISpoke); | ||
| /// @notice Returns the spoke registry contract | ||
| /// @return The spoke registry contract instance | ||
| function spokeRegistry() external view returns (ISpokeRegistry); |
Contributor
Author
There was a problem hiding this comment.
Should be called spoke() to avoid any changes here
|
Coverage after merging ref/spoke-refactor into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
Author
|
Closed in favor to an internal mirror: https://github.com/centrifuge/protocol-internal/pull/174 |
Contributor
Author
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.
Description
Spoke diagram
A future vaults implementation will use mostly both:
Spoke: to perform requestsSpokeRegistrycan be retriever fromSpokeVaultRegistryto look for the registered vaultIdeally processing a message should not call directly to
VaultRegistry, instead should call toSpokeHandler, which would callVaultRegistry. I mean bothSpokeRegistryand Vault registry should be at the same level handled by SpokeHandler. I think I can have this without migratingVaultRegistryjust by copingVaultRegisty.updateVault()method intoSpokeHandler. WDYT cc @hieronx?## Messaging diagram