eos icon indicating copy to clipboard operation
eos copied to clipboard

lastest build key errors to run example currency contract

Open ChrisSun1212 opened this issue 8 years ago • 5 comments

Hi,

I encountered the following error when I tried to execute

./cleos push action currency issue '{"to":"currency","quantity":"1000.0000 CUR", "memo": "Test"}' --permission currency@active

2039019ms thread-0 main.cpp:1008 main ] Failed with error: Assert Exception (10) condition: assertion failed: unable to find key

Request Path: localhost:8888/v1/chain/push_transaction, Request Post Data: {"signatures":["EOSKXaXGTT3aocZyK2dcyHhg9bMXaxEwqRtMZonsNm314qKeSKgtV2iQqDYY8YFpch2rbrS3fwbGTkEeK8Jj2fUe4uvmmT1pV"],"compression":"none","data":"5ef3dc5800000000000000000000000000010000001e4d75af460000000000a53176010000001e4d75af4600000000a8ed32321d0000001e4d75af46809698000000000004435552000000000474657374"}

However, I have already added 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 as private key to my wallet.

./cleos wallet keys [[ "EOS5nGU1fzERfNUXT3Z1XJjNtbQEv7TdCVD6jH1MefkBdBcon892v", "5JcbmPrYvKTsWeStLgGEz95G5Ta2xCB2Lfb8qm6KHt5ACQfav6H" ],[ "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" ],[ "EOS7HrtBh5bNZq5uRvA7L1VfayWA1u5vycZcmGMtQAQJiKi3kWPkJ", "5HzXp5jJNi8E9nh26FHyiytKPqxh7gNtoCCgYsuPYCsDywnZAN2" ] ]

Any idea how to fix this?

Thanks,

Chris

ChrisSun1212 avatar Mar 21 '18 12:03 ChrisSun1212

I have the same problem.

OuterSpaceTears avatar Mar 22 '18 05:03 OuterSpaceTears

@heifner
Do you know this problem,ts

OuterSpaceTears avatar Mar 22 '18 05:03 OuterSpaceTears

The key mentioned in the error is the currency symbol. You first need to create the currency before you can issue some more (that is a recent change):

cleos push action currency create '{"issuer":"currency", "maximum_supply": "1000000000.0000 CUR", "can_freeze": 1, "can_recall": 1, "can_whitelist": 1}' -p currency@active

For the details of the actions check the contract code: https://github.com/EOSIO/eos/blob/master/contracts/eosiolib/currency.hpp

jeremi avatar Mar 22 '18 08:03 jeremi

Take note that it seems that get table is broken but the contract is working fine. I reported it in #1742

I attached to #1742 the log of the tests I did with it. You can check it to know how to use the latest version of the contract.

jeremi avatar Mar 22 '18 09:03 jeremi

The answer from @jeremi should be the right one. The currency contract is not available anymore so this issue is no longer relevant. I'm going to close this issue

andriantolie avatar Jul 03 '18 08:07 andriantolie