{"_id":"@divswap/v1-swap-router-contracts","_rev":"1-0b26d31285af603d12041e2a16354bbc","name":"@divswap/v1-swap-router-contracts","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@divswap/v1-swap-router-contracts","description":"Smart contracts for swapping","license":"GPL-2.0-or-later","publishConfig":{"access":"public"},"version":"1.0.0","homepage":"","keywords":["uniswap","v2","v3"],"repository":{"type":"git","url":""},"engines":{"node":">=10"},"dependencies":{"@divswap/v1-core":"1.0.17-solc-0.8","@divswap/v1-periphery":"1.0.6-solc-0.8","@openzeppelin/contracts":"4.6.0","@uniswap/v2-core":"^1.0.1","dotenv":"^14.2.0","hardhat-watcher":"^2.1.1"},"devDependencies":{"@nomiclabs/hardhat-ethers":"^2.0.2","@nomiclabs/hardhat-etherscan":"^2.1.8","@nomiclabs/hardhat-waffle":"^2.0.1","@typechain/ethers-v5":"^4.0.0","@types/chai":"^4.2.6","@types/mocha":"^5.2.7","chai":"^4.2.0","decimal.js":"^10.2.1","ethereum-waffle":"^3.0.2","ethers":"^5.0.8","hardhat":"^2.18.3","hardhat-contract-sizer":"^2.10.0","hardhat-typechain":"^0.3.5","is-svg":"^4.3.1","mocha":"^6.2.2","mocha-chai-jest-snapshot":"^1.1.0","prettier":"^2.0.5","prettier-plugin-solidity":"^1.0.0-beta.10","solhint":"^3.2.1","solhint-plugin-prettier":"^0.0.5","ts-generator":"^0.1.1","ts-node":"^8.5.4","typechain":"^4.0.0","typescript":"^3.7.3"},"scripts":{"compile":"hardhat compile","test":"hardhat test"},"gitHead":"6ddbe8a94aa0241cf66b9e986259b026cb8ab9f1","_id":"@divswap/v1-swap-router-contracts@1.0.0","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"integrity":"sha512-RCLK3FyArYKf5fYboeuIT+UsPwO5kvQKgk+ZVoEa62U06sEidD2K9QtvkIe+1UrR1EPRLAwDyjp9nYoZZx29SQ==","shasum":"ed018fc7dba5b3aa090455276ebba9c6b8f4dc93","tarball":"https://registry.npmjs.org/@divswap/v1-swap-router-contracts/-/v1-swap-router-contracts-1.0.0.tgz","fileCount":51,"unpackedSize":399392,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDY+b4bDG/QwFAYXatgg7Z7mtnxBD11VnwT9LgBwlv9gIgC/s8jVZhUkZCpHqt84mT/+0+UzetbiW8/PqBPwlmm5g="}]},"_npmUser":{"name":"divswap","email":"divswap@gmail.com"},"directories":{},"maintainers":[{"name":"divswap","email":"divswap@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/v1-swap-router-contracts_1.0.0_1698368064025_0.732969599057044"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-27T00:54:23.901Z","1.0.0":"2023-10-27T00:54:24.295Z","modified":"2023-12-31T17:01:43.300Z"},"maintainers":[{"email":"support@npmjs.com","name":"npm-support"}],"description":"Smart contracts for swapping","keywords":["uniswap","v2","v3"],"repository":{"type":"git","url":""},"license":"GPL-2.0-or-later","readme":"# Uniswap Swap Router\n\n[![Tests](https://github.com/Uniswap/swap-router-contracts/workflows/Tests/badge.svg)](https://github.com/Uniswap/swap-router-contracts/actions?query=workflow%3ATests)\n[![Lint](https://github.com/Uniswap/swap-router-contracts/workflows/Lint/badge.svg)](https://github.com/Uniswap/swap-router-contracts/actions?query=workflow%3ALint)\n\nThis repository contains smart contracts for swapping on the Uniswap V2 and V3 protocols.\n\n## Bug bounty\n\nThis repository is subject to the Uniswap V3 bug bounty program,\nper the terms defined [here](./bug-bounty.md).\n\n## Local deployment\n\nIn order to deploy this code to a local testnet, you should install the npm package\n`@uniswap/swap-router-contracts`\nand import bytecode imported from artifacts located at\n`@uniswap/swap-router-contracts/artifacts/contracts/*/*.json`.\nFor example:\n\n```typescript\nimport {\n  abi as SWAP_ROUTER_ABI,\n  bytecode as SWAP_ROUTER_BYTECODE,\n} from '@uniswap/swap-router-contracts/artifacts/contracts/SwapRouter02.sol/SwapRouter02.json'\n\n// deploy the bytecode\n```\n\nThis will ensure that you are testing against the same bytecode that is deployed to\nmainnet and public testnets, and all Uniswap code will correctly interoperate with\nyour local deployment.\n\n## Using solidity interfaces\n\nThe swap router contract interfaces are available for import into solidity smart contracts\nvia the npm artifact `@uniswap/swap-router-contracts`, e.g.:\n\n```solidity\nimport '@uniswap/swap-router-contracts/contracts/interfaces/ISwapRouter02.sol';\n\ncontract MyContract {\n  ISwapRouter02 router;\n\n  function doSomethingWithSwapRouter() {\n    // router.exactInput(...);\n  }\n}\n\n```\n\n## Tests\n\nSome tests use Hardhat mainnet forking and therefore require an archive node.\nEither create a `.env` file in the workspace root containing:\n\n```\nARCHIVE_RPC_URL='...'\n```\n\nOr set the variable when running tests:\n\n```\nexport ARCHIVE_RPC_URL='...' && npm run test\n```\n","readmeFilename":"README.md"}