Giter Site home page Giter Site logo

pyhmy's People

Contributors

daniel-vdm avatar denniswon avatar gupadhyaya avatar hsiungpins avatar maxmustermann2 avatar rhazberries avatar tempoxylophone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyhmy's Issues

eth address to one address

import binascii
from bech32 import bech32_encode, convertbits

def convert_eth_to_one(eth_address):
hex_address = binascii.a2b_hex(eth_address)
binary_address = convertbits(hex_address, 8, 5)
return bech32_encode('one', binary_address)

a = convert_eth_to_one('006922cf75094708c691d06818034d89aeb23ca0')#delete 0x
print(a)

Update eth-account requirement to >=0.5.6

There currently exists a pip dependency conflict with Web3; namely, Web3 requires eth-account<0.6.0,>=0.5.6, but pyhmy's setup.cfg explicitly requires 0.5.4.

Unless this older version is used for a specific reason, pyhmy should be updated to use a newer version of eth-account, such as 0.5.7.

Do not support web sockets

Hi
when I was working on this rep
I noticed that it does not support web sockets ('wss://ws.s0.t.hmny.io')
Do you have a plan to complete this feature?
Thankful

[Bug] Fix issue parsing string into list for single_call

Warning: Using outdated version. Redownload to upgrade to v393-854a73e
commit: v390-4b59bb7, error: unknown command "st__PYHMY_ARG_PREFIX___3king" for "hmy"
check hmy cookbook for valid examples or try adding a `--help` flag
[AutoNode] Create-validator transaction failure (attempt 1). Error: Bad CLI args: `hmy --node https://api.s0.b.hmny.io/ staking create-validator --validator-addr one1sndrr078n0wd3g0hmvyedwj2grckswvn8zf863 --name "a" --identity "AutoNode-2307956633354238483" --website "]" --security-contact "c" --details "e" --rate 0.1 --max-rate 1 --max-change-rate 0.1 --min-self-delegation 1E+4 --max-total-delegation 1E+4 --amount 1E+4 --bls-pubkeys 006de9f3edec3f2b687a0a99fa560d432d9aa80df04f771e3230508d890d67a2933905bfd038c8c7445b36365583188f --passphrase-file "/home/ec2-user/.hmy/.wallet_pass" --bls-pubkeys-dir "/home/ec2-user/.hmy/blskeys" --gas-price 1 `
 	Exception: Command '['/home/ec2-user/.hmy/bin/hmy', '--nod__PYHMY_ARG_PREFIX___6', 'https://__PYHMY_ARG_PREFIX___3pi.s0.b.hmny.io/', 'st__PYHMY_ARG_PREFIX___3king', '__PYHMY_ARG_PREFIX___5r__PYHMY_ARG_PREFIX___6__PYHMY_ARG_PREFIX___3t__PYHMY_ARG_PREFIX___6-v__PYHMY_ARG_PREFIX___3lid__PYHMY_ARG_PREFIX___3tor', '--v__PYHMY_ARG_PREFIX___3lid__PYHMY_ARG_PREFIX___3tor-__PYHMY_ARG_PREFIX___3ddr', 'on__PYHMY_ARG_PREFIX___61sndrr078n0wd3g0hmvy__PYHMY_ARG_PREFIX___6dwj2gr__PYHMY_ARG_PREFIX___5kswvn8zf863', '--n__PYHMY_ARG_PREFIX___3m__PYHMY_ARG_PREFIX___6', 'a', '--id__PYHMY_ARG_PREFIX___6ntity', 'AutoNode-2307956633354238483', '--w__PYHMY_ARG_PREFIX___6bsit__PYHMY_ARG_PREFIX___6', ']', '--s__PYHMY_ARG_PREFIX___6__PYHMY_ARG_PREFIX___5urity-__PYHMY_ARG_PREFIX___5ont__PYHMY_ARG_PREFIX___3__PYHMY_ARG_PREFIX___5t', 'c', '--d__PYHMY_ARG_PREFIX___6t__PYHMY_ARG_PREFIX___3ils', 'e', '--r__PYHMY_ARG_PREFIX___3t__PYHMY_ARG_PREFIX___6', '0.1', '--m__PYHMY_ARG_PREFIX___3x-r__PYHMY_ARG_PREFIX___3t__PYHMY_ARG_PREFIX___6', '1', '--m__PYHMY_ARG_PREFIX___3x-__PYHMY_ARG_PREFIX___5h__PYHMY_ARG_PREFIX___3ng__PYHMY_ARG_PREFIX___6-r__PYHMY_ARG_PREFIX___3t__PYHMY_ARG_PREFIX___6', '0.1', '--min-s__PYHMY_ARG_PREFIX___6lf-d__PYHMY_ARG_PREFIX___6l__PYHMY_ARG_PREFIX___6g__PYHMY_ARG_PREFIX___3tion', '1E+4', '--m__PYHMY_ARG_PREFIX___3x-tot__PYHMY_ARG_PREFIX___3l-d__PYHMY_ARG_PREFIX___6l__PYHMY_ARG_PREFIX___6g__PYHMY_ARG_PREFIX___3tion', '1E+4', '--__PYHMY_ARG_PREFIX___3mount', '1E+4', '--bls-pubk__PYHMY_ARG_PREFIX___6ys', '006d__PYHMY_ARG_PREFIX___69f3__PYHMY_ARG_PREFIX___6d__PYHMY_ARG_PREFIX___6__PYHMY_ARG_PREFIX___53f2b687__PYHMY_ARG_PREFIX___30__PYHMY_ARG_PREFIX___399f__PYHMY_ARG_PREFIX___3560d432d9__PYHMY_ARG_PREFIX___3__PYHMY_ARG_PREFIX___380df04f771__PYHMY_ARG_PREFIX___63230508d890d67__PYHMY_ARG_PREFIX___32933905bfd038__PYHMY_ARG_PREFIX___58__PYHMY_ARG_PREFIX___57445b36365583188f', '--p__PYHMY_ARG_PREFIX___3ssphr__PYHMY_ARG_PREFIX___3s__PYHMY_ARG_PREFIX___6-fil__PYHMY_ARG_PREFIX___6', '/home/ec2-user/.hmy/.wallet_pass', '--bls-pubk__PYHMY_ARG_PREFIX___6ys-dir', '/home/ec2-user/.hmy/blskeys', '--g__PYHMY_ARG_PREFIX___3s-pri__PYHMY_ARG_PREFIX___5__PYHMY_ARG_PREFIX___6', '1']' returned non-zero exit status 1.

pip3 install pyhmy returns outdated version

Manually cloning the repo and doing a make install works fine.

However, doing a pip3 install pyhmy gives a version without some essential features. e.g. from pyhmy import signing fails

Error inside pychmy lib

You should change account.py script, remove from .bech32.bech32 import (...) one bech32.
It should be from .bech32 import (...)

Solved: Transaction related code from examples section doesnt work

Lib version:

668d7ef756e4fefe4621f435bb9a3e37cbeb82d9

The problem:

I am trying to issue a simple fund-transferring transaction. The code, according to the project's README should look like this:

import pyhmy.transaction as t
import pyhmy.signing as s


bobPub = "one1mfzkvvtsjzagnkxc3ad4lndnfk92hpla70nf24"
# Bob is a testing acc with only testnet ONEs
bobPriv = "c07bfdf4819946009c06bfee12f9ef2d37c1a216600961460121f1c085d16316"
magniffPub = "one10glu5d2sxyn5gcg0e6yd7v7ty4vptjs3pr0spc"

testNetAddress = "https://api.s0.b.hmny.io"

tx = {
 'chainId': 2,
 'from': bobPub,
 'gas': 6721900,
 'gasPrice': 1000000000,
 'nonce': 10101,
 'shardID': 0,
 'to': magniffPub,
 'toShardID': 0,
 'value': 10 ** 15,
}


print(t.send_raw_transaction(
    s.sign_transaction(tx, bobPriv).rawTransaction.hex(), testNetAddress
))

It actually gives me back the transaction id, yet it could not be found on explorer, nor funds are transferred.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.