{"id":18850123,"url":"https://github.com/everfinance/token-demo","last_synced_at":"2025-04-14T09:21:16.082Z","repository":{"id":48680580,"uuid":"312146133","full_name":"everFinance/token-demo","owner":"everFinance","description":"A rollup token issued on Arweave.","archived":false,"fork":false,"pushed_at":"2023-03-16T13:10:04.000Z","size":617,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T01:38:06.311Z","etag":null,"topics":["arweave-blockchain","arweave-dapp","blockchain","rollup-example"],"latest_commit_sha":null,"homepage":"http://everwallet.io/token/","language":"Go","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/everFinance.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-12T02:29:17.000Z","updated_at":"2023-03-16T13:10:10.000Z","dependencies_parsed_at":"2024-06-19T05:17:40.250Z","dependency_job_id":"6f0fccee-de33-4da0-9fac-37ea157e538d","html_url":"https://github.com/everFinance/token-demo","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/everFinance%2Ftoken-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everFinance%2Ftoken-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everFinance%2Ftoken-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everFinance%2Ftoken-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/everFinance","download_url":"https://codeload.github.com/everFinance/token-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852186,"owners_count":21171843,"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":["arweave-blockchain","arweave-dapp","blockchain","rollup-example"],"created_at":"2024-11-08T03:27:47.833Z","updated_at":"2025-04-14T09:21:16.053Z","avatar_url":"https://github.com/everFinance.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# token-demo\n\n[中文](./README_ZH.md)\n\n[demo](http://everwallet.io/token/)\n\nA rollup token issued on Arweave.\n\n- Three-party verification\n- Fast as traditional Internet applications\n- Very cheap\n- Support MetaMask, compatible with Ethereum\n\n## Architecture\n\n![arch](./demo-0.png)\n\n## Module\n\n### Application Modules\n\n#### issuer\n\nToken issuance program, provide the WEB of Token, and token API.\n\n##### API:\n\n- balanceOf: query user's balance\n- txsByAddress: query user's transactions\n- txs: query all transactions\n- submitTx: user signature and submit transaction\n\n#### detector\n\ndetector program automatically loads the data on Arweave after running, and provide API to query token transactions.\n\n##### API:\n\n- balanceOf: query user's balance\n- txsByAddress: query user's transactions\n- txs: query all transactions\n\n### Other modules\n\n#### token\n\ntoken core module, providing ExecuteTx to execute transactions\n\n#### tracker\n\nArweave data tracking program, parse the data into tx for output\n\n#### web\n\nApplication front-end page\n\n#### cache\n\nSave the off-chain calculation state, convenient for API query and output\n\n## Build \u0026 Run\n\nAfter the build is completed, a build folder will be created, containing two applications, issuer and detector.\n\n```shell\nmake all\n```\n\n### issuer\n\nRun the program when the operator issues tokens on its own\n\nPrepare:\n\n1. An AR private key with a certain AR balance, such as 0.1 AR\n2. The name of the token\n3. The address of the creator who issued the token, which is the AR wallet address in 1 step\n\nRun:\n\n1. Place the keyfile in the application root directory\n```shell\n./test-keyfile.json\n```\n2. Run\n```shell\nGIN_MODE=release \\\nTOKEN_SYMBOL={{Your token name}} \\\nTOKEN_OWNER={{Token creator address}} \\\nKEY_PATH={{Keyfile path}} \\\nPORT={{HTTP port}} ./build/issuer\n```\neg: (***Note!!! You need to add `:` before the PORT. The correct writing is `:80`, not `80`***)\n```shell\nGIN_MODE=release \\\nTOKEN_SYMBOL=ROL \\\nTOKEN_OWNER=dQzTM9hXV5MD1fRniOKI3MvPF_-8b2XDLmpfcMN9hi8 \\\nKEY_PATH='./test-keyfile.json' \\\nPORT=:80 ./build/issuer\n```\n3. Click on `Connect Wallet`, use MetaMask for Claim and Transfer\n```\nhttp://127.0.0.1/token/\n```\n\n![demo-1](./demo-1.png)\n\n### detector\n\nTransactions from issuer can be checked through the detector.\n\nPrepare:\n\n1. token name\n2. The address of the creator who issued the token\n\nRun the program:\n\n```shell\nTOKEN_SYMBOL=ROL \\\nTOKEN_OWNER=dQzTM9hXV5MD1fRniOKI3MvPF_-8b2XDLmpfcMN9hi8 \\\nPORT=:80 ./build/detector\n```\n\nWait for the program to complete sync, use the following command to query the data:\n\n```shell\ncurl 'http://127.0.0.1/balanceOf/{{wallet address}}' # Query wallet balance\ncurl 'http://127.0.0.1/txs/{{wallet address}}' # Query all transactions of the wallet\ncurl 'http://127.0.0.1/txs' # Query all historical transactions\n```\n\n## Development\n\ntest\n\n```shell\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverfinance%2Ftoken-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feverfinance%2Ftoken-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverfinance%2Ftoken-demo/lists"}