Skip to content

Commit

Permalink
Merge pull request #11 from bandprotocol/support-secure-grpc
Browse files Browse the repository at this point in the history
Support secure grpc
  • Loading branch information
thebevrishot authored Aug 31, 2021
2 parents 6c3e4e3 + 6a274bb commit e988ab1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 21 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Pyband is a library that is used for interacting with BandChain using `gRPC` pro
## ⭐️ Features

This helper library allows users to interact with Bandchain where the following features can be done easily.

- Getting information of a specific oracle script, data source, and request ID.
- Getting the account information of the specify address
- Getting the latest request of the oracle script ID that matches the data and number of validators required to complete the job.
Expand All @@ -16,7 +17,6 @@ This helper library allows users to interact with Bandchain where the following
- Seeing what Bandchain you are using and getting the latest block in Bandchain.
- Sending transaction in 3 modes, including block mode, async mode, and sync mode.


## 📦 Installation

The library is available on [PyPI](https://pypi.org/project/pyband/)
Expand All @@ -29,18 +29,18 @@ pip install pyband

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

- `oracleScriptID`: 37
- `calldata`: The hex string representing [OBI](<https://github.com/bandprotocol/bandchain/wiki/Oracle-Binary-Encoding-(OBI)>)-encoded value of `{'symbols': ['BTC', 'ETH', 'MIR', 'ANC', 'DOGE', 'LUNA'], 'multiplier': 1000000000}`
- `minCount`: 3
- `askCount`: 6
- `oracleScriptID`: 37
- `calldata`: The hex string representing [OBI](<https://github.com/bandprotocol/bandchain/wiki/Oracle-Binary-Encoding-(OBI)>)-encoded value of `{'symbols': ['BTC', 'ETH', 'MIR', 'ANC', 'DOGE', 'LUNA'], 'multiplier': 1000000000}`
- `minCount`: 3
- `askCount`: 6

```python
from pyband import Client, PyObi


def main():
grpc_url = "rpc-laozi-testnet2.bandchain.org:9090"
c = Client(grpc_url)
c = Client(grpc_url, insecure=True)

oid = 37
calldata = "000000060000000342544300000003455448000000034d495200000003414e4300000004444f4745000000044c554e41000000003b9aca00"
Expand All @@ -62,14 +62,15 @@ if __name__ == "__main__":
```

Here is the result of the program above.

```
{'symbols': ['BTC', 'ETH', 'MIR', 'ANC', 'DOGE', 'LUNA'], 'multiplier': 1000000000}
{'rates': [31966219600000, 1891714500000, 3280000000, 2012829000, 190938000, 7080000000]}
```

Another example shows how to send a transaction to Bandchain using block mode.

``` python
```python
import os

from pyband import Client, Transaction, PrivateKey
Expand Down Expand Up @@ -137,10 +138,13 @@ def main():
if __name__ == "__main__":
main()
```

Here is the result after sending a block transaction

```
{"height":"1136536","txhash":"9B854B9A36A1BFFE3BF16E75E9E8BE2FF5A5D5E4700D17492F3317809527178D","data":"0A090A0772657175657374","rawLog":"[{\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"request\"}]},{\"type\":\"raw_request\",\"attributes\":[{\"key\":\"data_source_id\",\"value\":\"61\"},{\"key\":\"data_source_hash\",\"value\":\"07be7bd61667327aae10b7a13a542c7dfba31b8f4c52b0b60bf9c7b11b1a72ef\"},{\"key\":\"external_id\",\"value\":\"6\"},{\"key\":\"calldata\",\"value\":\"BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"57\"},{\"key\":\"data_source_hash\",\"value\":\"61b369daa5c0918020a52165f6c7662d5b9c1eee915025cb3d2b9947a26e48c7\"},{\"key\":\"external_id\",\"value\":\"0\"},{\"key\":\"calldata\",\"value\":\"BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"62\"},{\"key\":\"data_source_hash\",\"value\":\"107048da9dbf7960c79fb20e0585e080bb9be07d42a1ce09c5479bbada8d0289\"},{\"key\":\"external_id\",\"value\":\"3\"},{\"key\":\"calldata\",\"value\":\"BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"60\"},{\"key\":\"data_source_hash\",\"value\":\"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac\"},{\"key\":\"external_id\",\"value\":\"5\"},{\"key\":\"calldata\",\"value\":\"huobipro BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"59\"},{\"key\":\"data_source_hash\",\"value\":\"5c011454981c473af3bf6ef93c76b36bfb6cc0ce5310a70a1ba569de3fc0c15d\"},{\"key\":\"external_id\",\"value\":\"2\"},{\"key\":\"calldata\",\"value\":\"BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"60\"},{\"key\":\"data_source_hash\",\"value\":\"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac\"},{\"key\":\"external_id\",\"value\":\"4\"},{\"key\":\"calldata\",\"value\":\"binance BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"60\"},{\"key\":\"data_source_hash\",\"value\":\"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac\"},{\"key\":\"external_id\",\"value\":\"9\"},{\"key\":\"calldata\",\"value\":\"bittrex BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"60\"},{\"key\":\"data_source_hash\",\"value\":\"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac\"},{\"key\":\"external_id\",\"value\":\"7\"},{\"key\":\"calldata\",\"value\":\"kraken BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"60\"},{\"key\":\"data_source_hash\",\"value\":\"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac\"},{\"key\":\"external_id\",\"value\":\"8\"},{\"key\":\"calldata\",\"value\":\"bitfinex BTC ETH\"},{\"key\":\"fee\"},{\"key\":\"data_source_id\",\"value\":\"58\"},{\"key\":\"data_source_hash\",\"value\":\"7e6759fade717a06fb643392bfde837bfc3437da2ded54feed706e6cd35de461\"},{\"key\":\"external_id\",\"value\":\"1\"},{\"key\":\"calldata\",\"value\":\"BTC ETH\"},{\"key\":\"fee\"}]},{\"type\":\"request\",\"attributes\":[{\"key\":\"id\",\"value\":\"916006\"},{\"key\":\"client_id\",\"value\":\"BandProtocol\"},{\"key\":\"oracle_script_id\",\"value\":\"37\"},{\"key\":\"calldata\",\"value\":\"0000000200000003425443000000034554480000000000000064\"},{\"key\":\"ask_count\",\"value\":\"4\"},{\"key\":\"min_count\",\"value\":\"3\"},{\"key\":\"gas_used\",\"value\":\"111048\"},{\"key\":\"total_fees\"},{\"key\":\"validator\",\"value\":\"bandvaloper1e9sa38742tzhmandc4gkqve9zy8zc0yremaa3j\"},{\"key\":\"validator\",\"value\":\"bandvaloper19eu9g3gka6rxlevkjlvjq7s6c498tejnwxjwxx\"},{\"key\":\"validator\",\"value\":\"bandvaloper17n5rmujk78nkgss7tjecg4nfzn6geg4cqtyg3u\"},{\"key\":\"validator\",\"value\":\"bandvaloper1zl5925n5u24njn9axpygz8lhjl5a8v4cpkzx5g\"}]}]}]","logs":[{"events":[{"type":"message","attributes":[{"key":"action","value":"request"}]},{"type":"raw_request","attributes":[{"key":"data_source_id","value":"61"},{"key":"data_source_hash","value":"07be7bd61667327aae10b7a13a542c7dfba31b8f4c52b0b60bf9c7b11b1a72ef"},{"key":"external_id","value":"6"},{"key":"calldata","value":"BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"57"},{"key":"data_source_hash","value":"61b369daa5c0918020a52165f6c7662d5b9c1eee915025cb3d2b9947a26e48c7"},{"key":"external_id","value":"0"},{"key":"calldata","value":"BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"62"},{"key":"data_source_hash","value":"107048da9dbf7960c79fb20e0585e080bb9be07d42a1ce09c5479bbada8d0289"},{"key":"external_id","value":"3"},{"key":"calldata","value":"BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"60"},{"key":"data_source_hash","value":"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac"},{"key":"external_id","value":"5"},{"key":"calldata","value":"huobipro BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"59"},{"key":"data_source_hash","value":"5c011454981c473af3bf6ef93c76b36bfb6cc0ce5310a70a1ba569de3fc0c15d"},{"key":"external_id","value":"2"},{"key":"calldata","value":"BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"60"},{"key":"data_source_hash","value":"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac"},{"key":"external_id","value":"4"},{"key":"calldata","value":"binance BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"60"},{"key":"data_source_hash","value":"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac"},{"key":"external_id","value":"9"},{"key":"calldata","value":"bittrex BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"60"},{"key":"data_source_hash","value":"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac"},{"key":"external_id","value":"7"},{"key":"calldata","value":"kraken BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"60"},{"key":"data_source_hash","value":"2e588de76a58338125022bc42b460072300aebbcc4acaf55f91755c1c1799bac"},{"key":"external_id","value":"8"},{"key":"calldata","value":"bitfinex BTC ETH"},{"key":"fee"},{"key":"data_source_id","value":"58"},{"key":"data_source_hash","value":"7e6759fade717a06fb643392bfde837bfc3437da2ded54feed706e6cd35de461"},{"key":"external_id","value":"1"},{"key":"calldata","value":"BTC ETH"},{"key":"fee"}]},{"type":"request","attributes":[{"key":"id","value":"916006"},{"key":"client_id","value":"BandProtocol"},{"key":"oracle_script_id","value":"37"},{"key":"calldata","value":"0000000200000003425443000000034554480000000000000064"},{"key":"ask_count","value":"4"},{"key":"min_count","value":"3"},{"key":"gas_used","value":"111048"},{"key":"total_fees"},{"key":"validator","value":"bandvaloper1e9sa38742tzhmandc4gkqve9zy8zc0yremaa3j"},{"key":"validator","value":"bandvaloper19eu9g3gka6rxlevkjlvjq7s6c498tejnwxjwxx"},{"key":"validator","value":"bandvaloper17n5rmujk78nkgss7tjecg4nfzn6geg4cqtyg3u"},{"key":"validator","value":"bandvaloper1zl5925n5u24njn9axpygz8lhjl5a8v4cpkzx5g"}]}]}],"gasWanted":"2000000","gasUsed":"564187"}
```

## 🧀 Notes

For more examples, please see [`example`](/example.py) file by running a command `python example.py`.
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def main():
# Step 1 Create a gRPC connection
grpc_url = "rpc-laozi-testnet2.bandchain.org:9090"
c = Client(grpc_url)
c = Client(grpc_url, insecure=True)

# Step 2 Convert a menmonic to private key, public key, and sender
MNEMONIC = os.getenv("MNEMONIC")
Expand Down
16 changes: 14 additions & 2 deletions pyband/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,20 @@


class Client:
def __init__(self, grpc_endpoint: str):
channel = grpc.insecure_channel(grpc_endpoint)
def __init__(
self,
grpc_endpoint: str,
insecure: bool = False,
credentials: grpc.ChannelCredentials = None,
):
channel = (
grpc.insecure_channel(grpc_endpoint)
if insecure
else grpc.secure_channel(
grpc_endpoint,
credentials or grpc.ssl_channel_credentials(),
)
)
self.stubOracle = oracle_query_grpc.QueryStub(channel)
self.stubCosmosTendermint = tendermint_query_grpc.ServiceStub(channel)
self.stubAuth = auth_query_grpc.QueryStub(channel)
Expand Down
2 changes: 1 addition & 1 deletion tests/client/client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def pyband_client(_grpc_server, grpc_addr):

from pyband.client import Client

yield Client(grpc_addr)
yield Client(grpc_addr, insecure=True)
_grpc_server.stop(grace=None)


Expand Down
10 changes: 5 additions & 5 deletions tests/client/send_tx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def BroadcastTx(self, request: BroadcastTxRequest, context) -> BroadcastTxRespon
txhash="C278EC5A69C34AACE42773E41B1163E6CE40C906F2A14F807D39D1B2A1C2DFF5",
codespace="sdk",
code=2,
raw_log="errUnknownField \"*tx.TxRaw\": {TagNum: 13, WireType:\"bytes\"}: tx parse error",
raw_log='errUnknownField "*tx.TxRaw": {TagNum: 13, WireType:"bytes"}: tx parse error',
)
)
elif request.tx_bytes == b"block_success":
Expand Down Expand Up @@ -63,7 +63,7 @@ def BroadcastTx(self, request: BroadcastTxRequest, context) -> BroadcastTxRespon
txhash="7CA12506E88CF8B814E20848B229460F91FC0370C44A7C4FEE786960CE30C36D",
codespace="sdk",
code=2,
raw_log="errUnknownField \"*tx.TxRaw\": {TagNum: 14, WireType:\"start_group\"}: tx parse error",
raw_log='errUnknownField "*tx.TxRaw": {TagNum: 14, WireType:"start_group"}: tx parse error',
gas_used=6429,
)
)
Expand All @@ -80,7 +80,7 @@ def pyband_client(_grpc_server, grpc_addr):

from pyband.client import Client

yield Client(grpc_addr)
yield Client(grpc_addr, insecure=True)
_grpc_server.stop(grace=None)


Expand Down Expand Up @@ -120,7 +120,7 @@ def test_send_tx_sync_mode_invalid_bytes(pyband_client):
txhash="C278EC5A69C34AACE42773E41B1163E6CE40C906F2A14F807D39D1B2A1C2DFF5",
codespace="sdk",
code=2,
raw_log="errUnknownField \"*tx.TxRaw\": {TagNum: 13, WireType:\"bytes\"}: tx parse error",
raw_log='errUnknownField "*tx.TxRaw": {TagNum: 13, WireType:"bytes"}: tx parse error',
)
)
assert tx_response == mock_result.tx_response
Expand Down Expand Up @@ -177,7 +177,7 @@ def test_send_tx_block_mode_invalid_bytes(pyband_client):
txhash="7CA12506E88CF8B814E20848B229460F91FC0370C44A7C4FEE786960CE30C36D",
codespace="sdk",
code=2,
raw_log="errUnknownField \"*tx.TxRaw\": {TagNum: 14, WireType:\"start_group\"}: tx parse error",
raw_log='errUnknownField "*tx.TxRaw": {TagNum: 14, WireType:"start_group"}: tx parse error',
gas_used=6429,
)
)
Expand Down
21 changes: 16 additions & 5 deletions tests/transaction_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@


class QueryServicer(QueryServicerBase):

def Account(self, request: QueryAccountRequest, context):
return QueryAccountResponse(
account=Any(
Expand All @@ -43,7 +42,7 @@ def pyband_client(_grpc_server, grpc_addr):

from pyband.client import Client

yield Client(grpc_addr)
yield Client(grpc_addr, insecure=True)
_grpc_server.stop(grace=None)


Expand All @@ -68,6 +67,7 @@ def test_get_sign_doc_success():
account_number=100,
)


def test_get_sign_doc_no_public_key_success():
msg = MsgRequestData(
oracle_script_id=1,
Expand All @@ -89,6 +89,7 @@ def test_get_sign_doc_no_public_key_success():
account_number=100,
)


def test_get_sign_data_with_sender_success(pyband_client):
msg = MsgRequestData(
oracle_script_id=1,
Expand Down Expand Up @@ -118,6 +119,7 @@ def test_get_sign_data_with_sender_success(pyband_client):
account_number=104,
)


def test_create_transaction_with_sender_fail(pyband_client):
with pytest.raises(EmptyMsgError, match="messsage is empty, please use with_messages at least 1 message"):
t = Transaction().with_sender(pyband_client, "band13eznuehmqzd3r84fkxu8wklxl22r2qfmtlth8c")
Expand Down Expand Up @@ -222,7 +224,10 @@ def test_get_tx_data_success():
sign_doc = t.get_sign_doc(PUBLIC_KEY)
signature = PRIVATE_KEY.sign(sign_doc.SerializeToString())
tx_raw_bytes = t.get_tx_data(signature, PUBLIC_KEY)
assert tx_raw_bytes == b"\n\x87\x01\n\x84\x01\n\x19/oracle.v1.MsgRequestData\x12g\x08\x01\x12\x0f\x00\x00\x00\x03BTC\x00\x00\x00\x00\x00\x00\x00\x01\x18\x04 \x03*\x0bfrom_pyband2\x0c\n\x05uband\x12\x031008\xb0\xea\x01@\xd0\x86\x03J+band1jrhuqrymzt4mnvgw8cvy3s9zhx3jj0dq30qpte\x12X\nP\nF\n\x1f/cosmos.crypto.secp256k1.PubKey\x12#\n!\x03\xfep\x8b\xdafRO\xd2\xc6\xbc\xe9\x06\x82\xe3\x85U\xa8Q\xe0=*\xeeOb\x9b\x05\xde\x90\xf5\x1e\xd9\xbc\x12\x04\n\x02\x08\x01\x18\x1e\x12\x04\x10\xc0\x9a\x0c\x1a@/\xa2\xe7\xb3e\xf8\x13\x7f$\x162q\x11\xbaX\xa0\x93\xbeWeO\xc7~\x0e3\xe5F\xd0\xbd\xf1\xd5\xe1k\xefnxuv\x14l?\x8a3\x06Z_7\x93\xd7\xcc\xbf\xc0\xa2S\xff\xaa\x19\xfd}\xddO\xe3\xd9\xb1"
assert (
tx_raw_bytes
== b"\n\x87\x01\n\x84\x01\n\x19/oracle.v1.MsgRequestData\x12g\x08\x01\x12\x0f\x00\x00\x00\x03BTC\x00\x00\x00\x00\x00\x00\x00\x01\x18\x04 \x03*\x0bfrom_pyband2\x0c\n\x05uband\x12\x031008\xb0\xea\x01@\xd0\x86\x03J+band1jrhuqrymzt4mnvgw8cvy3s9zhx3jj0dq30qpte\x12X\nP\nF\n\x1f/cosmos.crypto.secp256k1.PubKey\x12#\n!\x03\xfep\x8b\xdafRO\xd2\xc6\xbc\xe9\x06\x82\xe3\x85U\xa8Q\xe0=*\xeeOb\x9b\x05\xde\x90\xf5\x1e\xd9\xbc\x12\x04\n\x02\x08\x01\x18\x1e\x12\x04\x10\xc0\x9a\x0c\x1a@/\xa2\xe7\xb3e\xf8\x13\x7f$\x162q\x11\xbaX\xa0\x93\xbeWeO\xc7~\x0e3\xe5F\xd0\xbd\xf1\xd5\xe1k\xefnxuv\x14l?\x8a3\x06Z_7\x93\xd7\xcc\xbf\xc0\xa2S\xff\xaa\x19\xfd}\xddO\xe3\xd9\xb1"
)


def test_get_tx_data_tx_raw_bytes_no_public_key_success():
Expand All @@ -243,7 +248,10 @@ def test_get_tx_data_tx_raw_bytes_no_public_key_success():
sign_doc = t.get_sign_doc(PUBLIC_KEY)
signature = PRIVATE_KEY.sign(sign_doc.SerializeToString())
tx_raw_bytes = t.get_tx_data(signature)
assert tx_raw_bytes == b"\n\x87\x01\n\x84\x01\n\x19/oracle.v1.MsgRequestData\x12g\x08\x01\x12\x0f\x00\x00\x00\x03BTC\x00\x00\x00\x00\x00\x00\x00\x01\x18\x04 \x03*\x0bfrom_pyband2\x0c\n\x05uband\x12\x031008\xb0\xea\x01@\xd0\x86\x03J+band1jrhuqrymzt4mnvgw8cvy3s9zhx3jj0dq30qpte\x12\x10\n\x08\x12\x04\n\x02\x08\x01\x18\x1e\x12\x04\x10\xc0\x9a\x0c\x1a@/\xa2\xe7\xb3e\xf8\x13\x7f$\x162q\x11\xbaX\xa0\x93\xbeWeO\xc7~\x0e3\xe5F\xd0\xbd\xf1\xd5\xe1k\xefnxuv\x14l?\x8a3\x06Z_7\x93\xd7\xcc\xbf\xc0\xa2S\xff\xaa\x19\xfd}\xddO\xe3\xd9\xb1"
assert (
tx_raw_bytes
== b"\n\x87\x01\n\x84\x01\n\x19/oracle.v1.MsgRequestData\x12g\x08\x01\x12\x0f\x00\x00\x00\x03BTC\x00\x00\x00\x00\x00\x00\x00\x01\x18\x04 \x03*\x0bfrom_pyband2\x0c\n\x05uband\x12\x031008\xb0\xea\x01@\xd0\x86\x03J+band1jrhuqrymzt4mnvgw8cvy3s9zhx3jj0dq30qpte\x12\x10\n\x08\x12\x04\n\x02\x08\x01\x18\x1e\x12\x04\x10\xc0\x9a\x0c\x1a@/\xa2\xe7\xb3e\xf8\x13\x7f$\x162q\x11\xbaX\xa0\x93\xbeWeO\xc7~\x0e3\xe5F\xd0\xbd\xf1\xd5\xe1k\xefnxuv\x14l?\x8a3\x06Z_7\x93\xd7\xcc\xbf\xc0\xa2S\xff\xaa\x19\xfd}\xddO\xe3\xd9\xb1"
)


def test_get_tx_data_no_public_key_success():
Expand All @@ -264,4 +272,7 @@ def test_get_tx_data_no_public_key_success():
sign_doc = t.get_sign_doc()
signature = PRIVATE_KEY.sign(sign_doc.SerializeToString())
tx_raw_bytes = t.get_tx_data(signature)
assert tx_raw_bytes == b"\n\x87\x01\n\x84\x01\n\x19/oracle.v1.MsgRequestData\x12g\x08\x01\x12\x0f\x00\x00\x00\x03BTC\x00\x00\x00\x00\x00\x00\x00\x01\x18\x04 \x03*\x0bfrom_pyband2\x0c\n\x05uband\x12\x031008\xb0\xea\x01@\xd0\x86\x03J+band1jrhuqrymzt4mnvgw8cvy3s9zhx3jj0dq30qpte\x12\x10\n\x08\x12\x04\n\x02\x08\x01\x18\x1e\x12\x04\x10\xc0\x9a\x0c\x1a@\xf3\xb5z\xa4\xea\xc6\x02\xff\\\x862x\x80\xba\xbf\xd8%t\x88X\xddrDY^\"C\xd7\x9c\xf1\xb3\xbe]\xe7Z\x9a\x07\xedX\xf7r\xd4\xf8\x044\xf8\xda\x86\x80(~J\xb8\r\x12\x03\x17\xcb\x9f\xb95\xa4&\xa1"
assert (
tx_raw_bytes
== b'\n\x87\x01\n\x84\x01\n\x19/oracle.v1.MsgRequestData\x12g\x08\x01\x12\x0f\x00\x00\x00\x03BTC\x00\x00\x00\x00\x00\x00\x00\x01\x18\x04 \x03*\x0bfrom_pyband2\x0c\n\x05uband\x12\x031008\xb0\xea\x01@\xd0\x86\x03J+band1jrhuqrymzt4mnvgw8cvy3s9zhx3jj0dq30qpte\x12\x10\n\x08\x12\x04\n\x02\x08\x01\x18\x1e\x12\x04\x10\xc0\x9a\x0c\x1a@\xf3\xb5z\xa4\xea\xc6\x02\xff\\\x862x\x80\xba\xbf\xd8%t\x88X\xddrDY^"C\xd7\x9c\xf1\xb3\xbe]\xe7Z\x9a\x07\xedX\xf7r\xd4\xf8\x044\xf8\xda\x86\x80(~J\xb8\r\x12\x03\x17\xcb\x9f\xb95\xa4&\xa1'
)

0 comments on commit e988ab1

Please sign in to comment.