Skip to content

Commit

Permalink
fix: hash entire message when calculating relay hash for evm chains
Browse files Browse the repository at this point in the history
Signed-off-by: bennett <[email protected]>
  • Loading branch information
bmzig committed Jan 20, 2025
1 parent a6ed1d1 commit f3ea9f8
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions contracts/SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1641,24 +1641,7 @@ abstract contract SpokePool is
}

function _getV3RelayHash(V3RelayData memory relayData) private view returns (bytes32) {
return
keccak256(
abi.encode(
relayData.depositor,
relayData.recipient,
relayData.exclusiveRelayer,
relayData.inputToken,
relayData.outputToken,
relayData.inputAmount,
relayData.outputAmount,
relayData.originChainId,
relayData.depositId,
relayData.fillDeadline,
relayData.exclusivityDeadline,
_hashNonEmptyMessage(relayData.message),
chainId()
)
);
return keccak256(abi.encode(relayData, chainId()));
}

// Unwraps ETH and does a transfer to a recipient address. If the recipient is a smart contract then sends wrappedNativeToken.
Expand Down

0 comments on commit f3ea9f8

Please sign in to comment.