{"id":19498168,"url":"https://github.com/patrickalphac/chainlink-the-graph","last_synced_at":"2025-04-25T22:33:23.821Z","repository":{"id":53885866,"uuid":"401214438","full_name":"PatrickAlphaC/chainlink-the-graph","owner":"PatrickAlphaC","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-01T16:55:24.000Z","size":11155,"stargazers_count":22,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-04T01:09:10.401Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatrickAlphaC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-30T04:21:32.000Z","updated_at":"2023-02-23T19:18:10.000Z","dependencies_parsed_at":"2022-09-12T03:22:08.850Z","dependency_job_id":null,"html_url":"https://github.com/PatrickAlphaC/chainlink-the-graph","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fchainlink-the-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fchainlink-the-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fchainlink-the-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickAlphaC%2Fchainlink-the-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatrickAlphaC","download_url":"https://codeload.github.com/PatrickAlphaC/chainlink-the-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224019638,"owners_count":17242176,"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-11-10T21:49:25.701Z","updated_at":"2024-11-10T21:49:27.164Z","avatar_url":"https://github.com/PatrickAlphaC.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://ethereum.org/en/\" target=\"_blank\"\u003e\n\u003cimg src=\"./img/png/thumbsup.png\" width=\"225\" alt=\"Low logo\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://ethereum.org/en/\" target=\"_blank\"\u003e\n\u003cimg src=\"./img/png/thumbsdown.png\" width=\"225\" alt=\"Low logo\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n# Feeds NFT\nThis is a demo repo showing you how to create NFTs that are dynamic based on price. \n\n - [Chainlink Price Feeds](https://docs.chain.link/docs/using-chainlink-reference-contracts)\n\n ## Requirements\n\n- [NPM](https://www.npmjs.com/) or [YARN](https://yarnpkg.com/)\n\n## Installation\n\nSet your `RINKEBY_RPC_URL` [environment variable.](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html). You can get one for free at [Infura's site.](https://infura.io/) You'll also need to set the variable `PRIVATE_KEY` which is your private key from you wallet, ie MetaMask. This is needed for deploying contracts to public networks.\n\nYou can set these in your `.env` file if you're unfamiliar with how setting environment variables work. Check out our [.env example](https://github.com/smartcontractkit/hardhat-starter-kit/blob/main/.env.example). If you wish to use this method to set these variables, update the values in the .env.example file, and then rename it to '.env'\n\n![WARNING](https://via.placeholder.com/15/f03c15/000000?text=+) **WARNING** ![WARNING](https://via.placeholder.com/15/f03c15/000000?text=+)\n\nDon't commit and push any changes to .env files that may contain sensitive information, such as a private key! If this information reaches a public GitHub repository, someone can use it to check if you have any Mainnet funds in that wallet address, and steal them!\n\n`.env` example:\n```\nRINKEBY_RPC_URL='www.infura.io/asdfadsfafdadf'\nPRIVATE_KEY='abcdef'\nMAINNET_RPC_URL=\"https://eth-mainnet.alchemyapi.io/v2/your-api-key\"\n```\n`bash` example\n```\nexport RINKEBY_RPC_URL='www.infura.io/asdfadsfafdadf'\nexport MNEMONIC='cat dog frog...'\nexport MAINNET_RPC_URL=\"https://eth-mainnet.alchemyapi.io/v2/your-api-key\"\n```\n\nIf you plan on deploying to a local [Hardhat network](https://hardhat.org/hardhat-network/) that's a fork of the Ethereum mainnet instead of a public test network like Kovan, you'll also need to set your `MAINNET_RPC_URL` [environment variable.](https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html) and uncomment the `forking` section in `hardhat.config.js`. You can get one for free at [Alchemy's site.](https://alchemyapi.io/).\n\nYou can also use a `PRIVATE_KEY` instead of a `MNEMONIC` environment variable by uncommenting the section in the `hardhat.config.js`, and commenting out the `MNEMONIC` line.\n\nThen you can install all the dependencies\n\n```bash\ngit clone https://github.com/patrickalphac/chainlink-the-graph/\ncd chainlink-the-graph\n```\nthen\n\n```bash\nnpm install\n```\n\nOr\n\n```bash\nyarn\n```\n\n\n## Deploy\n\nDeployment scripts are in the [deploy](https://github.com/smartcontractkit/hardhat-starter-kit/tree/main/deploy) directory. If required, edit the desired environment specific variables or constructor parameters in each script, then run the hardhat deployment plugin as follows. If no network is specified, it will default to the Kovan network.\n\nThis will deploy to a local hardhat network.\n\n```bash\nnpx hardhat deploy\n```\n\nTo deploy to testnet:\n```bash\nnpx hardhat deploy --network rinkeby\n```\n\n# Create NFT \u0026 View on OpenSea\n\nOnce deployed, you can run a script to create a new NFT. It'll look something like this: \n\n[Feeds NFT Opensea](https://testnets.opensea.io/assets/0x2695C58d06501A0f62d3c80e3009DFc655632f7c/0)\n\nThis will:\n1. Deploy our NFT Feeds contract\n2. Add a thumbsup and thumbsdown svg as our 2 imageURIs\n3. Create 1 NFT \n\n## Important notes for SVGs\n\n1. Make sure all the double quotes are single quotes\n\nUsing SVGs will allow you to make all the drawings directly on-chain, and store them on chain too! For example, you could store an SVG as a string, and then edit it to change your drawings. \n\n## Other Notes\n\n1. I wasn't able to make `data:image/png` types work as an imageURI, but hypothetically it should. \n\n## Test\nTests are located in the [test](https://github.com/smartcontractkit/hardhat-starter-kit/tree/main/test) directory, and are split between unit tests and integration tests. Unit tests should only be run on local environments, and integration tests should only run on live environments.\n\nTo run unit tests:\n\n```bash\nnpx harhat test\n```\n\n\n## Verify on Etherscan\n\nYou'll need an `ETHERSCAN_API_KEY` environment variable. You can get one from the [Etherscan API site.](https://etherscan.io/apis)\n\n```\nnpx hardhat verify --network \u003cNETWORK\u003e \u003cCONTRACT_ADDRESS\u003e \u003cCONSTRUCTOR_PARAMETERS\u003e\n```\nexample:\n\n```\nnpx hardhat verify --network kovan 0x9279791897f112a41FfDa267ff7DbBC46b96c296 \"0x9326BFA02ADD2366b30bacB125260Af641031331\"\n```\n\n### Linting\n\n```\nyarn lint:fix\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickalphac%2Fchainlink-the-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickalphac%2Fchainlink-the-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickalphac%2Fchainlink-the-graph/lists"}