Skip to content

Commit 7754dd3

Browse files
authored
Merge pull request #240 from InjectiveLabs/dev
Release version 0.8 to production
2 parents e0f9230 + c8d68eb commit 7754dd3

File tree

149 files changed

+3365
-2633
lines changed

Some content is hidden

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

149 files changed

+3365
-2633
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ copy-proto:
3535
done
3636

3737
tests:
38-
pytest -v tests/**
38+
pytest -v
3939

4040
.PHONY: all gen gen-client copy-proto tests

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ websockets = "*"
2525
[dev-packages]
2626
pytest = "*"
2727
pytest-asyncio = "*"
28+
pytest-grpc = "*"
2829
requests-mock = "*"
2930

3031
[requires]

Pipfile.lock

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

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,23 @@ make tests
8787
```
8888

8989
### Changelogs
90+
**0.8.1**
91+
* 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.
92+
* 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`
93+
94+
**0.8**
95+
* 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
96+
* 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
97+
* Change in AsyncClient to be able to create Composer instances for the client network, markets and tokens
98+
* Examples have been adapted to create Composer instances using the AsyncClient
99+
* Added new nodes (bare-metal load balancing nodes) for mainnet and testnet
100+
* Deprecated the kubernetes load balanced nodes for testnet
101+
* 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
102+
* Removed class Client. The only supported now is the async version called AsyncClient.
103+
104+
**0.7.1.1**
105+
* Fixed Testnet network URLs
106+
90107
**0.7.2.1**
91108
* Synchronization of denoms configuration files.
92109

examples/SendToInjective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import asyncio
55
import logging
66

7-
from pyinjective.constant import Network
7+
from pyinjective.core.network import Network
88
from pyinjective.sendtocosmos import Peggo
99

1010
import importlib.resources as pkg_resources

examples/chain_client/0_LocalOrderHash.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import asyncio
2-
import logging
32

4-
from pyinjective.composer import Composer as ProtoMsgComposer
53
from pyinjective.async_client import AsyncClient
4+
from pyinjective.composer import Composer
65
from pyinjective.transaction import Transaction
7-
from pyinjective.constant import Network
6+
from pyinjective.core.network import Network
87
from pyinjective.wallet import PrivateKey
98
from pyinjective.orderhash import OrderHashManager
109

1110
async def main() -> None:
1211
# select network: local, testnet, mainnet
1312
network = Network.testnet()
14-
composer = ProtoMsgComposer(network=network.string())
1513

1614
# initialize grpc client
17-
client = AsyncClient(network, insecure=False)
15+
client = AsyncClient(network)
16+
composer = await client.composer()
1817
await client.sync_timeout_height()
1918

2019
# load account

examples/chain_client/13_MsgIncreasePositionMargin.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import asyncio
2-
import logging
32

4-
from pyinjective.composer import Composer as ProtoMsgComposer
53
from pyinjective.async_client import AsyncClient
64
from pyinjective.transaction import Transaction
7-
from pyinjective.constant import Network
5+
from pyinjective.core.network import Network
86
from pyinjective.wallet import PrivateKey
97

108

119
async def main() -> None:
1210
# select network: local, testnet, mainnet
1311
network = Network.testnet()
14-
composer = ProtoMsgComposer(network=network.string())
1512

1613
# initialize grpc client
17-
client = AsyncClient(network, insecure=False)
14+
client = AsyncClient(network)
15+
composer = await client.composer()
1816
await client.sync_timeout_height()
1917

2018
# load account

examples/chain_client/15_MsgWithdraw.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,20 @@
1313
# limitations under the License.
1414

1515
import asyncio
16-
import logging
1716

18-
from pyinjective.composer import Composer as ProtoMsgComposer
1917
from pyinjective.async_client import AsyncClient
2018
from pyinjective.transaction import Transaction
21-
from pyinjective.constant import Network
19+
from pyinjective.core.network import Network
2220
from pyinjective.wallet import PrivateKey
2321

2422

2523
async def main() -> None:
2624
# select network: local, testnet, mainnet
2725
network = Network.testnet()
28-
composer = ProtoMsgComposer(network=network.string())
2926

3027
# initialize grpc client
31-
client = AsyncClient(network, insecure=False)
28+
client = AsyncClient(network)
29+
composer = await client.composer()
3230
await client.sync_timeout_height()
3331

3432
# load account

examples/chain_client/16_MsgSubaccountTransfer.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import asyncio
2-
import logging
32

4-
from pyinjective.composer import Composer as ProtoMsgComposer
53
from pyinjective.async_client import AsyncClient
64
from pyinjective.transaction import Transaction
7-
from pyinjective.constant import Network
5+
from pyinjective.core.network import Network
86
from pyinjective.wallet import PrivateKey
97

108

119
async def main() -> None:
1210
# select network: local, testnet, mainnet
1311
network = Network.testnet()
14-
composer = ProtoMsgComposer(network=network.string())
1512

1613
# initialize grpc client
17-
client = AsyncClient(network, insecure=False)
14+
client = AsyncClient(network)
15+
composer = await client.composer()
1816
await client.sync_timeout_height()
1917

2018
# load account

examples/chain_client/17_MsgBatchUpdateOrders.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import asyncio
2-
import logging
32

4-
from pyinjective.composer import Composer as ProtoMsgComposer
53
from pyinjective.async_client import AsyncClient
64
from pyinjective.transaction import Transaction
7-
from pyinjective.constant import Network
5+
from pyinjective.core.network import Network
86
from pyinjective.wallet import PrivateKey
97

108

119
async def main() -> None:
1210
# select network: local, testnet, mainnet
1311
network = Network.testnet()
14-
composer = ProtoMsgComposer(network=network.string())
1512

1613
# initialize grpc client
17-
client = AsyncClient(network, insecure=False)
14+
client = AsyncClient(network)
15+
composer = await client.composer()
1816
await client.sync_timeout_height()
1917

2018
# load account
@@ -132,7 +130,7 @@ async def main() -> None:
132130
print(sim_res)
133131
return
134132

135-
sim_res_msg = ProtoMsgComposer.MsgResponses(sim_res, simulation=True)
133+
sim_res_msg = composer.MsgResponses(sim_res, simulation=True)
136134
print("---Simulation Response---")
137135
print(sim_res_msg)
138136

0 commit comments

Comments
 (0)