{"id":27193634,"url":"https://github.com/ricardomuchacho/uniswap-router-swaps","last_synced_at":"2025-04-09T18:56:56.408Z","repository":{"id":285391638,"uuid":"957974502","full_name":"RicardoMuchacho/uniswap-router-swaps","owner":"RicardoMuchacho","description":"smart contract that integrates Uniswap's V2 Router to enable seamless token swaps on Arbitrum One","archived":false,"fork":false,"pushed_at":"2025-03-31T13:21:34.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T14:02:07.076Z","etag":null,"topics":["arbitrum","defi","foundry","smart-contracts","uniswap"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RicardoMuchacho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-31T12:45:27.000Z","updated_at":"2025-03-31T13:22:51.000Z","dependencies_parsed_at":"2025-03-31T14:02:10.657Z","dependency_job_id":"3ce0eaa5-5cde-4fcf-b15c-182baa2cdb86","html_url":"https://github.com/RicardoMuchacho/uniswap-router-swaps","commit_stats":null,"previous_names":["ricardomuchacho/uniswap-router-swaps"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicardoMuchacho%2Funiswap-router-swaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicardoMuchacho%2Funiswap-router-swaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicardoMuchacho%2Funiswap-router-swaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicardoMuchacho%2Funiswap-router-swaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RicardoMuchacho","download_url":"https://codeload.github.com/RicardoMuchacho/uniswap-router-swaps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094206,"owners_count":21046765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrum","defi","foundry","smart-contracts","uniswap"],"created_at":"2025-04-09T18:56:55.919Z","updated_at":"2025-04-09T18:56:56.400Z","avatar_url":"https://github.com/RicardoMuchacho.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔄 SwapApp - Uniswap V2 Router Integration on Arbitrum One\n\n## 📌 Overview\nSwapApp is a Solidity smart contract that integrates Uniswap's V2 Router to enable seamless token swaps on the Arbitrum One mainnet. The contract supports swaps between ERC-20 tokens and ETH, ensuring efficient and decentralized trading.\n\n## ✨ Key Features\n- **Uniswap V2 Integration**: Uses Uniswap V2 Router for decentralized swaps.\n- **100% Test Coverage**: Ensures reliability and security.\n- **Token-to-Token Swaps**: Swap one ERC-20 token for another.\n- **ETH to Token Swaps**: Convert ETH to ERC-20 tokens.\n- **Token to ETH Swaps**: Convert ERC-20 tokens to ETH.\n\n## 📜 Contracts Overview\n\n| Contract  | Description |\n|-----------|------------|\n| `IV2Router` | Interface for interacting with Uniswap V2 Router functions. |\n| `Swap` | Implements token swaps and ETH conversions using Uniswap V2 Router. |\n\n### ⚙️ `Swap.sol` Contract Functions\n\n| Function | Description |\n|----------|------------|\n| `swapTokens(uint256 amountIn_, uint256 amountOutMin_, address[] memory path_, uint256 deadline_)` | Swaps ERC-20 tokens for another ERC-20 token. |\n| `swapETHForTokens(uint256 amountOutMin_, address[] memory path_, uint256 deadline_)` | Swaps ETH for ERC-20 tokens. |\n| `swapTokensForETH(uint256 amountIn_, uint256 amountOutMin_, address[] memory path_, uint256 deadline_)` | Swaps ERC-20 tokens for ETH. |\n| `getAmountOutHelper(uint256 amountIn_, address[] calldata path_)` | Helper function to fetch estimated output amount for a given input amount. |\n\n## 🚀 Getting Started\n1. Deploy `SwapApp` with the Uniswap V2 Router address on Arbitrum One.\n2. Ensure that users approve token transfers before swapping.\n3. Call the relevant swap function depending on the desired trade type.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardomuchacho%2Funiswap-router-swaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardomuchacho%2Funiswap-router-swaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardomuchacho%2Funiswap-router-swaps/lists"}