{"id":27874685,"url":"https://github.com/camerodev/swap-solidity","last_synced_at":"2026-06-10T07:31:46.095Z","repository":{"id":231525136,"uuid":"772758925","full_name":"camerodev/swap-solidity","owner":"camerodev","description":"Uniswap Solidity Contracts for Tron","archived":false,"fork":false,"pushed_at":"2024-03-15T20:51:47.000Z","size":590,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T01:39:46.393Z","etag":null,"topics":["blockchain","smart-contracts","solidity","uniswap"],"latest_commit_sha":null,"homepage":"https://swap.oikos.cash/","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/camerodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audits/fuzzing/harvey-solidity/exchange-issues.txt","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-15T20:51:40.000Z","updated_at":"2024-03-29T17:35:38.000Z","dependencies_parsed_at":"2024-04-04T13:27:56.980Z","dependency_job_id":null,"html_url":"https://github.com/camerodev/swap-solidity","commit_stats":null,"previous_names":["slickcharmer/swap-solidity","camerodev/swap-solidity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/camerodev/swap-solidity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2Fswap-solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2Fswap-solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2Fswap-solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2Fswap-solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camerodev","download_url":"https://codeload.github.com/camerodev/swap-solidity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camerodev%2Fswap-solidity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34142638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","smart-contracts","solidity","uniswap"],"created_at":"2025-05-05T01:37:22.881Z","updated_at":"2026-06-10T07:31:46.066Z","avatar_url":"https://github.com/camerodev.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uniswap contracts for the Tron blockchain\n\nInstall dependencies:\n\n```bash\nnpm install\n```\n\nPrivate key to use for deployment:\n\n```bash\nexport TRON_NETWORK=shasta\n# export DEPLOY_PRIVATE_KEY_MAINNET=privatekey_for_mainnet\nexport PRIVATE_KEY=yourprivatekey\n```\n\nCompile contracts:\n\n```bash\nnpm run compile\n```\n\nDeploy:\n\n```bash\nnpm run deploy:mainnet\nnpm run deploy:shasta\n```\n\n## Deploying Exchange through Tronscan\n\n1. Go to https://tronscan.org/#/contracts/contract-compiler and drag \u0026\n   drop files from `./tronscan-contracts` directory.\n\n2. Click compile\n   - Solidity version: 0.5.8_Odyssey_v3.6.0\n   - Optimization: enabled\n   - Runs: 200\n3. Set `Contact Name` to `UniswapExchange.sol` and click deploy (keep other parameters to their default values).\n4. Note contract address (e.g. `TSpoeVoxnZHdnLopfMd5YPJyFEE2zPjb8v`)\n5. Add entry to `./src/other-tokens.js` with token information (token\n   address, code and decimals). For\n   example:\n\n   ```json\n   {\n     \"address\": \"TNo59Khpq46FGf4sD7XSWYFNfYfbc8CqNK\",\n     \"code\": \"BNKR\",\n     \"decimals\": 6\n   }\n   ```\n\n6. Add entry to `./addresses.json` with token information (addresses in\n   tron hex format). `address` is the address of the exchange previously\n   created at step 4 and `tokenAddress` is the token address in tron hex\n   format. You can use `tronWeb.address.toHex('...')` in browser console\n   to convert from Tron address format to tron hex address format. The\n   `setup` field should be false (meaning the exchange is not setup\n   yet).\n\n   For example:\n\n   ```json\n      \"BNKR\": {\n        \"address\": \"41b8e350b56e26fdc2a8cbc0700657b88587043609\",\n        \"tokenAddress\": \"418caeea9c7ebb8840ee4b49d10542b99cec6ffbc6\",\n        \"decimals\": 6,\n        \"setup\": false\n      }\n   ```\n\n7. Run `npm run deploy:mainnet` to setup the exchange.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamerodev%2Fswap-solidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamerodev%2Fswap-solidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamerodev%2Fswap-solidity/lists"}