mgpai22 / ergpy Goto Github PK
View Code? Open in Web Editor NEWA python-jvm wrapper for interacting with the Ergo blockchain.
License: MIT License
A python-jvm wrapper for interacting with the Ergo blockchain.
License: MIT License
Hi, I was looking for repositories I could contribute to so I discovered this one here.
I am creating this issue in order to restructure it a bit the repo and you will tell me what you think about it.
Is your feature request related to a problem? Please describe.
As this project is meant to become a Python package, it is highly recommended to make it follow the PEP 8 - Style Guide for Python Code.
Source : PEP 8 – Style Guide for Python Code
Describe the solution you'd like
Make all source code more PEP 8-friendly.
Additional context
A python-jvm wrapper for interacting with the Ergo blockchain.
So we have to be careful of not following Java standards (at least try not to).
Is your feature request related to a problem? Please describe.
In order to make it easy to interact with the package, a CLI
might be needed.
Describe the solution you'd like
Call CLI
like the following examples :
ergpy send simple <addr1> <addr2>
ergpy send token <id> <addr1> <addr2>
ergpy get wallet-addresses --no-addresses 2
ergpy get box-info <index> <addr>
Warning
@mgpai22 I will need your help defining the commands' behavior.
Additional context
Hi, can you please give me more admin rights to make this repo alive? I would like to add many things such as :
You can also consider transforming your account into an organization.
I tested everything with various scenarios and they work well!
I am thinking of adding some sort of optional parameter to the ergo connection object to enable or disable logging. What do you think @rafidini ?
Originally posted by @mgpai22 in #4 (comment)
Whenever the code is run I notice that something does not properly exit.
Try this code out:
from ergpy import helper_functions, appkit
node_url: str = "http://213.239.193.208:9052/" # MainNet or TestNet
ergo = appkit.ErgoAppKit(node_url=node_url)
wallet_mnemonic = "what stadium typical spell rate truly pen tongue fuel intact fluid strike vibrant city shine"
receiver_addresses = [
"3WwdXmYP39DLmDWJ6grH9ArXbWuCt2uGAh46VTfeGPrHKJJY6cSJ",
"3WwuG9amNVDwkJdgT5Ce7aJCfeoafVmd9tag9AEiAZwgPi7pYX3w",
"3Wxk5oofZ3Laq2CpFW4Fi9YQiaep9bZr6QFg4s4xpzz4bi9tZq2U"
]
amount = [0.22, 0.33, 0.11]
tx = helper_functions.simple_send(ergo=ergo, amount=amount, wallet_mnemonic=wallet_mnemonic, receiver_addresses=receiver_addresses)
data = f'Transaction: {str(tx)}'
with open('demo.text', 'w') as file:
file.write(data)
print("wrote to file")
This will write the txid to file and print to console. However if you want to exit to run other commands in the console you must exit with ctrl + c
. I tried including sys.exit(0)
and quit()
in the code but it does not help.
Any ideas @rafidini ?
Thank you
Is your feature request related to a problem? Please describe.
No problem, but @mgpai22 can you check issue no. #20 in my branch and also the wiki to confirm it?
Among the helper function here are the ones we need to validate with the CLI :
version
get
send
create
Hello @mgpai22, let us go back on track 🚀
I committed some changes to the logs issue (#11), for now, it is very simple and I only added it to a new example (example_7_*.py) to make sure the feature works properly.
But I have an issue running the example, this is my output:
I'll create a new issue to separate it from this feature 🔧
Originally posted by @rafidini in #11 (comment)
Is your feature request related to a problem? Please describe.
In order to validate our developments, tests are needed and if they are automated it would be the best
Describe the solution you'd like
GitHub Actions allows us to execute code on runners hosted by GitHub.
We can write some tests in a /tests
folder in order to validate the whole behavior of the package by writing deterministic code and checking with assert
statements.
Additional context
assert
documentation : https://docs.python.org/3.8/reference/simple_stmts.html#the-assert-statementA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.