Skip to content

Commit dfc6c97

Browse files
authored
Merge pull request #1098 from graphprotocol/mde/add-contract-address-to-signer-proof-message
2 parents a4cb2d4 + 768bc83 commit dfc6c97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/horizon/contracts/payments/collectors/TAPCollector.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ contract TAPCollector is EIP712, GraphDirectory, ITAPCollector {
276276
);
277277

278278
// Generate the hash of the payer's address
279-
bytes32 messageHash = keccak256(abi.encodePacked(block.chainid, _proofDeadline, msg.sender));
279+
bytes32 messageHash = keccak256(abi.encodePacked(block.chainid, address(this), _proofDeadline, msg.sender));
280280

281281
// Generate the digest to be signed by the signer
282282
bytes32 digest = MessageHashUtils.toEthSignedMessageHash(messageHash);

packages/horizon/test/payments/tap-collector/TAPCollector.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ contract TAPCollectorTest is HorizonStakingSharedTest, PaymentsEscrowSharedTest
4848

4949
function _getSignerProof(uint256 _proofDeadline, uint256 _signer) internal returns (bytes memory) {
5050
(, address msgSender, ) = vm.readCallers();
51-
bytes32 messageHash = keccak256(abi.encodePacked(block.chainid, _proofDeadline, msgSender));
51+
bytes32 messageHash = keccak256(abi.encodePacked(block.chainid, address(tapCollector), _proofDeadline, msgSender));
5252
bytes32 proofToDigest = MessageHashUtils.toEthSignedMessageHash(messageHash);
5353
(uint8 v, bytes32 r, bytes32 s) = vm.sign(_signer, proofToDigest);
5454
return abi.encodePacked(r, s, v);

0 commit comments

Comments
 (0)