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

chore: migrate tests to solidity #106

Open
34 of 37 tasks
Tracked by #76
mfw78 opened this issue Jun 3, 2024 · 0 comments
Open
34 of 37 tasks
Tracked by #76

chore: migrate tests to solidity #106

mfw78 opened this issue Jun 3, 2024 · 0 comments
Assignees
Labels
E:5.2 Contracts migrations See https://github.com/cowprotocol/pm/issues/32 for details help wanted Extra attention is needed

Comments

@mfw78
Copy link
Contributor

mfw78 commented Jun 3, 2024

Description

There is a comprehensive test suite that needs to be migrated from hardhat to foundry.

External contributors

Upon completion of reference unit test and/or reference E2E test, external contributors are invited to contribute to the code base in the migration from hardhat to foundry for subsequent unit / E2E tests.

Work plan

  1. Assign yourself to a task (or external contributors, request assignment)
  2. In accordance with best practices, implement the nominated hardhat test suite in foundry.
  3. Code coverage must be equivalent.
  4. The submitted PR must have:
    a. The foundry tests
    b. Deleted the associated hardhat tests that were migrated
    c. Run forge fmt on the source code files that were added.

Tasks

@mfw78 mfw78 added the E:5.2 Contracts migrations See https://github.com/cowprotocol/pm/issues/32 for details label Jun 3, 2024
@mfw78 mfw78 transferred this issue from cowprotocol/pm Jun 3, 2024
@mfw78 mfw78 pinned this issue Jun 3, 2024
@mfw78 mfw78 added the help wanted Extra attention is needed label Jun 4, 2024
@mfw78 mfw78 self-assigned this Jun 4, 2024
fedgiac added a commit that referenced this issue Jun 4, 2024
## Description

Coveralls is noisy, since it started adding a message to each PR since a
while ago.
We are also going to break full coverage while we migrate tests
gradually from Hardhat to Foundry.
This PR removes Coveralls from this repo.

## Test Plan

See no new message on CI.

## Related Issues

#106
mfw78 added a commit that referenced this issue Jun 5, 2024
## Description

This PR bumps the pragma to support up-to-and-including solidity
(`0.8.26`). This allows the foundry migration taking place to have tests
written in solc `0.8.x`, reducing redundancy / effort with writing the
associated test contracts.

It is important that the `bytecode` generated for production still be
compliant with `0.7.6` (save for potential issues associated with the
`metadata` hash appended by `solc`). To facilitate this, the `test`
pipeline uses a multi-version matrix strategy to ensure that the
contracts remain able to be built with `0.7.6`.

A minor miscellaneous patch is also included for VS Code's solidity
configuration, reducing configuration size.

## Test Plan

1. Verify `test` CI/CD runs `0.7.6` and `0.8.26` matrices.
2. Verify that the `ci` CI/CD runs (`hardhat`) and completes
successfully.

## Related Issues

Related: #106

---------

Co-authored-by: Federico Giacon <[email protected]>
kamuik16 pushed a commit to kamuik16/contracts that referenced this issue Jun 5, 2024
## Description

This PR bumps the pragma to support up-to-and-including solidity
(`0.8.26`). This allows the foundry migration taking place to have tests
written in solc `0.8.x`, reducing redundancy / effort with writing the
associated test contracts.

It is important that the `bytecode` generated for production still be
compliant with `0.7.6` (save for potential issues associated with the
`metadata` hash appended by `solc`). To facilitate this, the `test`
pipeline uses a multi-version matrix strategy to ensure that the
contracts remain able to be built with `0.7.6`.

A minor miscellaneous patch is also included for VS Code's solidity
configuration, reducing configuration size.

## Test Plan

1. Verify `test` CI/CD runs `0.7.6` and `0.8.26` matrices.
2. Verify that the `ci` CI/CD runs (`hardhat`) and completes
successfully.

## Related Issues

Related: cowprotocol#106

---------

Co-authored-by: Federico Giacon <[email protected]>
@mfw78 mfw78 changed the title chore: migrate / develop test harnesses in solidity chore: migrate tests to solidity Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:5.2 Contracts migrations See https://github.com/cowprotocol/pm/issues/32 for details help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant