{"id":24326682,"url":"https://github.com/rggh/tokenz","last_synced_at":"2025-10-24T20:18:40.813Z","repository":{"id":272794589,"uuid":"917778602","full_name":"RGGH/tokenz","owner":"RGGH","description":"Token Contract","archived":false,"fork":false,"pushed_at":"2025-01-16T16:45:54.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T04:11:30.365Z","etag":null,"topics":["learning-rust","rust","smart-contracts","soroban","soroban-sdk","stellar"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/RGGH.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":"2025-01-16T16:20:58.000Z","updated_at":"2025-01-16T16:45:55.000Z","dependencies_parsed_at":"2025-01-16T17:53:53.810Z","dependency_job_id":"dd430345-584e-403e-a20b-6bf290d064e7","html_url":"https://github.com/RGGH/tokenz","commit_stats":null,"previous_names":["rggh/tokenz"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RGGH/tokenz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2Ftokenz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2Ftokenz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2Ftokenz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2Ftokenz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RGGH","download_url":"https://codeload.github.com/RGGH/tokenz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RGGH%2Ftokenz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011057,"owners_count":26084865,"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-10-12T02:00:06.719Z","response_time":53,"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":["learning-rust","rust","smart-contracts","soroban","soroban-sdk","stellar"],"created_at":"2025-01-17T21:14:08.002Z","updated_at":"2025-10-12T10:42:03.522Z","avatar_url":"https://github.com/RGGH.png","language":"Rust","readme":"### Token Contract\n\nTest uses : Use env.mock_all_auths() for simple testing (allows all auth)\n\n![image](https://github.com/user-attachments/assets/0649f288-75a7-42e3-a174-33efd5e66668)\n---\n\n![image](https://github.com/user-attachments/assets/0e70065c-429a-4b11-a320-dcbda792a792)\n\n\n### Understanding Token Decimals in Soroban\nThe decimal value (18 in your code) determines the divisibility of your token. \nIt represents the number of decimal places that your token can be divided into.\n\n```Common Decimal Values\n0 - No decimals (whole numbers only)\n6 - Common for stablecoins (like USDC)\n7 - Native XLM decimal places\n8 - Common for Bitcoin-like tokens\n18 - Common for Ethereum-like tokens\n```\n\nExamples with Different Decimals\n```Decimal: 2\n1 token = 100 base units\nSmallest unit: 0.01\n```\n\n```Decimal: 7 (XLM standard)\n1 token = 10,000,000 base units\nSmallest unit: 0.0000001\n```\n\n```Decimal: 18 (Your current setting)\n1 token = 1,000,000,000,000,000,000 base units\nSmallest unit: 0.000000000000000001\n```\n\n\n#### How to Choose\nConsider these factors when selecting decimals:\n  ```Use case of your token\n  Industry standards\n  Gas efficiency (smaller decimals = less computation)\n  User experience requirements\n```\n\nExample Code with Different Decimals\n```// For a whole number token\nclient.initialize(\u0026admin, \u00260, \u0026symbol, \u0026token);\n```\n\n```// For an XLM-like token\nclient.initialize(\u0026admin, \u00267, \u0026symbol, \u0026token);\n```\n```// For a stablecoin-like token\nclient.initialize(\u0026admin, \u00266, \u0026symbol, \u0026token);\n```\n\n\nImportant Notes:\nThe decimal value cannot be changed after initialization\nChoose carefully based on your token's intended use\nMore decimals means higher precision but also more complexity\nConsider gas costs when working with large decimal values\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frggh%2Ftokenz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frggh%2Ftokenz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frggh%2Ftokenz/lists"}