@@ -41,9 +41,6 @@ contract Solana_Adapter is AdapterInterface, CircleCCTPAdapter {
41
41
// Solana spoke pool address, mapped to its EVM address representation.
42
42
address public immutable SOLANA_SPOKE_POOL_ADDRESS;
43
43
44
- // USDC mint address on Solana, decoded from Base58 to bytes32.
45
- bytes32 public immutable SOLANA_USDC_BYTES32;
46
-
47
44
// USDC mint address on Solana, mapped to its EVM address representation.
48
45
address public immutable SOLANA_USDC_ADDRESS;
49
46
@@ -56,8 +53,6 @@ contract Solana_Adapter is AdapterInterface, CircleCCTPAdapter {
56
53
57
54
// Custom errors for relayMessage validation.
58
55
error InvalidRelayMessageTarget (address target );
59
- error InvalidOriginToken (address originToken );
60
- error InvalidDestinationChainId (uint256 destinationChainId );
61
56
62
57
// Custom errors for relayTokens validation.
63
58
error InvalidL1Token (address l1Token );
@@ -95,7 +90,6 @@ contract Solana_Adapter is AdapterInterface, CircleCCTPAdapter {
95
90
SOLANA_SPOKE_POOL_BYTES32 = solanaSpokePool;
96
91
SOLANA_SPOKE_POOL_ADDRESS = solanaSpokePool.toAddressUnchecked ();
97
92
98
- SOLANA_USDC_BYTES32 = solanaUsdc;
99
93
SOLANA_USDC_ADDRESS = solanaUsdc.toAddressUnchecked ();
100
94
101
95
SOLANA_SPOKE_POOL_USDC_VAULT = solanaSpokePoolUsdcVault;
@@ -111,17 +105,7 @@ contract Solana_Adapter is AdapterInterface, CircleCCTPAdapter {
111
105
if (target != SOLANA_SPOKE_POOL_ADDRESS) {
112
106
revert InvalidRelayMessageTarget (target);
113
107
}
114
-
115
- bytes4 selector = bytes4 (message[:4 ]);
116
- if (selector == bytes4 (keccak256 ("setEnableRoute(address,uint256,bool) " ))) {
117
- cctpMessageTransmitter.sendMessage (
118
- CircleDomainIds.Solana,
119
- SOLANA_SPOKE_POOL_BYTES32,
120
- _translateSetEnableRoute (message)
121
- );
122
- } else {
123
- cctpMessageTransmitter.sendMessage (CircleDomainIds.Solana, SOLANA_SPOKE_POOL_BYTES32, message);
124
- }
108
+ cctpMessageTransmitter.sendMessage (CircleDomainIds.Solana, SOLANA_SPOKE_POOL_BYTES32, message);
125
109
126
110
// TODO: consider if we need also to emit the translated message.
127
111
emit MessageRelayed (target, message);
@@ -159,32 +143,4 @@ contract Solana_Adapter is AdapterInterface, CircleCCTPAdapter {
159
143
// TODO: consider if we need also to emit the translated addresses.
160
144
emit TokensRelayed (l1Token, l2Token, amount, to);
161
145
}
162
-
163
- /**
164
- * @notice Translates a message to enable/disable a route on Solana spoke pool.
165
- * @param message Message to translate, expecting setEnableRoute(address,uint256,bool).
166
- * @return Translated message, using setEnableRoute(bytes32,uint64,bool).
167
- */
168
- function _translateSetEnableRoute (bytes calldata message ) internal view returns (bytes memory ) {
169
- (address originToken , uint256 destinationChainId , bool enable ) = abi.decode (
170
- message[4 :],
171
- (address , uint256 , bool )
172
- );
173
-
174
- if (originToken != SOLANA_USDC_ADDRESS) {
175
- revert InvalidOriginToken (originToken);
176
- }
177
-
178
- if (destinationChainId > type (uint64 ).max) {
179
- revert InvalidDestinationChainId (destinationChainId);
180
- }
181
-
182
- return
183
- abi.encodeWithSignature (
184
- "setEnableRoute(bytes32,uint64,bool) " ,
185
- SOLANA_USDC_BYTES32,
186
- uint64 (destinationChainId),
187
- enable
188
- );
189
- }
190
146
}
0 commit comments