{"id":20974279,"url":"https://github.com/thirdweb-example/nft-staking-app","last_synced_at":"2025-05-14T12:31:29.295Z","repository":{"id":40895577,"uuid":"498194075","full_name":"thirdweb-example/nft-staking-app","owner":"thirdweb-example","description":"An NFT Staking contract deployed using thirdweb deploy, where users stake their ERC721 tokens and earn ERC20 tokens in return!","archived":false,"fork":false,"pushed_at":"2023-10-17T15:31:40.000Z","size":183,"stargazers_count":127,"open_issues_count":3,"forks_count":153,"subscribers_count":8,"default_branch":"main","last_synced_at":"2023-11-07T19:58:17.512Z","etag":null,"topics":["erc20","erc721","ethereum","nft-staking","solidity","staking"],"latest_commit_sha":null,"homepage":"https://nft-staking-contract.thirdweb-example.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thirdweb-example.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}},"created_at":"2022-05-31T05:09:19.000Z","updated_at":"2023-10-31T11:04:36.000Z","dependencies_parsed_at":"2023-02-15T04:45:43.978Z","dependency_job_id":null,"html_url":"https://github.com/thirdweb-example/nft-staking-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fnft-staking-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fnft-staking-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fnft-staking-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thirdweb-example%2Fnft-staking-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thirdweb-example","download_url":"https://codeload.github.com/thirdweb-example/nft-staking-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225294387,"owners_count":17451522,"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":["erc20","erc721","ethereum","nft-staking","solidity","staking"],"created_at":"2024-11-19T04:27:42.021Z","updated_at":"2024-11-19T04:27:42.588Z","avatar_url":"https://github.com/thirdweb-example.png","language":"TypeScript","readme":"\u003e [!Important]  \r\n\u003e This repository is referencing the `mumbai` chain.\r\n\u003e \r\n\u003e `Mumbai` [is deprecated since 08/04/2024](https://blog.thirdweb.com/deprecation-of-mumbai-testnet/), meaning the code in this repository will no longer work out of the box.\r\n\u003e\r\n\u003e You can still use this repository, however you will have to switch any references to `mumbai` to another chain.\r\n\r\n# NFT Staking App\r\n\r\n## Introduction\r\n\r\nThis example demonstrates a use of several thirdweb tools to create an NFT Staking application. In this example, users can stake their ERC721 NFTs and earn ERC20 tokens as a reward. It combines:\r\n\r\n- [NFT Drop contract](https://thirdweb.com/thirdweb.eth/DropERC721): To create a collection of NFTs that users can stake.\r\n- [Token contract](https://thirdweb.com/thirdweb.eth/TokenERC20): To create a token that users can earn as a reward for staking.\r\n- [NFT Staking contract](https://thirdweb.com/thirdweb.eth/NFTStake): To create a contract that users can stake their NFTs in, and earn tokens as a reward.\r\n\r\n## Using This Template\r\n\r\nCreate a project using this example:\r\n\r\n```bash\r\nnpx thirdweb create --template nft-staking-app\r\n```\r\n\r\n- Create an [NFT Drop](https://thirdweb.com/thirdweb.eth/DropERC721) contract using the dashboard.\r\n- Create a [Token](https://thirdweb.com/thirdweb.eth/TokenERC20) contract using the dashboard.\r\n- Create an [NFT Staking](https://thirdweb.com/thirdweb.eth/NFTStake) contract using the dashboard.\r\n- Approve the NFT Staking contract to transfer your tokens.\r\n- Deposit the tokens into the NFT Staking contract.\r\n- Update the information in the [contractAddresses.ts](./consts/contractAddresses.ts) file to\r\n\r\n## Run Locally\r\n\r\nInstall dependencies\r\n\r\n```bash\r\n  # npm\r\n  npm install\r\n\r\n  # yarn\r\n  yarn install\r\n```\r\n\r\nStart the server\r\n\r\n```bash\r\n  # npm\r\n  npm run start\r\n\r\n  # yarn\r\n  yarn start\r\n```\r\n\r\n## Environment Variables\r\n\r\nTo run this project, you will need to add environment variables. Check the `.env.example` file for all the environment variables required and add it to `.env.local` file or set them up on your hosting provider.\r\n\r\n## Deployment\r\n\r\nDeploy a copy of your application to IPFS using the following command:\r\n\r\n```bash\r\n  yarn deploy\r\n```\r\n\r\n## Additional Resources\r\n\r\n- [Documentation](https://portal.thirdweb.com)\r\n- [Templates](https://thirdweb.com/templates)\r\n- [Video Tutorials](https://youtube.com/thirdweb_)\r\n- [Blog](https://blog.thirdweb.com)\r\n\r\n## Contributing\r\n\r\nContributions and [feedback](https://feedback.thirdweb.com) are always welcome! Please check our [open source page](https://thirdweb.com/open-source) for more information.\r\n\r\n## Need help?\r\n\r\nFor help, join the [discord](https://discord.gg/thirdweb) or visit our [support page](https://support.thirdweb.com).\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthirdweb-example%2Fnft-staking-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthirdweb-example%2Fnft-staking-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthirdweb-example%2Fnft-staking-app/lists"}