asiron / fincontracts-cli Goto Github PK
View Code? Open in Web Editor NEWCLI for interacting with Ethereum fincontracts
License: MIT License
CLI for interacting with Ethereum fincontracts
License: MIT License
When creating a fincontract, it is cumbersome to copy-paste the address of the proposed owner. Include autocomplete over registered addresses for the -i
option.
A more user-friendly approach: take a path to folder as a parameter (assume ./
as default?), create .dot file with filename = fincontract-name.dot.
Consider the following:
create-fincontract -i 0x0 -s one One(USD)
create-fincontract -i 0x0 -s one One(EUR)
Observed output of the second command:
sender info One transaction was sent. HASH: 0x8c6517452e
desc-deploy info One primitive stored with ID: 0x0cf1b7b5e0
sender info createFincontract transaction was sent. HASH: 0x76f9acfbbb
deploy info Fincontract: 0x3b4011777f
deploy info Created for: 0xebd0a594e3
sender info issueFor transaction was sent. HASH: 0x5a2c2d01a6
deploy info Fincontract: 0x3b4011777f
deploy info Issued for: 0x0000000000
ℹ ID added to autocomplete!
⚠ Fincontract with this name already exists!
That is, One(EUR)
is issued, but not saved.
Possibly better outcome:
⚠ Fincontract with this name already exists!
(One(EUR)
is not issued until the user removes -s
option or changes the name).
Observed output of list-accounts
:
ℹ Unlocked Ethereum accounts:
ℹ 0: 0xc27cffb5c1be0f72b58b3639d5bad4a92e82ce57
ℹ 1: 0xebd0a594e3c9332fac7354c44599c02fa699d9e3
ℹ 2: 0x5343885282b739d4156a35e125fd54411d0a2980
Proposed output:
ℹ Ethereum accounts:
ℹ 0: [REGISTERED] 0xc27cffb5c1be0f72b58b3639d5bad4a92e82ce57
ℹ 1: [REGISTERED] 0xebd0a594e3c9332fac7354c44599c02fa699d9e3
ℹ 2: 0x5343885282b739d4156a35e125fd54411d0a2980
Also, what does "unlocked" mean? Remove or replace with "pre-defined"?
Show [part of] address in the command line before the >
to help the user understand which account they are using now.
The list of commands does not obviously correspond to that described in the paper. Namely, it is not clear what pull-fincontract
does. State explicitly that a user can:
After ./blockchain deploy
; fincli
on Ubuntu 16.04.2 LTS:
/usr/bin/env: ‘node --harmony’: No such file or directory
Proposed solutions:
ln -s /usr/bin/nodejs /usr/bin/node
.src/cli.js
to #!/usr/bin/nodejs --harmony
.TODO: Either make it work out of the box on Ubuntu, or include troubleshooting advise in readme.
Is it true
/ false
? 0
/ 1
?
The following fincontract is incorrect: And( One(EUR), One(USD) ) )
.
Descriptions with whitespace are more readable, especially for complex fincontracts.
Allow whitespace in description: remove them internally before parsing.
Some commands require the user to be registered, but do not signal error when this is not the case.
For instance, calling show-balance
before register
:
✔ Balance of 0xc27cffb5c1be0f72b58b3639d5bad4a92e82ce57
Calling show-balance
after register
:
✔ Balance of 0xc27cffb5c1be0f72b58b3639d5bad4a92e82ce57
ℹ USD: 0.00
ℹ EUR: 0.00
ℹ GBP: 0.00
ℹ JPY: 0.00
ℹ CNY: 0.00
ℹ SGD: 0.00
In the first case, it may be useful to output a warning prompting the user to register.
Same for other functions that assume that the user is registered, e.g., create-fincontract
. If the user is not registered, it starts executing and hangs.
Show an error message when appropriate: "This command requires you to register first: register
".
A 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.