-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35c4b61
commit 20047b8
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# GSRPC Registry | ||
The GSRPC Registry can parse target metadata information into an in-memory registry of complex structures. | ||
|
||
By leveraging the on-chain metadata, GSRPC is more robust to changes on types, allowing clients to only keep updated the types that are relevant to their business operation. | ||
|
||
This registry can be used afterwards to decode data read from live chains (events & extrinsics). | ||
|
||
## Usage | ||
Since docs get outdated fairly quick, here are links to tests that will always be up-to-date. | ||
### Populate Call, Error & Events Registries | ||
[Browse me](registry_test.go) | ||
|
||
### Event retriever | ||
[TestLive_EventRetriever_GetEvents](retriever/event_retriever_live_test.go) | ||
### Extrinsic retriever | ||
Since chain runtimes can be customized, modifying core types such as Accounts, Signature payloads or Payment payloads, the code supports a customizable way of passing those custom types to the extrinsic retriever. | ||
|
||
On the other hand, since a great majority of chains do not need to change these types, the tool provides a default for the most common used ones. | ||
#### Using Chain Defaults | ||
[TestExtrinsicRetriever_NewDefault](retriever/extrinsic_retriever_test.go#L179) | ||
#### Using Custom core types | ||
[TestLive_ExtrinsicRetriever_GetExtrinsics](retriever/extrinsic_retriever_live_test.go) |