{"id":30135712,"url":"https://github.com/joaovaladares/erc-properties-hevm","last_synced_at":"2026-05-14T13:35:38.299Z","repository":{"id":221061649,"uuid":"753346804","full_name":"joaovaladares/erc-properties-hevm","owner":"joaovaladares","description":"ERC Properties for Formal Verification using hevm ","archived":false,"fork":false,"pushed_at":"2024-03-14T22:11:54.000Z","size":3376,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-10T22:57:03.620Z","etag":null,"topics":["blockchain","crypto","erc20","ethereum","formal-verification","hevm","solidity","testing-tools","web3"],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/joaovaladares.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":"2024-02-05T23:51:37.000Z","updated_at":"2024-02-06T17:30:10.000Z","dependencies_parsed_at":"2024-03-14T23:25:59.173Z","dependency_job_id":"0d4e6f72-02a2-4c7f-9522-11b946777927","html_url":"https://github.com/joaovaladares/erc-properties-hevm","commit_stats":null,"previous_names":["joaovaladares/erc-properties-hevm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joaovaladares/erc-properties-hevm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaovaladares%2Ferc-properties-hevm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaovaladares%2Ferc-properties-hevm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaovaladares%2Ferc-properties-hevm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaovaladares%2Ferc-properties-hevm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaovaladares","download_url":"https://codeload.github.com/joaovaladares/erc-properties-hevm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaovaladares%2Ferc-properties-hevm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281425557,"owners_count":26499031,"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-28T02:00:06.022Z","response_time":60,"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":["blockchain","crypto","erc20","ethereum","formal-verification","hevm","solidity","testing-tools","web3"],"created_at":"2025-08-10T22:52:12.622Z","updated_at":"2025-10-28T10:40:57.124Z","avatar_url":"https://github.com/joaovaladares.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Properties hevm\n\nThis repository contains implementation of several properties of the Ethereum Token Standards for formal verification using hevm as a tool.\n\n- [ERC-20 Properties](https://github.com/joaovaladares/erc-properties-hevm/blob/main/PROPERTIES.md#erc-20-token-standard-properties)\n\n## Installation\n\nTo run the tests you need to install the following dependencies:\n\n- [foundry](https://github.com/foundry-rs/foundry#installation) (for compiling and easier managment of libs)\n- [hevm](https://github.com/ethereum/hevm?tab=readme-ov-file#installation) (to formally verify our properties)\n\n## Usage\n\nConsider you are using this repository to test your ERC-20 implementation, you should do the following:\n\nFirst, create your ERC-20 token under `src/contracts/ERC-20/`:\n\n```Solidity\n// Example ERC-20 Token for OpenZeppelin\n// SPDX-License-Identifier: MIT \npragma solidity ^0.8.13;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract OpenZeppelinERC20 is ERC20 {\n    constructor() ERC20(\"MyToken\", \"MTK\") {}\n\n    function mint(address to, uint256 amount) public {\n        _mint(to, amount);\n    }\n}\n```\n\nThen you can simply set your token on `test/ERC20PropertiesTest.t.sol` (this is temporary while hevm solve an issue I submitted)\n\n```Solidity\n// Properties tests file\n// SPDX-License-Identifier: MIT \npragma solidity ^0.8.13;\n\nimport {Test} from \"forge-std/Test.sol\";\nimport {OpenZeppelinERC20} from \"src/contracts/ERC-20/OpenZeppelinERC20.sol\";\n\ncontract ERC20PropertiesTest is Test {\n    OpenZeppelinERC20 token; // \u003c--- For now you can simply set your token here\n\n    function setUp() public {\n        token = new OpenZeppelinERC20(); // \u003c--- Don't forget to correctly create it\n    }\n\n    // ERC-20 properties implementation below\n```\n\nThen you simply do\n\n- `forge build` to compile your files\n- `hevm test` to run your prove tests\n\n### Example output for a successful test\n\n```\nRunning 1 tests for test/ERC20PropertiesTest.t.sol:ERC20PropertiesTest\nExploring contract\nSimplifying expression\nExplored contract (36 branches)\nChecking for reachability of 25 potential property violation(s)\n[PASS] prove_transferSuccessReturnsTrue(address,address,uint256)\n```\n\n#### Example output for a fail test (it returns a counterexample)\n\n```\nRunning 1 tests for test/ERC20PropertiesTest.t.sol:ERC20PropertiesTest\nExploring contract\nSimplifying expression\nExplored contract (6 branches)\nChecking for reachability of 1 potential property violation(s)\n[FAIL] proveFail_transferToZeroAddress(uint256,uint256)\n\nFailure: proveFail_transferToZeroAddress(uint256,uint256)\n\n  Counterexample:\n  \n    result:   Successful execution\n    calldata: proveFail_transferToZeroAddress(115792089237316195423570985008687907853269984665640564037096400766478308081662,1048576)\n```\n\n## How to Contribute?\n\n**Important:** always open an issue before opening a Pull Request to discuss about what you want to include in this repo\n\nTo contribute you can consider the following scenarios:\n\n- Propose new properties for an already implemented token standard (e.g. ERC-20)\n- Include properties implementation for new  token standards\n- Optimization or change of already implemented properties\n- Documentation\n\nPlease make sure that if you are implementing new properties it succeeds for OpenZeppelin's implementation as it's our baseline for this repo.\n\n## License\n\n[MIT](https://github.com/0xRalts/properties-hevm/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaovaladares%2Ferc-properties-hevm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaovaladares%2Ferc-properties-hevm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaovaladares%2Ferc-properties-hevm/lists"}