eos icon indicating copy to clipboard operation
eos copied to clipboard

Upload sample contract doesn't work.

Open liderako opened this issue 9 years ago • 12 comments

Input

./eosc set contract player ../../../contracts/currency/currency.wast ../../../contracts/currency/currency.abi

Output

236602ms thread-0 main.cpp:768main] Failed with error: 10 assert_exception: Assert Exception status_code == 200: Error : 3030002 tx_missing_sigs: signatures do not satisfy declared authorizations Transaction declares authority '{"account":"player1","permission":"active"}', but does not have signatures for it. {"auth":{"account":"player1","permission":"active"}} thread-0 chain_controller.cpp:749 get_required_keys

where is find tutorial about create smart contracts on eos?

liderako avatar Sep 07 '17 16:09 liderako

check this. Don't know if it help https://github.com/EOSIO/eos/issues/311

bycz6 avatar Sep 07 '17 16:09 bycz6

This does not work

liderako avatar Sep 07 '17 16:09 liderako

Do you have your wallet unlocked and have all necessary private keys imported for the player account?

nanonano7 avatar Sep 07 '17 17:09 nanonano7

Yes

liderako avatar Sep 07 '17 17:09 liderako

INPUT WALLET CREATE

./eosc wallet create

OUTPUT

Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5Jw18LjR65ATRZAuGZfBDDCrifKimWXNXiFrxQZt9F9zKV3cA6j"

INPUT WALLET IMPORT

./eosc wallet import 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

OUTPUT

imported private key for: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

INPUT CREATE KEY

./eosc create key
./eosc create key

OUTPUT

Owner key

Private key: 5JrCcoukm93odyEcHxD9gbGJ5Qy7Q4KNK1RGtDCKExww6TdRK6x
Public key:  EOS65oyszGKvYfkLavKUD5WywJqQdqFa4wBLRA5MPND1muVHRVErh

activity key

Private key: 5JeC2Uc7DK9ErNPkcESDRAzndUAuWPdGt96AULpgkD99Fnssmh4
Public key:  EOS7w6XGCvkLkw4CKW1rAwNMXK6a77JWyhYFMwBWT1QvwXv2inSsk

INPUT

./eosc create account inita currency EOS65oyszGKvYfkLavKUD5WywJqQdqFa4wBLRA5MPND1muVHRVErh EOS7w6XGCvkLkw4CKW1rAwNMXK6a77JWyhYFMwBWT1QvwXv2inSsk

iNPUT

./eosc set contract currency ../../../contracts/currency/currency.wast ../../../contracts/currency/currency.abi

OUTPUT

Reading WAST...
Assembling WASM...
Publishing contract...
3577570ms thread-0   main.cpp:768 main] Failed with error: 10 assert_exception: Assert Exception
status_code == 200: Error 

liderako avatar Sep 07 '17 18:09 liderako

Before running, I delete files "blocks" "blockchain" "default.wallet" in data-dir I run command in terminal ./eosd --skip-transaction-signatures and start ./eosc create wallet etc

liderako avatar Sep 07 '17 18:09 liderako

Solution

./eosc wallet import PRIVAT_KEY_ACTIVITY

and after

./eosc set contract currency ../../../contracts/currency/currency.wast ../../../contracts/currency/currency.abi

liderako avatar Sep 08 '17 08:09 liderako

@nanonano7 : If I have to create and deploy a new Smart Contract, then how can i Create a wast and abi file?

amodi01 avatar Dec 07 '17 14:12 amodi01

via eoscpp in tools. https://eosio.github.io/eos/md_contracts_eoslib_tutorial.html

nanonano7 avatar Dec 07 '17 14:12 nanonano7

@nanonano7 Thanks alot for the help.

amodi01 avatar Dec 07 '17 14:12 amodi01

@amodi01 Please use Telegram EOS Developers for support.

heifner avatar Dec 07 '17 14:12 heifner

Hi, Does the name of an account should be same as of .abi file for setting the hash-code/contract ? I mean in above detailed comments from @liderako , instead of creating currency account if I use any other account name like player , will it work for following command ? ./eosc set contract currency ../../../contracts/currency/currency.wast ../../../contracts/currency/currency.abi

I am facing same issue, as I am trying to achieve --> transfer fund from accountA to accountB (the way it happens in usual wallets like Zebpay).

Please guide, it feels quite confusing. Thanks in advanced.

amolmaid avatar Jun 13 '18 09:06 amolmaid