From 8b0cac190d46fec31025399c087bd87c552ae080 Mon Sep 17 00:00:00 2001 From: Christina <156356273+cratiu222@users.noreply.github.com> Date: Tue, 17 Sep 2024 19:23:23 +0300 Subject: [PATCH 1/3] Update json.go --- gethrpc/json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gethrpc/json.go b/gethrpc/json.go index e991363a2..c14c95814 100644 --- a/gethrpc/json.go +++ b/gethrpc/json.go @@ -226,7 +226,7 @@ func (c *jsonCodec) Closed() <-chan interface{} { return c.closed } -// parseMessage parses raw bytes as a (batch of) JSON-RPC message(s). There are no error +// parseMessage parses raw bytes as a (batch of) JSON-RPC message(s). There is no error // checks in this function because the raw message has already been syntax-checked when it // is called. Any non-JSON-RPC messages in the input return the zero value of // jsonrpcMessage. From 60e468de6270a0334f45e6801cfa40d483d47da3 Mon Sep 17 00:00:00 2001 From: Christina <156356273+cratiu222@users.noreply.github.com> Date: Tue, 17 Sep 2024 19:25:42 +0300 Subject: [PATCH 2/3] Update subscription.go --- gethrpc/subscription.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gethrpc/subscription.go b/gethrpc/subscription.go index d972244db..26c58054a 100644 --- a/gethrpc/subscription.go +++ b/gethrpc/subscription.go @@ -47,7 +47,7 @@ func NewID() ID { return globalGen() } -// randomIDGenerator returns a function generates a random IDs. +// randomIDGenerator returns a function that generates a random IDs. func randomIDGenerator() func() ID { seed, err := binary.ReadVarint(bufio.NewReader(crand.Reader)) if err != nil { @@ -97,7 +97,7 @@ type Notifier struct { // CreateSubscription returns a new subscription that is coupled to the // RPC connection. By default subscriptions are inactive and notifications // are dropped until the subscription is marked as active. This is done -// by the RPC server after the subscription ID is send to the client. +// by the RPC server after the subscription ID is sent to the client. func (n *Notifier) CreateSubscription() *Subscription { n.mu.Lock() defer n.mu.Unlock() @@ -152,7 +152,7 @@ func (n *Notifier) takeSubscription() *Subscription { } // activate is called after the subscription ID was sent to client. Notifications are -// buffered before activation. This prevents notifications being sent to the client before +// buffered before activation. This prevents notifications from being sent to the client before // the subscription ID is sent to the client. func (n *Notifier) activate() error { n.mu.Lock() From f08f0e2054578d7061d8fa87c0c56a9d13318463 Mon Sep 17 00:00:00 2001 From: Christina <156356273+cratiu222@users.noreply.github.com> Date: Tue, 17 Sep 2024 19:29:28 +0300 Subject: [PATCH 3/3] Update REGISTRY.md --- registry/REGISTRY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/registry/REGISTRY.md b/registry/REGISTRY.md index b0ad02aa5..4bca54bbd 100644 --- a/registry/REGISTRY.md +++ b/registry/REGISTRY.md @@ -3,7 +3,7 @@ The GSRPC Registry can parse target metadata information into an in-memory regis 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). +This registry can be used afterwards to decode data read from live chains (events & extrinsic). ## How to parse events and its types First we instantiate the API with the client node and open a connection: @@ -80,4 +80,4 @@ On the other hand, since a great majority of chains do not need to change these #### Using Chain Defaults [TestExtrinsicRetriever_NewDefault](retriever/extrinsic_retriever_test.go#L179) #### Using Custom core types -[TestLive_ExtrinsicRetriever_GetExtrinsics](retriever/extrinsic_retriever_live_test.go) \ No newline at end of file +[TestLive_ExtrinsicRetriever_GetExtrinsics](retriever/extrinsic_retriever_live_test.go)