Skip to content

Commit

Permalink
Update Readme (safe-global#457)
Browse files Browse the repository at this point in the history
* Update Readme

* Update CHANGELOG.md

* Update package.json

* Update bug_report.md

* Update feature_request.md

* Update safe_tx_gas.md

* Update alexey_audit.md

* Update audit_1_1_1.md

* Update audit_1_2_0.md

* Update audit_1_3_0.md

* Update rv_1_0_0.md
  • Loading branch information
rmeissner authored Dec 18, 2022
1 parent c36bcab commit 3d360a3
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ about: Bug report about the Safe smart contracts
## Prerequisites

- First, many thanks for taking part in the community and helping us improve. We appreciate that a lot.
- Support questions are better asked in our Gitter chat: https://gitter.im/gnosis/Safe
- Support questions are better asked in our Discord: https://chat.safe.global
- Please ensure the issue isn't already reported.

*Please delete the above section and the instructions in the sections below before submitting*
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ about: Suggest an idea or feature request for the Safe smart contracts project
## Prerequisites

- First, many thanks for taking part in the community and helping us improve. We appreciate that a lot.
- Support questions are better asked in our Gitter chat: https://gitter.im/gnosis/Safe
- Support questions are better asked in our Discord: https://chat.safe.global
- Please ensure the issue isn't already reported.

*Please delete the above section and the instructions in the sections below before submitting*
Expand Down
68 changes: 34 additions & 34 deletions CHANGELOG.md

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Gnosis Safe Contracts
=====================
Safe Contracts
==============

[![npm version](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-contracts.svg)](https://badge.fury.io/js/%40gnosis.pm%2Fsafe-contracts)
[![Build Status](https://github.com/gnosis/safe-contracts/workflows/safe-contracts/badge.svg?branch=development)](https://github.com/gnosis/safe-contracts/actions)
[![Coverage Status](https://coveralls.io/repos/github/gnosis/safe-contracts/badge.svg?branch=development)](https://coveralls.io/github/gnosis/safe-contracts)
[![Build Status](https://github.com/safe-global/safe-contracts/workflows/safe-contracts/badge.svg?branch=development)](https://github.com/safe-global/safe-contracts/actions)
[![Coverage Status](https://coveralls.io/repos/github/safe-global/safe-contracts/badge.svg?branch=development)](https://coveralls.io/github/safe-global/safe-contracts)

> :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 Gnosis Safe team can be found in the [releases](https://github.com/gnosis/safe-contracts/releases).
> :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-contracts/releases).
Usage
-----
Expand All @@ -24,15 +24,15 @@ yarn test

### Deployments

A collection of the different Safe contract deployments and their addresses can be found in the [Safe deployments](https://github.com/gnosis/safe-deployments) repository.
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.

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/gnosis/safe-deployments) repository.
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.

### Deploy

> :warning: **Make sure to use the correct commit when deploying the contracts.** Any change (even comments) within the contract files will result in different addresses. The tagged versions that are used by the Gnosis Safe team can be found in the [releases](https://github.com/gnosis/safe-contracts/releases).
> :warning: **Make sure to use the correct commit when deploying the contracts.** Any change (even comments) within the contract files will result in different addresses. The tagged versions that are used by the Safe team can be found in the [releases](https://github.com/safe-global/safe-contracts/releases).
> **Current version:** The latest release is [v1.3.0-libs.0](https://github.com/gnosis/safe-contracts/tree/v1.3.0-libs.0) on the commit [767ef36](https://github.com/gnosis/safe-contracts/commit/767ef36bba88bdbc0c9fe3708a4290cabef4c376)
> **Current version:** The latest release is [v1.3.0-libs.0](https://github.com/safe-global/safe-contracts/tree/v1.3.0-libs.0) on the commit [767ef36](https://github.com/safe-global/safe-contracts/commit/767ef36bba88bdbc0c9fe3708a4290cabef4c376)
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.

Expand Down Expand Up @@ -68,7 +68,7 @@ Note: Address will vary if contract code is changed or a different Solidity vers

Some networks require replay protection. This is not possible with the default deployment process as it relies on a presigned transaction without replay protection (see https://github.com/Arachnid/deterministic-deployment-proxy).

It is possible to enable deployment via a different determinisitic deployment proxy (https://github.com/gnosis/safe-singleton-factory). To enable this the `CUSTOM_DETERMINISTIC_DEPLOYMENT` env var has to be set to `true` (see `.env.sample`). To make sure that the latest version of this package is install, make sure to run `yarn add @gnosis.pm/safe-singleton-factory` before deployment.
It is possible to enable deployment via a different determinisitic deployment proxy (https://github.com/safe-global/safe-singleton-factory). To enable this the `CUSTOM_DETERMINISTIC_DEPLOYMENT` env var has to be set to `true` (see `.env.sample`). To make sure that the latest version of this package is install, make sure to run `yarn add @gnosis.pm/safe-singleton-factory` before deployment.

Note: This will result in different addresses compared to the default deployment process.

Expand All @@ -86,7 +86,7 @@ yarn hardhat --network <network> etherscan-verify

Documentation
-------------
- [Safe developer portal](http://docs.gnosis.io/safe)
- [Safe developer portal](http://docs.safe.global)
- [Error codes](docs/error_codes.md)
- [Coding guidelines](docs/guidelines.md)

Expand Down
6 changes: 3 additions & 3 deletions docs/alexey_audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* Alexey Akhunov (<[email protected]>)

##### Notes
The audit report was based on commit [942968d66a4fa200fe9757d02b377dbfc3c88636](https://github.com/gnosis/safe-contracts/commit/942968d66a4fa200fe9757d02b377dbfc3c88636)
The audit report was based on commit [942968d66a4fa200fe9757d02b377dbfc3c88636](https://github.com/safe-global/safe-contracts/commit/942968d66a4fa200fe9757d02b377dbfc3c88636)

Changes made until commit [898cc8969736bc190db1b7c446e050f49177f898](https://github.com/gnosis/safe-contracts/commit/898cc8969736bc190db1b7c446e050f49177f898) have been checked with symbolic execution and can be found in the attached pdf (see table `SecuredTokenTransfer::transferToken`).
Changes made until commit [898cc8969736bc190db1b7c446e050f49177f898](https://github.com/safe-global/safe-contracts/commit/898cc8969736bc190db1b7c446e050f49177f898) have been checked with symbolic execution and can be found in the attached pdf (see table `SecuredTokenTransfer::transferToken`).

##### Files
* [Audit Report](Gnosis_Safe_Audit_Report.pdf)
* [Symbolic execution](Gnosis_Safe_Symbolic_Execution.pdf)
* [Symbolic execution](Gnosis_Safe_Symbolic_Execution.pdf)
8 changes: 4 additions & 4 deletions docs/audit_1_1_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* Nick Munoz-McDonald (@NickErrant)

##### Notes
All changes for 1.1.1 until commit [2df0b2e0ad5d0f7ab5423e7f5baa72b2456d32ae](https://github.com/gnosis/safe-contracts/commit/2df0b2e0ad5d0f7ab5423e7f5baa72b2456d32ae) have been audited and the result were added to an ammended report.
All changes for 1.1.1 until commit [2df0b2e0ad5d0f7ab5423e7f5baa72b2456d32ae](https://github.com/safe-global/safe-contracts/commit/2df0b2e0ad5d0f7ab5423e7f5baa72b2456d32ae) have been audited and the result were added to an ammended report.

All changes for 1.1.0 until commit [78494bcdbc61b3db52308a25f0556c42cf656ab1](https://github.com/gnosis/safe-contracts/commit/78494bcdbc61b3db52308a25f0556c42cf656ab1) have been audited and are considered in the audit report.
All changes for 1.1.0 until commit [78494bcdbc61b3db52308a25f0556c42cf656ab1](https://github.com/safe-global/safe-contracts/commit/78494bcdbc61b3db52308a25f0556c42cf656ab1) have been audited and are considered in the audit report.

The audit was initially performed on commit [1a9e5ce768e134c556770ea50e114fd83666b8a8](https://github.com/gnosis/safe-contracts/commit/1a9e5ce768e134c556770ea50e114fd83666b8a8)
The audit was initially performed on commit [1a9e5ce768e134c556770ea50e114fd83666b8a8](https://github.com/safe-global/safe-contracts/commit/1a9e5ce768e134c556770ea50e114fd83666b8a8)

##### Links
* [Audit Report 1.1.1](https://github.com/g0-group/Audits/blob/master/G0Group-GnosisSafe-Ammended.pdf)

##### Files
* [Audit Report 1.1.1](Gnosis_Safe_Audit_Report_1_1_1.pdf)
* [Audit Report 1.1.0](Gnosis_Safe_Audit_Report_1_1_0.pdf)
* [Audit Report 1.1.0](Gnosis_Safe_Audit_Report_1_1_0.pdf)
4 changes: 2 additions & 2 deletions docs/audit_1_2_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Nick Munoz-McDonald (@NickErrant)

##### Notes
The audit was performed on commit [62d4bd39925db65083b035115d6987772b2d2dca](https://github.com/gnosis/safe-contracts/commit/62d4bd39925db65083b035115d6987772b2d2dca)
The audit was performed on commit [62d4bd39925db65083b035115d6987772b2d2dca](https://github.com/safe-global/safe-contracts/commit/62d4bd39925db65083b035115d6987772b2d2dca)

##### Files
* [Audit Report 1.2.0](Gnosis_Safe_Audit_Report_1_2_0.pdf)
* [Audit Report 1.2.0](Gnosis_Safe_Audit_Report_1_2_0.pdf)
6 changes: 3 additions & 3 deletions docs/audit_1_3_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Adam Kolář (@adamkolar)

##### Notes
An initial audit was performed on commit [4bfc0c8519f1893015d7edfd2c2780fca163c364](https://github.com/gnosis/safe-contracts/tree/4bfc0c8519f1893015d7edfd2c2780fca163c364) and contract changes until commit [9b305a0f80da7f1107d1181f52c844f089557d05](https://github.com/gnosis/safe-contracts/tree/9b305a0f80da7f1107d1181f52c844f089557d05) have been checked.
An initial audit was performed on commit [4bfc0c8519f1893015d7edfd2c2780fca163c364](https://github.com/safe-global/safe-contracts/tree/4bfc0c8519f1893015d7edfd2c2780fca163c364) and contract changes until commit [9b305a0f80da7f1107d1181f52c844f089557d05](https://github.com/safe-global/safe-contracts/tree/9b305a0f80da7f1107d1181f52c844f089557d05) have been checked.

The final audit was performed on commit [ad6c7355d5bdf4f7fa348fbfcb9f07431769a3c9](https://github.com/gnosis/safe-contracts/tree/ad6c7355d5bdf4f7fa348fbfcb9f07431769a3c9).
The final audit was performed on commit [ad6c7355d5bdf4f7fa348fbfcb9f07431769a3c9](https://github.com/safe-global/safe-contracts/tree/ad6c7355d5bdf4f7fa348fbfcb9f07431769a3c9).


##### Files
Expand All @@ -16,4 +16,4 @@ The final audit was performed on commit [ad6c7355d5bdf4f7fa348fbfcb9f07431769a3c

##### External links for Audit Reports
* [Final Audit Report 1.3.0](https://github.com/g0-group/Audits/blob/9c18c800e65d28a8cf9f608c9dbbc13edbac70c8/GnosisSafeMay2021.pdf)
* [Initial Audit Report 1.3.0](https://github.com/g0-group/Audits/blob/9c18c800e65d28a8cf9f608c9dbbc13edbac70c8/GnosisSafeApr2021.pdf)
* [Initial Audit Report 1.3.0](https://github.com/g0-group/Audits/blob/9c18c800e65d28a8cf9f608c9dbbc13edbac70c8/GnosisSafeApr2021.pdf)
6 changes: 3 additions & 3 deletions docs/rv_1_0_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Runtime Verification (https://github.com/runtimeverification)

##### Notes
The formal verification was based on commit [427d6f7e779431333c54bcb4d4cde31e4d57ce96](https://github.com/gnosis/safe-contracts/commit/427d6f7e779431333c54bcb4d4cde31e4d57ce96)
The formal verification was based on commit [427d6f7e779431333c54bcb4d4cde31e4d57ce96](https://github.com/safe-global/safe-contracts/commit/427d6f7e779431333c54bcb4d4cde31e4d57ce96)

Critical findings have been fixed with https://github.com/gnosis/safe-contracts/pull/90
Critical findings have been fixed with https://github.com/safe-global/safe-contracts/pull/90

##### Files
* [Formal Verification Report](Gnosis_Safe_Formal_Verification_Report_1_0_0.pdf)
* [Formal Verification Report](Gnosis_Safe_Formal_Verification_Report_1_0_0.pdf)
12 changes: 6 additions & 6 deletions docs/safe_tx_gas.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### Safe Transaction Gas Limit (safeTxGas)
In this document will describe the behaviour of the internal gas limit (aka `safeTxGas`) for the [1.3.0](https://github.com/gnosis/safe-contracts/releases/tag/v1.3.0-libs.0) version of the Safe Contracts.
In this document will describe the behaviour of the internal gas limit (aka `safeTxGas`) for the [1.3.0](https://github.com/safe-global/safe-contracts/releases/tag/v1.3.0-libs.0) version of the Safe Contracts.

There have been changes to this behaviour with the [1.3.0](https://github.com/gnosis/safe-contracts/blob/main/CHANGELOG.md#version-130) version of the Safe contract (see [#274](https://github.com/gnosis/safe-contracts/issues/274))
There have been changes to this behaviour with the [1.3.0](https://github.com/safe-global/safe-contracts/blob/main/CHANGELOG.md#version-130) version of the Safe contract (see [#274](https://github.com/safe-global/safe-contracts/issues/274))

The behaviour of `safeTxGas` depends on the `gasPrice` value of the Safe transaction.

#### With gas refund

If `gasPrice` is set to a value `>0` the Safe contracts will issue a refund for the gas costs incured the execution of the Safe transaction. An example where this can be used are the relayers. These would execute the Safe transaction after it has been signed by the owners and then would get refunded for the execution.

The logic for this can be seen in [`GnosisSafe.sol`](https://github.com/gnosis/safe-contracts/blob/main/contracts/GnosisSafe.sol#L183-L185):
The logic for this can be seen in [`GnosisSafe.sol`](https://github.com/safe-global/safe-contracts/blob/main/contracts/GnosisSafe.sol#L183-L185):
```js
if (gasPrice > 0) {
payment = handlePayment(gasUsed, baseGas, gasPrice, gasToken, refundReceiver);
Expand All @@ -28,7 +28,7 @@ If `gasPrice` is set to `0` then the Safe contracts will **not** issue a refund

Therefore it is not necessary to be as strict on the gas being passed along with the execution of the Safe transaction. As no refund is triggered the Safe will not pay for the execution costs, based on this the Safe contracts will send along all available case when no refund is used.

Before the execution the Safe contracts always check if enough gas is available to satisfy the `safeTxGas`. This can be seen in [`GnosisSafe.sol`](hhttps://github.com/gnosis/safe-contracts/blob/main/contracts/GnosisSafe.sol#L168-L170):
Before the execution the Safe contracts always check if enough gas is available to satisfy the `safeTxGas`. This can be seen in [`GnosisSafe.sol`](hhttps://github.com/safe-global/safe-contracts/blob/main/contracts/GnosisSafe.sol#L168-L170):
```js
require(gasleft() >= ((safeTxGas * 64) / 63).max(safeTxGas + 2500) + 500, "GS010");
```
Expand All @@ -43,9 +43,9 @@ Most wallets will estimate Ethereum transaction by checking with what gas limit

To make it easier to set the `safeTxGas` value a change has been made with the 1.3.0 version of the Safe contracts:

**When `safeTxGas` is set to `0`, the Safe contract will revert if the internal Safe transaction fails** (see [#274](https://github.com/gnosis/safe-contracts/issues/274))
**When `safeTxGas` is set to `0`, the Safe contract will revert if the internal Safe transaction fails** (see [#274](https://github.com/safe-global/safe-contracts/issues/274))

That means if `safeTxGas` is set to `0` the Safe contract sents along all awailable gas when performing the internal Safe transaction. If that transaction fails the Safe will revert and therefore also undo all State changes. This can be seen in [`GnosisSafe.sol`](https://github.com/gnosis/safe-contracts/blob/main/contracts/GnosisSafe.sol#L178-L180):
That means if `safeTxGas` is set to `0` the Safe contract sents along all awailable gas when performing the internal Safe transaction. If that transaction fails the Safe will revert and therefore also undo all State changes. This can be seen in [`GnosisSafe.sol`](https://github.com/safe-global/safe-contracts/blob/main/contracts/GnosisSafe.sol#L178-L180):
```js
require(success || safeTxGas != 0 || gasPrice != 0, "GS013");
```
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@gnosis.pm/safe-contracts",
"version": "1.3.0",
"description": "Ethereum multisig contract",
"homepage": "https://github.com/gnosis/safe-contracts/",
"homepage": "https://github.com/safe-global/safe-contracts/",
"license": "GPL-3.0",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -32,16 +32,16 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/gnosis/gnosis-safe.git"
"url": "git+https://github.com/safe-global/safe-contracts.git"
},
"keywords": [
"Ethereum",
"Wallet",
"Safe"
],
"author": "[email protected]",
"author": "[email protected]",
"bugs": {
"url": "https://github.com/gnosis/gnosis-safe/issues"
"url": "https://github.com/safe-global/safe-contracts/issues"
},
"devDependencies": {
"@gnosis.pm/mock-contract": "^4.0.0",
Expand Down

0 comments on commit 3d360a3

Please sign in to comment.