Code Monkey home page Code Monkey logo

fincontracts-cli's People

Contributors

asiron avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

fincontracts-cli's Issues

list-accounts doesn't indicate which accounts are registered

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"?

Issues with launching on Ubuntu

After ./blockchain deploy; fincli on Ubuntu 16.04.2 LTS:

/usr/bin/env: ‘node --harmony’: No such file or directory

Proposed solutions:

  1. [didn't help] Install Node.js 7.x as described here.
  2. [didn't help] Creating a symlink with ln -s /usr/bin/nodejs /usr/bin/node.
  3. [did help] Modify the first line of 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.

No check for name collision before issuing fincontract with -s option

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).

Whitespace not allowed in fincontract description

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.

Fincontracts lifecycle not obvious from documentation

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:

  1. create and store a fincontract locally
  2. issue a fincontract without saving it locally

No warning / error message when user is not registered

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".

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.