Skip to content

refactor: Update SUI client#774

Merged
faisal-chainlink merged 16 commits into
mainfrom
feat/sui-grpc-migration
Jun 11, 2026
Merged

refactor: Update SUI client#774
faisal-chainlink merged 16 commits into
mainfrom
feat/sui-grpc-migration

Conversation

@faisal-chainlink

@faisal-chainlink faisal-chainlink commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

This PR includes the following changes:

  1. Updates the Sui SDK references to correspond to the gRPC migration changes in chainlink-sui. This primarily includes dropping the ISuiAPI reference (old version of the Sui SDK) in favor of using a client interface exported by chainlink-sui/relayer/client.
  2. Update the mocked interface for Sui in this repo.
  3. General lint and deps version bumps.

@faisal-chainlink faisal-chainlink changed the title Update SUI client chore(main): Update SUI client Jun 8, 2026
@faisal-chainlink faisal-chainlink changed the title chore(main): Update SUI client refactor: Update SUI client Jun 8, 2026
@faisal-chainlink faisal-chainlink marked this pull request as ready for review June 8, 2026 16:31
@faisal-chainlink faisal-chainlink requested a review from a team as a code owner June 8, 2026 16:31
Copilot AI review requested due to automatic review settings June 8, 2026 16:31
@faisal-chainlink

Copy link
Copy Markdown
Contributor Author

@JohnChangUK @RodrigoAD pinging because you worked on MCMS for Sui. There's a test that currently fails due to a fallback decode (object name --> decodes to address). Is that test / behavior necessary? The E2E tests are passing here.

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 refactors the Sui integration to use the chainlink-sui/relayer/client bindings (gRPC/PTB-backed) instead of the block-vision/sui-go-sdk/sui ISuiAPI client, and updates unit/e2e tests plus generated mocks accordingly.

Changes:

  • Replace sui.ISuiAPI with cslclient.BindingsClient across Sui inspector/executor/configurer/timelock components and chainwrappers.
  • Add a Sui helper to build a gRPC-backed bindings client from a node URL; update e2e setup to use it.
  • Regenerate/update mockery mocks and config to target the new Sui client interfaces.

Reviewed changes

Copilot reviewed 30 out of 53 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
taskfiles/generate/Taskfile.yml Fix/normalize mock generation task command indentation.
sdk/ton/mocks/wallet.go Mock import reordering (generated/formatting).
sdk/ton/mocks/api.go Mock import reordering (generated/formatting).
sdk/sui/timelock_inspector.go Switch TimelockInspector client type to BindingsClient.
sdk/sui/timelock_inspector_test.go Update tests to use NewBindingsClient mock.
sdk/sui/timelock_executor.go Switch TimelockExecutor client + ExecutePTB signature to BindingsClient.
sdk/sui/timelock_executor_test.go Update tests to use NewBindingsClient mock and new ExecutePTB signature.
sdk/sui/mocks/sui/suiptbclient.go Add generated mock for SuiPTBClient.
sdk/sui/mocks/sui/bindingsclient.go Add generated mock for BindingsClient.
sdk/sui/mocks/mcmsdeployer/imcmsdeployer.go Mock import reordering (generated/formatting).
sdk/sui/mocks/mcms/mcmsencoder.go Mock import reordering (generated/formatting).
sdk/sui/mocks/mcms/imcmsdevinspect.go Mock import reordering (generated/formatting).
sdk/sui/mocks/mcms/imcms.go Mock import reordering (generated/formatting).
sdk/sui/mocks/feequoter/feequoterencoder.go Mock import reordering (generated/formatting).
sdk/sui/mocks/bindutils/iboundcontract.go Mock import reordering (generated/formatting).
sdk/sui/inspector.go Switch Inspector client type to BindingsClient.
sdk/sui/inspector_test.go Update tests to use NewBindingsClient mock.
sdk/sui/executor.go Switch Executor client type + ExecutePTB signature to BindingsClient.
sdk/sui/executor_test.go Update tests to use NewBindingsClient mock and new ExecutePTB signature.
sdk/sui/executing_callback.go Switch executing callback params to use BindingsClient.
sdk/sui/executing_callback_test.go Update tests for BindingsClient and updated function types.
sdk/sui/configurer.go Switch Configurer client type to BindingsClient.
sdk/sui/configurer_test.go Update tests to use NewBindingsClient mock.
sdk/sui/client_helper.go Add helper to create a gRPC-backed BindingsClient from an RPC URL.
sdk/solana/mocks/jsonrpcclient.go Mock import formatting cleanup.
sdk/mocks/timelock_executor.go Mock import formatting cleanup.
sdk/mocks/timelock_converter.go Mock import formatting cleanup.
sdk/mocks/timelock_configurer.go Add generated mock for TimelockConfigurer.
sdk/mocks/simulator.go Mock import formatting cleanup.
sdk/mocks/operation_id.go Add generated mock for OperationID.
sdk/mocks/inspector.go Mock import formatting cleanup.
sdk/mocks/executor.go Mock import formatting cleanup.
sdk/mocks/decoder.go Mock import reordering (generated/formatting).
sdk/evm/mocks/contract_deploy_backend.go Mock import reordering (generated/formatting).
sdk/evm/bindings/mocks/rbac_timelock_interface.go Mock import reordering (generated/formatting).
sdk/evm/bindings/mocks/many_chain_multi_sig_interface.go Mock import reordering (generated/formatting).
sdk/evm/bindings/mocks/call_proxy_interface.go Mock import reordering (generated/formatting).
sdk/aptos/mocks/mcms/mcms/mcms.go Mock import reordering (generated/formatting).
sdk/aptos/mocks/mcms/mcms/mcms_encoder.go Mock import reordering (generated/formatting).
sdk/aptos/mocks/mcms/mcms.go Mock import reordering (generated/formatting).
sdk/aptos/mocks/mcms/mcms_executor/mcms_executor.go Mock import reordering (generated/formatting).
sdk/aptos/mocks/aptos/transactionsigner.go Mock import formatting cleanup.
sdk/aptos/mocks/aptos/rpcclient.go Mock import reordering (generated/formatting).
go.mod Bump chainlink-sui, add chainlink-common direct dep, add go-cache (needed by generated mocks).
go.sum Update sums for new/updated dependencies.
e2e/tests/sui/common.go Switch e2e suite client type to BindingsClient.
e2e/tests/setup.go Create Sui gRPC bindings client via new helper; update types/logging accordingly.
chainwrappers/timelock_executors_test.go Update Sui timelock executor test to use NewBindingsClient mock.
chainwrappers/mocks/chain_accessor.go Update ChainAccessor mock to return BindingsClient for Sui and adjust imports.
chainwrappers/executors_test.go Update Sui executor test to use NewBindingsClient mock.
chainwrappers/chainaccessor.go Update ChainAccessor interface: SuiClient now returns BindingsClient.
.mockery.yaml Update mockery config to generate mocks for chainlink-sui/relayer/client interfaces.
Files not reviewed (20)
  • chainwrappers/mocks/chain_accessor.go: Language not supported
  • sdk/aptos/mocks/aptos/rpcclient.go: Language not supported
  • sdk/aptos/mocks/aptos/transactionsigner.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms_encoder.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms_executor/mcms_executor.go: Language not supported
  • sdk/evm/bindings/mocks/call_proxy_interface.go: Language not supported
  • sdk/evm/bindings/mocks/many_chain_multi_sig_interface.go: Language not supported
  • sdk/evm/bindings/mocks/rbac_timelock_interface.go: Language not supported
  • sdk/evm/mocks/contract_deploy_backend.go: Language not supported
  • sdk/mocks/decoder.go: Language not supported
  • sdk/mocks/executor.go: Language not supported
  • sdk/mocks/inspector.go: Language not supported
  • sdk/mocks/operation_id.go: Language not supported
  • sdk/mocks/simulator.go: Language not supported
  • sdk/mocks/timelock_configurer.go: Language not supported
  • sdk/mocks/timelock_converter.go: Language not supported
  • sdk/mocks/timelock_executor.go: Language not supported
  • sdk/solana/mocks/jsonrpcclient.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/sui/client_helper.go
@FelixFan1992

Copy link
Copy Markdown
Contributor

can you fix the failing tests?

Copilot AI review requested due to automatic review settings June 9, 2026 15:47

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

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

Files not reviewed (20)
  • chainwrappers/mocks/chain_accessor.go: Language not supported
  • sdk/aptos/mocks/aptos/rpcclient.go: Language not supported
  • sdk/aptos/mocks/aptos/transactionsigner.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms_encoder.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms_executor/mcms_executor.go: Language not supported
  • sdk/evm/bindings/mocks/call_proxy_interface.go: Language not supported
  • sdk/evm/bindings/mocks/many_chain_multi_sig_interface.go: Language not supported
  • sdk/evm/bindings/mocks/rbac_timelock_interface.go: Language not supported
  • sdk/evm/mocks/contract_deploy_backend.go: Language not supported
  • sdk/mocks/decoder.go: Language not supported
  • sdk/mocks/executor.go: Language not supported
  • sdk/mocks/inspector.go: Language not supported
  • sdk/mocks/operation_id.go: Language not supported
  • sdk/mocks/simulator.go: Language not supported
  • sdk/mocks/timelock_configurer.go: Language not supported
  • sdk/mocks/timelock_converter.go: Language not supported
  • sdk/mocks/timelock_executor.go: Language not supported
  • sdk/solana/mocks/jsonrpcclient.go: Language not supported

Comment thread sdk/sui/client_helper.go
Comment thread sdk/sui/client_helper.go
Copilot AI review requested due to automatic review settings June 9, 2026 16:12

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

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

Files not reviewed (20)
  • chainwrappers/mocks/chain_accessor.go: Language not supported
  • sdk/aptos/mocks/aptos/rpcclient.go: Language not supported
  • sdk/aptos/mocks/aptos/transactionsigner.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms_encoder.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms_executor/mcms_executor.go: Language not supported
  • sdk/evm/bindings/mocks/call_proxy_interface.go: Language not supported
  • sdk/evm/bindings/mocks/many_chain_multi_sig_interface.go: Language not supported
  • sdk/evm/bindings/mocks/rbac_timelock_interface.go: Language not supported
  • sdk/evm/mocks/contract_deploy_backend.go: Language not supported
  • sdk/mocks/decoder.go: Language not supported
  • sdk/mocks/executor.go: Language not supported
  • sdk/mocks/inspector.go: Language not supported
  • sdk/mocks/operation_id.go: Language not supported
  • sdk/mocks/simulator.go: Language not supported
  • sdk/mocks/timelock_configurer.go: Language not supported
  • sdk/mocks/timelock_converter.go: Language not supported
  • sdk/mocks/timelock_executor.go: Language not supported
  • sdk/solana/mocks/jsonrpcclient.go: Language not supported

Comment thread sdk/sui/client_helper.go
Comment thread sdk/sui/client_helper.go
@faisal-chainlink faisal-chainlink marked this pull request as draft June 9, 2026 16:23
@cl-sonarqube-production

cl-sonarqube-production Bot commented Jun 10, 2026

Copy link
Copy Markdown

@faisal-chainlink faisal-chainlink marked this pull request as ready for review June 10, 2026 21:07
Copilot AI review requested due to automatic review settings June 10, 2026 21:07

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

Copilot reviewed 31 out of 54 changed files in this pull request and generated no new comments.

Files not reviewed (20)
  • chainwrappers/mocks/chain_accessor.go: Language not supported
  • sdk/aptos/mocks/aptos/rpcclient.go: Language not supported
  • sdk/aptos/mocks/aptos/transactionsigner.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms/mcms_encoder.go: Language not supported
  • sdk/aptos/mocks/mcms/mcms_executor/mcms_executor.go: Language not supported
  • sdk/evm/bindings/mocks/call_proxy_interface.go: Language not supported
  • sdk/evm/bindings/mocks/many_chain_multi_sig_interface.go: Language not supported
  • sdk/evm/bindings/mocks/rbac_timelock_interface.go: Language not supported
  • sdk/evm/mocks/contract_deploy_backend.go: Language not supported
  • sdk/mocks/decoder.go: Language not supported
  • sdk/mocks/executor.go: Language not supported
  • sdk/mocks/inspector.go: Language not supported
  • sdk/mocks/operation_id.go: Language not supported
  • sdk/mocks/simulator.go: Language not supported
  • sdk/mocks/timelock_configurer.go: Language not supported
  • sdk/mocks/timelock_converter.go: Language not supported
  • sdk/mocks/timelock_executor.go: Language not supported
  • sdk/solana/mocks/jsonrpcclient.go: Language not supported

@faisal-chainlink faisal-chainlink enabled auto-merge (squash) June 10, 2026 21:17
@faisal-chainlink faisal-chainlink merged commit 3f43937 into main Jun 11, 2026
23 checks passed
@faisal-chainlink faisal-chainlink deleted the feat/sui-grpc-migration branch June 11, 2026 00:42
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.

5 participants