Skip to content

Conversation

@kaze-cow
Copy link
Contributor

@kaze-cow kaze-cow commented Dec 28, 2025

Description

Forking off the original e2e-migration branch, finish the E2E tests migration. This PR has been pending for a while and needed some updates based on the latest state of solidity/plans for the future of the protocol, so its been updated/adapted.

Concretely, this branch differs from the original branch by:

  • updating OpenZeppelin to 5.5.0 (the latest), which supports solidity 0.8, simplifying some aspects of the tests such as delpoyment of openzepplin test contracts
  • remove tests related to balancer/internal balances functionality. This will not be used in the next version of the protocol.
  • updating the code to work with the latest foundry warnings cleaned
  • ran forge fmt
  • update hardhat (this wasnt directly related to any issues with the codebase, but it was causing yarn to fail install on my ARM hardware and updating seems to have no noticable negative effect at this time)

The actual diff between original e2e testing brnach can be seen here (individual commits viewing is helpful due to the forge fmt): e2e-migration...e2e-migration-update

The previous branch was pretty scant on documentation and review, and never received a review in the first place. The original reviewers are no longer here, and some lint fixes from upstream foundry are needed, so may we just start again with this branch?

Test Plan

The new tests can be verified with FORK_URL=<url of mainnet> forge test. There are no more tests in hardhat. We may consider removing hardhat entirely?

Related Issues

#226

meetmangukiya and others added 20 commits October 7, 2024 10:56
## Description

Base test contract for forked tests in e2e tests

## Test Plan

CI

## Related Issues
## Description

Migrate nonStandardErc20 e2e test to foundry. Depends on
`FoundryTest.sol` introduced in #215

## Test Plan

CI

## Related Issues

Closes #138
## Description

Migrate the internalBalances e2e test to foundry. Depends on #215.

## Test Plan

CI

## Related Issues

Closes #137
## Description

Migrate the 0xTrade e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #131 #132
## Description

This PR replaces llamarpc with merkle.io for the RPC as there are higher
RPS.

## Test Plan

1. Ensure CI/CD remains green for fork tests.

## Related Issues

N/A
## Description

Migrate wineOilMarket e2e test to foundry. Depends on #215 for the
`ForkedTest.t.sol`.

## Test Plan

CI

## Related Issues

Closes #143
## Description

Migrate the upgradeAuthenticator e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #142
## Description

In order to make use of cache, and to convey to testers / developers
what the assumptions of fork tests are, the fork block number is
established as a constant within the `Helper.sol`.

## Test Plan

1. Verify that CI/CD passes.

## Related Issues

N/A
## Description

Migrate the burnFees e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #134
## Description

This PR sets the `FORK_URL` environment variable to a mainnet archive
node with sufficient RPS / capacity to facilitate the fork tests.

## Test Plan

1. Verify CI/CD green.

## Related Issues

N/A
## Description

Migrate buyEth e2e test to foundry. Depends on
#215

## Test Plan

CI

## Related Issues
Closes #135
<!-- List related issues here -->
<!-- Closes #issue (optional) -->

---------

Co-authored-by: mfw78 <53399572+mfw78@users.noreply.github.com>
## Description

Migrate the offchainAllowances e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #139
## Description

Migrate the smartOrder e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Issue doesn't exist
## Description

Migrate the uniswapTrade e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #141
## Description

Migrate the contractOrdersWithGnosisSafe e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #136
## Description

Migrate the deployment e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #149
## Description

This PR addresses the environment setup that was used for fork tests.
Now, the `FORK_URL` is set by a secret, and the `FORK_BLOCK_NUMBER` is
hard coded within the `e2e` Helper as a constant so that assumptions are
visible for auditors / developers.

## Test Plan

1. Confirm CI/CD green

## Related Issues

N/A
## Description

Migrate the balancerSwap e2e test to foundry. Depends on
#215.

## Test Plan

CI

## Related Issues

Closes #133
## Description

This PR removes extraneous TypeScript that has been left over as a
result of the E2E tests.

## Test Plan

1. Confirm CI/CD green.

## Related Issues

#130
* remove balancer tests (we will be actively removing balancer support itself by the next release)
* update to use latest openzepplin (actually supports 0.8)
* remove the foundry warnings error (temp so that we can get things to compile)
@kaze-cow kaze-cow requested a review from a team as a code owner December 28, 2025 05:26
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedts-node@​10.9.1 ⏵ 10.9.297 +110010082100
Updatedhardhat@​2.13.1 ⏵ 2.28.09410092 +496 -180
Updated@​openzeppelin/​contracts@​3.4.0-solc-0.7 ⏵ 5.5.0100100 +75100 +694 +3100

View full report

@socket-security
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm safer-buffer is 94.0% likely obfuscated

Confidence: 0.94

Location: Package overview

From: ?npm/hardhat@2.28.0npm/safer-buffer@2.1.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/safer-buffer@2.1.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

there are probably some dumb things here and there but this serves as a starting point

now moving onto coverage, there are some things missing
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.

4 participants