Skip to content

Commit 9aee4c4

Browse files
authored
Final repo adjustments before release (#303)
1 parent addfabf commit 9aee4c4

File tree

4 files changed

+1226
-951
lines changed

4 files changed

+1226
-951
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ yarn build
2020
yarn test
2121
```
2222

23-
### Deploy
23+
### Deployments
24+
25+
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.
2426

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+
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.
2628

27-
Note: The formal verification was performed using the contract compiled with solcjs 0.5.0.
29+
### Deploy
2830

29-
This will deploy the contracts deterministically and verify the contracts on etherscan.
31+
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.
3032

3133
Preparation:
3234
- Set `MNEMONIC` in `.env`
@@ -45,6 +47,16 @@ yarn hardhat --network <network> etherscan-verify
4547
yarn hardhat --network <network> local-verify
4648
```
4749

50+
#### Custom Networks
51+
52+
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.
53+
54+
E.g. to deploy the Safe contract suite on that network you would run `yarn deploy-all custom`.
55+
56+
The resulting addresses should be on all networks the same.
57+
58+
Note: Address will vary if contract code is changed or a different Solidity version is used.
59+
4860
### Verify contract
4961

5062
This command will use the deployment artifacts to compile the contracts and compare them to the onchain code

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"eslint-plugin-no-only-tests": "^2.4.0",
5858
"eslint-plugin-prettier": "^3.1.4",
5959
"ethereum-waffle": "^3.3.0",
60-
"hardhat": "^2.0.8",
61-
"hardhat-deploy": "^0.7.0-beta.38",
60+
"hardhat": "^2.2.1",
61+
"hardhat-deploy": "^0.7.5",
6262
"husky": "^5.1.3",
6363
"prettier": "^2.1.2",
6464
"prettier-plugin-solidity": "^1.0.0-alpha.60",
@@ -72,11 +72,8 @@
7272
"@types/yargs": "^15.0.10",
7373
"argv": "^0.0.2",
7474
"dotenv": "^8.0.0",
75-
"ethers": "^5.0.32",
75+
"ethers": "^5.1.4",
7676
"solc": "0.7.6",
7777
"yargs": "^16.1.1"
78-
},
79-
"resolutions": {
80-
"bitcore-lib": "8.1.1"
8178
}
8279
}

test/core/GnosisSafe.Execution.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe("GnosisSafe", async () => {
179179
const successEvent = safe.interface.decodeEventLog("ExecutionFailure", receipt.logs[logIndex].data, receipt.logs[logIndex].topics)
180180
expect(successEvent.txHash).to.be.eq(calculateSafeTransactionHash(safe, tx, await chainId()))
181181
// FIXME: When running out of gas the gas used is slightly higher than the safeTxGas and the user has to overpay
182-
expect(successEvent.payment.toNumber()).to.be.lte(5000)
182+
expect(successEvent.payment.toNumber()).to.be.lte(10000)
183183
await expect(await hre.ethers.provider.getBalance(user2.address)).to.be.deep.eq(userBalance.add(successEvent.payment))
184184
})
185185

@@ -218,15 +218,15 @@ describe("GnosisSafe", async () => {
218218
).to.emit(safe, "ExecutionFailure")
219219

220220
await expect(
221-
executeTx(safe, tx, [await safeApproveHash(user1, safe, tx, true)], { gasLimit: 4000000 }),
221+
executeTx(safe, tx, [await safeApproveHash(user1, safe, tx, true)], { gasLimit: 6000000 }),
222222
"Safe transaction should succeed with high gasLimit"
223223
).to.emit(safe, "ExecutionSuccess")
224224

225225
// This should only work if the gasPrice is 0
226226
tx.gasPrice = 1
227227
await user1.sendTransaction({ to: safe.address, value: parseEther("1") })
228228
await expect(
229-
executeTx(safe, tx, [await safeApproveHash(user1, safe, tx, true)], { gasLimit: 4000000 }),
229+
executeTx(safe, tx, [await safeApproveHash(user1, safe, tx, true)], { gasLimit: 6000000 }),
230230
"Safe transaction should fail with gasPrice 1 and high gasLimit"
231231
).to.emit(safe, "ExecutionFailure")
232232
})

0 commit comments

Comments
 (0)