refactor: Update SUI client#774
Conversation
|
@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. |
There was a problem hiding this comment.
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.ISuiAPIwithcslclient.BindingsClientacross 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.
|
can you fix the failing tests? |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
There was a problem hiding this comment.
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




This PR includes the following changes:
chainlink-sui. This primarily includes dropping theISuiAPIreference (old version of the Sui SDK) in favor of using a client interface exported bychainlink-sui/relayer/client.