
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@uniswap/v3-periphery-optimism
Advanced tools
🎚 Optimism fork of peripheral smart contracts for interacting with Uniswap V3 on Optimism
This repository contains the Optimism fork of the periphery smart contracts for the Uniswap V3 Protocol. For the lower level core contracts, see the uniswap-v3-core-optimism repository.
Because these contracts and tests are modified for OVM support, there are some changes that mean we can no longer simply run yarn test and yarn test:ovm and expect all tests to pass for both the EVM and OVM. There are a few reasons for this:
PoolAddress.sol has a hardcoded bytecode hash, but this hash will be different for EVM vs. OVM bytecodePoolAddress.sol, but this is no longer true. The contracts now require linking libraries, and therefore the bytecode and bytecode hash is dependent on the library addresses, which are dependent on the deployer account and nonceTherefore, we must follow the steps below to run EVM tests in this repo:
UPDATE_SNAPSHOT=1 yarn test which will ensure gas costs snapshots are updated (i.e. tests will not fail for gas cost reasons)And to run OVM tests:
yarn postinstall to apply a patch that adds OVM mock contract support to WaffleUPDATE_SNAPSHOT=1 yarn test:ovm which will ensure gas costs snapshots are updated (i.e. tests will not fail for gas cost reasons)yarn optimism-down && yarn optimism-up && UPDATE_SNAPSHOT=1 yarn test:ovm. This is required so the deployer account nonce is reset to zero, which is necessary to get the above bytecode hash when deploying contractsBoth test commands (yarn test and yarn test:ovm) will automatically update the POOL_INIT_CODE_HASH in PoolAddress.sol as needed for testing.
Note that the _Setup.spec.ts test file must always be run first. This ensures library addresses (which are dependent on account nonce) are always the same, which ensures the bytecode hash is the same on each test run.
FAQs
🎚 Optimism fork of peripheral smart contracts for interacting with Uniswap V3 on Optimism
We found that @uniswap/v3-periphery-optimism demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.