Skip to content

Commit 5bf5b44

Browse files
authored
Merge pull request #287 from crytic/GPT-root
GPT Review ./
2 parents 1a7d9e7 + 4f9e10c commit 5bf5b44

File tree

4 files changed

+98
-100
lines changed

4 files changed

+98
-100
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
# Contributing to Building-secure-contracts
1+
# Contributing to Building-Secure-Contracts
22

3-
First, thanks for your interest in contributing to Building-secure-contracts! We welcome and appreciate all contributions, including bug reports, feature suggestions, tutorials/blog posts, and code improvements.
3+
First, thank you for your interest in contributing to Building-Secure-Contracts! We appreciate and warmly welcome all contributions, which include bug reports, feature suggestions, tutorials/blog posts, and code improvements.
44

5-
If you're unsure where to start, we recommend our [`good first issue`](https://github.com/crytic/building-secure-contracts/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/crytic/building-secure-contracts/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issue labels.
5+
If you're not sure where to begin, we recommend checking out our [`good first issue`](https://github.com/crytic/building-secure-contracts/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https://github.com/crytic/building-secure-contracts/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issue labels.
66

7-
## Bug reports and feature suggestions
7+
## Bug Reports and Feature Suggestions
88

9-
Bug reports and feature suggestions can be submitted to our issue tracker. For bug reports, attaching the contract that caused the bug will help us in debugging and resolving the issue quickly. If you find a security vulnerability, do not open an issue; email opensource@trailofbits.com instead.
9+
Please submit bug reports and feature suggestions to our issue tracker. When reporting a bug, attaching the contract causing the issue is helpful for efficient debugging and resolution. If you discover a security vulnerability, do not open an issue; instead, email opensource@trailofbits.com.
1010

1111
## Questions
1212

1313
Questions can be submitted to the issue tracker, but you may get a faster response if you ask in our [chat room](https://slack.empirehacking.nyc/) (in the #ethereum channel).
1414

15-
## Code
15+
## Code Contributions
1616

17-
building-secure-contracts uses the pull request contribution model. Please make an account on Github, fork this repo, and submit code contributions via pull request. For more documentation, look [here](https://guides.github.com/activities/forking/).
17+
Building-Secure-Contracts follows the pull request contribution model. Create an account on Github, fork this repo, and submit code contributions through pull requests. For additional documentation, refer [here](https://guides.github.com/activities/forking/).
1818

1919
Some pull request guidelines:
2020

21-
- Minimize irrelevant changes (formatting, whitespace, etc) to code that would otherwise not be touched by this patch. Save formatting or style corrections for a separate pull request that does not make any semantic changes.
22-
- When possible, large changes should be split up into smaller focused pull requests.
23-
- Fill out the pull request description with a summary of what your patch does, key changes that have been made, and any further points of discussion, if applicable.
24-
- Title your pull request with a brief description of what it's changing. "Fixes #123" is a good comment to add to the description, but makes for an unclear title on its own.
21+
- Limit unnecessary changes (formatting, whitespace, etc.) to code unrelated to the patch. Save formatting or style corrections for a separate pull request, which doesn't include any semantic changes.
22+
- When possible, break down large changes into smaller, focused pull requests.
23+
- Complete the pull request description with an overview of your patch, including key modifications, and any further discussion points if relevant.
24+
- Use a concise title to describe your pull request's changes. "Fixes #123" is suitable for adding to the description, but not as a standalone title.
2525

2626
## Directory Structure
2727

28-
Below is a rough outline of building-secure-contracts's structure:
28+
Here's a basic overview of Building-Secure-Contracts' structure:
2929

3030
```text
3131
.
32-
├── development-guidelnes # High-level best-practices for all smart contracts
32+
├── development-guidelines # High-level best practices for all smart contracts
3333
├── learn_evm # EVM technical knowledge
34-
├── not-so-smart-contracts # Examples of smart contract common issues. Each issue contains a description, an example and recommendations
35-
├── program-analysis # How to use automated tools to secure contracts
36-
├── ressources # Various online resources
34+
├── not-so-smart-contracts # Examples of common smart contract issues, including descriptions, examples, and recommendations
35+
├── program-analysis # How to utilize automated tools to secure contracts
36+
├── resources # Various online resources
3737
└── ...
3838
```
3939

40-
## Linting and formatting
40+
## Linting and Formatting
4141

4242
To install the formatters and linters, run:
4343

4444
```bash
4545
npm install
4646
```
4747

48-
To run the formatter, use:
48+
To use the formatter, run:
4949

5050
```bash
5151
npm run format
5252
```
5353

54-
To run the linters, use:
54+
To use the linters, run:
5555

5656
```bash
5757
npm run lint
5858
```
5959

60-
To run the individual linters, use:
60+
To use individual linters, run:
6161

6262
- `npm run lint:format` to check the formatting
63-
- `npm run lint:links` to check for invalid links in markdown files
63+
- `npm run lint:links` to verify the validity of links in markdown files
6464

65-
## Create the book
65+
## Creating the Book
6666

67-
We use `mdbook` to generate [secure-contracts.com](https://secure-contracts.com/).
67+
We utilize `mdbook` to generate [secure-contracts.com](https://secure-contracts.com/).
6868

6969
To run it locally:
7070

@@ -73,4 +73,4 @@ cargo install --git https://github.com/montyly/mdBook.git mdbook
7373
mdbook build
7474
```
7575

76-
Note: we use https://github.com/montyly/mdBook.git, which contains https://github.com/rust-lang/mdBook/pull/1584.
76+
Note: We use https://github.com/montyly/mdBook.git, which contains https://github.com/rust-lang/mdBook/pull/1584.

README.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,39 @@
22

33
![](https://github.com/crytic/building-secure-contracts/workflows/CI/badge.svg) ![](https://github.com/crytic/building-secure-contracts/workflows/Echidna/badge.svg)
44

5-
This repository, brought to you by [Trail of Bits](https://www.trailofbits.com/), outlines guidelines and best practices to write secure smart contracts.
5+
Brought to you by [Trail of Bits](https://www.trailofbits.com/), this repository offers guidelines and best practices for developing secure smart contracts. Contributions are welcome, you can contribute by following our [contributing guidelines](https://github.com/crytic/building-secure-contracts/blob/master/CONTRIBUTING.md).
66

7-
We welcome contributions, and you can contribute by following our [contributing guidelines](https://github.com/crytic/building-secure-contracts/blob/master/CONTRIBUTING.md).
7+
**Table of Contents:**
88

9-
**Table of contents:**
10-
11-
- [Development guidelines](./development-guidelines)
12-
- [High-level best practices](./development-guidelines/guidelines.md): High-level best-practices for all smart contracts
13-
- [Incident Response Recommendations](./development-guidelines/incident_response.md): Guidelines on how to formulate an incident response plan
14-
- [Secure development workflow](./development-guidelines/workflow.md): A rough, high-level process to follow while you write code
15-
- [Token integration checklist](./development-guidelines/token_integration.md): What to check when interacting with arbitrary token
16-
- [Learn EVM](./learn_evm): EVM technical knowledge
17-
- [EVM Opcodes](./learn_evm/evm_opcodes.md): Details on all EVM opcodes
9+
- [Development Guidelines](./development-guidelines)
10+
- [High-Level Best Practices](./development-guidelines/guidelines.md): Best practices for all smart contracts
11+
- [Incident Response Recommendations](./development-guidelines/incident_response.md): Guidelines for creating an incident response plan
12+
- [Secure Development Workflow](./development-guidelines/workflow.md): A high-level process to follow during code development
13+
- [Token Integration Checklist](./development-guidelines/token_integration.md): What to check when interacting with arbitrary tokens
14+
- [Learn EVM](./learn_evm): Technical knowledge about the EVM
15+
- [EVM Opcodes](./learn_evm/evm_opcodes.md): Information on all EVM opcodes
1816
- [Transaction Tracing](./learn_evm/tracing.md): Helper scripts and guidance for generating and navigating transaction traces
1917
- [Arithmetic Checks](./learn_evm/arithmetic-checks.md): A guide to performing arithmetic checks in the EVM
20-
- [Yellow Paper Guidance](./learn_evm/yellow-paper.md): Symbol reference for more easily reading the Ethereum yellow paper
21-
- [Forks <> EIPs](./learn_evm/eips_forks.md): Summarize the EIPs included in each Ethereum fork
22-
- [Forks <> CIPs](./learn_evm/cips_forks.md): Summarize the CIPs and EIPs included in each Celo fork _(EVM-compatible chain)_
23-
- [Upgrades <> TIPs](./learn_evm/tips_upgrades.md): Summarize the TIPs included in each TRON upgrade _(EVM-compatible chain)_
24-
- [Forks <> BEPs](./learn_evm/beps_forks.md): Summarize the BEPs included in each BSC fork _(EVM-compatible chain)_
25-
- [Not so smart contracts](./not-so-smart-contracts): Examples of smart contract common issues. Each issue contains a description, an example and recommendations
18+
- [Yellow Paper Guidance](./learn_evm/yellow-paper.md): Symbol reference for easier reading of the Ethereum yellow paper
19+
- [Forks <> EIPs](./learn_evm/eips_forks.md): Summaries of the EIPs included in each Ethereum fork
20+
- [Forks <> CIPs](./learn_evm/cips_forks.md): Summaries of the CIPs and EIPs included in each Celo fork _(EVM-compatible chain)_
21+
- [Upgrades <> TIPs](./learn_evm/tips_upgrades.md): Summaries of the TIPs included in each TRON upgrade _(EVM-compatible chain)_
22+
- [Forks <> BEPs](./learn_evm/beps_forks.md): Summaries of the BEPs included in each BSC fork _(EVM-compatible chain)_
23+
- [Not So Smart Contracts](./not-so-smart-contracts): Examples of common smart contract issues, complete with descriptions, examples, and recommendations
2624
- [Algorand](./not-so-smart-contracts/algorand)
2725
- [Cairo](./not-so-smart-contracts/cairo)
2826
- [Cosmos](./not-so-smart-contracts/cosmos)
2927
- [Substrate](./not-so-smart-contracts/substrate)
3028
- [Solana](./not-so-smart-contracts/solana)
31-
- [Program analysis](./program-analysis): How to use automated tools to secure contracts
32-
- [Echidna](./program-analysis/echidna): a fuzzer that will check your contract's properties.
33-
- [Slither](./program-analysis/slither): a static analyzer available through a CLI and scriptable interface.
34-
- [Manticore](./program-analysis/manticore): a symbolic execution engine that can prove the correctness properties.
35-
- For each tool, this training material will provide:
36-
- a theoretical introduction, a walkthrough of its API, and a set of exercises.
37-
- exercises expected to require ~two hours to practically learn its operation.
38-
- [Resources](./resources): Various online resources
39-
- [Trail of Bits blogposts](./resources/tob_blogposts.md): List of blockchain related blogposts made by Trail of Bits
29+
- [Program Analysis](./program-analysis): Using automated tools to secure contracts
30+
- [Echidna](./program-analysis/echidna): A fuzzer that checks your contract's properties
31+
- [Slither](./program-analysis/slither): A static analyzer with both CLI and scriptable interfaces
32+
- [Manticore](./program-analysis/manticore): A symbolic execution engine that proves the correctness of properties
33+
- For each tool, this training material provides:
34+
- A theoretical introduction, an API walkthrough, and a set of exercises
35+
- Exercises that take approximately two hours to gain practical understanding
36+
- [Resources](./resources): Assorted online resources
37+
- [Trail of Bits Blog Posts](./resources/tob_blogposts.md): A list of blockchain-related blog posts created by Trail of Bits
4038

4139
# License
4240

SUMMARY.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[Introduction](./README.md)
44

5-
- [Development-guidelines](./development-guidelines/README.md)
6-
- [High-level best practices](./development-guidelines/guidelines.md)
7-
- [Token integration checklist](./development-guidelines/token_integration.md)
5+
- [Development Guidelines](./development-guidelines/README.md)
6+
- [High-Level Best Practices](./development-guidelines/guidelines.md)
7+
- [Token Integration Checklist](./development-guidelines/token_integration.md)
88
- [Incident Response Recommendations](./development-guidelines/incident_response.md)
9-
- [Secure development workflow](./development-guidelines/workflow.md)
9+
- [Secure Development Workflow](./development-guidelines/workflow.md)
1010
- [Learn EVM](./learn_evm/README.md)
1111
- [EVM Opcode Reference](./learn_evm/evm_opcodes.md)
1212
- [Transaction Tracing](./learn_evm/tracing.md)
@@ -23,51 +23,51 @@
2323
- [Closing Account](./not-so-smart-contracts/algorand/closing_account/README.md)
2424
- [Closing Asset](./not-so-smart-contracts/algorand/closing_asset/README.md)
2525
- [Group Size Check](./not-so-smart-contracts/algorand/group_size_check/README.md)
26-
- [Time-based Replay Attack](./not-so-smart-contracts/algorand/time_based_replay_attack/README.md)
26+
- [Time-Based Replay Attack](./not-so-smart-contracts/algorand/time_based_replay_attack/README.md)
2727
- [Access Controls](./not-so-smart-contracts/algorand/access_controls/README.md)
28-
- [Asset Id Check](./not-so-smart-contracts/algorand/asset_id_check/README.md)
28+
- [Asset ID Check](./not-so-smart-contracts/algorand/asset_id_check/README.md)
2929
- [Denial of Service](./not-so-smart-contracts/algorand/denial_of_service/README.md)
3030
- [Inner Transaction Fee](./not-so-smart-contracts/algorand/inner_transaction_fee/README.md)
3131
- [Clear State Transaction Check](./not-so-smart-contracts/algorand/clear_state_transaction_check/README.md)
3232
- [Cairo](./not-so-smart-contracts/cairo/README.md)
33-
- [Improper access controls](./not-so-smart-contracts/cairo/access_controls/README.md)
34-
- [Integer division errors](./not-so-smart-contracts/cairo/integer_division/README.md)
35-
- [View state modifications](./not-so-smart-contracts/cairo/view_state/README.md)
36-
- [Arithmetic overflow](./not-so-smart-contracts/cairo/arithmetic_overflow/README.md)
37-
- [Signature replays](./not-so-smart-contracts/cairo/replay_protection/README.md)
33+
- [Improper Access Controls](./not-so-smart-contracts/cairo/access_controls/README.md)
34+
- [Integer Division Errors](./not-so-smart-contracts/cairo/integer_division/README.md)
35+
- [View State Modifications](./not-so-smart-contracts/cairo/view_state/README.md)
36+
- [Arithmetic Overflow](./not-so-smart-contracts/cairo/arithmetic_overflow/README.md)
37+
- [Signature Replays](./not-so-smart-contracts/cairo/replay_protection/README.md)
3838
- [L1 to L2 Address Conversion](./not-so-smart-contracts/cairo/L1_to_L2_address_conversion/README.md)
3939
- [Incorrect Felt Comparison](./not-so-smart-contracts/cairo/incorrect_felt_comparison/README.md)
4040
- [Namespace Storage Var Collision](./not-so-smart-contracts/cairo/namespace_storage_var_collision/README.md)
4141
- [Dangerous Public Imports in Libraries](./not-so-smart-contracts/cairo/dangerous_public_imports_in_libraries/README.md)
4242
- [Cosmos](./not-so-smart-contracts/cosmos/README.md)
43-
- [Incorrect signers](./not-so-smart-contracts/cosmos/incorrect_getsigners/README.md)
44-
- [Non-determinism](./not-so-smart-contracts/cosmos/non_determinism/README.md)
45-
- [Not prioritized messages](./not-so-smart-contracts/cosmos/messages_priority/README.md)
46-
- [Slow ABCI methods](./not-so-smart-contracts/cosmos/abci_fast/README.md)
47-
- [ABCI methods panic](./not-so-smart-contracts/cosmos/abci_panic/README.md)
48-
- [Broken bookkeeping](./not-so-smart-contracts/cosmos/broken_bookkeeping/README.md)
49-
- [Rounding errors](./not-so-smart-contracts/cosmos/rounding_errors/README.md)
50-
- [Unregistered message handler](./not-so-smart-contracts/cosmos/unregistered_msg_handler/README.md)
51-
- [Missing error handler](./not-so-smart-contracts/cosmos/missing_error_handler/README.md)
43+
- [Incorrect Signers](./not-so-smart-contracts/cosmos/incorrect_getsigners/README.md)
44+
- [Non-Determinism](./not-so-smart-contracts/cosmos/non_determinism/README.md)
45+
- [Not Prioritized Messages](./not-so-smart-contracts/cosmos/messages_priority/README.md)
46+
- [Slow ABCI Methods](./not-so-smart-contracts/cosmos/abci_fast/README.md)
47+
- [ABCI Methods Panic](./not-so-smart-contracts/cosmos/abci_panic/README.md)
48+
- [Broken Bookkeeping](./not-so-smart-contracts/cosmos/broken_bookkeeping/README.md)
49+
- [Rounding Errors](./not-so-smart-contracts/cosmos/rounding_errors/README.md)
50+
- [Unregistered Message Handler](./not-so-smart-contracts/cosmos/unregistered_msg_handler/README.md)
51+
- [Missing Error Handler](./not-so-smart-contracts/cosmos/missing_error_handler/README.md)
5252
- [Solana](./not-so-smart-contracts/solana/README.md)
5353
- [Arbitrary CPI](./not-so-smart-contracts/solana/arbitrary_cpi/README.md)
5454
- [Improper PDA Validation](./not-so-smart-contracts/solana/improper_pda_validation/README.md)
5555
- [Ownership Check](./not-so-smart-contracts/solana/ownership_check/README.md)
5656
- [Signer Check](./not-so-smart-contracts/solana/signer_check/README.md)
5757
- [Sysvar Account Check](./not-so-smart-contracts/solana/sysvar_account_check/README.md)
5858
- [Substrate](./not-so-smart-contracts/substrate/README.md)
59-
- [Arithmetic overflow](./not-so-smart-contracts/substrate/arithmetic_overflow/README.md)
60-
- [Don't panic!](./not-so-smart-contracts/substrate/dont_panic/README.md)
61-
- [Weights and fees](./not-so-smart-contracts/substrate/weights_and_fees/README.md)
62-
- [Verify first](./not-so-smart-contracts/substrate/verify_first/README.md)
63-
- [Unsigned transaction validation](./not-so-smart-contracts/substrate/validate_unsigned/README.md)
64-
- [Bad randomness](./not-so-smart-contracts/substrate/randomness/README.md)
65-
- [Bad origin](./not-so-smart-contracts/substrate/origins/README.md)
59+
- [Arithmetic Overflow](./not-so-smart-contracts/substrate/arithmetic_overflow/README.md)
60+
- [Don't Panic!](./not-so-smart-contracts/substrate/dont_panic/README.md)
61+
- [Weights and Fees](./not-so-smart-contracts/substrate/weights_and_fees/README.md)
62+
- [Verify First](./not-so-smart-contracts/substrate/verify_first/README.md)
63+
- [Unsigned Transaction Validation](./not-so-smart-contracts/substrate/validate_unsigned/README.md)
64+
- [Bad Randomness](./not-so-smart-contracts/substrate/randomness/README.md)
65+
- [Bad Origin](./not-so-smart-contracts/substrate/origins/README.md)
6666
- [Program Analysis](./program-analysis/README.md)
6767
- [Echidna](./program-analysis/echidna/README.md)
6868
- [Introduction](./program-analysis/echidna/introduction/README.md)
69-
- [Introduction to fuzzing](./program-analysis/echidna/introduction/fuzzing-introduction.md)
70-
- [How to test a property](./program-analysis/echidna/introduction/how-to-test-a-property.md)
69+
- [Introduction to Fuzzing](./program-analysis/echidna/introduction/fuzzing-introduction.md)
70+
- [How to Test a Property](./program-analysis/echidna/introduction/how-to-test-a-property.md)
7171
- [Basic](./program-analysis/echidna/basic/README.md)
7272
- [How to select the most suitable testing mode](./program-analysis/echidna/basic/testing-modes.md)
7373
- [How to select the best testing approach](./program-analysis/echidna/basic/common-testing-approaches.md)

0 commit comments

Comments
 (0)