{"id":24307062,"url":"https://github.com/fulldecent/solidity-template","last_synced_at":"2025-06-16T06:36:50.697Z","repository":{"id":41857549,"uuid":"372262414","full_name":"fulldecent/solidity-template","owner":"fulldecent","description":"The starting point for every Solidity project","archived":false,"fork":false,"pushed_at":"2022-08-22T13:39:41.000Z","size":2258,"stargazers_count":17,"open_issues_count":7,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-05T16:11:08.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fulldecent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"fulldecent","custom":"http://paypal.me/fulldecent/"}},"created_at":"2021-05-30T16:23:41.000Z","updated_at":"2024-10-30T00:55:53.000Z","dependencies_parsed_at":"2022-09-24T05:30:30.638Z","dependency_job_id":null,"html_url":"https://github.com/fulldecent/solidity-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/fulldecent/solidity-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Fsolidity-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Fsolidity-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Fsolidity-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Fsolidity-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fulldecent","download_url":"https://codeload.github.com/fulldecent/solidity-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fulldecent%2Fsolidity-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260114990,"owners_count":22961023,"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-17T03:49:57.878Z","updated_at":"2025-06-16T06:36:50.654Z","avatar_url":"https://github.com/fulldecent.png","language":"Solidity","funding_links":["https://github.com/sponsors/fulldecent","http://paypal.me/fulldecent/"],"categories":[],"sub_categories":[],"readme":"**PROJECT STATUS: Technology preview, bug bounty not active.**\n\n# Solidity Template — Your Smart Contract Starting Point\n\nThis project is sponsored by: XXXX XXXX XXXX, your name here. Contact [Will](https://twitter.com/fulldecent) for details.\n\nClick at top to WATCH this repository for updates and security fixes, and click SPONSOR above to ensure updates and fixes keep coming.\n\n## How to use this\n\n1. Click USE THIS TEMPLATE above to make your own repository based on this template.\n\n2. Install project and run all tests\n   ```sh\n   # Install Node 14+ (or nvm install 14 \u0026\u0026 nvm use 14)\n   yarn install\n   yarn test\n   ```\n\n3. Add your own application code inside the [contract](contracts) folder and tests inside the Tests folder.\n\n4. Delete stuff you don't need.\n\n5. Make sure tests still pass.\n\n6. Deploy and make a GitHub release showing your deployed address.\n\n## Introduction\n\nThis repository is a starting point for anybody developing their own Solidity smart contracts. It is opinionated. You should use this as your starting point for all your projects.\n\n**Reusable utilities**\n\nSee the contracts/Utilities folder.\n\n**Implementations**\n\nSee the contracts folder. In here are the contracts you would use to deploy your contract and other implementation-specific details.\n\n## Run test suite\n\nRun this each time you change contracts or test scripts:\n\n```sh\nyarn run prepare\nyarn run lint # note, we do not use Prettier style for Solidity\nFORCE_COLOR=1 ENABLE_GAS_REPORT=true yarn run test\nyarn run test:inheritance\nyarn run coverage\n```\n\n## Smooth sailing\n\n1. Install VS Code\n2. Install VS Code Remote - Containers extension\n3. Install a container system\n   1. Install podman (maybe `brew install podman`?)\n   2. `podman machine init`\n   3. `podman machine start`\n   4. Set VS Code setting Remote \u003e Containers \u003e Docker Path to `podman`\n\n4. Install VS Code extension [Mocha Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter)  ([recommended](https://hardhat.org/guides/vscode-tests.html) by Hardhat)\n\n\n\n// todo: get mocha running inside container https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter\n\n## Contributing\n\n:moneybag: See our bug bounty at [BUG-BOUNTY.md](BUG-BOUNTY.md) (NOT YET ACTIVE).\n\nThis repository is supported by William Entriken. We are accepting contributions of new features to the repository but have not defined yet which new feaures are welcome (!).\n\nPlease send pull requests to improve documentation and test cases. Please send issues for anything that might be improved.\n\n### Idioms\n\n* The zero address (0x00...00) is no more special than the one address (0x00...01). If your application treats them differently, document it.\n* Log things that people might reasonably want to look up or index.\n\n## Style guide\n\nLocal conventions in this project include:\n\n* \u003ckbd\u003e.sol\u003c/kbd\u003e \u003ckbd\u003e.js\u003c/kbd\u003e 120 hard limit line length\n* \u003ckbd\u003e.md\u003c/kbd\u003e File names and headings are sentence case. Except the name of this project is title case.\n\nWe recognize the following as best practice for all Solidity development:\n\n* Code documentation\n\n  * \u003e  It is recommended that Solidity contracts are fully annotated using [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html#natspec) for all public interfaces (everything in the ABI).\n    \u003e\n    \u003e https://docs.soliditylang.org/en/latest/style-guide.html?highlight=style\n\n  * Always use NatSpec with the `///` flavor (because [Solidity documentation](https://docs.soliditylang.org/en/latest/natspec-format.html) uses that one first, we can assume it is preferred). \n\n  * Align whitespace for tags, and then params do:\n\n    ```solidity\n    /// @notice Hi\n    /// @dev    This does things.\n    /// @param  name the self-chosen name for this entity\n    /// @param  age  time since their birth, in seconds\n    ```\n\n    not:\n\n    ```solidity\n    /// @notice Hi\n    /// @dev This does things.\n    /// @param name the self-chosen name for this entity\n    /// @param age time since their birth, in seconds\n    ```\n\n  * For `@param` (and state variable `@dev`), use  sentence case without capitalization for the first letter, do:\n\n    ```solidity\n    /// @param tokenID the token to operate on\n    ```\n\n    not:\n\n    ```solidity\n    /// @param tokenID The token to operate on.\n    ```\n\n  * For `@notice`...\n\n    * with an `event`, use past-simple tense without a period like \"Tokens were transferred\".\n    * with a `function`, use sentence case in present-simple tense without a period like \"Finish a sale\".\n\n* When comparing things, prefer to compare what we have versus the requirement, like `msg.sender == owner` rather than the reverse order.\n\n* For error conditions, prefer using `revert()` with an `error`. If using `require()`, always include a revert-string and that string must start with the name of the contract/library.\n\n* A data structure (a `library` with an embedded `struct`) must name the `struct` as `self`.\n\n* For abstract contracts, design for safety by enforcing rules if possible\n\n  - See in ThreeChiefOfficers how the state variables are kept private. This is because the\n    security guarantee (limited functionality) requires that an inheriting contract will not\n    those values. If it had used non-private scope then inheriting contracts could have violated that.\n\n* Use an underscore (`_`) suffix for function parameters that would collide with a named state variable.\n\nWhere not more specifically addressed above, we defer all style decisions to (in order):\n\n1. The [Solidity Style Guide](https://docs.soliditylang.org/en/v0.8.12/style-guide.html?highlight=style) where it makes sense\n   1. Prefix private/internal functions \u0026 variables with underscore (`_`)\n2. Conventions in [Seaport](https://github.com/ProjectOpenSea/seaport)\n3. Conventions in [OpenZeppelin Contracts](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol)\n\n## References\n\n- Uses [best practices for developing Solidity projects](https://github.com/fulldecent/solidity-template)\n- Great implementation examples for setting up automated testing are maintained in the [OpenZeppelin Contracts project](https://github.com/OpenZeppelin/openzeppelin-contracts)\n  - Hardhat is preferred for building / see also [Foundry](https://github.com/gakonst/foundry) as a competitive offering\n- A good review of setting up your editor to use tools here is provided [by Yarn](https://yarnpkg.com/getting-started/editor-sdks)\n- Set up VS Code\n  - See [Hardhat + Mocha notes](https://hardhat.org/guides/vscode-tests.html)\n- Style\n  - Follow automated test cases and [Solidity style guide](https://docs.soliditylang.org/en/latest/style-guide.html), especially use [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html?highlight=natspec) everywhere\n  - Use underbar prefix for and only for private variables/functions, see https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2798\n- Use the contract name in every revert message\n- Use a container for all work\n\n- \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2Fsolidity-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffulldecent%2Fsolidity-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffulldecent%2Fsolidity-template/lists"}