Giter Site home page Giter Site logo

asch-cli's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asch-cli's Issues

craeteGenesis return address string

createGenesis block command return the string type of address but when we perform any transaction it gives error due to to the string type of address.

template files not used

I found that the files in https://github.com/AschPlatform/asch-cli/tree/master/template are not used when running asch-cli. When you install a Dapp with asch-cli it downloads the .zip archive from the link provide in the dapp.json.
Maybe there is an option to use the template which is not described in the docs now?

The templates files itself can be useful to setup a basic Dapp. Maybe we can put them in an other repo, like: https://github.com/bassjobsen/asch-test-dapp, which enable us to do:

  • git clone https://github.com/AschPlatform/asch-redeploy.git && cd asch-redeploy && yarn install && cd ..
  • git clone https://github.com/bassjobsen/asch-test-dapp.git && cd asch-test-dapp && ../asch-dedeploy/bin/asch-redeploy

Commands for the proposals and gateways

The current version of asch-cli does not contain commands for proposals and gateways. I will add these commands, so please assign this issue to me.
I also wonder which branch i should use to add these commands? @liangpeili

aschJS.transaction.createTransactionEx is not a function

> asch-cli -H 127.0.0.1 -P 4096 registerchain -e "maximum correct local collect moral theme silver mule tell gift reward only" -f chain.json
/Users/larry/code/asch-cli/plugins/api.js:312
  var trs = aschJS.transaction.createTransactionEx({
                               ^

TypeError: aschJS.transaction.createTransactionEx is not a function
    at Command.registerChain (/Users/larry/code/asch-cli/plugins/api.js:312:32)
    at Command.listener (/Users/larry/code/asch-cli/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (/Users/larry/code/asch-cli/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/larry/code/asch-cli/node_modules/commander/index.js:474:21)
    at main (/Users/larry/code/asch-cli/index.js:26:13)
    at Object.<anonymous> (/Users/larry/code/asch-cli/index.js:29:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)

npm version not uptodate

please update!

Example; in the /plugins/dapps.js line 491:

npm version:

if (wantInbuiltAsset) {

Should be:

if (wantInbuiltAsset.wantInbuiltAsset) {

The above is already fixed in the latest version on github (1.3.8) but is not published to npm yet.

which endpoint should i call?

i try to fix the function to register a Dapp by calling something like that shown below:

asch-cli -H 127.0.0.1 -P 4096 registerdapp --metafile dapp.json --secret "gesture goose side remember actress frame ceiling buffalo bring slice soap describe"

The above calls /peer/transactions with a POST request here: https://github.com/AschPlatform/asch-cli/blob/master/helpers/api.js#L67

The POST request calls (as expected) chain.register() https://github.com/AschPlatform/asch/blob/master/src/contract/chain.js#L4, but the parameters for chain.register() are NOT set???

As far as i do understand does the POST request call chain.register() via the asch-sandbox. The code of asch-sandbox isn't readable (WHY NOT?)

Should i use a different end point or goes something wrong in the sandbox? @sqfasd @liangpeili @a1300

errors on making a deposit

When my balance is empty it says: "Account not found" and when i refuel my balance i got the following output:

Error: Error: TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

Please see below:

bass@bass-Aspire-ES1-521:~/testomgeving/asch$ ./asch-cli/bin/asch-cli dapps --deposit
? Enter secret [hidden]
? Enter amount 120
? DApp Id f4c34f11c469462d6239a2b9afdf8cf904828d9bcd11fc25c258716ecdd8df65
? Enter secondary secret (if defined) 
? Host and port localhost:4096
Account not found
bass@bass-Aspire-ES1-521:~/testomgeving/asch$ asch-cli -H 127.0.0.1 -P 4096 sendmoney --secret "someone manual strong movie roof episode eight spatial brown soldier soup motor" --to "ABmShCxN9okgsthq5ao915A94mdfoXQ24p" --amount 100000000000
f972b28f0871596376061cac543759762f68358cc83f9abb907d17cde4819c95
bass@bass-Aspire-ES1-521:~/testomgeving/asch$ ./asch-cli/bin/asch-cli dapps --deposit
? Enter secret [hidden]
? Enter amount 120
? DApp Id f4c34f11c469462d6239a2b9afdf8cf904828d9bcd11fc25c258716ecdd8df65
? Enter secondary secret (if defined) 
? Host and port localhost:4096
Error: Error: TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

can't create dapp

running asch-cli -H 127.0.0.1 -P 4096 registerdapp --metafile dapp.json --secret "nasty arm work trade sad orphan artist disorder trim cloth enable rescue" will cause the following error:

buffer.js:481
    throw new TypeError('"string" must be a string, Buffer, or ArrayBuffer');
    ^

TypeError: "string" must be a string, Buffer, or ArrayBuffer
    at Function.byteLength (buffer.js:481:11)
    at ByteBuffer.module.exports.ByteBufferPrototype.writeUTF8String (/home/bass/testomgeving/asch-cli/node_modules/asch-js/node_modules/bytebuffer/dist/bytebuffer-node.js:2004:20)
    at getBytes (/home/bass/testomgeving/asch-cli/node_modules/asch-js/lib/transactions/crypto.js:120:5)
    at getHash (/home/bass/testomgeving/asch-cli/node_modules/asch-js/lib/transactions/crypto.js:166:24)
    at Object.sign (/home/bass/testomgeving/asch-cli/node_modules/asch-js/lib/transactions/crypto.js:191:13)
    at Object.createDApp (/home/bass/testomgeving/asch-cli/node_modules/asch-js/lib/transactions/dapp.js:34:16)
    at Command.registerDapp (/home/bass/testomgeving/asch-cli/plugins/api.js:309:25)
    at Command.listener (/home/bass/testomgeving/asch-cli/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)

The above seems due to AschPlatform/asch-js#11

如何把asch-cli 从1.3.8升级到1.4.0

如何把asch-cli 从1.3.8升级到1.4.0
使用npm install -g asch-cli 安装的是1.3.8,我发现github上1.4.0
怎么升级到1.4.0啊,asch-cli没有upgrade命令

can not make deposit (npm version)

bass@bass-Aspire-ES1-521:~/testomgeving/asch$ asch-cli dapps --deposit
? Enter secret [hidden]
? Enter amount 120
? DApp Id f4c34f11c469462d6239a2b9afdf8cf904828d9bcd11fc25c258716ecdd8df65
? Enter secondary secret (if defined)

Then the process stops?

asch-cli dapps -i does not install the app

Problem-
once i enter the master key followed by dappId and host-port ,final callback does not execute

I went through dapps.js inside the plugin folder and seems like you are upgrading to async await feature but did not implement it completely ,i had to make the couple of changes,and then it worked.
is asch-cli project still in development ? if it is when will it be ready for production use.

registerdapp error

执行:( asch-cli v1.3.8)asch-cli registerdapp -f dapp.json -e "stone elephant caught wrong spend traffic success fetch inside blush virtual element"
返回错误:Server error: Error: Invalid description
但是dapp.json里"description": "shopping"

Bug: Execute "bin/asch-cli dapps --install". Callback doesn't get called

Dear Asch-Team,

Bug Reproduction

nvm use 8.0.0
cd asch-cli
bin/asch-cli dapps --install

? Enter dapp id
# ddf48b35aa19624d64755a66ec2cbfbbb4110765b0324f82a2c19c09d8cdf9b5
? Host and port (localhost:4096)
# [Enter]
? Enter dapp master password
# ytfACAMegjrK

After that, the callback for the inquirer doesn't get called.

I will provide the necessary pull requests to fix this bug.
Kind regards
a1300

can't sendmoney

./bin/asch-cli -H 127.0.0.1 -P 4096 sendmoney --secret "stone elephant caught wrong spend traffic success fetch inside blush virtual element" --to "AJbjcLUmQezDrVrzS7XUaax6Pt3T8GQTM5" --amount 100000000000

returns:

Server error: Invalid transaction body

wrong assets name example

>? Enter asset name, for example: BTC, CNY, USD, MYASSET

You can not chose MYASSET because of max 6 chars are allowed

code error

plugins/dapps.js 186
code:
dappTrs = AschJS.dapp.createDapp(account.secret, secondSecret, dappParams);
but
fucntion createDapp first params need to dappParams.

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.