Skip to content

Commit 94e7fc7

Browse files
authored
Grammar and Spelling Pass 1 (#938)
This is a first pass at the Grammar and Spelling check for the Safe Smart Account contracts. Some of the changes are subjectively taken from Grammarly. Additional: - Removed the deprecated tests (Don't think we require it anymore, and git has the history if someone requires it)
1 parent c4859f4 commit 94e7fc7

30 files changed

Lines changed: 234 additions & 903 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ coverage.json
1616
yarn-error.log
1717
typechain-types
1818
.vscode
19+
.cache
1920

2021
# Certora Formal Verification related files
2122
.certora_internal

CHANGELOG.md

Lines changed: 118 additions & 122 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
Safe Smart Account
2-
==============
1+
# Safe Smart Account
32

43
[![npm version](https://badge.fury.io/js/%40safe-global%2Fsafe-smart-account.svg)](https://badge.fury.io/js/%40safe-global%2Fsafe-smart-account)
54
[![Build Status](https://github.com/safe-global/safe-smart-account/workflows/safe-smart-account/badge.svg?branch=main)](https://github.com/safe-global/safe-smart-account/actions)
65
[![Coverage Status](https://coveralls.io/repos/github/safe-global/safe-smart-account/badge.svg?branch=main)](https://coveralls.io/github/safe-global/safe-smart-account)
76

87
> :warning: **This branch contains changes that are under development** To use the latest audited version make sure to use the correct commit. The tagged versions that are used by the Safe team can be found in the [releases](https://github.com/safe-global/safe-smart-account/releases).
98
10-
Usage
11-
-----
9+
## Usage
10+
1211
### Install requirements with npm:
1312

1413
```bash
@@ -42,7 +41,7 @@ MNEMONIC=
4241

4342
A collection of the different Safe contract deployments and their addresses can be found in the [Safe deployments](https://github.com/safe-global/safe-deployments) repository.
4443

45-
To add support for a new network follow the steps of the ``Deploy`` section and create a PR in the [Safe deployments](https://github.com/safe-global/safe-deployments) repository.
44+
To add support for a new network follow the steps of the `Deploy` section and create a PR in the [Safe deployments](https://github.com/safe-global/safe-deployments) repository.
4645

4746
### Deploy
4847

@@ -53,6 +52,7 @@ To add support for a new network follow the steps of the ``Deploy`` section and
5352
This will deploy the contracts deterministically and verify the contracts on etherscan using [Solidity 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6) by default.
5453

5554
Preparation:
55+
5656
- Set `MNEMONIC` in `.env`
5757
- Set `INFURA_KEY` in `.env`
5858
- For zkSync, set `ZKSYNC_DEPLOYER_PK` in `.env`
@@ -75,51 +75,54 @@ npx hardhat --network <network> local-verify
7575

7676
It is possible to use the `NODE_URL` env var to connect to any EVM based network via an RPC endpoint. This connection then can be used with the `custom` network.
7777

78-
E.g. to deploy the Safe contract suite on that network you would run `npm run deploy-all custom`.
78+
E.g. to deploy the Safe contract suite on that network you would run `npm run deploy-all custom`.
7979

8080
The resulting addresses should be on all networks the same.
8181

8282
Note: Address will vary if contract code is changed or a different Solidity version is used.
8383

8484
#### Replay protection ([EIP-155](https://eips.ethereum.org/EIPS/eip-155))
8585

86-
Some networks require replay protection, making it incompatible with the default deployment process as it relies on a presigned transaction without replay protection (see https://github.com/Arachnid/deterministic-deployment-proxy).
86+
Some networks require replay protection, making it incompatible with the default deployment process as it relies on a presigned transaction without replay protection (see https://github.com/Arachnid/deterministic-deployment-proxy).
8787

88-
Safe Smart Account contracts use a different deterministic deployment proxy (https://github.com/safe-global/safe-singleton-factory). To make sure that the latest version of this package is installed, run `npm i --save-dev @safe-global/safe-singleton-factory` before deployment. For more information, including deploying the factory to a new network, please refer to the factory repo.
88+
Safe Smart Account contracts use a different deterministic deployment proxy (https://github.com/safe-global/safe-singleton-factory). To make sure that the latest version of this package is installed, run `npm i --save-dev @safe-global/safe-singleton-factory` before deployment. For more information, including deploying the factory to a new network, please refer to the factory repo.
8989

9090
Note: This will result in different addresses compared to hardhat's default deterministic deployment process.
9191

9292
### Verify contract
9393

9494
This command will use the deployment artifacts to compile the contracts and compare them to the onchain code
95+
9596
```bash
9697
npx hardhat --network <network> local-verify
9798
```
9899

99100
This command will upload the contract source to Etherscan
101+
100102
```bash
101103
npx hardhat --network <network> etherscan-verify
102104
```
103105

104-
Documentation
105-
-------------
106+
## Documentation
107+
106108
- [Safe developer portal](http://docs.safe.global)
107109
- [Error codes](docs/error_codes.md)
108110
- [Coding guidelines](docs/guidelines.md)
109111

110-
Audits/ Formal Verification
111-
---------
112+
## Audits / Formal Verification
113+
114+
- [for Version 1.5.0 by Certora](docs/audit_1_5_0.md)
112115
- [for Version 1.4.0/1.4.1 by Ackee Blockchain](docs/audit_1_4_0.md)
113116
- [for Version 1.3.0 by G0 Group](docs/audit_1_3_0.md)
114117
- [for Version 1.2.0 by G0 Group](docs/audit_1_2_0.md)
115118
- [for Version 1.1.1 by G0 Group](docs/audit_1_1_1.md)
116119
- [for Version 1.0.0 by Runtime Verification](docs/rv_1_0_0.md)
117120
- [for Version 0.0.1 by Alexey Akhunov](docs/alexey_audit.md)
118121

119-
Security and Liability
120-
----------------------
122+
## Security and Liability
123+
121124
All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
122125

123-
License
124-
-------
126+
## License
127+
125128
All smart contracts are released under LGPL-3.0

contracts/base/OwnerManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ abstract contract OwnerManager is SelfAuthorized, IOwnerManager {
7171
* @inheritdoc IOwnerManager
7272
*/
7373
function removeOwner(address prevOwner, address owner, uint256 _threshold) public override authorized {
74-
// Only allow to remove an owner, if threshold can still be reached.
74+
// Only allow the removal of an owner if the threshold can still be reached.
7575
// Here we do pre-decrement as it is cheaper and allows us to check if the threshold is still reachable.
7676
if (--ownerCount < _threshold) revertWithError("GS201");
7777
// Validate owner address and check that it corresponds to owner index.

contracts/handler/CompatibilityFallbackHandler.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ contract CompatibilityFallbackHandler is TokenCallbackHandler, ISignatureValidat
5050

5151
/**
5252
* @notice Implementation of updated EIP-1271 signature validation method.
53-
* @param _dataHash Hash of the data signed on the behalf of address(msg.sender)
53+
* @param _dataHash Hash of the data signed on behalf of the address(msg.sender)
5454
* @param _signature Signature byte array associated with _dataHash
5555
* @return Updated EIP1271 magic value if signature is valid, otherwise 0x0
5656
*/

contracts/handler/HandlerContext.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ pragma solidity >=0.7.0 <0.9.0;
1111
abstract contract HandlerContext {
1212
/**
1313
* @notice Allows fetching the original caller address.
14-
* @dev This is only reliable in combination with a FallbackManager that supports this (e.g. Safe contract >=1.3.0).
15-
* When using this functionality make sure that the linked _manager (aka msg.sender) supports this.
14+
* @dev This is only reliable with a FallbackManager supporting this (e.g. Safe contract >=1.3.0).
15+
* When using this functionality, ensure that the linked _manager (aka msg.sender) supports this.
1616
* This function does not rely on a trusted forwarder. Use the returned value only to
1717
* check information against the calling manager.
1818
* @return sender Original caller address.

contracts/handler/extensible/ExtensibleBase.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ abstract contract ExtensibleBase is HandlerContext {
6565

6666
/**
6767
* Dry code to get the Safe and the original `msg.sender` from the FallbackManager
68-
* @return safe The safe whose FallbackManager is making this call
68+
* @return safe The Safe whose FallbackManager is making this call
6969
* @return sender The original `msg.sender` (as received by the FallbackManager)
7070
*/
7171
function _getContext() internal view returns (ISafe safe, address sender) {
@@ -75,7 +75,7 @@ abstract contract ExtensibleBase is HandlerContext {
7575

7676
/**
7777
* Get the context and the method handler applicable to the current call
78-
* @return safe The safe whose FallbackManager is making this call
78+
* @return safe The Safe whose FallbackManager is making this call
7979
* @return sender The original `msg.sender` (as received by the FallbackManager)
8080
* @return isStatic Whether the method is static (`view`) or not
8181
* @return handler the address of the handler contract

contracts/interfaces/ERC777TokensRecipient.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity >=0.7.0 <0.9.0;
44
/**
55
* @title ERC777TokensRecipient
66
* @dev Interface for contracts that will be called with the ERC777 token's `tokensReceived` method.
7-
* The contract receiving the tokens must implement this interface in order to receive the tokens.
7+
* The contract receiving the tokens must implement this interface to receive the tokens.
88
*/
99
interface ERC777TokensRecipient {
1010
/**

contracts/interfaces/ISafe.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {IModuleManager} from "./IModuleManager.sol";
88
import {IOwnerManager} from "./IOwnerManager.sol";
99

1010
/**
11-
* @title ISafe - A multisignature wallet interface with support for confirmations using signed messages based on EIP-712.
11+
* @title ISafe - A multi signature wallet interface with support for confirmations using signed messages based on EIP-712.
1212
* @author @safe-global/safe-protocol
1313
*/
1414
interface ISafe is IModuleManager, IGuardManager, IOwnerManager, IFallbackManager {

contracts/interfaces/ISignatureValidator.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ contract ISignatureValidatorConstants {
1010
abstract contract ISignatureValidator is ISignatureValidatorConstants {
1111
/**
1212
* @notice EIP1271 method to validate a signature.
13-
* @param _hash Hash of the data signed on the behalf of address(this).
13+
* @param _hash Hash of the data signed on behalf of the address(this).
1414
* @param _signature Signature byte array associated with _data.
1515
*
1616
* MUST return the bytes4 magic value 0x1626ba7e when function passes.

0 commit comments

Comments
 (0)