{"id":30878467,"url":"https://github.com/masdxi/chronograph-evm","last_synced_at":"2025-09-08T05:10:36.366Z","repository":{"id":274256988,"uuid":"922377647","full_name":"MASDXI/chronograph-evm","owner":"MASDXI","description":"Project chronograph-evm explores the design of a 10,000 Baht Digital Wallet by applying relevant Ethereum standards, including ERC-6372 and ERC-7818.","archived":false,"fork":false,"pushed_at":"2025-08-24T07:54:34.000Z","size":2447,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T13:16:22.747Z","etag":null,"topics":["digital-money","erc-6372","erc-7818"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MASDXI.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,"zenodo":null}},"created_at":"2025-01-26T03:06:09.000Z","updated_at":"2025-08-24T07:54:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"116d8224-4e09-4094-b7ae-e86d259c54db","html_url":"https://github.com/MASDXI/chronograph-evm","commit_stats":null,"previous_names":["masdxi/chronograph","masdxi/chronograph-evm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MASDXI/chronograph-evm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASDXI%2Fchronograph-evm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASDXI%2Fchronograph-evm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASDXI%2Fchronograph-evm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASDXI%2Fchronograph-evm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MASDXI","download_url":"https://codeload.github.com/MASDXI/chronograph-evm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MASDXI%2Fchronograph-evm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274135710,"owners_count":25228209,"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-08T02:00:09.813Z","response_time":121,"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":["digital-money","erc-6372","erc-7818"],"created_at":"2025-09-08T05:10:31.169Z","updated_at":"2025-09-08T05:10:36.337Z","avatar_url":"https://github.com/MASDXI.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chronograph-evm\n\n\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"./assets/banner.jpeg\" width=\"360\"/\u003e\n\u003c/h1\u003e\n\nProject `chronograph-evm` explores design of a [10,000 Baht Digital Wallet](https://digitalwallet.go.th) by applying relevant Ethereum standards, including [ERC-6372](https://eips.ethereum.org/EIPS/eip-6372) and [ERC-7818](https://eips.ethereum.org/EIPS/eip-7818).\n\n\u003e [!Important]\n\u003e This is not official source code of Digital Wallet Project form government.\n\n### Requirement\n\nThe system is governed by the following requirements. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” are to be interpreted as described in RFC 2119 and RFC 8174.\n\n- Digital money **SHALL** expire 6 months after the date of receipt.\n- Digital money **MUST** only be spent at registered merchants participating in the program.\n- Digital money **MUST** only be used within the recipient’s domicile district.\n- Digital money **MUST** only be withdrawn or converted into cash after it has been circulated and spent at least 3 times.\n\n### Implementation Approaches\n\nTwo possible approaches are considered for managing the token life span\n\n#### [ERC-7818](https://eips.ethereum.org/EIPS/eip-7818) : [DigitalWalletToken.sol](./contracts/DigitalWalletToken.sol)\n - Supports per-user issuance, meaning each citizen’s 6-month validity period begins at the time of receipt.\n - Suitable if on-boarding occurs at different times.\n\n#### [ERC-6372](https://eips.ethereum.org/EIPS/eip-6372) : [DigitalWalletTokenV2.sol](./contracts/DigitalWalletTokenV2.sol)\n\n- Instead of expiring tokens, the token itself has no lifespan.\nTransferability is restricted within a defined period using time-based clocks.\n- Ensures all citizens share the same start and end date for usability.\n\n\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"./assets/transfer-flow.png\"/\u003e\n\u003c/h1\u003e\n\nWhen citizen transfer Digital Token to merchant expirable token will be burned and minting Merchant Digital Token to merchant at index [0] balance of merchant\n\n\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"./assets/merc-transfer-flow.png\"/\u003e\n\u003c/h1\u003e\n\nWhen merchants transfer tokens between each other, the circulation index increases to track spending cycles\n\n```\nTransfer Cycle 0: Burning Digital Token → Mint Merchant Digital Token\nTransfer Cycle 1: Spender balance[0] → Receiver balance[1]\nTransfer Cycle 2: Spender balance[1] → Receiver balance[2]  \nTransfer Cycle 3: Spender balance[2] → Receiver balance[3]\nTransfer Cycle 4+: Spender balance[3] → Receiver balance[3] (stays at final tier)\n```\n\n### Deployment and Initialization Sequence\n\n1. Deploy Contracts\n   - Deploy `AddressRegistry`.\n   - Deploy `FrozenRegistry`.\n   - Deploy `DigitalWalletToken`, passing the addresses of `AddressRegistry` and `FrozenRegistry` to its constructor.\n   - Deploy `MerchantDigitalToken`, passing the addresses of `AddressRegistry` and `FrozenRegistry` to its constructor.\n\n2. Initialize Contracts\n  - Update the `DigitalWalletToken` contract with the deployed `MerchantDigitalWalletToken` contract address so `DigitalWalletToken` can call mint `MerchantDigitalWalletToken`.\n  - Update the `MerchantDigitalWalletToken` contract with the deployed `DigitalWalletToken` contract address as the issuer.\n\nHere’s a cleaner and more formal revision of that section for your `README.md`:\n\n---\n\n1. Merchant Registration to Exception List\n\n  - After registering a merchant in the `AddressRegistry`, the merchant must also be added to the exception list in the `DigitalWalletToken (ERC7818Exception)` contract.\n  - This can be done either manually or via an owner contract call executed in sequence.  \n   _**Note:** This step is not required when using `DigitalWalletTokenV2`._\n\n\n\n#### Additional Rules\n- Tokens held by citizens **MUST NOT** be transferable from one citizen to another.\n- Tokens held by merchants **MUST NOT** be transferable back to citizens. \n- Tokens held by merchants **MUST** be non-expiring.\n- Transfer **MUST** be validated to ensure that both the spender and the recipient are located within the same district.\n- Circulation tracking (e.g., “spent at least 3 times before cash-out”) **MUST** be implemented.\n\n## Appendix\n\n### Other Possible Solutions\n\n- [ERC-1400: The Security Token Standard](https://www.polymath.network/erc-1400)\n- [ERC-3643: T-REX - Token for Regulated EXchange](https://eips.ethereum.org/EIPS/eip-3643)\n- [ERC-7291: Purpose bound money](https://eips.ethereum.org/EIPS/eip-7291)\n\n## Copyright\n\n`chronograph-evm` Copyright 2025 Sirawit Techavanitch. This repository release under the [GPL-3.0](./LICENSE) license","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasdxi%2Fchronograph-evm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasdxi%2Fchronograph-evm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasdxi%2Fchronograph-evm/lists"}