{"id":22164829,"url":"https://github.com/net2devcrypto/erc-404-deploy-contract-and-uniswapv3-tutorial","last_synced_at":"2025-07-01T10:36:18.067Z","repository":{"id":226558651,"uuid":"767267542","full_name":"net2devcrypto/ERC-404-Deploy-Contract-and-UniswapV3-Tutorial","owner":"net2devcrypto","description":"The Ultimate ERC-404 Token Tutorial - Deploy your own ERC-404 then provide liquidity with an UniswapV3 Pool","archived":false,"fork":false,"pushed_at":"2024-03-17T22:39:07.000Z","size":13167,"stargazers_count":5,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-02T05:10:39.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/net2devcrypto.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-05T01:33:07.000Z","updated_at":"2024-07-30T16:14:52.000Z","dependencies_parsed_at":"2024-03-17T07:47:19.010Z","dependency_job_id":null,"html_url":"https://github.com/net2devcrypto/ERC-404-Deploy-Contract-and-UniswapV3-Tutorial","commit_stats":null,"previous_names":["net2devcrypto/erc-404-deploy-contract-and-uniswapv3-tutorial"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net2devcrypto%2FERC-404-Deploy-Contract-and-UniswapV3-Tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net2devcrypto%2FERC-404-Deploy-Contract-and-UniswapV3-Tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net2devcrypto%2FERC-404-Deploy-Contract-and-UniswapV3-Tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net2devcrypto%2FERC-404-Deploy-Contract-and-UniswapV3-Tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/net2devcrypto","download_url":"https://codeload.github.com/net2devcrypto/ERC-404-Deploy-Contract-and-UniswapV3-Tutorial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236261573,"owners_count":19120744,"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":[],"created_at":"2024-12-02T05:10:55.034Z","updated_at":"2025-01-29T21:31:25.881Z","avatar_url":"https://github.com/net2devcrypto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ERC-404-Contract-UniswapV3Pool-Tutorial\nThe Ultimate ERC-404 Token Tutorial - Deploy your own ERC-404 then provide liquidity with an UniswapV3 Pool\n\n\u003cimg src=\"https://raw.githubusercontent.com/net2devcrypto/misc/main/erc404.jpg\" width=\"650\" height=\"370\"\u003e\n\n\u003e [!NOTE]  \n\u003e THE FILES ATTACHED TO THIS REPO ARE FOR EDUCATIONAL PURPOSES ONLY.\n\u003e NOT FINANCIAL ADVICE\n\u003e USE IT AT YOUR OWN RISK, I'M NOT RESPONSIBLE FOR ANY USE, ISSUES.\n\nENTIRE PLAYLIST:\n\u003ca href=\"https://www.youtube.com/playlist?list=PLLkrq2VBYc1ZTGE4wTlff2vczjn-YSUan\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/net2devcrypto/misc/blob/main/ytlogo2.png\" width=\"90\" height=\"20\"\u003e\u003c/a\u003e\n\n\u003ch3\u003ePart 2 Repo\u003c/h3\u003e\n\nClick for video:\n\n\u003ca href=\"https://youtu.be/z-Uu-MBrigU\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/net2devcrypto/misc/blob/main/ytlogo2.png\" width=\"150\" height=\"40\"\u003e\u003c/a\u003e\n\nPart2 \"Contracts\" Folder Contents:\n\n```shell\nN2DR-ERC404-Semifungibles.sol\nERC404.sol\n```\n1- Import both N2DR-ERC404-Semifungibles.sol and ERC404.sol contracts to Remix or any other environment like Hardhat or Foundry.\n\n  Update N2DR-ERC404-Semifungibles.sol contract with your info: \n  \n    ERC404(\"COLLECTION NAME\", \"TOKENSYMBOL\", TOKENDECIMALS, TOTALSUPPLY\n    balanceOf[_owner] = TOTALSUPPLY * 10**18;\n    \nexample: \n\n```shell\n    constructor(address _owner)\n        ERC404(\"Net2Dev SemiFungibles Rewards\", \"N2DR\", 18, 10000, _owner)\n    {\n        balanceOf[_owner] = 10000 * 10**18;\n    }\n```\n\nthen compile and deploy!\n\n2- Update the token metadata description by calling the setMetadataDescription function on the contract.\n\n3- Update the token dataURI with the path to the nft pictures by calling the setDataURI function on the contract.\n\n\u003ch3\u003ePart 3\u003c/h3\u003e\n\nClick for video:\n\n\u003ca href=\"https://youtu.be/jUvAkeYjrx8\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/net2devcrypto/misc/blob/main/ytlogo2.png\" width=\"150\" height=\"40\"\u003e\u003c/a\u003e\n\n1- Make sure that your deployer wallet used to deploy both ERC-404 and FAKE USDT Contract has enough of both tokens stored to supply the pool liquidity.\n\nMint some FAKE USDT then send to the deployer wallet in case necessary. The wallet must have the amount of tokens specified in Step 3 below.\n\n2- Download the folder \"ERC-404-LiquidityPool-UniswapV3\", extract and open in VS Code, Open Terminal and Install Dependencies.\n\n```shell\ncd ERC-404-LiquidityPool-UniswapV3\nnpm i\n```\n\n3- Update config.js with your the required contracts addresses and values except poolAddress: \n\n```shell\nconst key = \"0xPRIVATE_KEY\"; // ONLY USE THE ERC-404 and FAKE USDT DEPLOYER WALLET!!!\nconst rpc = \"RPC_ADDRESS\"; // Find Available RPC Testnet Addresses: chainlist.org!\nconst chainID = 11155111; // Example Ethereum Sepolia Testnet\n\nconst usdtAddress = \"FAKE_USDT_CONTRACT_ADDRESS\"; // Liquidity Pool Token Contract\nconst erc404Address = \"ERC-404_CONTRACT_ADDRESS\"; // ERC-404 Token Contract\n\n// https://docs.uniswap.org/contracts/v3/reference/deployments\nconst positionAddress = \"POSITION_SMART_CONTRACT_ADDRESS\"; // NonfungiblePositionManager Sepolia Address https://docs.uniswap.org/contracts/v3/reference/deployments\nconst factoryAddress = \"FACTORY_SMART_CONTRACT_ADDRESS\"; // UniswapV3Factory Sepolia Address https://docs.uniswap.org/contracts/v3/reference/deployments\nconst poolAddress = \"SWAP_POOL_SMART_CONTRACT\"   // Obtain the address after executing step1-deploy-pool.js then update here!\nconst poolFee = 10000;      // Set the Uniswap pool fee in basis points, example 10000 = 1%\n\n/* \nThe amount of ERC-404 transferred could be higher/lower depending on the price curve.\nIf you are transferring an aprox 35 ERC-404 tokens, add an aprox 25-35% extra overhead of USDT:\n\n erc404Liquidity * erc404price = usdtLiquidity\n 35 * 300 = 10500\n Add an extra 3500 usdt to compensate the price curve.\n example = 10500 + 3500\n usdtLiquidity = 14000\n*/\n\nlet erc404price = 300;     // Price per ERC-404 Token in USDT\nlet usdtLiquidity = 14000;    // Amount of Fake USDT Tokens to deposit in pool + extra overhead for price curve.\nlet erc404Liquidity = 35;    // Amount of ERC-404 - NFTs in pool.\n\nIMPORTANT:\n\nTHE PRIVATE KEY PROVIDED IN THIS CONFIG.JS FILE IS THE OWNER (DEPLOYER) WALLET OF BOTH ERC404 and FAKE USDT CONTRACTS.\nIT MUST HAVE BOTH ERC-404 and FAKE USDT LIQUIDITY AMOUNTS SPECIFIED AVAILABLE BEFORE CONTINUING.\n\n```\nCTRL + S to save!!!\n\n4- Proceed to create the pool and pre-approve the position contract address to transfer both pool tokens.\n\n```shell\nnode step1-deploy-pool.js\n```\n\nOnce completed, copy the pool address obtained in the console and update the poolAddress in config.js with.\n\n```shell\nconst poolAddress = \"SWAP_POOL_SMART_CONTRACT\"   // Obtain the address after executing step1-deploy-pool.js then update here!\n```\n\nCTRL + S to save!!!\n\n5- Proceed to open the position and add the required liquidity.\n\n```shell\nnode step2-add-pos-liquidity.js\n```\n\nOnce complete, test swapping tokens with any wallet except the owner/deployer wallet!!\n\nWatch the part-3 final tutorial video for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnet2devcrypto%2Ferc-404-deploy-contract-and-uniswapv3-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnet2devcrypto%2Ferc-404-deploy-contract-and-uniswapv3-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnet2devcrypto%2Ferc-404-deploy-contract-and-uniswapv3-tutorial/lists"}