Failed with error: Assert Exception (10) status_code == 200: Error code 400 for upload currency
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
Same issue here. Seems missed some operations, but not sure what.
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)
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!