Decode Extrinsic
crossle opened this issue · comments
- When decode extrinsic, must fill metadataInstant ?
- How to get the transaction fee only use RPC via http?
- When decode extrinsic, must fill metadataInstant ?
- How to get the transaction fee only use RPC via http?
- Must fill metadataInstant, metadata info like ethereum contract Abi
- You can find there
substrate-api-rpc/rpc/system.go
Line 97 in 3f2460e
Thanks, BTW, How to get the extrinsic status? success or failure?
decodeEvent, err := substrate.DecodeEvent(event, metaInstant, specVersion)
if err != nil {
return nil, err
}
When decode event like block 2088622, error:
Recovering from panic in DecodeEvent error is: runtime error: index out of range [5] with length 3
Sometime error Recovering from panic in DecodeEvent error is: Vec length 672001531 exceeds 1000
How to use event metadata, i get the metadata from rpc state_getMetadata
@crossle state_getMetadata,you need use event block relate metadata
curl -X POST -H "Content-Type: application/json" --data '{"id":6,"jsonrpc":"2.0","method":"state_getMetadata","params":[blockHash]}'
@crossle state_getMetadata,you need use event block relate metadata
curl -X POST -H "Content-Type: application/json" --data '{"id":6,"jsonrpc":"2.0","method":"state_getMetadata","params":[blockHash]}'
Thanks, I lost the blockHash param...
Sometime error
Recovering from panic in DecodeEvent error is: Vec length 672001531 exceeds 1000
@freehere107 spec version must match the metadata?
Sometime error
Recovering from panic in DecodeEvent error is: Vec length 672001531 exceeds 1000
@freehere107 spec version must match the metadata?
@crossle Right!
@crossle Your need to check using event relate metadata and custom type
@freehere107 Can you commit the polkadot custom type to the project? like decode event, or where i can find the custom type?
@crossle you may reference https://github.com/itering/scale.go/tree/master/network
@crossle you may reference https://github.com/itering/scale.go/tree/master/network
Why not make the json to go file? others can import it
@crossle In fact, this custom JSON can only be used for testing. The custom JSON used by subscan.io is not open source.
@crossle In fact, this custom JSON can only be used for testing. The custom JSON used by subscan.io is not open source.
Any different?
@crossle https://github.com/itering/scale.go/tree/master/network Updates are not frequent
Updates are not frequent
How about make the json to *.go file?