GetScatter/ScatterWebExtension

3090003, unsatisfied_authorization

leocll opened this issue · 2 comments

This mistake has been bothering me all day. I saw other issues about it, but none of them solved the problem. Help me, I will be grateful.

  • Net config
const network = Network.fromJson({
    blockchain:'eos',
    host:'api-kylin.eoslaomao.com',
    port:443,
    protocol:'https',
    chainId:'5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191' // <-- this is the 麒麟测试
});
  • Code
const options = { authorization:[`${this.account.name}@${this.account.authority}`] };
const completed = res => { console.log(res) }
const abi_ = {
      "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ",
      "version": "eosio::abi/1.1",
      "types": [],
      "structs": [{"name": "hi","base": "","fields": [{"name": "user", "type": "name"}]}],
      "actions": [{"name": "hi","type": "hi","ricardian_contract": ""}],
      "tables": [],
      "ricardian_clauses": [],
      "variants": []
    }
eos.setabi(this.account.name, abi_, options)
        .then(completed).catch(completed)
// eos.contract('eosio.token').then(contract => {
//         contract.transfer(this.account.name, "leoclltest12", '1.0000 EOS', "ceshi", options)
//             .then(completed).catch(completed);
//     })
  • Error
{
    "code":500,
    "message":"Internal Service Error",
    "error":{
        "code":3090003,
        "name":"unsatisfied_authorization",
        "what":"Provided keys, permissions, and delays do not satisfy declared authorizations",
        "details":[
            {
                "message":"transaction declares authority '{"actor":"leoclltest14","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys ["EOS5ZcMvpgtDMdVtvCFewAQYTyfN6Vqhg4kdgauffx3jiaKaeWfY1"], and a delay max limit of 3888000000 ms",
                "file":"authorization_manager.cpp",
                "line_number":524,
                "method":"check_authorization"
            }
        ]
    }
}

The transfer can be successful, but setcode and setabi will report the error.

// transfer, successful
eos.contract('eosio.token').then(contract => {
        contract.transfer(this.account.name, "leoclltest12", '1.0000 EOS', "ceshi", options)
            .then(completed).catch(completed);
    })
// setabi, error
eos.setabi(this.account.name, abi_, options)
        .then(completed).catch(completed)
// setabi, error
eos.contract('eosio').then(contract => {
        contract.setabi(this.account.name, "0e656f73696f3a3a6162692f312e31000102686900010475736572046e616d6501000000000000806b02686900000000", options)
            .then(completed).catch(completed);
    })

Closing in favor of GetScatter/scatter-js#126