Skip to content

Commit ccffe81

Browse files
authored
Merge pull request #291 from InjectiveLabs/dev
feat/release changes for chain v1.12 upgrade
2 parents ac3476c + c0adb1f commit ccffe81

File tree

570 files changed

+30773
-8983
lines changed

Some content is hidden

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

570 files changed

+30773
-8983
lines changed

CHANGELOG.md

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [1.0.1] - 2024-01-08
6+
### Added
7+
- Added low level API components for all modules (chain, exchain and explorer) to make the Python SDK compatible with the TypeScript SDK.
8+
- Added support for all wasm module messages.
9+
- Added support for all token factory module messages.
10+
11+
### Changed
12+
- Updated proto definitions to injective-core v1.12.0 and injective-indexer v1.12.72
13+
- Added new functions in AsyncClient to interact with chain, exchange and explorer using the low level API components
14+
- Marked old function sin AsyncClient as deprecated (the functions will be removed in a future version)
15+
- Updated all API examples to use the new AsyncClient functions
16+
17+
## [1.0] - 2023-11-01
18+
### Added
19+
- Added logic to support use of Client Order ID (CID) new identifier in OrderInfo
20+
- New chain stream support
21+
22+
### Changed
23+
- Remove support for `sentry` nodes in mainnet network. The only supported node option in mainnet is `lb`
24+
- Migrated all proto objects dependency to support chain version 1.22
25+
- Moved changelog from the README.md file to its own CHANGELOG.md file
26+
- Remove `aiocron` dependency. Use plain asyncio tasks to solve the timeout height synchronization
27+
- Updated the gas fee buffer used to calculate fee consumption in all examples
28+
- Refactored logic in AsyncClient to load markets and tokens, to ensure there are no duplicated tokens with the same denom
29+
30+
## [0.9.12]
31+
* Synchronized markets and tokens config files to add KIRA/INJ, NINJA/INJ, KATANA/INJ, BRETT/INJ and nINJ/INJ spot markets
32+
33+
## [0.9.11]
34+
* Synchronized markets and tokens config files to add SEI/USDT and TIA/USDT perpetual markets
35+
36+
## [0.9.10]
37+
* Synchronized markets and tokens config files to add SOL/USDT spot market
38+
39+
## [0.9.9]
40+
* Synchronized markets and tokens config files to add USDY/USDT and WHALE/USDT spot markets
41+
42+
## [0.9.8]
43+
* Synchronized markets and tokens config files to add PYTH/USDT spot market
44+
45+
## [0.9.7]
46+
* Added PYTH/USDT PERP market info in mainnet metadata ini file
47+
48+
## [0.9.6]
49+
* Synchronized denom ini files with Indexer information for mainnet, testnet and devnet to include TALIS/INJ and KUJI/USDT markets
50+
51+
## [0.9.5]
52+
* Updated fetch_metadata script (to synchronize denom ini files) to reuse logic in AsyncClient
53+
* Synchronized denom ini files with Indexer information for mainnet, testnet and devnet
54+
55+
## [0.9.4]
56+
* Added TIA/USDT spot market in mainnet and testnet ini file
57+
58+
## [0.9.3]
59+
* Updated TIA/USDT-30NOV2023 market id in denoms_mainnet.ini file
60+
61+
## [0.9.2]
62+
* Added fix to the grpc import error in Mac with M1 and M2 chips
63+
64+
## [0.9.1]
65+
* Added new spot markets in mainnet ini file: KAVA/USDT, USDTkv/USDT
66+
* Added new derivative markets in mainnet ini file: TIA/USDT-30NOV2023, AXL/USDT, BTC/USDTkv, ETH/USDTkv
67+
68+
## [0.9.0]
69+
* Improvement in broadcaster to initialize the account sequence number and the timeout height only when required
70+
* Replace Pipenv with Poetry
71+
* Add pre-commit validations to the project
72+
* Add a GitHub workflow to run all tests and calculate coverage for each PR
73+
74+
75+
## [0.8.5]
76+
* Added NEOK/USDT and ORAI/USDT spot markets to the mainnet .ini file
77+
78+
## [0.8.4]
79+
* Added methods to SpotMarket, DerivativeMarket and BianaryOptionMarket to translate chain prices and quantities to human-readable format.
80+
81+
## [0.8.3]
82+
* Fix dependency issue in setup.py.
83+
84+
## [0.8.2]
85+
* Add web3 library as a dependency for the project.
86+
87+
## [0.8.1]
88+
* Moved the configuration to use a secure or insecure connection inside the Network class. The AsyncClient's `insecure` parameter is no longer used for anything and will be removed in the future.
89+
* Made the new load balanced bare-metal node the default one for mainnet (it is called `lb`). The legacy one (load balanced k8s node) is called `lb_k8s`
90+
91+
## [0.8]
92+
* Refactor Composer to be created with all the markets and tokens. The Composer now uses the real markets and tokens to convert human-readable values to chain format
93+
* The Composer can still be instantiated without markets and tokens. When markets and tokens are not provided the Composer loads the required information from the Denoms used in previous versions
94+
* Change in AsyncClient to be able to create Composer instances for the client network, markets and tokens
95+
* Examples have been adapted to create Composer instances using the AsyncClient
96+
* Added new nodes (bare-metal load balancing nodes) for mainnet and testnet
97+
* Deprecated the kubernetes load balanced nodes for testnet
98+
* Refactored the cookies management logic into a cookie assistant. Added the required logic to support the new cookies format for bare-metal load balanced nodes
99+
* Removed class Client. The only supported now is the async version called AsyncClient.
100+
101+
## [0.7.1.1]
102+
* Fixed Testnet network URLs
103+
104+
## [0.7.2.1]
105+
* Synchronization of denoms configuration files.
106+
107+
## [0.7.2]
108+
* Added a new gas limit calculation for the TransactionBroadcaster that estimates the value based on the messages in the transaction (without running the transaction simulation).
109+
110+
## [0.7.1.2]
111+
* Add NBLA
112+
113+
## [0.7.1.1]
114+
* Fixed Testnet network URLs
115+
116+
## [0.7.1]
117+
* Include implementation of the TransactionBroadcaster, to simplify the transaction creation and broadcasting process.
118+
119+
## [0.7.0.6]
120+
* ADD SEI/USDT in metadata
121+
122+
## [0.7.0.5]
123+
* Added the required logic in the MsgSubaccountTransfer message to translate amounts and token into the correct amount and token name representation for the chain
124+
125+
## [0.7.0.4]
126+
* Synchronized decimals for ATOM and WETH in Testnet with the configuration provided by the indexer
127+
128+
## [0.7.0.3]
129+
* Add FRCOIN testnet
130+
131+
## [0.7.0.2]
132+
* Removed from AsyncClient all references to the deprecated OrderBook RPC endpoints (replaced them with OrderBookV2)
133+
* Updated all orderbook examples
134+
135+
## [0.7]
136+
* Removed references to pysha3 library (and also eip712-struct that required it) and replaced it with other implementation to allow the project to work with Python 3.11
137+
* Updated sentry nodes LCD URL, for each sentry node to use its own service
138+
139+
## [0.6.5]
140+
* Removed `k8s` from the list of supported mainnet nodes (`lb` should be used instead)
141+
142+
## [0.6.4]
143+
* Change logging logic to use different loggers for each module and class
144+
* Solved issue preventing requesting spot and derivative historical orders for more than one market_id
145+
* Add `pytest` as a development dependency to implement and run unit tests
146+
147+
## [0.6.3.3]
148+
* Update the code to the new structure of transaction responses
149+
150+
## [0.6.3.1]
151+
* Update the code to the new structure of transaction simulation responses
152+
153+
## [0.6.2.7]
154+
* Fix margin calculation in utils
155+
156+
## [0.6.2.1]
157+
* Remove version deps from Pipfile
158+
159+
## [0.6.2.0]
160+
* Add MsgUnderwrite, MsgRequestRedemption in Composer
161+
162+
## [0.6.1.8]
163+
* Add MsgCreateInsuranceFund in Composer
164+
* Re-gen mainnet denoms
165+
166+
## [0.6.1.5]
167+
* Add MsgExecuteContract in Composer
168+
169+
## [0.6.1.4]
170+
* Add wMATIC
171+
172+
## [0.6.1.2]
173+
* Add OrderbookV2 method in async client
174+
175+
## [0.6.1.1]
176+
* Add ARB/USDT
177+
178+
## [0.6.0.9]
179+
* Deprecate K8S and set LB as default
180+
* Proto re-gen
181+
182+
## [0.6.0.8]
183+
* Add USDCfr
184+
185+
## [0.6.0.7]
186+
* Add LDO
187+
188+
## [0.6.0.6]
189+
* Set default testnet endpoints to K8S
190+
* Remove LB config for testnet
191+
* Fix relative imports in composer
192+
* Add AccountPortfolio & StreamAccountPortfolio
193+
194+
## [0.6.0.5]
195+
* Add new testnet endpoints
196+
* Re-gen mainnet denoms
197+
198+
## [0.6.0.4]
199+
* Remove explicit versions from protobuf and grpcio-tools dependencies
200+
201+
## [0.6.0.2]
202+
* Re-gen mainnet denoms
203+
204+
## [0.6.0.0]
205+
* Change default network to LB
206+
* Re-gen mainnet denoms
207+
208+
## [0.5.9.7]
209+
* Re-gen mainnet denoms
210+
211+
## [0.5.9.6]
212+
* Re-gen proto
213+
214+
## [0.5.9.5]
215+
* Add orderbook snaphot methods
216+
217+
## [0.5.9.4]
218+
* Re-gen mainnet denoms
219+
220+
## [0.5.9.4]
221+
* Re-gen mainnet denoms
222+
223+
## [0.5.9.2]
224+
* Fix margin conversion for binary options
225+
226+
## [0.5.9.1]
227+
* Add skip/limit to BinaryOptionsMarketsRequest
228+
229+
## [0.5.9.0]
230+
* Re-gen proto
231+
* Fix MsgRewardsOptOut
232+
* Remove pysha3 dependency
233+
234+
## [0.5.8.8]
235+
* Add grpc_explorer_endpoint in Network
236+
* Add explorer channel and stub
237+
238+
*BREAKING CHANGES*
239+
240+
- Clients using [Custom Network](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/constant.py#L166) must now set grpc_explorer_endpoint during init

Makefile

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
all:
22

3-
EXCHANGE_PROTO_FILES=$(shell find ../injective-indexer/api/gen/grpc -type f -name '*.proto')
4-
PROTO_DIRS=$(shell find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
53
gen: gen-client
64

7-
gen-client: copy-proto
8-
@for dir in $(PROTO_DIRS); do \
5+
gen-client: clone-all copy-proto
6+
@for dir in $(shell find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq); do \
97
mkdir -p ./pyinjective/$${dir}; \
108
python3 -m grpc_tools.protoc \
119
-I proto \
@@ -14,25 +12,55 @@ gen-client: copy-proto
1412
$$(find ./$${dir} -type f -name '*.proto'); \
1513
done; \
1614
rm -rf proto
15+
$(call clean_repos)
1716
echo "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))" > pyinjective/proto/__init__.py
1817

18+
define clean_repos
19+
rm -Rf cosmos-sdk
20+
rm -Rf ibc-go
21+
rm -Rf cometbft
22+
rm -Rf wasmd
23+
rm -Rf injective-core
24+
rm -Rf injective-indexer
25+
endef
26+
27+
clean-all:
28+
$(call clean_repos)
29+
30+
clone-injective-core:
31+
git clone https://github.com/InjectiveLabs/injective-core.git -b v1.12.0 --depth 1 --single-branch
32+
33+
clone-injective-indexer:
34+
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.12.72 --depth 1 --single-branch
35+
36+
clone-cometbft:
37+
git clone https://github.com/InjectiveLabs/cometbft.git -b v0.37.2-inj --depth 1 --single-branch
38+
39+
clone-wasmd:
40+
git clone https://github.com/InjectiveLabs/wasmd.git -b v0.45.0-inj --depth 1 --single-branch
41+
42+
clone-cosmos-sdk:
43+
git clone https://github.com/InjectiveLabs/cosmos-sdk.git -b v0.47.3-inj-9 --depth 1 --single-branch
44+
45+
clone-ibc-go:
46+
git clone https://github.com/InjectiveLabs/ibc-go.git -b v7.2.0-inj --depth 1 --single-branch
47+
48+
clone-all: clone-cosmos-sdk clone-cometbft clone-ibc-go clone-wasmd clone-injective-core clone-injective-indexer
49+
1950
copy-proto:
2051
rm -rf pyinjective/proto
2152
mkdir -p proto/exchange
22-
buf export buf.build/cosmos/cosmos-sdk:v0.47.0 --output=third_party
23-
buf export https://github.com/cosmos/ibc-go.git --exclude-imports --output=third_party
24-
buf export https://github.com/cometbft/cometbft.git --exclude-imports --output=third_party
25-
buf export https://github.com/CosmWasm/wasmd.git --exclude-imports --output=./third_party
26-
buf export https://github.com/cosmos/ics23.git --exclude-imports --output=./third_party
27-
28-
cp -r ../injective-core/proto/injective proto/
29-
cp -r ./third_party/* proto/
53+
buf export ./cosmos-sdk --output=third_party
54+
buf export ./ibc-go --exclude-imports --output=third_party
55+
buf export ./cometbft --exclude-imports --output=third_party
56+
buf export ./wasmd --exclude-imports --output=third_party
57+
buf export https://github.com/cosmos/ics23.git --exclude-imports --output=third_party
58+
cp -r injective-core/proto/injective proto/
59+
cp -r third_party/* proto/
3060

3161
rm -rf ./third_party
3262

33-
@for file in $(EXCHANGE_PROTO_FILES); do \
34-
cp "$${file}" proto/exchange/; \
35-
done
63+
find ./injective-indexer/api/gen/grpc -type f -name "*.proto" -exec cp {} ./proto/exchange/ \;
3664

3765
tests:
3866
poetry run pytest -v

0 commit comments

Comments
 (0)