Skip to content

Commit 76f9ae0

Browse files
authored
Merge pull request #307 from gnosis/development
Sync master<>development
2 parents 131d2b4 + f67936f commit 76f9ae0

File tree

167 files changed

+12494
-7956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+12494
-7956
lines changed

.env.sample

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
MNEMONIC=""
2-
INFURA_TOKEN=""
2+
# Used for infura based network
3+
INFURA_KEY=""
4+
# Used for custom network
5+
NODE_URL=""
6+
ETHERSCAN_API_KEY=""

.github/workflows/ci.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: safe-contracts
2+
on: [push]
3+
4+
jobs:
5+
tests:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions/setup-node@v2
10+
with:
11+
node-version: 15
12+
- uses: actions/cache@v2
13+
with:
14+
path: "**/node_modules"
15+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
16+
- run: yarn --frozen-lockfile
17+
- run: yarn build
18+
- run: yarn coverage
19+
- name: Coveralls
20+
uses: coverallsapp/github-action@master
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
lint:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/setup-node@v2
28+
with:
29+
node-version: 15
30+
- uses: actions/cache@v2
31+
with:
32+
path: "**/node_modules"
33+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
34+
- run: yarn --frozen-lockfile
35+
- run: yarn lint:sol
36+
tests-other:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
contract-name: ["GnosisSafeL2"]
42+
env:
43+
SAFE_CONTRACT_UNDER_TEST: ${{ matrix.contract-name }}
44+
steps:
45+
- uses: actions/checkout@v2
46+
- uses: actions/setup-node@v2
47+
with:
48+
node-version: 15
49+
- uses: actions/cache@v2
50+
with:
51+
path: "**/node_modules"
52+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
53+
- run: yarn --frozen-lockfile
54+
- run: yarn build
55+
- run: yarn coverage
56+
- name: Coveralls
57+
uses: coverallsapp/github-action@master
58+
with:
59+
github-token: ${{ secrets.GITHUB_TOKEN }}
60+
benchmarks:
61+
runs-on: ubuntu-latest
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
solidity: ["0.7.6", "0.8.2"]
66+
include:
67+
- solidity: "0.8.2"
68+
settings: '{"viaIR":true,"optimizer":{"enabled":true,"runs":10000}}'
69+
env:
70+
SOLIDITY_VERSION: ${{ matrix.solidity }}
71+
SOLIDITY_SETTINGS: ${{ matrix.settings }}
72+
steps:
73+
- uses: actions/checkout@v2
74+
- uses: actions/setup-node@v2
75+
with:
76+
node-version: 15
77+
- uses: actions/cache@v2
78+
with:
79+
path: "**/node_modules"
80+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
81+
- run: (yarn --frozen-lockfile && yarn build && yarn hardhat codesize --contractname GnosisSafe && yarn benchmark) || echo "Benchmark failed"

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ node_modules/
33
.DS_Store
44
.zos.session
55
.openzeppelin/.session
6+
deployments/
67
env/
8+
dist/
79
.env
810
bin/
9-
solc
11+
solc
12+
coverage/
13+
coverage.json
14+
yarn-error.log

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Redirect output to stderr.
5+
exec 1>&2
6+
7+
# prevent it.only or describe.only commited
8+
if [ "$allowonlytests" != "true" ] &&
9+
test $(git diff --cached | grep -E "\b(it|describe).only\(" | wc -l) != 0
10+
then
11+
cat <<\EOF
12+
Error: Attempt to add it.only or describe.only - which may disable all other tests
13+
14+
If you know what you are doing you can disable this check using:
15+
16+
git config hooks.allowonlytests true
17+
EOF
18+
exit 1
19+
fi
20+
21+
exit 0

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v15.6.0

.prettierrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": "*.sol",
5+
"options": {
6+
"printWidth": 140,
7+
"tabWidth": 4,
8+
"useTabs": false,
9+
"singleQuote": false,
10+
"bracketSpacing": false,
11+
"explicitTypes": "always"
12+
}
13+
}
14+
]
15+
}

.solcover.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
skipFiles: [
3+
'test/Token.sol',
4+
'test/ERC20Token.sol',
5+
'test/TestHandler.sol',
6+
'test/ERC1155Token.sol',
7+
],
8+
mocha: {
9+
grep: "@skip-on-coverage", // Find everything with this tag
10+
invert: true // Run the grep's inverse set.
11+
}
12+
};

.solhint.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"plugins": [
4+
"prettier"
5+
],
6+
"rules": {
7+
"compiler-version": "off",
8+
"func-visibility": [
9+
"warn",
10+
{
11+
"ignoreConstructors": true
12+
}
13+
],
14+
"prettier/prettier": "error",
15+
"not-rely-on-time": "off",
16+
"reason-string": "off",
17+
"no-empty-blocks": "off",
18+
"avoid-low-level-calls": "off"
19+
}
20+
}

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)