Skip to content

Commit c9cfcc0

Browse files
committed
chore: update proto definitions from injective-core master branch (v1.16 candidate)
1 parent 398e523 commit c9cfcc0

File tree

254 files changed

+14293
-3182
lines changed

Some content is hidden

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

254 files changed

+14293
-3182
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ gen-client: clone-all copy-proto
99
$(call clean_repos)
1010
$(MAKE) fix-generated-proto-imports
1111

12-
PROTO_MODULES := cosmwasm exchange gogoproto cosmos_proto cosmos testpb ibc amino tendermint injective
12+
PROTO_MODULES := cosmwasm exchange gogoproto cosmos_proto cosmos testpb ibc amino tendermint cometbft injective
1313

1414
fix-generated-proto-imports:
1515
@touch pyinjective/proto/__init__.py
@@ -31,7 +31,7 @@ clean-all:
3131
$(call clean_repos)
3232

3333
clone-injective-indexer:
34-
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.13.4 --depth 1 --single-branch
34+
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.15.6 --depth 1 --single-branch
3535

3636
clone-all: clone-injective-indexer
3737

buf.gen.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@ inputs:
1111
- module: buf.build/cosmos/gogo-proto
1212
- module: buf.build/googleapis/googleapis
1313
- module: buf.build/cosmos/ics23
14-
- git_repo: https://github.com/InjectiveLabs/cosmos-sdk
15-
tag: v0.50.9-inj-2
1614
- git_repo: https://github.com/InjectiveLabs/ibc-go
17-
tag: v8.3.2-inj-0
15+
tag: v8.7.0-evm-comet1-inj
1816
- git_repo: https://github.com/InjectiveLabs/wasmd
19-
tag: v0.52.0-inj-0
17+
tag: v0.53.2-evm-comet1-inj
18+
- git_repo: https://github.com/InjectiveLabs/cometbft
19+
tag: v1.0.1-inj
20+
- git_repo: https://github.com/InjectiveLabs/cosmos-sdk
21+
tag: v0.50.13-evm-comet1-inj.2
2022
# - git_repo: https://github.com/InjectiveLabs/wasmd
2123
# branch: v0.51.x-inj
2224
# subdir: proto
2325
# - git_repo: https://github.com/InjectiveLabs/injective-core
2426
# tag: v1.13.0
2527
# subdir: proto
2628
- git_repo: https://github.com/InjectiveLabs/injective-core
27-
branch: feat/add_exchange_v1_compatibility_to_chain_stream
29+
branch: master
2830
subdir: proto
2931
- directory: proto

pyinjective/composer.py

Lines changed: 1 addition & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -863,63 +863,6 @@ def msg_instant_spot_market_launch_v2(
863863
quote_decimals=quote_decimals,
864864
)
865865

866-
def msg_instant_perpetual_market_launch(
867-
self,
868-
sender: str,
869-
ticker: str,
870-
quote_denom: str,
871-
oracle_base: str,
872-
oracle_quote: str,
873-
oracle_scale_factor: int,
874-
oracle_type: str,
875-
maker_fee_rate: Decimal,
876-
taker_fee_rate: Decimal,
877-
initial_margin_ratio: Decimal,
878-
maintenance_margin_ratio: Decimal,
879-
min_price_tick_size: Decimal,
880-
min_quantity_tick_size: Decimal,
881-
min_notional: Decimal,
882-
) -> injective_exchange_tx_pb.MsgInstantPerpetualMarketLaunch:
883-
"""
884-
This method is deprecated and will be removed soon. Please use `msg_instant_perpetual_market_launch_v2` instead
885-
"""
886-
warn(
887-
"This method is deprecated. Use msg_instant_perpetual_market_launch_v2 instead",
888-
DeprecationWarning,
889-
stacklevel=2,
890-
)
891-
892-
quote_token = self.tokens[quote_denom]
893-
894-
chain_min_price_tick_size = quote_token.chain_formatted_value(min_price_tick_size) * Decimal(
895-
f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}"
896-
)
897-
chain_min_quantity_tick_size = min_quantity_tick_size * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
898-
chain_maker_fee_rate = maker_fee_rate * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
899-
chain_taker_fee_rate = taker_fee_rate * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
900-
chain_initial_margin_ratio = initial_margin_ratio * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
901-
chain_maintenance_margin_ratio = maintenance_margin_ratio * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
902-
chain_min_notional = quote_token.chain_formatted_value(min_notional) * Decimal(
903-
f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}"
904-
)
905-
906-
return injective_exchange_tx_pb.MsgInstantPerpetualMarketLaunch(
907-
sender=sender,
908-
ticker=ticker,
909-
quote_denom=quote_token.denom,
910-
oracle_base=oracle_base,
911-
oracle_quote=oracle_quote,
912-
oracle_scale_factor=oracle_scale_factor,
913-
oracle_type=injective_oracle_pb.OracleType.Value(oracle_type),
914-
maker_fee_rate=f"{chain_maker_fee_rate.normalize():f}",
915-
taker_fee_rate=f"{chain_taker_fee_rate.normalize():f}",
916-
initial_margin_ratio=f"{chain_initial_margin_ratio.normalize():f}",
917-
maintenance_margin_ratio=f"{chain_maintenance_margin_ratio.normalize():f}",
918-
min_price_tick_size=f"{chain_min_price_tick_size.normalize():f}",
919-
min_quantity_tick_size=f"{chain_min_quantity_tick_size.normalize():f}",
920-
min_notional=f"{chain_min_notional.normalize():f}",
921-
)
922-
923866
def msg_instant_perpetual_market_launch_v2(
924867
self,
925868
sender: str,
@@ -962,66 +905,6 @@ def msg_instant_perpetual_market_launch_v2(
962905
min_notional=f"{chain_min_notional.normalize():f}",
963906
)
964907

965-
def msg_instant_expiry_futures_market_launch(
966-
self,
967-
sender: str,
968-
ticker: str,
969-
quote_denom: str,
970-
oracle_base: str,
971-
oracle_quote: str,
972-
oracle_scale_factor: int,
973-
oracle_type: str,
974-
expiry: int,
975-
maker_fee_rate: Decimal,
976-
taker_fee_rate: Decimal,
977-
initial_margin_ratio: Decimal,
978-
maintenance_margin_ratio: Decimal,
979-
min_price_tick_size: Decimal,
980-
min_quantity_tick_size: Decimal,
981-
min_notional: Decimal,
982-
) -> injective_exchange_tx_pb.MsgInstantPerpetualMarketLaunch:
983-
"""
984-
This method is deprecated and will be removed soon.
985-
Please use `msg_instant_expiry_futures_market_launch_v2` instead
986-
"""
987-
warn(
988-
"This method is deprecated. Use msg_instant_expiry_futures_market_launch_v2 instead",
989-
DeprecationWarning,
990-
stacklevel=2,
991-
)
992-
993-
quote_token = self.tokens[quote_denom]
994-
995-
chain_min_price_tick_size = quote_token.chain_formatted_value(min_price_tick_size) * Decimal(
996-
f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}"
997-
)
998-
chain_min_quantity_tick_size = min_quantity_tick_size * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
999-
chain_maker_fee_rate = maker_fee_rate * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
1000-
chain_taker_fee_rate = taker_fee_rate * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
1001-
chain_initial_margin_ratio = initial_margin_ratio * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
1002-
chain_maintenance_margin_ratio = maintenance_margin_ratio * Decimal(f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}")
1003-
chain_min_notional = quote_token.chain_formatted_value(min_notional) * Decimal(
1004-
f"1e{ADDITIONAL_CHAIN_FORMAT_DECIMALS}"
1005-
)
1006-
1007-
return injective_exchange_tx_pb.MsgInstantExpiryFuturesMarketLaunch(
1008-
sender=sender,
1009-
ticker=ticker,
1010-
quote_denom=quote_token.denom,
1011-
oracle_base=oracle_base,
1012-
oracle_quote=oracle_quote,
1013-
oracle_scale_factor=oracle_scale_factor,
1014-
oracle_type=injective_oracle_pb.OracleType.Value(oracle_type),
1015-
expiry=expiry,
1016-
maker_fee_rate=f"{chain_maker_fee_rate.normalize():f}",
1017-
taker_fee_rate=f"{chain_taker_fee_rate.normalize():f}",
1018-
initial_margin_ratio=f"{chain_initial_margin_ratio.normalize():f}",
1019-
maintenance_margin_ratio=f"{chain_maintenance_margin_ratio.normalize():f}",
1020-
min_price_tick_size=f"{chain_min_price_tick_size.normalize():f}",
1021-
min_quantity_tick_size=f"{chain_min_quantity_tick_size.normalize():f}",
1022-
min_notional=f"{chain_min_notional.normalize():f}",
1023-
)
1024-
1025908
def msg_instant_expiry_futures_market_launch_v2(
1026909
self,
1027910
sender: str,
@@ -1590,7 +1473,7 @@ def msg_instant_binary_options_market_launch(
15901473
min_price_tick_size: Decimal,
15911474
min_quantity_tick_size: Decimal,
15921475
min_notional: Decimal,
1593-
) -> injective_exchange_tx_pb.MsgInstantPerpetualMarketLaunch:
1476+
) -> injective_exchange_tx_pb.MsgInstantBinaryOptionsMarketLaunch:
15941477
"""
15951478
This method is deprecated and will be removed soon.
15961479
Please use `msg_instant_binary_options_market_launch_v2` instead

pyinjective/proto/cometbft/abci/v1/service_pb2.py

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)