in the document: https://github.com/ekkis/eos the section Example "Currency" Contract Walkthrough (incidentally, it would be better to have multiple documents for each section instead of a single huge file) indicates I can upload a sample contract like this:
cleos set contract currency ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi
but in my case I get the error:
Reading WAST...
Assembling WASM...
Publishing contract...
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet.
Error Details:
transaction declares authority '{"actor":"currency","permission":"active"}', but does not have signatures for it.
however, the previous have me create a couple of keys like this:
cleos create key
...the second which is referred to as the 'active' key and is imported like this:
cleos wallet import <public-key>
which I did. something has gone wrong since it can't seem to find the private key it needs. the instructions only state to import the 'active' key. what has gone amiss?
just for the hell of it, I imported the other private key (the 'owner' key) and now the set contract worked. the docs clearly need fixing here
more woes. further down the doc, I'm supposed to issue the currency:
cleos push action currency issue '{"to":"currency","quantity":"1000.0000 CUR","memo":""}' --permission currency@active
but that makes the system puke:
2168966ms thread-0 main.cpp:935 operator() ] Converting argument to binary...
2168978ms thread-0 main.cpp:1008 main ] Failed with error: Assert Exception (10)
condition: assertion failed: unable to find key
Request Path: nodeos:8888/v1/chain/push_transaction, Request Post Data: {"signatures":["EOSKeHEPQA7EGYsCHG32upJEz8qExtY8AtQTDqPrXUCybZE2PuQeYGGyRYkSYeY6jHKAvkXbpiHsQshs1UxFzqJowH4pvFef3"],"compression":"none","data":"86f4b95a00003716178096820000000000010000001e4d75af460000000000a53176010000001e4d75af4600000000a8ed3232190000001e4d75af468096980000000000044355520000000000"}
unable to find key -- which key? find it where?
I have same situation with u
cleos set contract YOUR_ACCOUNT_NAME ../../contracts/currency/currency.wast
YOUR_ACCOUNT_NAME is your account name,it is not "currency".
try it
The docs have been updated in developers.eos.io, if you encounter the similar problem, please open a new issue. I'm closing this issue. Thanks!
Most helpful comment
just for the hell of it, I imported the other private key (the 'owner' key) and now the set contract worked. the docs clearly need fixing here