Skip to content

fix(sui): expose a function to infer roles from action - #829

Merged
FelixFan1992 merged 1 commit into
mainfrom
ccip-13068
Aug 18, 2026
Merged

fix(sui): expose a function to infer roles from action#829
FelixFan1992 merged 1 commit into
mainfrom
ccip-13068

Conversation

@FelixFan1992

@FelixFan1992 FelixFan1992 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

CCIP-13068

@FelixFan1992 FelixFan1992 changed the title CCIP-13068: expose a function to infer roles from action chore: CCIP-13068: expose a function to infer roles from action Aug 17, 2026
@FelixFan1992
FelixFan1992 marked this pull request as ready for review August 17, 2026 22:45
@FelixFan1992
FelixFan1992 requested a review from a team as a code owner August 17, 2026 22:45
Copilot AI lite review requested due to automatic review settings August 17, 2026 22:45
@cl-sonarqube-production

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an exported helper in the Sui SDK to infer the appropriate TimelockRole from a types.TimelockAction, aligning Sui with existing chain SDK patterns (e.g., Aptos/Canton) and making role inference reusable by callers.

Changes:

  • Added SuiRoleFromAction(action types.TimelockAction) (TimelockRole, error) to map timelock actions to Sui TimelockRoles.
  • Added a table-driven unit test covering the supported actions and the unknown-action error path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/sui/sui_helpers.go Exposes SuiRoleFromAction for mapping TimelockActionTimelockRole.
sdk/sui/chain_metadata_test.go Adds test coverage for SuiRoleFromAction across known and unknown actions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sdk/sui/sui_helpers.go
@FelixFan1992
FelixFan1992 enabled auto-merge (squash) August 18, 2026 03:32
@gustavogama-cll gustavogama-cll changed the title chore: CCIP-13068: expose a function to infer roles from action fix(sui): CCIP-13068: expose a function to infer roles from action Aug 18, 2026
@gustavogama-cll gustavogama-cll changed the title fix(sui): CCIP-13068: expose a function to infer roles from action fix(sui): expose a function to infer roles from action Aug 18, 2026
@FelixFan1992
FelixFan1992 merged commit 33bdc81 into main Aug 18, 2026
24 of 25 checks passed
@FelixFan1992
FelixFan1992 deleted the ccip-13068 branch August 18, 2026 03:35
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.

3 participants