BCSkill (Block chain skill ) 技术社区
社区QQ群:791420381
推荐论坛:https://eosfans.io
Telegram: https://t.me/bcskill

dawn 4.2 RPC push_transaction error 3090003 unsatisfied_authorization

在升级EOS到dawn 4.2 之后之前运行好好的Dapp报error 3090003

EOS的配置如下

const EOS_CONFIG = {
  contractName: "dapp.token", // Contract name
  contractReceiver: "eosio", // User executing the contract (should be paired with private key)
  clientConfig: {
    keyProvider: '5KeqsXty9Sa8GfJgNfkckYxKKGcAWE4AWmUHiw6ifDcnaa2i', // Your private key
    httpEndpoint: 'http://192.168.1.112:8888' // EOS http endpoint
  }
}

返回

{"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\":\"eosio\",\"permission\":\"active\"}', but does not have signatures for it under a provided delay of 0 ms","file":"authorization_manager.cpp","line_number":405,"method":"check_authorization"}]}}

问题分析:
是因为新版本EOS配置或者请求时需要添加EOS链上chain_id
chain_id可以通过cleos get info获取到

如果获取没有的话,先确认下本地Eos的版本,或者在build完,没有在build目录下执行 make install

EOS的配置修改如下

const EOS_CONFIG = {
  contractName: "dapp.token", // Contract name
  contractReceiver: "eosio", // User executing the contract (should be paired with private key)
  clientConfig: {
    keyProvider: '5KeqsXty9Sa8GfJgNfkckYxKKGcAWE4AWmUHiw6ifDcnaa2i', // Your private key
    httpEndpoint: 'http://192.168.1.112:8888', // EOS http endpoint
    chain_id: "706a7ddd808de9fc2b8879904f3b392256c83104c1d544b38302cc07d9fca477"
  }
}

trust web3 provider

Web3 javascript wrapper provider for iOS and Android platforms.
github: https://github.com/TrustWallet/trust-web3-provider

Scatter is a browser extension for EOS

Scatter is a browser extension that allows you to sign transactions for multiple blockchains and provide personal information to web applications without ever exposing your keys or filling out forms.

github: https://github.com/EOSEssentials/Scatter

EOS commander for developer

EOS commander is an Android client for EOSIO blockchain for EOS dApp developer. It includes functions of wallet. Developers can test wallet, account, transaction, contract, etc. with simple input on the Android device. PLACTAL team hopes this makes more EOS mobile DApps activated.

github: https://github.com/plactal/EosCommander

EOS.IO智能合约的无限精度整数库(biginteger-for-eosio)

#include "eoslib/print.hpp"  
#include "BigIntegerLibrary.hpp"  

 BigInteger a = 65536;  
 print("a * a * a * a * a * a * a * a: ", ( a * a * a * a * a * a * a * a ) );

then, eosd prints 340282366920938463463374607431768211456.

github: https://github.com/plactal/biginteger-for-eosio