darwinia-network / darwinia-offchain-tools

Ethereum bridge relayer tools
3 stars 4 forks source link

How to custimize types.json in tools like polkadot-js-api #9

Open hackfisher opened 4 years ago

hackfisher commented 4 years ago
promote:~ denny$ polkadot-js-api query.system.account --ws ws://127.0.0.1:9944
Unable to resolve type RingBalance, it will fail on constrution
Unable to resolve type EthTransactionIndex, it will fail on constrution
Unable to resolve type KtonBalance, it will fail on constrution
Unable to resolve type DepositId, it will fail on constrution
Unable to resolve type EthHeader, it will fail on constrution
Unable to resolve type Receipt, it will fail on constrution
Unable to resolve type EthReceiptProof, it will fail on constrution
Unable to resolve type MomentT, it will fail on constrution
Unknown types found, no types for DepositId,EthAddress,EthHeader,EthReceiptProof,EthTransactionIndex,HeaderInfo,KtonBalance,MomentT,Power,RKT,Receipt,RingBalance,StakingBalanceT,StakingLedgerT,ValidatorReward
2020-03-06 14:51:00        API/INIT: Error: FATAL: Unable to initialize the API: createType(EthTransactionIndex):: Cannot construct unknown type EthTransactionIndex
    at EventEmitter.value (/Users/denny/.config/yarn/global/node_modules/@polkadot/api/base/Init.js:67:25)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: FATAL: Unable to initialize the API: createType(EthTransactionIndex):: Cannot construct unknown type EthTransactionIndex
    at EventEmitter.value (/Users/denny/.config/yarn/global/node_modules/@polkadot/api/base/Init.js:67:25)
hackfisher commented 4 years ago

https://github.com/polkadot-js/tools/tree/master/packages/api-cli

clearloop commented 4 years ago

I suggest we register a bot account with a pretty girl avatar like @rust-highfive, and powered her by ansible or jenkins. (or any other handwrite tools)

Listen to the update of darwinia, if types.json changes @darwinia-highfive will re-write darwinia-offchain-tools immediately.