Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024-07-25-constants-for-testing #23

Closed
wants to merge 1 commit into from

Conversation

Erikd-dev
Copy link
Collaborator

@Erikd-dev Erikd-dev commented Jul 25, 2024

Motivation

Constants are needed to transfer test cases and mock libraries from the legacy repository.

Solution

Added a file with constants necessary for the implementation of the test cases.

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • [] unit-tested any new functionality
  • linked any relevant issues or PRs

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// SPDX-License-Identifier: CAL
pragma solidity ^0.8.18;

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// @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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should put abstract stuff for mocking and testing the interpreter in the interpreter interface repo under test/abstract

https://github.com/rainlanguage/rain.interpreter.interface/tree/main/test/abstract

@Erikd-dev Erikd-dev closed this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants