eos icon indicating copy to clipboard operation
eos copied to clipboard

Online samples of eosc for contract has an issue, samples needs to be updated.

Open MatthewPappas opened this issue 9 years ago • 3 comments

I believe this:

eosc push message currency transfer '{"from":"currency","to":"tester","quantity":50}' -s currency -s tester -p active@currency

Should be this:

eosc push message currency transfer '{"from":"currency","to":"tester","amount":"50"}' -s currency -s tester -p active@currency

However when I run it I still run into another issue: matthew@ubuntu2mp:/home/matthew/eos/build> eosc -p $EOSCUSEPORT push message currency transfer '{"from":"currency","to":"tester","amount":"50"}' -s currency -s tester -p active@currency 2251978ms thread-0 main.cpp:544 operator() ] Converting argument to binary... 2251979ms thread-0 main.cpp:600 main ] Failed with error: 10 assert_exception: Assert Exception status_code == 200: Error : 10 assert_exception: Assert Exception account != nullptr: Account not found: active {"name":"active"} thread-0 chain_controller.cpp:978 require_account

{"trx":{"refBlockNum":32,"refBlockPrefix":632100820,"expiration":"2017-09-03T19:39:10","scope":["currency","tester"],"readscope":[],"messages":[{"code":"currency","type":"transfer","authorization":[{"account":"active","permission":"currency"},{"account":"active","permission":"currency"}],"data":"00000079b822651d00000000c84267a13200000000000000"}],"signatures":[]}}
thread-0  chain_controller.cpp:263 push_transaction

{"msg":"10 assert_exception: Assert Exception\naccount != nullptr: Account not found: active\n    {\"name\":\"active\"}\n    thread-0  chain_controller.cpp:978 require_account\n\n    {\"trx\":{\"refBlockNum\":32,\"refBlockPrefix\":632100820,\"expiration\":\"2017-09-03T19:39:10\",\"scope\":[\"currency\",\"tester\"],\"readscope\":[],\"messages\":[{\"code\":\"currency\",\"type\":\"transfer\",\"authorization\":[{\"account\":\"active\",\"permission\":\"currency\"},{\"account\":\"active\",\"permission\":\"currency\"}],\"data\":\"00000079b822651d00000000c84267a13200000000000000\"}],\"signatures\":[]}}\n    thread-0  chain_controller.cpp:263 push_transaction"}
thread-0  httpc.cpp:113 call

{"server":"localhost","port":8888,"path":"/v1/chain/push_transaction","postdata":{"refBlockNum":32,"refBlockPrefix":632100820,"expiration":"2017-09-03T19:39:10","scope":["currency","tester"],"readscope":[],"messages":[{"code":"currency","type":"transfer","authorization":[{"account":"active","permission":"currency"},{"account":"active","permission":"currency"}],"data":"00000079b822651d00000000c84267a13200000000000000"}],"signatures":[]}}
thread-0  httpc.cpp:117 call

MatthewPappas avatar Sep 03 '17 19:09 MatthewPappas

We found the same issue. it should be amount instead of quantity and secondly it should be currency@active instead of active@currency. But that will only get you to next issue which I am fixing as we speak.

pavybez avatar Sep 04 '17 02:09 pavybez

@pavybez I think this is fixed now? @bytemaster would it make more sense to do key@account, not account@key?

sergmetelin avatar Sep 05 '17 03:09 sergmetelin

Yes this is fixed now and merged. Documentation has been updated (I believe) to reflect that we need to use account@key.

pavybez avatar Sep 07 '17 05:09 pavybez