diff --git a/evm/Dockerfile b/evm/Dockerfile index 985a64550..a768e74fd 100644 --- a/evm/Dockerfile +++ b/evm/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/foundry-rs/foundry@sha256:8b843eb65cc7b155303b316f65d27173c862b37719dc095ef3a2ef27ce8d3c00 as builder +FROM ghcr.io/foundry-rs/foundry:stable as builder WORKDIR /app COPY foundry.toml foundry.toml diff --git a/evm/test/HubMessageDispatcher.t.sol b/evm/test/HubMessageDispatcher.t.sol index c8803f68f..0a723291a 100644 --- a/evm/test/HubMessageDispatcher.t.sol +++ b/evm/test/HubMessageDispatcher.t.sol @@ -56,7 +56,7 @@ contract Dispatch is HubMessageDispatcherTest { bytes memory payload = abi.encode( _wormholeChainId, builder.targets(), builder.values(), builder.calldatas(), keccak256(bytes(_description)) ); - dispatcher.dispatch(payload); + dispatcher.dispatch{value: wormholeCoreMock.messageFee()}(payload); assertEq( wormholeCoreMock.ghostPublishMessagePayload(), abi.encode(nextMessageId, _wormholeChainId, builder.targets(), builder.values(), builder.calldatas()) @@ -74,7 +74,7 @@ contract Dispatch is HubMessageDispatcherTest { bytes memory payload = abi.encode( _wormholeChainId, builder.targets(), builder.values(), builder.calldatas(), keccak256(bytes(_description)) ); - dispatcher.dispatch(payload); + dispatcher.dispatch{value: wormholeCoreMock.messageFee()}(payload); assertEq( wormholeCoreMock.ghostPublishMessagePayload(), abi.encode(nextMessageId, _wormholeChainId, builder.targets(), builder.values(), builder.calldatas()) @@ -96,7 +96,7 @@ contract Dispatch is HubMessageDispatcherTest { vm.expectEmit(); emit IMessageDispatcher.MessageDispatched(nextMessageId, emittedPayload); - dispatcher.dispatch(payload); + dispatcher.dispatch{value: wormholeCoreMock.messageFee()}(payload); } function testFuzz_RevertIf_ProposalDataIsDifferentLengths( diff --git a/evm/test/HubSolanaMessageDispatcher.t.sol b/evm/test/HubSolanaMessageDispatcher.t.sol index a169a3450..6f3c0b855 100644 --- a/evm/test/HubSolanaMessageDispatcher.t.sol +++ b/evm/test/HubSolanaMessageDispatcher.t.sol @@ -76,7 +76,7 @@ contract Dispatch is HubSolanaMessageDispatcherTest { bytes memory payload = abi.encode(CHAIN_ID_SOLANA, instructions); bytes memory emittedPayload = abi.encode(nextMessageId, CHAIN_ID_SOLANA, instructions); - dispatcher.dispatch(payload); + dispatcher.dispatch{value: wormholeCoreMock.messageFee()}(payload); assertEq(wormholeCoreMock.ghostPublishMessagePayload(), emittedPayload); } @@ -101,7 +101,7 @@ contract Dispatch is HubSolanaMessageDispatcherTest { bytes memory payload = abi.encode(CHAIN_ID_SOLANA, instructions); bytes memory emittedPayload = abi.encode(nextMessageId, CHAIN_ID_SOLANA, instructions); - dispatcher.dispatch(payload); + dispatcher.dispatch{value: wormholeCoreMock.messageFee()}(payload); assertEq(wormholeCoreMock.ghostPublishMessagePayload(), emittedPayload); } @@ -125,7 +125,7 @@ contract Dispatch is HubSolanaMessageDispatcherTest { vm.expectEmit(); emit IMessageDispatcher.MessageDispatched(nextMessageId, emittedPayload); - dispatcher.dispatch(payload); + dispatcher.dispatch{value: wormholeCoreMock.messageFee()}(payload); } function test_RevertIf_EmptyInstructionSet() public { diff --git a/evm/test/mocks/WormholeCoreMock.sol b/evm/test/mocks/WormholeCoreMock.sol index e0c90c179..2127e5568 100644 --- a/evm/test/mocks/WormholeCoreMock.sol +++ b/evm/test/mocks/WormholeCoreMock.sol @@ -9,9 +9,11 @@ contract WormholeCoreMock is WormholeMock { bytes public ghostPublishMessagePayload; uint8 public ghostPublishMessageConsistencyLevel; uint16 public override chainId; + uint256 public override messageFee; constructor(uint16 _chainId) { chainId = _chainId; + messageFee = 1; } function publishMessage(uint32 _nonce, bytes memory _payload, uint8 _consistencyLevel) @@ -20,6 +22,7 @@ contract WormholeCoreMock is WormholeMock { override returns (uint64) { + require(msg.value == messageFee, "WormholeCoreMock: Invalid message fee"); ghostPublishMessageNonce = _nonce; ghostPublishMessagePayload = _payload; ghostPublishMessageConsistencyLevel = _consistencyLevel; diff --git a/integration-tests/Dockerfile b/integration-tests/Dockerfile index f99541697..bc7c6d7f5 100644 --- a/integration-tests/Dockerfile +++ b/integration-tests/Dockerfile @@ -1,5 +1,5 @@ # First stage: Build contracts -FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry@sha256:8b843eb65cc7b155303b316f65d27173c862b37719dc095ef3a2ef27ce8d3c00 as foundry +FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:stable as foundry # Only copy what's needed for forge build WORKDIR /app/evm