Skip to main content

Evmos grpc messages.

Project description

Evmos GRPC

Evmos' grpc messages. WIP: Only the message send was implemented because is the one used for the faucet.

Requirements

  • Python3.9+
  • Evmos grpc endpoint available
  • Wallet seed (only supports the evmos default algorithm: ethsecp256k1)

Installation

pip install evmosgrpc

Configuration

The configuration can be set using env vars:

  • GRPC_ENDPOINT: Default = '127.0.0.1:9090'
  • MEMO: Default = 'Sent from Hanchon's faucet'
  • FEE: Default = '20'
  • GAS_LIMIT: Default = '200000'
  • CHAIN_ID: Default = 'evmos_9000-1'
  • DENOM: Default = 'aphoton'

Usage

from evmosgrpc.messages.msgsend import create_msg_send
from evmosgrpc.builder import TransactionBuilder
from evmosgrpc.transaction import Transaction

seed = 'garment seat help gallery ride divide truth smooth end chunk '\
       'ten cross badge want vehicle mirror dismiss remind crouch '\
       'base crouch palm leader dinner'
builder = TransactionBuilder(seed)
msg = create_msg_send(
    builder.address,
    "evmos1sgg7ny6mkk375ghdlx837hkm92dqxs450fxwwz",
    100,
)
res = builder.send_tx(Transaction().generate_tx(builder, msg))
# res =
# tx_response {
#   txhash: "F4DFCF8E0BAEBBE088DF0C8A4DA1EF70CD29983C5F7663A523A87F1CE479BFF5"
#   raw_log: "[]"
# }

# To read the response as a dict:
from google.protobuf.json_format import MessageToDict
res_obj = MessageToDict(res)

TODO

  • Add tests.
  • Add more messages.
  • Add secp256k1 wallet support on evmoswallet.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evmosgrpc-1.0.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evmosgrpc-1.0.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file evmosgrpc-1.0.2.tar.gz.

File metadata

  • Download URL: evmosgrpc-1.0.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for evmosgrpc-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d28e004b1048c337f5957cf027f9254276b6bb3e189267c103d436417d8dcab4
MD5 a998881ca984a8f81b6d18f7fe634237
BLAKE2b-256 26ba46d0afe84a6a39ba9d2f5886aef80aefbcb72f5ba8e5bc8924dddd798ae9

See more details on using hashes here.

File details

Details for the file evmosgrpc-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: evmosgrpc-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for evmosgrpc-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6f17f23ccb9d975c1e341cc5b68d2c76c047b9912e9a09e2f82ca95d4a109d33
MD5 dfec6cfe32331d0a9435d218f6319077
BLAKE2b-256 707c1c635361c68ae4a1b5c13a47ea72024fd23c47c3af9adf0b8a3981eb9b6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page