Skip to content

Commit 35322b0

Browse files
SegfaultdSegfaultFabrice BascoulergueEnguerrand Pinot
authored
Beam messages integration (#10)
* CI/CD pipes improvement, added contributing file * Move types declaration dependencies in production from dev dependencies * Update auto generated docs * 0.3.4 * Add support for ulum base denom * 0.3.5 * Added beam proto generation * Use builtin codecs * Added beam messages, fixed duplicate interface usage * Added editor config (webstorm) * Fixed typo * Removed not relevant test * Fixed codec compilation * Added basic beam test Co-authored-by: Segfault <[email protected]> Co-authored-by: Fabrice Bascoulergue <[email protected]> Co-authored-by: Enguerrand Pinot <[email protected]>
1 parent 3aa04b2 commit 35322b0

28 files changed

+2469
-194
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
max_line_length = 240
11+
12+
[*.ts]
13+
quote_type = single
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@
6767
"@babel/preset-typescript": "^7.8.3",
6868
"@types/jest": "^26.0.20",
6969
"@types/ledgerhq__hw-transport-node-hid": "^4.22.2",
70+
"axios": "^0.21.1",
7071
"cross-env": "^7.0.3",
7172
"eslint": "^7.19.0",
7273
"gts": "^3.1.0",
7374
"jest": "^26.6.3",
7475
"prettier": "^2.2.1",
7576
"rimraf": "^3.0.2",
7677
"ts-jest": "^26.5.0",
77-
"ts-proto": "^1.67.0",
78+
"ts-proto": "^1.79.7",
7879
"typedoc": "^0.20.25",
7980
"typedoc-plugin-markdown": "^3.5.0",
8081
"typescript": "^4.1.3"

scripts/define-proto.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ command -v shellcheck >/dev/null && shellcheck "$0"
55
ROOT_PROTO_DIR="./proto/cosmos/cosmos-sdk"
66
COSMOS_PROTO_DIR="$ROOT_PROTO_DIR/proto"
77
THIRD_PARTY_PROTO_DIR="$ROOT_PROTO_DIR/third_party/proto"
8+
9+
ROOT_LUM_PROTO_DIR="./proto/lum-network/chain"
10+
LUM_PROTO_DIR="$ROOT_LUM_PROTO_DIR/proto"
11+
812
OUT_DIR="./src/codec/"
913

1014
mkdir -p "$OUT_DIR"
@@ -14,6 +18,7 @@ protoc \
1418
--ts_proto_out="$OUT_DIR" \
1519
--proto_path="$COSMOS_PROTO_DIR" \
1620
--proto_path="$THIRD_PARTY_PROTO_DIR" \
21+
--proto_path="$LUM_PROTO_DIR" \
1722
--ts_proto_opt="esModuleInterop=true,forceLong=long,useOptionals=true" \
1823
"$COSMOS_PROTO_DIR/cosmos/auth/v1beta1/auth.proto" \
1924
"$COSMOS_PROTO_DIR/cosmos/auth/v1beta1/query.proto" \
@@ -33,12 +38,6 @@ protoc \
3338
"$COSMOS_PROTO_DIR/cosmos/staking/v1beta1/tx.proto" \
3439
"$COSMOS_PROTO_DIR/cosmos/tx/signing/v1beta1/signing.proto" \
3540
"$COSMOS_PROTO_DIR/cosmos/tx/v1beta1/tx.proto" \
36-
"$COSMOS_PROTO_DIR/ibc/core/channel/v1/channel.proto" \
37-
"$COSMOS_PROTO_DIR/ibc/core/channel/v1/query.proto" \
38-
"$COSMOS_PROTO_DIR/ibc/core/client/v1/client.proto" \
39-
"$COSMOS_PROTO_DIR/ibc/core/commitment/v1/commitment.proto" \
40-
"$COSMOS_PROTO_DIR/ibc/core/connection/v1/connection.proto" \
41-
"$COSMOS_PROTO_DIR/ibc/core/connection/v1/query.proto" \
4241
"$THIRD_PARTY_PROTO_DIR/confio/proofs.proto" \
4342
"$THIRD_PARTY_PROTO_DIR/tendermint/abci/types.proto" \
4443
"$THIRD_PARTY_PROTO_DIR/tendermint/crypto/keys.proto" \
@@ -47,7 +46,8 @@ protoc \
4746
"$THIRD_PARTY_PROTO_DIR/tendermint/types/params.proto" \
4847
"$THIRD_PARTY_PROTO_DIR/tendermint/types/types.proto" \
4948
"$THIRD_PARTY_PROTO_DIR/tendermint/types/validator.proto" \
50-
"$THIRD_PARTY_PROTO_DIR/tendermint/version/types.proto"
49+
"$THIRD_PARTY_PROTO_DIR/tendermint/version/types.proto" \
50+
"$LUM_PROTO_DIR/chain/beam/beam.proto"
5151

5252
# Remove unnecessary codec files
5353
rm -rf \

scripts/get-proto.sh

+12
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,26 @@ PROTO_DIR="./proto"
66
COSMOS_DIR="$PROTO_DIR/cosmos"
77
COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk"
88
ZIP_FILE="$COSMOS_DIR/tmp.zip"
9+
10+
LUM_NETWORK_DIR="$PROTO_DIR/lum-network"
11+
LUM_NETWORK_SDK_DIR="$LUM_NETWORK_DIR/chain"
12+
913
REF=${REF:-"master"}
1014
SUFFIX=${REF}
1115

1216
[[ $SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.+)?$ ]] && SUFFIX=${SUFFIX#v}
1317

18+
# Create the cosmos dir
1419
mkdir -p "$COSMOS_DIR"
1520

21+
# Download the cosmos archive
1622
wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$REF.zip"
1723
unzip "$ZIP_FILE" "*.proto" -d "$COSMOS_DIR"
1824
mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR"
1925
rm "$ZIP_FILE"
26+
27+
# Create the lum network dir
28+
mkdir -p "$LUM_NETWORK_SDK_DIR/proto/chain/beam"
29+
30+
# Download the beam archive
31+
wget -qO "$LUM_NETWORK_SDK_DIR/proto/chain/beam/beam.proto" "https://raw.githubusercontent.com/lum-network/chain/master/proto/beam/beam.proto?token=ABH2VUAPWO3DRGHMRGXWZWDASVAMY"

0 commit comments

Comments
 (0)