Skip to content

Commit

Permalink
Merge pull request #13 from bandprotocol/patch-pyband
Browse files Browse the repository at this point in the history
Add new generated proto from chain2.3.0, cosmos0.44.0, ibc-go 1.1.0
  • Loading branch information
p-rial authored Sep 6, 2021
2 parents e988ab1 + 1ae3a34 commit 89e2ca8
Show file tree
Hide file tree
Showing 243 changed files with 12,889 additions and 2,716 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ The library is available on [PyPI](https://pypi.org/project/pyband/)
pip install pyband
```

## Compatible

Band 2.3.0, Cosmos-SDK 0.44.0, IBC-go 1.1.0


## 💎 Example Usage

The example code below shows how the library can be used to get the result of the latest request for the price of any cryptocurrency. In this example, we will get the latest price of the following coin - BTC, ETH, MIR, ANC, DOGE, and LUNA. The specified parameters are
Expand Down
2 changes: 1 addition & 1 deletion pyband/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_oracle_script(self, id: int) -> oracle_type.OracleScript:
def get_request_by_id(self, id: int) -> oracle_query.QueryRequestResponse:
return self.stubOracle.Request(oracle_query.QueryRequestRequest(request_id=id))

def get_reporters(self, validator: str) -> oracle_type.ReportersPerValidator.reporters:
def get_reporters(self, validator: str) -> oracle_query.QueryReportersResponse.reporter:
return self.stubOracle.Reporters(oracle_query.QueryReportersRequest(validator_address=validator)).reporter

def get_latest_block(self) -> tendermint_query.GetLatestBlockResponse:
Expand Down
24 changes: 0 additions & 24 deletions pyband/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,10 @@ class PybandError(Exception):
pass


class EmptyRequestMsgError(PybandError):
pass


class QueryError(PybandError):
pass


class NegativeIntegerError(PybandError):
pass


class ValueTooLargeError(PybandError):
pass


class InsufficientCoinError(PybandError):
pass


class EmptyMsgError(PybandError):
pass

Expand All @@ -42,13 +26,5 @@ class ConvertError(PybandError):
pass


class UnsuccessfulCallError(PybandError):
pass


class CreateError(PybandError):
pass


class SchemaError(PybandError):
pass
Binary file removed pyband/proto/.DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions pyband/proto/confio/proofs_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 89e2ca8

Please sign in to comment.