Skip to content

Commit

Permalink
added contacts for test case library
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikd-dev committed Jul 25, 2024
1 parent c6f1949 commit a853eb1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/util/lib/LibTestConstants.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: CAL
pragma solidity ^0.8.18;

import "openzeppelin-contracts/contracts/utils/introspection/IERC1820Registry.sol";

/// @dev https://eips.ethereum.org/EIPS/eip-1820#single-use-registry-deployment-account
IERC1820Registry constant IERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);

/// @dev Mocks need to be etched with some bytecode or they cannot even be
/// called. This is because Solidity first checks the bytecode size before
/// calling, so it never even gets to the point that mocking logic can intercept
/// the call. We want all non-mocked calls to revert, so all mocks should be
/// etched with a revert opcode.
bytes constant REVERTING_MOCK_BYTECODE = hex"FD";

/// @dev Stub expression bytecode used for testing purposes.
/// This is a simple bytecode stub that can be used as a placeholder for
/// expressions with mock initialization in tests. The bytecode is arbitrary
bytes constant STUB_EXPRESSION_BYTECODE = hex"010000";

0 comments on commit a853eb1

Please sign in to comment.