Skip to content

Commit

Permalink
using type(uint32).max instead of 2**32 - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 4, 2024
1 parent 9afb5f4 commit b5285de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion l1-contracts/src/core/messagebridge/NewInbox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ contract NewInbox {
content: _content,
secretHash: _secretHash,
// TODO: nuke the following 2 values from the struct once the new message model is in place
deadline: 2 ** 32 - 1,
deadline: type(uint32).max,
fee: 0
});

Expand Down
6 changes: 3 additions & 3 deletions l1-contracts/test/NewInbox.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract NewInboxTest is Test {
content: 0x2000000000000000000000000000000000000000000000000000000000000000,
secretHash: 0x3000000000000000000000000000000000000000000000000000000000000000,
fee: 0,
deadline: 0
deadline: type(uint32).max
});
}

Expand Down Expand Up @@ -71,7 +71,7 @@ contract NewInboxTest is Test {
_message.secretHash = bytes32(uint256(_message.secretHash) % Constants.P);

// TODO: nuke the following 2 values from the struct once the new message model is in place
_message.deadline = 2 ** 32 - 1;
_message.deadline = type(uint32).max;
_message.fee = 0;

bytes32 leaf = _message.sha256ToField();
Expand Down Expand Up @@ -144,7 +144,7 @@ contract NewInboxTest is Test {
message.recipient.version = version;

// TODO: nuke the following 2 values from the struct once the new message model is in place
message.deadline = 2 ** 32 - 1;
message.deadline = type(uint32).max;
message.fee = 0;

inbox.insert(message.recipient, message.content, message.secretHash);
Expand Down

0 comments on commit b5285de

Please sign in to comment.