Skip to content

Commit

Permalink
PRT-854 Mono repo effort LavaJs e-2-e (lavanet#721)
Browse files Browse the repository at this point in the history
* adding lavajs to lava mono repo

* lava-js new version of telescope merged

* golangci changes

* fixing telescope build

* fixing e2e file.

* fixing e2e for lavajs integration.

* fixing reference.
  • Loading branch information
ranlavanet authored Aug 20, 2023
1 parent 3f62950 commit c02d709
Show file tree
Hide file tree
Showing 150 changed files with 17,832 additions and 18 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ jobs:
npm install
npm run build
- name: Install telescope dependencies
run: |
sudo apt-get install -y expect
cd ecosystem/lavajs
npm install
npm run e2e-setup
######################################################
### Run Lava E2E Tests
######################################################
Expand Down
18 changes: 16 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,21 @@ ecosystem/lava-sdk/bin/src/sdk
ecosystem/lava-sdk/bin/src/types
ecosystem/lava-sdk/bin/src/util
ecosystem/lava-sdk/bin/src/wallet

ecosystem/lava-sdk/dist/*

# But don't ignore the specific folder inside the bin folder

# lavaJS ignores
ecosystem/lavajs/main
ecosystem/lavajs/module
ecosystem/lavajs/.npmrc
ecosystem/lavajs/proto/lavanet
ecosystem/lavajs/src
ecosystem/lavajs/types
ecosystem/lavajs/dist
ecosystem/lavajs/mjs






4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
run:
tests: true
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m
timeout: 7m
skip-files:
- "protocol/chainlib/chainproxy/rpcInterfaceMessages/grpcMessage.go"
- "protocol/chainlib/grpc.go"
- "protocol/chainlib/grpcproxy/dyncodec/remote_grpc_reflection.go"
- "protocol/chainlib/grpcproxy/dyncodec/remote_relayer.go"
- "protocol/chainlib/grpcproxy/dyncodec/remotes_test.go"
- "ecosystem/lavajs/*"
- "ecosystem/lava-sdk/*"

linters:
disable-all: true
Expand Down
12 changes: 12 additions & 0 deletions ecosystem/lavajs/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
5 changes: 5 additions & 0 deletions ecosystem/lavajs/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
dist/
main/
module/
coverage/
70 changes: 70 additions & 0 deletions ecosystem/lavajs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module.exports = {
plugins: ['prettier'],
extends: ['eslint:recommended', 'prettier'],
parserOptions: {
ecmaVersion: 11,
requireConfigFile: false,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
env: {
es6: true,
browser: true,
node: true,
jest: true
},
rules: {
'no-debugger': 2,
'no-alert': 2,
'no-await-in-loop': 0,
'no-prototype-builtins': 0,
'no-return-assign': ['error', 'except-parens'],
'no-restricted-syntax': [
2,
'ForInStatement',
'LabeledStatement',
'WithStatement'
],
'no-unused-vars': [
0,
{
ignoreSiblings: true,
argsIgnorePattern: 'React|res|next|^_'
}
],
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-unused-expressions': [
2,
{
allowTaggedTemplates: true
}
],
'no-console': 1,
'comma-dangle': 2,
'jsx-quotes': [2, 'prefer-double'],
'linebreak-style': ['error', 'unix'],
quotes: [
2,
'single',
{
avoidEscape: true,
allowTemplateLiterals: true
}
],
'prettier/prettier': [
'error',
{
trailingComma: 'none',
singleQuote: true,
printWidth: 80
}
]
}
};
32 changes: 32 additions & 0 deletions ecosystem/lavajs/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
*.log
npm-debug.log*

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Dependency directories
node_modules

# npm package lock
package-lock.json
yarn.lock

# project files
__fixtures__
__tests__
.babelrc
.babelrc.js
.editorconfig
.eslintignore
.eslintrc
.eslintrc.js
.gitignore
.travis.yml
.vscode
CHANGELOG.md
examples
jest.config.js
package.json
src
test
60 changes: 60 additions & 0 deletions ecosystem/lavajs/.telescope.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"protoDirs": [
"./proto"
],
"outPath": "./src/codegen",
"options": {
"interfaces": {
"enabled": false,
"useUnionTypes": false
},
"prototypes": {
"enabled": true,
"parser": {
"keepCase": false
},
"methods": {
"fromJSON": false,
"toJSON": false,
"encode": true,
"decode": true,
"fromPartial": true,
"toAmino": true,
"fromAmino": true,
"fromProto": true,
"toProto": true
},
"addTypeUrlToDecoders": true,
"addTypeUrlToObjects": true,
"typingsFormat": {
"duration": "duration",
"timestamp": "date",
"useExact": false,
"useDeepPartial": false,
"num64": "bigint",
"customTypes": {
"useCosmosSDKDec": true
}
}
},
"bundle": {
"enabled": true
},
"stargateClients": {
"enabled": true,
"includeCosmosDefaultTypes": true
},
"aminoEncoding": {
"enabled": true,
"exceptions": "AMINO_MAP",
"useRecursiveV2encoding": false
},
"lcdClients": {
"enabled": true
},
"rpcClients": {
"enabled": true,
"camelCase": true
}
}
}
21 changes: 21 additions & 0 deletions ecosystem/lavajs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2023 lavanet <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit c02d709

Please sign in to comment.