{"id":24189650,"url":"https://github.com/ztgx/assertionlogic","last_synced_at":"2026-04-17T14:35:43.447Z","repository":{"id":241056556,"uuid":"804192408","full_name":"zTgx/AssertionLogic","owner":"zTgx","description":"This Library is used to write the logic of Assertion.","archived":false,"fork":false,"pushed_at":"2024-05-23T02:14:16.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T08:42:19.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/assertionlogic","language":"Solidity","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/zTgx.png","metadata":{"files":{"readme":"README-Forge.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":"2024-05-22T06:08:34.000Z","updated_at":"2024-05-29T11:03:09.000Z","dependencies_parsed_at":"2024-05-22T07:27:30.489Z","dependency_job_id":"c9cd17ea-ef7c-4cdb-ac36-b42fc274a181","html_url":"https://github.com/zTgx/AssertionLogic","commit_stats":null,"previous_names":["ztgx/assertionlogic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2FAssertionLogic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2FAssertionLogic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2FAssertionLogic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zTgx%2FAssertionLogic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zTgx","download_url":"https://codeload.github.com/zTgx/AssertionLogic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241601167,"owners_count":19988879,"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":"2025-01-13T14:30:16.940Z","updated_at":"2026-04-17T14:35:43.402Z","avatar_url":"https://github.com/zTgx.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"## AssertionLogic\n\nThis Library is used to write the logic of Assertion.\n\n### Example\n\n1. Set Up Your Main Project\n\nIf you don't already have a Forge project, create one:\n```shell\nmkdir MyMainProject\ncd MyMainProject\nforge init\n```\n\n2. Install the Library\n\nUse Forge to install your published library from GitHub:\n```shell\nforge install zTgx/AssertionLogic\n```\nThis command clones the specified GitHub repository into the lib directory of your project.\n\n3. Update Your Configuration\n\nEnsure your foundry.toml file includes the library path:\n```toml\n[profile.default]\nsrc = 'src'\nout = 'out'\nlibs = ['lib']\n```\n\n4. Use the Library in Your Contract\n\nIn your main project, you can now use the installed library. For example, MainContract.sol:\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"AssertionLogic/src/AssertionLogic.sol\";\n\ncontract MainContract {\n    using AssertionLogic for AssertionLogic.CompositeCondition;\n    AssertionLogic.CompositeCondition public compositeCondition;\n\n    function build(uint256 a, uint256 b) public returns (string memory) {\n        compositeCondition.andOp(\"$has_web2_account\", AssertionLogic.Operator.Equal, \"true\");\n        compositeCondition.andOp(\"$has_web3_account\", AssertionLogic.Operator.Equal, \"true\");\n\n        return compositeCondition.toString();\n    }\n}\n```\n\n```json\n{\n    \"and\": [\n        {\n            \"src\": \"$has_web2_account\",\n            \"op\": \"==\",\n            \"dst\": \"true\"\n        },\n        {\n            \"src\": \"$has_web3_account\",\n            \"op\": \"==\",\n            \"dst\": \"true\"\n        }\n    ]\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztgx%2Fassertionlogic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fztgx%2Fassertionlogic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fztgx%2Fassertionlogic/lists"}