Skip to content

Commit a1a73e5

Browse files
Rahul MagantiRahulMaganti47
Rahul Maganti
authored andcommitted
evm: test setting invalid chainId config
1 parent 006da9d commit a1a73e5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

evm/test/IntegrationRelayer.t.sol

+17-1
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,24 @@ contract TestEndToEndRelayer is
205205
uint256 priceQuote1 = wormholeTransceiverChain1.quoteDeliveryPrice(
206206
chainId2, buildTransceiverInstruction(false)
207207
);
208-
209208
bytes memory instructions = encodeTransceiverInstruction(false);
209+
210+
// set invalid config
211+
vm.stopPrank();
212+
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2, false);
213+
214+
// config not set correctly
215+
vm.startPrank(userA);
216+
vm.expectRevert();
217+
nttManagerChain1.transfer{value: priceQuote1}(
218+
sendingAmount, chainId2, bytes32(uint256(uint160(userB))), false, instructions
219+
);
220+
221+
// set valid config
222+
vm.stopPrank();
223+
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2, true);
224+
vm.startPrank(userA);
225+
210226
vm.expectRevert(); // Dust error
211227
nttManagerChain1.transfer{value: priceQuote1}(
212228
sendingAmount - 1, chainId2, bytes32(uint256(uint160(userB))), false, instructions

0 commit comments

Comments
 (0)