eos icon indicating copy to clipboard operation
eos copied to clipboard

Failed with error: Assert Exception (10) status_code == 200: Error code 400 for upload currency

Open rogeryu23 opened this issue 8 years ago • 3 comments

I have a problem to upload contract in testnet

./eosc get code currency code hash: 0000000000000000000000000000000000000000000000000000000000000000

./eosc set contract test1cur ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi Reading WAST... Assembling WASM... Publishing contract... 1475086ms main.cpp:1195 main ] Failed with error: Assert Exception (10) status_code == 200: Error code 400 : {"code":400,"message":"Bad Request","details":"missing required scope (3030008)\nRequired scope currency not declared by transaction\n\n\n\n\n\n\n"}

any idea? I followed the doc and was successful until this command ./eosc set contract test1cur ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi

rogeryu23 avatar Jan 20 '18 16:01 rogeryu23

Same issue here. Seems missed some operations, but not sure what.

atjason avatar Jan 25 '18 06:01 atjason


if ( !accounts::get( owned_account, N(currency) )) {
          store_account( N(currency), account( currency_tokens(1000ull*1000ull*1000ull) ) );
}

notice the code N(currency), it will check the account scope. so, the account you used to deploy contract should be same with currency. or, just change the code N(currency) to N(yourAccountName)

manxiaqu avatar Jan 26 '18 09:01 manxiaqu

The db api has been heavily refactored and we don't need to explicitly declare scope anymore. I'm closing this issue as it's obsolete if you encounter similar issue uploading currency please open new ticket. Thanks!

andriantolie avatar Jun 29 '18 07:06 andriantolie