Skip to content

Commit 7d1b1cd

Browse files
committed
Add default structure for relayer and scenario script
1 parent 56083e5 commit 7d1b1cd

File tree

9 files changed

+86
-0
lines changed

9 files changed

+86
-0
lines changed

ibc.ts/.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[src/**.{ts,json,js}]
2+
trim_trailing_whitespace = true
3+
insert_final_newline = true
4+
indent_style = space
5+
indent_size = 4

ibc.ts/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
yarn-error.log
3+
yarn.lock
4+
build/

ibc.ts/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
IBC relayer and scenario
2+
=========================
3+
4+
This directory contains IBC relayer implementation and IBC demo scenario script.

ibc.ts/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "ibc",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"build": "tsc -p .",
6+
"fmt": "tslint -p . --fix && prettier 'src/**/*.{ts, json}' --write",
7+
"lint": "tslint -p . && prettier 'src/**/*.{ts, json}' -l",
8+
"scenario": "yarn build && node build/scenario/index.js",
9+
"relayer": "yarn build && node build/relayer/index.js"
10+
},
11+
"devDependencies": {
12+
"@types/node": "^13.7.4",
13+
"prettier": "^1.19.1",
14+
"tslint": "^6.0.0",
15+
"tslint-config-prettier": "^1.18.0",
16+
"typescript": "^3.8.2"
17+
}
18+
}

ibc.ts/src/common/example.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export let HelloWorld = "HelloWorld";

ibc.ts/src/relayer/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { HelloWorld } from "../common/example";
2+
3+
async function main() {
4+
console.log(HelloWorld);
5+
}
6+
7+
main().catch(console.error);

ibc.ts/src/scenario/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { HelloWorld } from "../common/example";
2+
3+
async function main() {
4+
console.log(HelloWorld);
5+
}
6+
7+
main().catch(console.error);

ibc.ts/tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2018",
4+
"types": ["node"],
5+
"module": "commonjs",
6+
"lib": ["es2018"],
7+
"declaration": true,
8+
"outDir": "build",
9+
"strict": true
10+
},
11+
"include": ["./src/**/*"],
12+
"exclude": ["./src/**/*.test.ts"]
13+
}

ibc.ts/tslint.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"extends": ["tslint:recommended", "tslint-config-prettier"],
3+
"rules": {
4+
"interface-name": false,
5+
"variable-name": [
6+
true,
7+
"check-format",
8+
"allow-leading-underscore",
9+
"allow-pascal-case"
10+
],
11+
"no-console": false,
12+
"object-literal-sort-keys": false,
13+
"only-arrow-functions": false,
14+
"no-var-requires": false,
15+
"max-classes-per-file": false,
16+
"triple-equals": [true, "allow-null-check", "allow-undefined-check"],
17+
"no-bitwise": false,
18+
"array-type": false
19+
},
20+
"jsRules": {
21+
"no-console": false,
22+
"object-literal-sort-keys": false
23+
},
24+
"linterOptions": {
25+
"exclude": ["node_modules/**/*.ts", "/build/*"]
26+
}
27+
}

0 commit comments

Comments
 (0)