{"id":20841395,"url":"https://github.com/iotexproject/iotex-dapp-sample","last_synced_at":"2025-05-12T01:30:34.015Z","repository":{"id":41088279,"uuid":"371575451","full_name":"iotexproject/iotex-dapp-sample","owner":"iotexproject","description":"This is a boilerplate template for making your awesome dApp on IoTeX and ETH, BSC, and other EVM compatible chains","archived":true,"fork":false,"pushed_at":"2024-07-13T19:46:50.000Z","size":2658,"stargazers_count":83,"open_issues_count":2,"forks_count":34,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-23T14:42:50.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dappsample.iotex.dev/","language":"TypeScript","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/iotexproject.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":"2021-05-28T04:04:37.000Z","updated_at":"2025-03-07T16:05:17.000Z","dependencies_parsed_at":"2022-07-21T04:35:04.828Z","dependency_job_id":"434b2a6a-2300-4b8c-a9fe-2d4cd350e836","html_url":"https://github.com/iotexproject/iotex-dapp-sample","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/iotexproject%2Fiotex-dapp-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-dapp-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-dapp-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fiotex-dapp-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotexproject","download_url":"https://codeload.github.com/iotexproject/iotex-dapp-sample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253659150,"owners_count":21943605,"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-18T01:19:56.242Z","updated_at":"2025-05-12T01:30:33.365Z","avatar_url":"https://github.com/iotexproject.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoTeX dApp Sample V3\n\n\u003ca href=\"https://iotex.io/devdiscord\" target=\"_blank\"\u003e\n  \u003cimg src=\"https://github.com/iotexproject/halogrants/blob/880eea4af074b082a75608c7376bd7a8eaa1ac21/img/btn-discord.svg\" height=\"36px\"\u003e\n\u003c/a\u003e\n\n![8861650093939_ pic_hd](https://user-images.githubusercontent.com/448293/171796205-937711d1-e336-4770-9388-ec0b02de3b89.jpg)\n\n\nThis is a boilerplate template for making your awesome dApp on IoTeX and ETH, BSC, and other possible chains ([request here](https://github.com/iotexproject/iotex-dapp-sample-v2/issues/new))\n\nTechnology used in this template are\n\n- [Next](https://github.com/vercel/next.js)\n- [React](https://reactjs.org/)\n- [TRPC](https://trpc.io/)\n- [Typescript](https://www.typescriptlang.org/)\n- [Mobx](https://mobx.js.org/README.html)\n- [Matine](https://mantine.dev/core/theme-icon/)\n- [Cypress](https://www.cypress.io/)\n\n## Intro\n\nA starter for React with Typescript with the fast Vite and the beautiful Matine, tested with the powerful Cypress.\n\n## Cheat Sheet\n\nHere's a cheat sheet list to help you get started quickly\n\n```ts\nimport { rootStore, useStore } from '@/store/index';\n\nconst { god } = useStore();\n// or const god = rootStore.god\n\ngod.isConnect;\n\ngod.currentChain;\ngod.currentChain.chainId; // for current connected chain id\ngod.currentChain.Coin; // eth/bnb/iotx\ngod.currentChain.Coin.balance; // current balance\n// ... see ChainState\n\ngod.currentNetwork;\ngod.currentNetwork.account; // for current connected account address\n// ... see NetworkState\n\ngod.setShowConnecter(); // to show/close the Wallet Selector\n\ngod.currentNetwork.loadBalance(); // to load chain coin balance\n\nawait rpc('query')({\n  UniswapRouter: [\n    { calls: [{ address: '0x95cB18889B968AbABb9104f30aF5b310bD007Fd8', chainId: 4689 }] },\n    {\n      swap: [\n        {\n          args: {\n            sellToken: 'BUSD_b',\n            buyToken: '0xb8744ae4032be5e5ef9fab94ee9c3bf38d5d2ae0',\n            buyAmount,\n            recipient: '0x2AcB8663B18d8c8180783C18b88D60b86de26dF2',\n            offlinePrice: true\n          }\n        },\n        {\n          amount: true,\n          data: true,\n          router: true,\n          path: {\n            address: true,\n            symbol: true,\n            decimals: true,\n            totalSupply: true\n          }\n        }\n      ]\n    }\n  ]\n});\n```\n\n## Generate sdk\n\n```\n$ npm i @smartgraph/cli -g\n$ pnpm dev\n$ smartgraph codegen -l http://localhost:3000/api/graphql -o ./src/lib\n\n```\n\n## Installation\n\nClone the repo and run `pnpm install`\n\n## Start\n\nAfter the successfull installation of the packages: `pnpm dev`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Fiotex-dapp-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotexproject%2Fiotex-dapp-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Fiotex-dapp-sample/lists"}