You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Run all tests (requires Node version >=7 for `async/await`):
16
+
### Run all tests:
16
17
17
18
```bash
18
-
yarn truffle compile
19
+
yarn build
19
20
yarn test
20
21
```
21
22
22
-
`yarn test` will start a ganache-cli with the correct configuration. If you want to run `yarn truffle test` you need to start a [ganache-cli](https://github.com/trufflesuite/ganache-cli) instance. For this it is required to use the [`--noVMErrorsOnRPCResponse`](https://github.com/trufflesuite/ganache-cli#options) option. This option will make sure that ganache-cli behaves the same as other clients (e.g. geth and parity) when handling reverting calls to contracts. This is required as some flows parse the error message (see https://gnosis-safe.readthedocs.io/en/latest/contracts/transactions.html#safe-transaction-gas-limit-estimation).
23
-
24
23
### Deploy
25
24
26
25
Some contracts require that the Solidity compile target is at least `petersburg` (e.g. GnosisSafeProxyFactory and MultiSend). This is default since [Solidity 0.5.5](https://github.com/ethereum/solidity/releases/tag/v0.5.5).
27
26
28
27
Note: The formal verification was performed using the contract compiled with solcjs 0.5.0.
29
28
30
-
Preparation:
31
-
- Set `INFURA_TOKEN` in `.env`
32
-
- Set `NETWORK` in `.env`
33
-
- Run `yarn truffle compile`
29
+
This will deploy the contracts deterministically and verify the contracts on etherscan.
34
30
35
-
Truffle:
31
+
Preparation:
36
32
- Set `MNEMONIC` in `.env`
33
+
- Set `INFURA_KEY` in `.env`
37
34
38
35
```bash
39
-
yarn truffle deploy
36
+
yarn deploy-all <network>
40
37
```
41
38
42
-
### Verify contract
43
-
44
-
Note: To completely replicate the bytecode that has been deployed it is required that the project path is `/gnosis-safe` this can be archived using `sudo mkdir /gnosis-safe && sudo mount -B <your_repo_path> /gnosis-safe`. Make sure the run `yarn` again if the path has been changed after the inital `yarn install`. If you use a different path you will only get partial matches.
39
+
This will perform the following steps
45
40
46
-
You can locally verify contract using the scripts `generate_meta.js` and `verify_deployment.js`.
41
+
```bash
42
+
yarn build
43
+
yarn deploy --network <network>
44
+
yarn hardhat --network <network> etherscan-verify
45
+
yarn hardhat --network <network> local-verify
46
+
```
47
47
48
-
With `node scripts/generate_meta.js` a `meta` folder is created in the `build` folder that contains all files required to verify the source code on https://verification.komputing.org/ and https://etherscan.io/
48
+
### Verify contract
49
49
50
-
For Etherscan only the `GnosisSafeEtherscan.json` file is required. For sourcify the `GnosisSafeMeta.json` and all the `.sol` files are required.
50
+
This command will use the deployment artifacts to compile the contracts and compare them to the onchain code
51
+
```bash
52
+
yarn hardhat --network <network> local-verify
53
+
```
51
54
52
-
Once the meta data has been generated you can verify that your local compiled code corresponds to the version deployed by Gnosis with `yarn do <network> scripts/verify_deployment.js`.
55
+
This command will upload the contract source to Etherescan
56
+
```bash
57
+
yarn hardhat --network <network> etherscan-verify
58
+
```
53
59
54
60
Documentation
55
61
-------------
@@ -69,12 +75,4 @@ All contracts are WITHOUT ANY WARRANTY; without even the implied warranty of MER
69
75
70
76
License
71
77
-------
72
-
All smart contracts are released under LGPL v.3.
73
-
74
-
Contributors
75
-
------------
76
-
- Stefan George ([Georgi87](https://github.com/Georgi87))
77
-
- Richard Meissner ([rmeissner](https://github.com/rmeissner))
78
-
- Christian Lundkvist ([christianlundkvist](https://github.com/christianlundkvist))
79
-
- Nick Dodson ([SilentCicero](https://github.com/SilentCicero))
80
-
- Gonçalo Sá ([GNSPS](https://github.com/GNSPS))
0 commit comments