Skip to content

Commit c112ae7

Browse files
authored
[LUM-765] SDK -> Add Millions DepositEdit message (#60)
* [Updated] Proto and scripts, add MsgDepositEdit * Update README.md
1 parent e1333b6 commit c112ae7

File tree

141 files changed

+16964
-7370
lines changed

Some content is hidden

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

141 files changed

+16964
-7370
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ As of [v0.40](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0), the Co
9898

9999
### Acquire the definition files
100100

101+
First you will need to have the `buf` CLI installed globally on your machine.
102+
103+
On Mac via Homebrew for exemple:
104+
```bash
105+
brew install bufbuild/buf/buf
106+
```
107+
Then
108+
101109
```bash
102110
yarn get-proto
103111
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"format": "prettier --write '**/*.{js,jsx,ts,tsx,css,json,md,html,yml}'",
3939
"bump": "npm version",
4040
"preget-proto": "rm -rf proto",
41-
"get-proto": "COSMOS_REF=v0.46.7 IBC_REF=v5.0.1 LUM_REF=v1.4.2 sh ./scripts/get-proto.sh",
41+
"get-proto": "COSMOS_REF=1236c529873343a1967780774aa40f05c6d12f0e ICS_23_REF=cea74ba58ffbf87154701cd5959184acedf09cd6 IBC_REF=78be372cf9b33242c0ca3f0e48d4d156842e5941 LUM_REF=v1.5.0 sh ./scripts/get-proto.sh",
4242
"define-proto": "sh ./scripts/define-proto.sh",
4343
"postdefine-proto": "prettier --write \"src/codec/**/*.ts\""
4444
},

scripts/define-proto.sh

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
set -o errexit -o nounset -o pipefail
33
command -v shellcheck >/dev/null && shellcheck "$0"
44

5-
ROOT_PROTO_DIR="./proto/cosmos/cosmos-sdk"
6-
COSMOS_PROTO_DIR="$ROOT_PROTO_DIR/proto"
7-
COSMOS_THIRD_PARTY_PROTO_DIR="$ROOT_PROTO_DIR/third_party/proto"
5+
COSMOS_PROTO_DIR="./proto/cosmos/cosmos-sdk"
86

9-
ROOT_IBC_PROTO_DIR="./proto/ibc/ibc-go"
10-
IBC_PROTO_DIR="$ROOT_IBC_PROTO_DIR/proto"
11-
IBC_THIRD_PARTY_PROTO_DIR="$ROOT_IBC_PROTO_DIR/third_party/proto"
7+
IBC_PROTO_DIR="./proto/ibc/ibc-go"
128

139
ROOT_LUM_PROTO_DIR="./proto/lum-network/chain"
1410
LUM_PROTO_DIR="$ROOT_LUM_PROTO_DIR/proto"
@@ -21,8 +17,6 @@ protoc \
2117
--plugin="$(yarn bin protoc-gen-ts_proto)" \
2218
--ts_proto_out="$OUT_DIR" \
2319
--proto_path="$COSMOS_PROTO_DIR" \
24-
--proto_path="$COSMOS_THIRD_PARTY_PROTO_DIR" \
25-
--proto_path="$IBC_THIRD_PARTY_PROTO_DIR" \
2620
--proto_path="$LUM_PROTO_DIR" \
2721
--proto_path="$IBC_PROTO_DIR" \
2822
--ts_proto_opt="esModuleInterop=true,forceLong=long,useOptionals=true" \
@@ -40,7 +34,6 @@ protoc \
4034
"$COSMOS_PROTO_DIR/cosmos/base/query/v1beta1/pagination.proto" \
4135
"$COSMOS_PROTO_DIR/cosmos/base/tendermint/v1beta1/query.proto" \
4236
"$COSMOS_PROTO_DIR/cosmos/base/v1beta1/coin.proto" \
43-
"$COSMOS_PROTO_DIR/cosmos/capability/v1beta1/capability.proto" \
4437
"$COSMOS_PROTO_DIR/cosmos/crypto/secp256k1/keys.proto" \
4538
"$COSMOS_PROTO_DIR/cosmos/crypto/multisig/v1beta1/multisig.proto" \
4639
"$COSMOS_PROTO_DIR/cosmos/distribution/v1beta1/distribution.proto" \
@@ -96,31 +89,31 @@ protoc \
9689
"$IBC_PROTO_DIR/ibc/core/connection/v1/query.proto" \
9790
"$IBC_PROTO_DIR/ibc/core/connection/v1/tx.proto" \
9891
"$IBC_PROTO_DIR/ibc/lightclients/tendermint/v1/tendermint.proto" \
99-
"$LUM_PROTO_DIR/lum-network/airdrop/claim.proto" \
100-
"$LUM_PROTO_DIR/lum-network/airdrop/query.proto" \
101-
"$LUM_PROTO_DIR/lum-network/airdrop/params.proto" \
102-
"$LUM_PROTO_DIR/lum-network/beam/beam.proto" \
103-
"$LUM_PROTO_DIR/lum-network/beam/query.proto" \
104-
"$LUM_PROTO_DIR/lum-network/beam/tx.proto" \
105-
"$LUM_PROTO_DIR/lum-network/dfract/deposit.proto" \
106-
"$LUM_PROTO_DIR/lum-network/dfract/query.proto" \
107-
"$LUM_PROTO_DIR/lum-network/dfract/tx.proto" \
108-
"$LUM_PROTO_DIR/lum-network/dfract/params.proto" \
109-
"$LUM_PROTO_DIR/lum-network/dfract/proposal.proto" \
110-
"$LUM_PROTO_DIR/lum-network/millions/callbacks.proto" \
111-
"$LUM_PROTO_DIR/lum-network/millions/deposit.proto" \
112-
"$LUM_PROTO_DIR/lum-network/millions/draw.proto" \
113-
"$LUM_PROTO_DIR/lum-network/millions/draw_schedule.proto" \
114-
"$LUM_PROTO_DIR/lum-network/millions/params.proto" \
115-
"$LUM_PROTO_DIR/lum-network/millions/pool.proto" \
116-
"$LUM_PROTO_DIR/lum-network/millions/prize.proto" \
117-
"$LUM_PROTO_DIR/lum-network/millions/prize_batch.proto" \
118-
"$LUM_PROTO_DIR/lum-network/millions/prize_ref.proto" \
119-
"$LUM_PROTO_DIR/lum-network/millions/prize_strategy.proto" \
120-
"$LUM_PROTO_DIR/lum-network/millions/query.proto" \
121-
"$LUM_PROTO_DIR/lum-network/millions/tx.proto" \
122-
"$LUM_PROTO_DIR/lum-network/millions/withdrawal.proto" \
123-
"$LUM_PROTO_DIR/lum-network/millions/gov.proto"
92+
"$LUM_PROTO_DIR/lum/network/airdrop/claim.proto" \
93+
"$LUM_PROTO_DIR/lum/network/airdrop/query.proto" \
94+
"$LUM_PROTO_DIR/lum/network/airdrop/params.proto" \
95+
"$LUM_PROTO_DIR/lum/network/beam/beam.proto" \
96+
"$LUM_PROTO_DIR/lum/network/beam/query.proto" \
97+
"$LUM_PROTO_DIR/lum/network/beam/tx.proto" \
98+
"$LUM_PROTO_DIR/lum/network/dfract/deposit.proto" \
99+
"$LUM_PROTO_DIR/lum/network/dfract/query.proto" \
100+
"$LUM_PROTO_DIR/lum/network/dfract/tx.proto" \
101+
"$LUM_PROTO_DIR/lum/network/dfract/params.proto" \
102+
"$LUM_PROTO_DIR/lum/network/dfract/proposal.proto" \
103+
"$LUM_PROTO_DIR/lum/network/millions/callbacks.proto" \
104+
"$LUM_PROTO_DIR/lum/network/millions/deposit.proto" \
105+
"$LUM_PROTO_DIR/lum/network/millions/draw.proto" \
106+
"$LUM_PROTO_DIR/lum/network/millions/draw_schedule.proto" \
107+
"$LUM_PROTO_DIR/lum/network/millions/params.proto" \
108+
"$LUM_PROTO_DIR/lum/network/millions/pool.proto" \
109+
"$LUM_PROTO_DIR/lum/network/millions/prize.proto" \
110+
"$LUM_PROTO_DIR/lum/network/millions/prize_batch.proto" \
111+
"$LUM_PROTO_DIR/lum/network/millions/prize_ref.proto" \
112+
"$LUM_PROTO_DIR/lum/network/millions/prize_strategy.proto" \
113+
"$LUM_PROTO_DIR/lum/network/millions/query.proto" \
114+
"$LUM_PROTO_DIR/lum/network/millions/tx.proto" \
115+
"$LUM_PROTO_DIR/lum/network/millions/withdrawal.proto" \
116+
"$LUM_PROTO_DIR/lum/network/millions/gov.proto"
124117

125118
# Remove unnecessary codec files
126119
rm -rf \

scripts/get-proto.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ PROTO_DIR="./proto"
99
##
1010
COSMOS_DIR="$PROTO_DIR/cosmos"
1111
COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk"
12-
COSMOS_ZIP_FILE="$COSMOS_DIR/tmp.zip"
1312

1413
# Init Cosmos REF
1514
COSMOS_REF=${COSMOS_REF:-"master"}
@@ -19,19 +18,16 @@ COSMOS_SUFFIX=${COSMOS_REF}
1918
# Create the Cosmos dir
2019
mkdir -p "$COSMOS_DIR"
2120

22-
# Download the Cosmos archive
23-
wget -qO "$COSMOS_ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$COSMOS_REF.zip"
24-
unzip "$COSMOS_ZIP_FILE" "*.proto" -d "$COSMOS_DIR"
25-
mv "$COSMOS_SDK_DIR-$COSMOS_SUFFIX" "$COSMOS_SDK_DIR"
26-
rm "$COSMOS_ZIP_FILE"
21+
# Download the Cosmos/ics23 archive
22+
buf export buf.build/cosmos/cosmos-sdk:$COSMOS_REF --output "$COSMOS_SDK_DIR"
23+
buf export buf.build/cosmos/ics23:$ICS_23_REF --output "$COSMOS_SDK_DIR"
2724

2825
##
2926
## IBC SDK
3027
##
3128

3229
IBC_DIR="$PROTO_DIR/ibc"
3330
IBC_SDK_DIR="$IBC_DIR/ibc-go"
34-
IBC_ZIP_FILE="$IBC_DIR/tmp.zip"
3531

3632
# Init IBC REF
3733
IBC_REF=${IBC_REF:-"main"}
@@ -42,10 +38,7 @@ IBC_SUFFIX=${IBC_REF}
4238
mkdir -p "$IBC_DIR"
4339

4440
# Download the IBC archive
45-
wget -qO "$IBC_ZIP_FILE" "https://github.com/cosmos/ibc-go/archive/$IBC_REF.zip"
46-
unzip "$IBC_ZIP_FILE" "*.proto" -d "$IBC_DIR"
47-
mv "$IBC_SDK_DIR-$IBC_SUFFIX" "$IBC_SDK_DIR"
48-
rm "$IBC_ZIP_FILE"
41+
buf export buf.build/cosmos/ibc:$IBC_REF --output "$IBC_SDK_DIR"
4942

5043
##
5144
## LUM SDK

src/codec/amino/amino.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* eslint-disable */
2+
3+
export const protobufPackage = 'amino';

0 commit comments

Comments
 (0)