{"id":20650961,"url":"https://github.com/niklr/vite-staking","last_synced_at":"2025-04-17T12:41:51.480Z","repository":{"id":84678163,"uuid":"413728067","full_name":"niklr/vite-staking","owner":"niklr","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-07T18:14:28.000Z","size":2229,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T06:11:14.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://niklr.github.io/vite-staking/","language":"TypeScript","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/niklr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-05T08:08:05.000Z","updated_at":"2022-05-08T11:50:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d5cdac6-7324-432b-a3aa-1b3ee65b01ae","html_url":"https://github.com/niklr/vite-staking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2Fvite-staking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2Fvite-staking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2Fvite-staking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2Fvite-staking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklr","download_url":"https://codeload.github.com/niklr/vite-staking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249342131,"owners_count":21254228,"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-16T17:24:42.207Z","updated_at":"2025-04-17T12:41:51.473Z","avatar_url":"https://github.com/niklr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vite-staking\n\nStaking pools distribute a chosen native Vite token as a reward to users staking another chosen native Vite token. The total reward rate is fixed, and staking users earn rewards proportional to the amount they stake. Contract can be found [here](https://github.com/weserickson/vite-staking-pools).\n\n\u003ch1 align=\"center\"\u003e\n\t\u003cimg src=\"assets/gui.png\" alt=\"VITE Staking Pools\"\u003e\n\u003c/h1\u003e\n\n## Setup\n\nFirst, download \u0026 install [Node](https://nodejs.org/en/) v14+ and [Yarn](https://yarnpkg.com/getting-started/install).\n\nTo install all dependencies just run the following command in the `app` folder:\n\n```bash\nyarn install\n```\n\n- create .env file based on [.env.example](./app/.env.example)\n\n### Start\n\nStarts the client at http://localhost:3000\n\n```bash\nyarn start\n```\n\n### GraphQL codegen\n\nThis command has to be executed whenever the GraphQL scheme changes.\n\n```bash\nyarn codegen\n```\n\n### Build\n\nBuilds the client into `build` folder.\n\n```bash\nyarn build\n```\n\n### Test\n\n```bash\nyarn test\n```\n\n## Notes\n\nSample response from getPoolInfo:\n\n```js\n[\n  'tti_5649544520544f4b454e6e40', // stakingTokenId\n  'tti_5649544520544f4b454e6e40', // rewardTokenId\n  '1000000000000000000', // totalStakingBalance\n  '10000000000000000000', // totalRewardBalance\n  '7922500', // startBlock\n  '7930500', // endBlock\n  '7922500', // latestRewardBlock\n  '1250000000000000', // rewardPerPeriod\n  '0', // rewardPerToken\n  '0' // paidOut\n]\n```\n\nSample response from getUserInfo:\n\n```js\n[ \n  '1000000000000000000', // stakingBalance\n  '0' // rewardDebt\n]\n```\n\nGet token information from ViteX API\n\nhttps://vitex.vite.net/api/v1/token/detail?tokenId=tti_5649544520544f4b454e6e40\n\n```json\n{\n    \"code\": 0,\n    \"msg\": \"ok\",\n    \"data\": {\n        \"tokenId\": \"tti_5649544520544f4b454e6e40\",\n        \"name\": \"VITE\",\n        \"symbol\": \"VITE\",\n        \"originalSymbol\": \"VITE\",\n        \"totalSupply\": \"1023020137199357914813224782\",\n        \"publisher\": \"vite_0000000000000000000000000000000000000004d28108e76b\",\n        \"tokenDecimals\": 18,\n        \"tokenAccuracy\": \"0.000000000000000001\",\n        \"publisherDate\": 1558411200,\n        \"reissue\": 1,\n        \"urlIcon\": \"https://token-profile-1257137467.cos.ap-hongkong.myqcloud.com/icon/e6dec7dfe46cb7f1c65342f511f0197c.png\",\n        \"gateway\": {\n            \"name\": \"Vite Gateway\",\n            \"icon\": null,\n            \"policy\": {\n                \"en\": \"https://x.vite.net/viteLabsGatePrivacy.html\"\n            },\n            \"overview\": {\n                \"en\": \"Vite Gateway runs cross-chain services for four coins: BTC, ETH, USDT(ERC20)\",\n                \"zh\": \"Vite Gateway runs cross-chain services for four coins: BTC, ETH, USDT(ERC20)\"\n            },\n            \"links\": {\n                \"website\": [\n                    \"https://vite.org\"\n                ],\n                \"whitepaper\": [\n                    \"https://github.com/vitelabs/whitepaper/\"\n                ],\n                \"explorer\": [\n                    \"https://explorer.vite.net\"\n                ],\n                \"email\": [\n                    \"gateway@vite.org\"\n                ]\n            },\n            \"support\": \"gateway@vite.org\",\n            \"serviceSupport\": \"https://vitex.zendesk.com/hc/en-001/requests/new\",\n            \"isOfficial\": false,\n            \"level\": 0,\n            \"website\": \"https://vite.org\",\n            \"mappedToken\": {\n                \"symbol\": \"VITE\",\n                \"name\": \"ViteToken\",\n                \"tokenCode\": \"1564\",\n                \"platform\": \"ETH\",\n                \"tokenAddress\": \"0xadd5E881984783dD432F80381Fb52F45B53f3e70\",\n                \"standard\": \"ERC20\",\n                \"url\": \"https://crosschain.vite.net/gateway/eth\",\n                \"tokenIndex\": null,\n                \"icon\": \"https://token-profile-1257137467.cos.ap-hongkong.myqcloud.com/icon/e6dec7dfe46cb7f1c65342f511f0197c.png\",\n                \"decimal\": 18,\n                \"mappedTokenExtras\": [\n                    {\n                        \"symbol\": \"VITE\",\n                        \"name\": null,\n                        \"tokenCode\": \"1588\",\n                        \"platform\": \"BSC\",\n                        \"tokenAddress\": \"0x2794dad4077602ed25a88d03781528d1637898b4\",\n                        \"standard\": \"BEP20\",\n                        \"url\": \"https://crosschain.vite.net/gateway/bsc\",\n                        \"tokenIndex\": null,\n                        \"icon\": \"https://token-profile-1257137467.cos.ap-hongkong.myqcloud.com/icon/e6dec7dfe46cb7f1c65342f511f0197c.png\",\n                        \"decimal\": 18,\n                        \"mappedTokenExtras\": null\n                    }\n                ]\n            },\n            \"url\": \"https://crosschain.vite.net/gateway/eth\"\n        },\n        \"links\": {\n            \"youtube\": [\n                \"https://www.youtube.com/channel/UC8qft2rEzBnP9yJOGdsJBVg\"\n            ],\n            \"forum\": [\n                \"https://forum.vite.net/\"\n            ],\n            \"website\": [\n                \"https://vite.org/\"\n            ],\n            \"github\": [\n                \"https://github.com/vitelabs\"\n            ],\n            \"twitter\": [\n                \"https://twitter.com/vitelabs/\"\n            ],\n            \"whitepaper\": [\n                \"https://github.com/vitelabs/whitepaper\"\n            ],\n            \"discord\": [\n                \"https://discordapp.com/invite/CsVY76q/\"\n            ],\n            \"facebook\": [\n                \"https://www.facebook.com/vitelabs/\"\n            ],\n            \"explorer\": [\n                \"https://explorer.vite.net/\",\n                \"https://vitescan.io/\"\n            ],\n            \"reddit\": [\n                \"https://www.reddit.com/r/vitelabs/\"\n            ],\n            \"medium\": [\n                \"https://medium.com/vitelabs/\"\n            ],\n            \"instagram\": [\n                \"https://www.instagram.com/vite.labs/\"\n            ]\n        },\n        \"overview\": {\n            \"en\": \"Vite describes itself as a public chain designed to provide a fast and feeless payment network and low-cost dApp platform for use in enterprise-grade applications. Vite uses a Directed Acyclic Graph (DAG) architecture with delegated Proof-of-Stake consensus algorithm. To reduce the security risks associated with DAG, Vite incorporates its Snapshot Chain technology.\"\n        }\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklr%2Fvite-staking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklr%2Fvite-staking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklr%2Fvite-staking/lists"}