{"id":20573475,"url":"https://github.com/siveing/dappiotex","last_synced_at":"2025-09-21T17:05:22.029Z","repository":{"id":182961662,"uuid":"459840363","full_name":"siveing/DappIOTEX","owner":"siveing","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-16T03:36:35.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T18:48:49.080Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siveing.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":"2022-02-16T03:36:34.000Z","updated_at":"2022-02-16T03:36:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc2ee8e2-7dea-472e-8b0c-4d9d827b66cd","html_url":"https://github.com/siveing/DappIOTEX","commit_stats":null,"previous_names":["siveing/dappiotex"],"tags_count":0,"template":false,"template_full_name":"iotexproject/iotex-dapp-sample","purl":"pkg:github/siveing/DappIOTEX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siveing%2FDappIOTEX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siveing%2FDappIOTEX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siveing%2FDappIOTEX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siveing%2FDappIOTEX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siveing","download_url":"https://codeload.github.com/siveing/DappIOTEX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siveing%2FDappIOTEX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276273642,"owners_count":25614217,"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","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-16T05:27:51.646Z","updated_at":"2025-09-21T17:05:21.987Z","avatar_url":"https://github.com/siveing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoTeX dApp Sample V2\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![7121622212283_ pic](https://user-images.githubusercontent.com/448293/120024975-d2604b80-bfa4-11eb-969c-f6f581fe11bf.jpg)\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- [Typescript](https://www.typescriptlang.org/)\n- [Mobx](https://mobx.js.org/README.html)\n- [Chakra](https://chakra-ui.com/)\n- [Cypress](https://www.cypress.io/)\n\n## Intro\n\nA starter for React with Typescript with the fast Vite and the beautiful Chakra, 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\n\ngod.setShowConnecter()  // to show/close the Wallet Selector\n\ngod.currentNetwork.loadBalance() // to load chain coin balance\ngod.currentNetwork.multicall()  // main function to batch read state from contract\ngod.currentNetwork.execContract() // main function to execute contract\n\n\n\n\n// multicall/execContract example\nimport ERC20ABI from \"...\"\n\nconst newToken = {\n    address: \"0x810ee35443639348adbbc467b33310d2ab43c168\",\n    abi: ERC20ABI,\n    symbol: \"\",\n    name: \"\",\n    decimals: \"\",\n    balance: new BignumberState({}),\n}\n\nconst {address, abi} = newToken\n\nawait god.currentNetwork.multicall([\n    { address, abi, method: 'symbol', handler: (v: any) =\u003e (newToken.symbol = v.toString()) },\n    { address, abi, method: 'name', handler: (v: any) =\u003e (newToken.name = v.toString()) },\n    { address, abi, method: 'decimals', handler: (v: any) =\u003e (newToken.decimals = Number(v.toString())) },\n    { address, abi, method: 'balanceOf', params:[god.currentNetwork.account]  handler: newToken.balance},\n);\n\nawait god.currenNetwork.execContract({adderss,abi,method:\"transfer\", params:[\"0x\", \"100000000000000000\"]})\nawait god.currenNetwork.execContract({adderss,abi,method:\"approve\", params:[\"0x\", \"100000000000000000\"]})\n\n\n\n// to help share the bignumber between on function and UI\nimport BN from 'bignumber.js';\nimport { BigNumberState } from '@/store/standard/BigNumberState';\n\nconst tokenAmount = new BigNumberState({value: new BN(1000000000000000000), decimals: 18 })\nconsole.log(tokenAmount.value.toFixed(0), tokenAmount.format)\n// 1000000000000000000, 1\ntokenAmount.setValue(new BN(2000000000000000000))\n// 2000000000000000000, 2\n\n\n```\n\n## Installation\n\nClone the repo and run `yarn install`\n\n## Start\n\nAfter the successfull installation of the packages: `yarn start`\n\n## Tests\n\nYou can build tests with Cypress. I wrote a small test to see if it's enabled. You can run it with `yarn test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiveing%2Fdappiotex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiveing%2Fdappiotex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiveing%2Fdappiotex/lists"}