Skip to content

Commit 9105987

Browse files
authored
feat: update to v0.20.0-rc1 (#223)
1 parent 2aba18a commit 9105987

File tree

7 files changed

+217
-225
lines changed

7 files changed

+217
-225
lines changed

nibiru/event_specs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from enum import Enum
33

44
import google.protobuf.message
5+
from nibiru_proto.proto.oracle.v1beta1 import event_pb2 as oracle_events
56
from nibiru_proto.proto.perp.v1 import event_pb2 as perp_events
67
from nibiru_proto.proto.spot.v1 import event_pb2 as spot_events
78
from nibiru_proto.proto.stablecoin import events_pb2 as stablecoin_events # noqa
@@ -39,6 +40,9 @@ class EventType(Enum):
3940
RecollateralizeEvent = stablecoin_events.EventRecollateralize
4041
BuybackEvent = stablecoin_events.EventBuyback
4142

43+
# Oracle events
44+
PriceUpdate = oracle_events.OraclePriceUpdate
45+
4246
# Bank
4347
Transfer = "transfer"
4448

nibiru/pytypes/network.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def string(self) -> str:
160160
return self.env
161161

162162
@classmethod
163-
def devnet(cls, chain_num: int = 3) -> "Network":
163+
def devnet(cls, chain_num: int = 2) -> "Network":
164164
"""
165165
Devnet is a network open to invited validators.
166166
@@ -182,10 +182,6 @@ def devnet(cls, chain_num: int = 3) -> "Network":
182182

183183
@classmethod
184184
def from_chain_id(cls, chain_id: str) -> "Network":
185-
"""
186-
Soon!
187-
"""
188-
189185
chain_id_elements: List[str] = chain_id.split("-")
190186
if len(chain_id_elements) != 3:
191187
raise ValueError(

nibiru/tx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def execute_msgs(
101101
if not isinstance(msgs, list):
102102
msgs = [msgs]
103103
self.client.wait_for_next_block()
104-
return self.execute_msgs(*msgs, get_sequence_from_node=True, **kwargs)
104+
kwargs["get_sequence_from_node"] = True
105+
return self.execute_msgs(*msgs, **kwargs)
105106

106107
if address:
107108
address.decrease_sequence()

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pre-commit = "^2.20.0"
3434
shutup = "^0.2.0"
3535
websocket-client = "^1.4.1"
3636
packaging = "^21.3"
37-
nibiru-proto = "==0.19.0"
37+
nibiru-proto = "==0.20.0-rc1"
3838
bip32 = "^3.3"
3939
importlib-metadata = "^5.0.0"
4040

tests/auth_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ def test_query_auth_account(sdk_val: nibiru.Sdk):
77
"sdk_val",
88
)
99

10-
query_resp: dict = sdk_val.query.auth.account(sdk_val.address)["account"]
11-
12-
tests.dict_keys_must_match(query_resp, ['@type', 'address', 'pubKey', 'sequence'])
10+
_: dict = sdk_val.query.auth.account(sdk_val.address)["account"]
1311

1412

1513
def test_query_auth_accounts(sdk_val: nibiru.Sdk):

tests/conftest.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
def pytest_configure(config):
4040
dotenv.load_dotenv()
4141

42-
EXPECTED_ENV_VARS: List[str] = list(PYTEST_GLOBALS.keys())
43-
4442
def set_pytest_global(name: str, value: Any):
4543
"""Adds environment variables to the 'pytest' object and the 'PYTEST_GLOBALS'
4644
dictionary so that a central point of truth on what variables are set
@@ -51,14 +49,10 @@ def set_pytest_global(name: str, value: Any):
5149

5250
use_localnet: Optional[str] = os.getenv("USE_LOCALNET")
5351
if use_localnet is not None:
54-
if use_localnet.lower() == "true":
55-
set_pytest_global("use_localnet", True)
56-
if not use_localnet:
57-
EXPECTED_ENV_VARS = [key for key in PYTEST_GLOBALS_REQUIRED]
58-
set_pytest_global("use_localnet", False)
52+
set_pytest_global("use_localnet", use_localnet.lower() == "true")
5953

6054
# Set the expected environment variables. Raise a value error if one is missing
61-
for env_var_name in EXPECTED_ENV_VARS:
55+
for env_var_name in PYTEST_GLOBALS_REQUIRED.keys():
6256
env_var_value = os.getenv(env_var_name)
6357
if not env_var_value:
6458
raise ValueError(f"Environment variable {env_var_name} is missing!")

0 commit comments

Comments
 (0)