Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion evm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions evm/test/HubMessageDispatcher.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand All @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions evm/test/HubSolanaMessageDispatcher.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions evm/test/mocks/WormholeCoreMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down