{"id":13734816,"url":"https://github.com/ton-ion/tonion-contracts","last_synced_at":"2025-05-08T11:31:06.704Z","repository":{"id":246038563,"uuid":"819028010","full_name":"ton-ion/tonion-contracts","owner":"ton-ion","description":"TonIon Contracts is a reusable smart contract library and toolkit for the Tact language on the TON blockchain","archived":false,"fork":false,"pushed_at":"2024-07-25T23:01:55.000Z","size":184,"stargazers_count":17,"open_issues_count":9,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-04T03:04:08.746Z","etag":null,"topics":["developer-tools","library","smart-contracts","tact","ton","tonion"],"latest_commit_sha":null,"homepage":"https://tonion.tech/","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/ton-ion.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-23T15:14:25.000Z","updated_at":"2024-08-01T09:51:10.000Z","dependencies_parsed_at":"2024-07-16T00:56:38.372Z","dependency_job_id":null,"html_url":"https://github.com/ton-ion/tonion-contracts","commit_stats":null,"previous_names":["open-gem/opengem-contracts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ton-ion%2Ftonion-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ton-ion%2Ftonion-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ton-ion%2Ftonion-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ton-ion%2Ftonion-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ton-ion","download_url":"https://codeload.github.com/ton-ion/tonion-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224727087,"owners_count":17359530,"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":["developer-tools","library","smart-contracts","tact","ton","tonion"],"created_at":"2024-08-03T03:01:00.198Z","updated_at":"2025-05-08T11:31:06.677Z","avatar_url":"https://github.com/ton-ion.png","language":"TypeScript","funding_links":[],"categories":["Tools and utilities [↑](#contents)"],"sub_categories":["Frameworks and libraries"],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003cimg alt=\"TonIon\" src=\"./assets/banner.png\" width=\"540\" height=\"320\" /\u003e\n\u003c/h1\u003e\n\n\u003cbr/\u003e\n\nTonIon Contracts is a reusable smart contract library and toolkit for the Tact language on the TON blockchain. TonIon aims to provide reliable and efficient contract components to streamline the development of TON-based decentralized applications.\n\n## Document\n\nYou can find Tonion documents on **[Tonion docs](https://tonion.tech)**\n\n### Traits\nadd the `traits (contracts/traits)` to your project `contracts/imports`, then\nImport the required contracts and traits in your Tact code.\n\n#### Sample Jetton Master:\n\n```ts\nimport \"@stdlib/deploy\";\nimport \"../imports/tonion/JettonMaster.tact\";\nimport \"../imports/tonion/JettonWallet.tact\";\n\ncontract MyJetton with JettonMaster, Deployable {\n    total_supply: Int as coins;\n    owner: Address;\n    jetton_content: Cell;\n    mintable: Bool;\n    \n    init(owner: Address, content: Cell){\n        self.total_supply = 0;\n        self.owner = owner;\n        self.mintable = true;\n        self.jetton_content = content;\n    }\n\n    override inline fun calculate_jetton_wallet_init(owner_address: Address): StateInit {\n        return initOf MyJettonWallet(owner_address, myAddress());\n    }\n\n}\n```\n\n#### Sample Jetton Wallet:\n```ts\nimport \"@stdlib/deploy\";\nimport \"../imports/tonion/JettonMaster.tact\";\nimport \"../imports/tonion/JettonWallet.tact\";\n\ncontract MyJettonWallet with JettonWallet, Deployable {\n    balance: Int as coins = 0;\n    owner: Address;\n    jetton_master: Address;\n\n    init(owner: Address, jetton_master: Address) {\n        self.owner = owner;\n        self.jetton_master = jetton_master;\n    }\n\n    override inline fun calculate_jetton_wallet_init(owner_address: Address): StateInit {\n        return initOf MyJettonWallet(owner_address, self.jetton_master);\n    }\n}\n```\n\u003cbr\u003e\n\n### implementation\nactually you can find implementation for the traits or TEPs in mock [contracts/mock](./contracts/mocks/) directory\n\n\u003cbr\u003e\n\n### Tonion-CLI\n\nWe are working on a solution to use `npm` to install Tonion Contracts and import them directly into your contracts without copying the files manually.\nAdditionally, we are exploring potential changes in Tact to support importing directly from GitHub or similar platforms.\n\n## Traits\n\n```plaintext\n┌ contracts/traits\n│\n├── access\n│   │\n│   ├── OwnableTransferable2Step.tact ✅\n│   │\n│   └── AccessControl.tact ✅\n│\n├── utils\n│   │\n│   └── Counter.tact ✅\n│   \n├── payments\n│   │\n│   └── PaymentSplitter.tact ✅\n│   \n└── tokens\n    │\n    ├── jetton\n    │   │\n    │   ├── JettonMaster.tact ✅\n    │   ├── JettonWallet.tact ✅\n    │   │\n    │   └── extensions\n    │       │\n    │       ├── MaxSupply.tact ✅\n    │       │\n    │       └── Approveable.tact ❓\n    │\n    │\n    └── NFT\n        │\n        ├── NFTCollection.tact ⏳\n        ├── NFTItem.tact ⏳\n        │\n        └── extensions\n            │\n            ├── Editable.tact ⏳\n            │\n            ├── MaxSupply.tact ⏳\n            │\n            └── Royalty.tact ⏳\n\n```\n\n## Scripts\n\n-   **Build All Contracts**: Compiles all the contracts in the library.\n\n    ```sh\n    npm run build:all\n    ```\n\n-   **Run Tests**: Executes the test suite using Jest.\n    ```sh\n    npm test\n    ```\n\n## Project Structure\n\n```plaintext\n┌── contracts\n│   │\n│   ├── traits\n│   │   │\n│   │   └── (trait categories)\n│   │           │\n│   │           └── (trait sub-categories)\n│   │               │\n│   │               └── (trait files)\n│   ├── mocks\n│   │   │\n│   │   └── (mock categories)\n│   │           │\n│   │           └── (mock sub-categories)\n│   │               │\n│   │               └── (mock files)\n├── tests\n│   │\n│   ├── (test categories)\n│   │       │\n│   │       └── (test files)\n│   │\n│   └── main.spec.ts\n│\n├── wrappers\n│   │\n│   └──(wrapper file)\n│\n├── package.json\n│\n└── README.md\n```\n\n## Contributing\n\nWe welcome contributions from the community! If you'd like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Add a feature or fix a bug\n3. Open a pull request.\n\n## Contributors\n\n\u003c!-- readme: contributors -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/ZigBalthazar\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/42387185?v=4\" width=\"50;\" alt=\"ZigBalthazar\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eZig Blathazar\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/kehiy\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/89645414?v=4\" width=\"50;\" alt=\"kehiy\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eKay\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/olumo-oke\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/173970179?v=4\" width=\"50;\" alt=\"olumo-oke\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eolumo-oke\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/satyasai69\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/62896328?v=4\" width=\"50;\" alt=\"satyasai69\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003esatya sai\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/seniorGarin\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/72135452?v=4\" width=\"50;\" alt=\"seniorGarin\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eseniorGarin\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: contributors -end --\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [MIT License](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fton-ion%2Ftonion-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fton-ion%2Ftonion-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fton-ion%2Ftonion-contracts/lists"}