Skip to content

Commit 60a25b1

Browse files
Rahul MagantiRahulMaganti47
Rahul Maganti
authored andcommitted
evm: test setting invalid chainId config
1 parent 8b7d2da commit 60a25b1

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
@@ -201,8 +201,24 @@ contract TestEndToEndRelayer is
201201
uint256 priceQuote1 = wormholeTransceiverChain1.quoteDeliveryPrice(
202202
chainId2, buildTransceiverInstruction(false)
203203
);
204-
205204
bytes memory instructions = encodeTransceiverInstruction(false);
205+
206+
// set invalid config
207+
vm.stopPrank();
208+
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2, false);
209+
210+
// config not set correctly
211+
vm.startPrank(userA);
212+
vm.expectRevert();
213+
nttManagerChain1.transfer{value: priceQuote1}(
214+
sendingAmount, chainId2, bytes32(uint256(uint160(userB))), false, instructions
215+
);
216+
217+
// set valid config
218+
vm.stopPrank();
219+
wormholeTransceiverChain1.setIsWormholeEvmChain(chainId2, true);
220+
vm.startPrank(userA);
221+
206222
vm.expectRevert(); // Dust error
207223
nttManagerChain1.transfer{value: priceQuote1}(
208224
sendingAmount - 1, chainId2, bytes32(uint256(uint160(userB))), false, instructions

0 commit comments

Comments
 (0)