Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New config issue format #166

Merged
merged 38 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4cf1c7a
Convert test case configs to new format
s0b0lev Jan 18, 2019
c8b1cba
Modify test case config checker
s0b0lev Jan 22, 2019
a1d0359
Update json_lint checker
s0b0lev Jan 22, 2019
4fd8715
Resolve issue with checkers
s0b0lev Jan 22, 2019
08dde65
Update circle ci config
s0b0lev Jan 22, 2019
464af9d
Check config hash
s0b0lev Jan 23, 2019
71b47dc
Fix hash in runtime_user_input_call config
s0b0lev Jan 24, 2019
4be8138
Update image version
s0b0lev Jan 24, 2019
95a1347
Update checker
s0b0lev Jan 24, 2019
6820c6c
Change the way web3 was used
s0b0lev Jan 24, 2019
618b0eb
Generate config bytecode hash by runtime bytecode
s0b0lev Jan 24, 2019
2eb7f98
Remove line break. And append all line numbers
s0b0lev Jan 24, 2019
349ff0f
Check if solidity file exists
s0b0lev Jan 24, 2019
b0b5452
add bytecode offset at SUB opcode
thec00n Feb 1, 2019
6c2c89d
Add offset add SUB opcode
thec00n Feb 1, 2019
45a22d8
Add bytecode offset at SUB
thec00n Feb 1, 2019
1d7ccdc
Add offset at MUL
thec00n Feb 1, 2019
369adb9
Add offset at ADD opcode
thec00n Feb 1, 2019
15016ed
Correct offset
thec00n Feb 1, 2019
11f2cf1
Add offset at SSTORE
thec00n Feb 1, 2019
55a6185
Add offset at JUMP
thec00n Feb 1, 2019
c94564b
merge from master
thec00n Feb 4, 2019
21cf046
fix byte code loc to reference creation bytecode
thec00n Feb 4, 2019
0b6ba17
Check create and runtime bytecode of all contracts within json files
s0b0lev Feb 7, 2019
6d789a6
Display errors in configs in readble format
s0b0lev Feb 7, 2019
b6823ba
Update yaml schema linter
s0b0lev Feb 7, 2019
35e717a
YAML schema validation
s0b0lev Feb 7, 2019
8f3a853
Rewrite bash script of yaml schema validation to js
s0b0lev Feb 7, 2019
e8ed102
bytecode offset at opcode 0xfe in ConstructorCreate
thec00n Feb 7, 2019
d31e491
Update offset to opcode 0xfe
thec00n Feb 7, 2019
f8e8274
Update offset to opcode 0xfe
thec00n Feb 7, 2019
42b69da
#168 Change folder structure
s0b0lev Feb 8, 2019
103e092
Update Circle CI Docker image
s0b0lev Feb 8, 2019
f7835ee
#168 GitHub checker for folder structure
s0b0lev Feb 11, 2019
ef48369
Merge branch 'feature/new-config-format' of github.com:SmartContractS…
s0b0lev Feb 11, 2019
1945796
#168 Update circle ci task name
s0b0lev Feb 11, 2019
6ad8ef8
#168 Update circle ci move task to flow
s0b0lev Feb 11, 2019
8b07553
#168 Update circle ci image and yaml content validator
s0b0lev Feb 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 17 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
name: Validate JSON files
shell: /bin/sh
command: |
cd scripts/ && npm install jsonlint && npm run json-lint
cd scripts/ && npm install && npm run json-lint

swc-yaml-config-content:
<<: *defaults
Expand All @@ -64,6 +64,16 @@ jobs:
command: |
cd scripts/ && npm install && npm run yaml-content-validate

swc-folder-structure:
<<: *defaults
steps:
- checkout
- run:
name: Check folder structure
shell: /bin/sh
command: |
cd scripts/ && npm install && npm run validate-dirs

deploy-gh-pages:
<<: *defaults
steps:
Expand Down Expand Up @@ -108,6 +118,12 @@ workflows:
- gh-pages
- website
- swc-json-lint:
filters:
branches:
ignore:
- gh-pages
- website
- swc-folder-structure:
filters:
branches:
ignore:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*~
.DS_Store
node_modules/
.vscode/
7 changes: 7 additions & 0 deletions scripts/bash/json_lint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
find ../test_cases -name '*.json' -print | while read line; do
command=$(./node_modules/jsonlint/lib/cli.js $line > /dev/null)
if (($? > 0)); then
echo "ERROR: Wrong json object - $line"
exit 1
fi
done
17 changes: 0 additions & 17 deletions scripts/bash/yaml_schema_lint.sh

This file was deleted.

35 changes: 35 additions & 0 deletions scripts/dir_structure.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const fs = require('fs');
const path = require('path');

const walkSync = (dir, filelist=[]) => {
fs.readdirSync(dir).forEach((file) => {
if(fs.statSync(path.join(dir, file)).isDirectory()) {
filelist = walkSync(path.join(dir, file), filelist)
} else {
filelist = filelist.concat(path.join(dir, file));
}
});
return filelist;
};

let hasError = false;

const files = walkSync('../test_cases');

files.map(file => {
const splitedPath = file.split('/');

const [filepath, folder, ...rest] = splitedPath.reverse();
const [filename, ...restels] = filepath.split('.');

if (folder !== filename) {
hasError = true;
console.log(`Path is wrong: ${file}`);
}
});

if (hasError) {
process.exit(1);
} else {
process.exit(0);
}
Loading