Skip to content

Commit b3b1867

Browse files
author
Rahul Maganti
committed
fix: modify [setIsWormholeEvmChain] to take bool
1 parent 1470fc6 commit b3b1867

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

evm/src/Transceiver/WormholeTransceiver/WormholeTransceiverState.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ abstract contract WormholeTransceiverState is IWormholeTransceiverState, Transce
226226
}
227227

228228
/// @inheritdoc IWormholeTransceiverState
229-
function setIsWormholeEvmChain(uint16 chainId) external onlyOwner {
229+
function setIsWormholeEvmChain(uint16 chainId, bool isEvm) external onlyOwner {
230230
if (chainId == 0) {
231231
revert InvalidWormholeChainIdZero();
232232
}
233-
_getWormholeEvmChainIdsStorage()[chainId] = TRUE;
233+
_getWormholeEvmChainIdsStorage()[chainId] = toWord(isEvm);
234234

235235
emit SetIsWormholeEvmChain(chainId);
236236
}

evm/src/interfaces/IWormholeTransceiverState.sol

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ interface IWormholeTransceiverState {
5050
/// @notice Set whether the chain is EVM compatible.
5151
/// @dev This function is only callable by the `owner`.
5252
/// @param chainId The Wormhole chain ID to set.
53-
function setIsWormholeEvmChain(uint16 chainId) external;
53+
/// @param isEvm A boolean indicating whether the chain is an EVM chain.
54+
function setIsWormholeEvmChain(uint16 chainId, bool isEvm) external;
5455

5556
/// @notice Set whether Wormhole relaying is enabled for the given chain.
5657
/// @dev This function is only callable by the `owner`.

evm/test/IntegrationRelayer.t.sol

+4-4
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ contract TestEndToEndRelayer is
172172
nttManagerChain2.setPeer(chainId1, bytes32(uint256(uint160(address(nttManagerChain1)))), 9);
173173
DummyToken token2 = DummyTokenMintAndBurn(nttManagerChain2.token());
174174
wormholeTransceiverChain2.setIsWormholeRelayingEnabled(chainId1, true);
175-
wormholeTransceiverChain2.setIsWormholeEvmChain(chainId1);
175+
wormholeTransceiverChain2.setIsWormholeEvmChain(chainId1, true);
176176

177177
// Register peer contracts for the nttManager and transceiver. Transceivers and nttManager each have the concept of peers here.
178178
vm.selectFork(sourceFork);
@@ -184,7 +184,7 @@ contract TestEndToEndRelayer is
184184

185185
// Enable general relaying on the chain to transfer for the funds.
186186
wormholeTransceiverChain1.setIsWormholeRelayingEnabled(chainId2, true);
187-
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2);
187+
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2, true);
188188

189189
// Setting up the transfer
190190
uint8 decimals = token1.decimals();
@@ -270,7 +270,7 @@ contract TestEndToEndRelayer is
270270
nttManagerChain2.setPeer(chainId1, bytes32(uint256(uint160(address(nttManagerChain1)))), 9);
271271
DummyToken token2 = DummyTokenMintAndBurn(nttManagerChain2.token());
272272
wormholeTransceiverChain2.setIsWormholeRelayingEnabled(chainId1, true);
273-
wormholeTransceiverChain2.setIsWormholeEvmChain(chainId1);
273+
wormholeTransceiverChain2.setIsWormholeEvmChain(chainId1, true);
274274

275275
// Register peer contracts for the nttManager and transceiver. Transceivers and nttManager each have the concept of peers here.
276276
vm.selectFork(sourceFork);
@@ -282,7 +282,7 @@ contract TestEndToEndRelayer is
282282

283283
// Enable general relaying on the chain to transfer for the funds.
284284
wormholeTransceiverChain1.setIsWormholeRelayingEnabled(chainId2, true);
285-
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2);
285+
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2, true);
286286

287287
// Setting up the transfer
288288
uint8 decimals = token1.decimals();

0 commit comments

Comments
 (0)