Skip to content

Commit 91e0dcf

Browse files
Merge branch 'develop' release 2.1
2 parents 63aefca + f08c325 commit 91e0dcf

File tree

358 files changed

+33542
-9178
lines changed

Some content is hidden

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

358 files changed

+33542
-9178
lines changed

.circleci/config.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ version: 2
22

33
job_common: &job_common
44
docker:
5-
- image: circleci/node:10.12-stretch
5+
- image: circleci/node:10.21-stretch
6+
working_directory: ~/argent-contracts
7+
job_python: &job_python
8+
docker:
9+
- image: circleci/python:3.8.0b1-stretch-node
610
working_directory: ~/argent-contracts
711
step_save_cache: &step_save_cache
812
save_cache:
@@ -18,7 +22,14 @@ step_setup_global_packages: &step_setup_global_packages
1822
name: "Set up global packages"
1923
command: |
2024
npm install
21-
25+
step_setup_slither: &step_setup_slither
26+
run:
27+
name: "Setup slither analyser https://github.com/crytic/slither"
28+
command: |
29+
wget https://github.com/ethereum/solidity/releases/download/v0.5.4/solc-static-linux
30+
chmod +x solc-static-linux
31+
sudo mv solc-static-linux /usr/local/bin/solc
32+
sudo pip3 install slither-analyzer
2233
jobs:
2334
unit-test:
2435
<<: *job_common
@@ -29,31 +40,59 @@ jobs:
2940
- run:
3041
name: "Lint Solidity contracts"
3142
command: npm run lint:contracts
43+
- run:
44+
name: "Testing deployment scripts and benchmark gas costs"
45+
command: npm run ganache >/dev/null 2>&1 & npm run test:deployment && npm run test:benchmark
3246
- run:
3347
name: "Compiling external library contracts"
3448
command: npm run compile:lib
49+
- run:
50+
name: "Compiling legacy contracts"
51+
command: npm run compile:legacy
3552
- run:
3653
name: "Compiling contracts"
3754
command: npm run compile
55+
- run:
56+
name: "Compiling test contracts"
57+
command: npm run compile:test
3858
- run:
3959
name: "Lint JavaScript"
4060
command: npm run lint:js
4161
- run:
4262
name: "Running unit tests"
4363
command: npm run ganache >/dev/null 2>&1 & npm run test
44-
- run:
45-
name: "Testing deployment scripts"
46-
command: npm run ganache >/dev/null 2>&1 & npm run test:deployment
4764
- run:
4865
name: "Running coverage"
49-
command: npm run test:coverage
66+
command: |
67+
npm run compile
68+
npm run compile:test
69+
npm run test:coverage
5070
- <<: *step_save_cache
5171
# Save coverage artifacts
5272
- store_artifacts:
5373
path: coverage
54-
74+
security-test:
75+
<<: *job_python
76+
steps:
77+
- checkout
78+
- <<: *step_restore_cache
79+
- <<: *step_setup_global_packages
80+
- <<: *step_setup_slither
81+
- run:
82+
name: "Run slither"
83+
command: npm run security:slither
5584
workflows:
5685
version: 2
5786
commit:
5887
jobs:
5988
- unit-test
89+
nightly:
90+
triggers:
91+
- schedule:
92+
cron: "0 1 * * *" # 1am UTC
93+
filters:
94+
branches:
95+
only:
96+
- develop
97+
jobs:
98+
- security-test

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
build/*
44
contracts/*
5+
contracts-test/*
56
coverage/*
67
lib/*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
build
3+
build-legacy
34
tmp
45
bin
56
.outputParameter

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.12.0
1+
10.21.0

.solhint.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "solhint:recommended",
3+
"plugins": [],
4+
"rules": {
5+
"compiler-version": ["off"],
6+
"no-inline-assembly": ["error"],
7+
"not-rely-on-time": ["off"],
8+
"avoid-low-level-calls": ["off"],
9+
"max-line-length": ["error", 150],
10+
"func-param-name-mixedcase": "error",
11+
"modifier-name-mixedcase": "error",
12+
"reason-string": ["warn", { "maxLength":32 }]
13+
}
14+
}

.solhintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
lib
3+
contracts-test
4+
contracts-legacy
5+
contracts/infrastructure_0.5

.soliumignore

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

.soliumrc.json

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

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Compile the contracts:
2727
npm run compile
2828
```
2929

30+
Compile the test contracts:
31+
```
32+
npm run compile:test
33+
```
34+
3035
## Test
3136

3237
Launch ganache:
@@ -39,6 +44,12 @@ Run the tests:
3944
npm run test
4045
```
4146

47+
To run coverage testing:
48+
```
49+
npm run test:coverage
50+
```
51+
You need to not have `ganache` running with this as it uses own instance.
52+
4253
## License
4354

4455
Released under [GPL-3.0](LICENSE)

audit/ArgentUpdateSep2020.pdf

315 KB
Binary file not shown.

0 commit comments

Comments
 (0)