Skip to content

Commit b09a7a0

Browse files
authored
Merge pull request #371 from InjectiveLabs/feat/release_v1_9_0
Feat/release v1.9.0
2 parents 10c7a90 + 68759f3 commit b09a7a0

File tree

132 files changed

+6301
-6996
lines changed

Some content is hidden

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

132 files changed

+6301
-6996
lines changed

.github/workflows/run-tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
python: ["3.9", "3.10", "3.11"]
12-
os: [ubuntu-latest, macos-13, windows-latest]
12+
os: [ubuntu-latest, macos-latest, windows-latest]
1313
runs-on: ${{ matrix.os }}
1414
env:
1515
OS: ${{ matrix.os }}
@@ -22,8 +22,13 @@ jobs:
2222
with:
2323
python-version: ${{ matrix.python }}
2424

25+
- name: Set ARCHFLAGS for macOS
26+
if: runner.os == 'macOS'
27+
run: echo "ARCHFLAGS=-arch arm64" >> $GITHUB_ENV
28+
2529
- name: Install poetry
2630
run: python -m pip install poetry
31+
2732
- name: Cache the virtualenv
2833
id: cache-venv
2934
uses: actions/cache@v4
@@ -37,7 +42,7 @@ jobs:
3742

3843
- name: Run tests and Generate coverage
3944
run: |
40-
poetry run pytest --cov --cov-report=xml
45+
poetry run pytest --cov --cov-report=xml -v --full-trace
4146
4247
- name: Upload coverage to Codecov
4348
uses: codecov/codecov-action@v4

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.9.0] - 2025-02-13
6+
### Added
7+
- Added support for all new queries and messages from the new Permissions module
8+
59
## [1.8.2] - 2024-12-13
610
### Changed
711
- Updated `protobuf` dependency version to make it more flexible

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.14.1-RC.6 --depth 1 --single-branch
3535

3636
clone-all: clone-injective-indexer
3737

buf.gen.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ inputs:
1212
- module: buf.build/googleapis/googleapis
1313
- module: buf.build/cosmos/ics23
1414
- git_repo: https://github.com/InjectiveLabs/cosmos-sdk
15-
tag: v0.50.8-inj-0
15+
tag: v0.50.9-inj-2
1616
- git_repo: https://github.com/InjectiveLabs/ibc-go
1717
tag: v8.3.2-inj-0
1818
- git_repo: https://github.com/InjectiveLabs/wasmd
19-
tag: v0.51.0-inj-0
19+
tag: v0.53.2-inj-1
2020
# - git_repo: https://github.com/InjectiveLabs/wasmd
2121
# branch: v0.51.x-inj
2222
# subdir: proto
2323
- git_repo: https://github.com/InjectiveLabs/injective-core
24-
tag: v1.13.0
24+
tag: v1.14.0
2525
subdir: proto
26-
# - git_repo: https://github.com/InjectiveLabs/injective-core
27-
# branch: master
28-
# subdir: proto
26+
# - git_repo: https://github.com/InjectiveLabs/injective-core
27+
# branch: testnet
28+
# subdir: proto
2929
- directory: proto

examples/chain_client/exchange/3_MsgInstantSpotMarketLaunch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ async def main() -> None:
4343
min_price_tick_size=Decimal("0.001"),
4444
min_quantity_tick_size=Decimal("0.01"),
4545
min_notional=Decimal("1"),
46+
base_decimals=18,
47+
quote_decimals=6,
4648
)
4749

4850
# broadcast the transaction
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import asyncio
2+
3+
from pyinjective.async_client import AsyncClient
4+
from pyinjective.core.network import Network
5+
6+
7+
async def main() -> None:
8+
# select network: local, testnet, mainnet
9+
network = Network.testnet()
10+
11+
# initialize grpc client
12+
client = AsyncClient(network)
13+
14+
orderbook = await client.fetch_l3_derivative_orderbook(
15+
market_id="0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6",
16+
)
17+
print(orderbook)
18+
19+
20+
if __name__ == "__main__":
21+
asyncio.get_event_loop().run_until_complete(main())
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import asyncio
2+
3+
from pyinjective.async_client import AsyncClient
4+
from pyinjective.core.network import Network
5+
6+
7+
async def main() -> None:
8+
# select network: local, testnet, mainnet
9+
network = Network.testnet()
10+
11+
# initialize grpc client
12+
client = AsyncClient(network)
13+
14+
orderbook = await client.fetch_l3_spot_orderbook(
15+
market_id="0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe",
16+
)
17+
print(orderbook)
18+
19+
20+
if __name__ == "__main__":
21+
asyncio.get_event_loop().run_until_complete(main())
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import asyncio
2+
3+
from pyinjective.async_client import AsyncClient
4+
from pyinjective.core.network import Network
5+
6+
7+
async def main() -> None:
8+
"""
9+
Demonstrate fetching market balance using AsyncClient.
10+
"""
11+
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet()
12+
network = Network.testnet()
13+
14+
# Initialize the Async Client
15+
client = AsyncClient(network)
16+
17+
try:
18+
# Example market ID (replace with an actual market ID from the network)
19+
market_id = "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"
20+
21+
# Fetch market balance
22+
market_balance = await client.fetch_market_balance(market_id=market_id)
23+
print("Market Balance:")
24+
print(market_balance)
25+
26+
except Exception as ex:
27+
print(f"Error occurred: {ex}")
28+
29+
30+
if __name__ == "__main__":
31+
asyncio.get_event_loop().run_until_complete(main())
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import asyncio
2+
3+
from pyinjective.async_client import AsyncClient
4+
from pyinjective.core.network import Network
5+
6+
7+
async def main() -> None:
8+
"""
9+
Demonstrate fetching market balances using AsyncClient.
10+
"""
11+
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet()
12+
network = Network.testnet()
13+
14+
# Initialize the Async Client
15+
client = AsyncClient(network)
16+
17+
try:
18+
# Fetch market balances
19+
market_balances = await client.fetch_market_balances()
20+
print("Market Balances:")
21+
print(market_balances)
22+
23+
except Exception as ex:
24+
print(f"Error occurred: {ex}")
25+
26+
27+
if __name__ == "__main__":
28+
asyncio.get_event_loop().run_until_complete(main())
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import asyncio
2+
3+
from pyinjective.async_client import AsyncClient
4+
from pyinjective.core.network import Network
5+
6+
7+
async def main() -> None:
8+
"""
9+
Demonstrate fetching denom min notional using AsyncClient.
10+
"""
11+
# Select network: choose between Network.mainnet(), Network.testnet(), or Network.devnet()
12+
network = Network.testnet()
13+
14+
# Initialize the Async Client
15+
client = AsyncClient(network)
16+
17+
try:
18+
# Example denom
19+
denom = "factory/inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r/inj_test"
20+
21+
# Fetch market balance
22+
min_notional = await client.fetch_denom_min_notional(denom=denom)
23+
print("Min Notional:")
24+
print(min_notional)
25+
26+
except Exception as ex:
27+
print(f"Error occurred: {ex}")
28+
29+
30+
if __name__ == "__main__":
31+
asyncio.get_event_loop().run_until_complete(main())

0 commit comments

Comments
 (0)