{"id":26469773,"url":"https://github.com/ocdbytes/uniswap-clone-web3","last_synced_at":"2025-03-19T17:09:20.713Z","repository":{"id":113750074,"uuid":"461526176","full_name":"ocdbytes/uniswap-clone-web3","owner":"ocdbytes","description":"This is a coinswap clone where we can send payments on our real network (rinkeby) and recieve them.","archived":false,"fork":false,"pushed_at":"2022-02-27T11:08:26.000Z","size":563,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T10:46:09.906Z","etag":null,"topics":["hardhat","nextjs","sanity-studio","solidity"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocdbytes.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-02-20T15:16:24.000Z","updated_at":"2022-02-22T16:57:54.000Z","dependencies_parsed_at":"2023-03-15T11:30:30.408Z","dependency_job_id":null,"html_url":"https://github.com/ocdbytes/uniswap-clone-web3","commit_stats":null,"previous_names":["ocdbytes/uniswap-clone-web3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2Funiswap-clone-web3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2Funiswap-clone-web3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2Funiswap-clone-web3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocdbytes%2Funiswap-clone-web3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocdbytes","download_url":"https://codeload.github.com/ocdbytes/uniswap-clone-web3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244470251,"owners_count":20457908,"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":["hardhat","nextjs","sanity-studio","solidity"],"created_at":"2025-03-19T17:09:19.828Z","updated_at":"2025-03-19T17:09:20.701Z","avatar_url":"https://github.com/ocdbytes.png","language":"JavaScript","readme":"# Uniswap Clone\n\nFollow along with Clever Programmer's tutorial video\n\n[https://www.youtube.com/watch?v=xXxjRzdYIss\u0026t=30s\u0026ab_channel=CleverProgrammer]\n\n## Tech used\n\n- Next JS\n- Sanity DB\n- Solidity\n- Hardhat\n\n## Folder Structure\n\n- Client\n- Smart_Contract\n- Studio\n\n### Sanity installation\n\n- First install sanity\n\n```bash\nsudo npm install -g @sanity/cli\n```\n\n- Then use cleverprogrammer token (it will provide us with best setup for sanity)\n\n```bash\nsanity init --coupon cleverprogrammer\n```\n\n- To start Database\n\n```bash\nsanity start\n```\n\n### How to connect to wallet ?\n\n- First we need to get metamask extension installed in our browser\n- The event called when we click on metamask is :\n\n```js\nlet event = window.ethereum;\n```\n\n- Now we will check our browser for meta mask using javascript\n\n```js\nlet eth;\nif (typeof window !== \"undefined\") {\n  eth = window.ethereum;\n}\n// Here 'eth' variable stores our metamask boolean (present or not)\n```\n\n- Now to request the method for connecting to metamask wallet we will use\n\n```js\nconst accounts = await metamask.request({ method: \"eth_requestAccounts\" });\n```\n\n- And Boom we have our wallet Accounts store in our accounts variable\n\n## Making our smart contract (solidity + hardhat)\n\n- Install hardhat using command (This is also for initialising a new project)\n\n```bash\nnpx hardhat\n```\n\n- In our contracts folder make a contract 'Transaction.sol' and write our contract to transfer money.\n- After writing our contract make a script for deploying our contract in 'scripts' folder.\n- Then we will deploy our contract using hardhat command :\n\n```bash\nnpx hardhat run scripts/deploy.js --network rinkeby\n```\n\n- To set up the networks we will edit our \"hardhat.config.js\" file\n\n```js\nrequire(\"@nomiclabs/hardhat-waffle\");\n\n/**\n * @type import('hardhat/config').HardhatUserConfig\n */\nmodule.exports = {\n  solidity: \"0.8.4\",\n  networks: {\n    rinkeby: {\n      url: \"alchemy url (http)\",\n      accounts: [\"Account_private_key\"],\n    },\n  },\n};\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focdbytes%2Funiswap-clone-web3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focdbytes%2Funiswap-clone-web3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focdbytes%2Funiswap-clone-web3/lists"}