Skip to content

Commit f77ef85

Browse files
mergify[bot]srdtrk
andauthored
imp!: remove unused ICS02 entrypoints (backport #495) (#496)
Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com>
1 parent 243ccc1 commit f77ef85

File tree

5 files changed

+1
-131
lines changed

5 files changed

+1
-131
lines changed

abi/ICS26Router.json

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -921,48 +921,6 @@
921921
"outputs": [],
922922
"stateMutability": "nonpayable"
923923
},
924-
{
925-
"type": "function",
926-
"name": "updateClient",
927-
"inputs": [
928-
{
929-
"name": "clientId",
930-
"type": "string",
931-
"internalType": "string"
932-
},
933-
{
934-
"name": "updateMsg",
935-
"type": "bytes",
936-
"internalType": "bytes"
937-
}
938-
],
939-
"outputs": [
940-
{
941-
"name": "",
942-
"type": "uint8",
943-
"internalType": "enum ILightClientMsgs.UpdateResult"
944-
}
945-
],
946-
"stateMutability": "nonpayable"
947-
},
948-
{
949-
"type": "function",
950-
"name": "upgradeClient",
951-
"inputs": [
952-
{
953-
"name": "clientId",
954-
"type": "string",
955-
"internalType": "string"
956-
},
957-
{
958-
"name": "upgradeMsg",
959-
"type": "bytes",
960-
"internalType": "bytes"
961-
}
962-
],
963-
"outputs": [],
964-
"stateMutability": "nonpayable"
965-
},
966924
{
967925
"type": "function",
968926
"name": "upgradeToAndCall",

contracts/interfaces/IICS02Client.sol

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
pragma solidity ^0.8.28;
33

44
import { IICS02ClientMsgs } from "../msgs/IICS02ClientMsgs.sol";
5-
import { ILightClientMsgs } from "../msgs/ILightClientMsgs.sol";
65
import { ILightClient } from "./ILightClient.sol";
76

87
/// @title ICS02 Light Client Router Interface
@@ -62,27 +61,11 @@ interface IICS02Client {
6261
/// @param substituteClientId The client identifier of the substitute client
6362
function migrateClient(string calldata subjectClientId, string calldata substituteClientId) external;
6463

65-
/// @notice Updates the client given the client identifier.
66-
/// @param clientId The client identifier
67-
/// @param updateMsg The update message
68-
/// @return The result of the update operation
69-
function updateClient(
70-
string calldata clientId,
71-
bytes calldata updateMsg
72-
)
73-
external
74-
returns (ILightClientMsgs.UpdateResult);
75-
7664
/// @notice Submits misbehaviour to the client with the given client identifier.
7765
/// @param clientId The client identifier
7866
/// @param misbehaviourMsg The misbehaviour message
7967
function submitMisbehaviour(string calldata clientId, bytes calldata misbehaviourMsg) external;
8068

81-
/// @notice Upgrades the client with the given client identifier.
82-
/// @param clientId The client identifier
83-
/// @param upgradeMsg The upgrade message
84-
function upgradeClient(string calldata clientId, bytes calldata upgradeMsg) external;
85-
8669
/// @notice Returns the role identifier for a light client
8770
/// @param clientId The client identifier
8871
/// @return The role identifier

contracts/utils/ICS02ClientUpgradeable.sol

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.28;
33

4-
import { ILightClientMsgs } from "../msgs/ILightClientMsgs.sol";
54
import { IICS02ClientMsgs } from "../msgs/IICS02ClientMsgs.sol";
65

76
import { IICS02ClientErrors } from "../errors/IICS02ClientErrors.sol";
@@ -151,28 +150,12 @@ abstract contract ICS02ClientUpgradeable is IICS02Client, IICS02ClientErrors, Ac
151150
emit ICS02ClientMigrated(subjectClientId, substituteClientId);
152151
}
153152

154-
/// @inheritdoc IICS02Client
155-
function updateClient(
156-
string calldata clientId,
157-
bytes calldata updateMsg
158-
)
159-
external
160-
returns (ILightClientMsgs.UpdateResult)
161-
{
162-
return getClient(clientId).updateClient(updateMsg);
163-
}
164-
165153
/// @inheritdoc IICS02Client
166154
function submitMisbehaviour(string calldata clientId, bytes calldata misbehaviourMsg) external {
167155
getClient(clientId).misbehaviour(misbehaviourMsg);
168156
emit ICS02MisbehaviourSubmitted(clientId, misbehaviourMsg);
169157
}
170158

171-
/// @inheritdoc IICS02Client
172-
function upgradeClient(string calldata clientId, bytes calldata upgradeMsg) external {
173-
getClient(clientId).upgradeClient(upgradeMsg);
174-
}
175-
176159
/// @notice Returns the storage of the ICS02Client contract
177160
function _getICS02ClientStorage() private pure returns (ICS02ClientStorage storage $) {
178161
// solhint-disable-next-line no-inline-assembly

packages/go-abigen/ics26router/contract.go

Lines changed: 1 addition & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/solidity-ibc/ICS02ClientTest.t.sol

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ contract ICS02ClientTest is Test {
8080
ics02Client.addClient(customClientId, counterpartyInfo, address(lightClient));
8181
}
8282

83-
function test_UpdateClient() public {
84-
bytes memory updateMsg = "testUpdateMsg";
85-
ILightClientMsgs.UpdateResult updateResult = ics02Client.updateClient(clientIdentifier, updateMsg);
86-
assertEq(uint256(updateResult), uint256(ILightClientMsgs.UpdateResult.Update), "updateClient failed");
87-
assertEq(updateMsg, lightClient.latestUpdateMsg(), "updateClient failed");
88-
}
89-
9083
function test_MigrateClient() public {
9184
address bob = makeAddr("bob");
9285

@@ -134,9 +127,4 @@ contract ICS02ClientTest is Test {
134127
bytes memory misbehaviourMsg = "testMisbehaviourMsg";
135128
ics02Client.submitMisbehaviour(clientIdentifier, misbehaviourMsg);
136129
}
137-
138-
function test_UpgradeClient() public {
139-
bytes memory upgradeMsg = "testUpgradeMsg";
140-
ics02Client.upgradeClient(clientIdentifier, upgradeMsg);
141-
}
142130
}

0 commit comments

Comments
 (0)