{"id":13408697,"url":"https://github.com/Elrond-Giants/erd-next-starter","last_synced_at":"2025-03-14T13:31:54.556Z","repository":{"id":46749833,"uuid":"463569534","full_name":"elrond-giants/erd-next-starter","owner":"elrond-giants","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-27T11:14:53.000Z","size":1026,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-31T20:31:57.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elrond-giants.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-25T14:48:58.000Z","updated_at":"2023-07-11T14:08:42.000Z","dependencies_parsed_at":"2023-09-27T17:21:57.423Z","dependency_job_id":null,"html_url":"https://github.com/elrond-giants/erd-next-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferd-next-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferd-next-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferd-next-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrond-giants%2Ferd-next-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elrond-giants","download_url":"https://codeload.github.com/elrond-giants/erd-next-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584408,"owners_count":20314752,"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-07-30T20:00:54.657Z","updated_at":"2025-03-14T13:31:54.138Z","avatar_url":"https://github.com/elrond-giants.png","language":"TypeScript","funding_links":[],"categories":["MultiversX community"],"sub_categories":["SDKs and dev tools"],"readme":"# Elrond Giants dapp template\n\n\u003cimg src=https://giants.fra1.cdn.digitaloceanspaces.com/dapp-template-os.jpg  width=\"550px\" alt=\"elrond giants dapp template banner\"/\u003e\n\nThis is a dapp template based on [Next.js](https://nextjs.org/)\nand [erd-react-hooks](https://github.com/Elrond-Giants/erd-react-hooks).\n\nIt offers authentication with Maiar App, Web Wallet, Extension, and Ledger. It also includes methods to easily sign and\nmake\ntransactions, query smart contracts, and a few utility methods.\n\nThis template is used as a starting point for many of the [Elrond Giants](https://elrondgiants.com/) projects, so it's\nvery opinionated.\n\n## Getting Started\n\n#### Get the template\n\nStart by creating a repository from this template.\n\n![use repository template](https://docs.github.com/assets/cb-36544/images/help/repository/use-this-template-button.png)\n\nClick on **Use this template** and then clone your newly created repository.\n\n#### Install the dependencies\n\n```bash\nnpm install\n```\n\n#### Set the .env file\n\nWe have included the .env.development and .env.production files, which contain just elrond-specific environment\nvariables. If you don't use a smart contract you don't need to do anything.\n\nIf you need to interact with a smart contract, create your .env file and set the `NEXT_PUBLIC_CONTRACT_ADDRESS`\nvariable.\n\n#### Launch and explore\n\n```bash\nnpm run dev\n```\n\nOpen your browser, go to [http://localhost:3000](http://localhost:3000) and start exploring.\n\n## How To's\n\n#### Sign and send transaction\n\nTo make a transaction, simply use the hook `useTransction` and everything will be taken care for, from signing the\ntransaction to\nstatus notifications.\n\nSimple egld transaction:\n\n```typescript\nimport {useTransaction} from \"../hooks/useTransaction\";\n\n\nconst {makeTransaction} = useTransaction();\n\nawait makeTransaction({\n    receiver: \"erd...\",\n    data: txData,\n    value: 0.01,\n});\n```\n\nSmart contract call:\n\n```typescript\nimport {useTransaction} from \"../hooks/useTransaction\";\nimport {TransactionPayload} from \"@elrondnetwork/erdjs/out\";\n\n\nconst {makeTransaction} = useTransaction();\nconst txData = TransactionPayload.contractCall()\n    .setFunction(new ContractFunction(\"SomeFunction\"))\n    .addArg(new BigUIntValue(10))\n    .build();\n\n\nawait makeTransaction({\n    receiver: \"erd...\",\n    data: txData,\n    value: 0.01,\n});\n```\n\n#### Make query\n\n```typescript\nexport const getTotalTokensLeft = async (): Promise\u003cnumber\u003e =\u003e {\n    const {data: data} = await querySc(\n        contractAddress,\n        \"getTotalTokensLeft\",\n        {outputType: \"int\"}\n    );\n\n    return parseInt(data, 10);\n};\n```\n\n## Deploy\n\nCheckout the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for details.\n\n\n## Projects that use this template\n\n* [MyERD](https://myerd.live)\n* [Elrond Print](https://elrondprint.com)\n* [Giants Raffle](https://raffle.elrondgiants.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElrond-Giants%2Ferd-next-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FElrond-Giants%2Ferd-next-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FElrond-Giants%2Ferd-next-starter/lists"}