Skip to content

Commit d5760ae

Browse files
Requests to access node use CCF encoding from now on (#53)
* Requests to access node use CCF encoding from now on * decode payload via ccf * update root block and spork id * Upgrade go version, flow-go and core-contracts deps
1 parent bab50a2 commit d5760ae

File tree

6 files changed

+484
-521
lines changed

6 files changed

+484
-521
lines changed

access/access.go

+14-8
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ func (c Client) BlockEvents(ctx context.Context, blockID []byte, typ string) ([]
165165
resp, err := c.client.GetEventsForBlockIDs(
166166
ctx,
167167
&access.GetEventsForBlockIDsRequest{
168-
BlockIds: [][]byte{blockID},
169-
Type: typ,
168+
BlockIds: [][]byte{blockID},
169+
Type: typ,
170+
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
170171
},
171172
)
172173
cancel()
@@ -386,7 +387,8 @@ func (c Client) Transaction(ctx context.Context, hash []byte) (*entities.Transac
386387
resp, err := c.client.GetTransaction(
387388
ctx,
388389
&access.GetTransactionRequest{
389-
Id: hash,
390+
Id: hash,
391+
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
390392
},
391393
)
392394
cancel()
@@ -406,8 +408,9 @@ func (c Client) TransactionResult(ctx context.Context, blockID []byte, txnIndex
406408
resp, err := c.client.GetTransactionResultByIndex(
407409
ctx,
408410
&access.GetTransactionByIndexRequest{
409-
BlockId: blockID,
410-
Index: txnIndex,
411+
BlockId: blockID,
412+
Index: txnIndex,
413+
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
411414
},
412415
)
413416
cancel()
@@ -428,7 +431,8 @@ func (c Client) TransactionResultByHash(ctx context.Context, hash []byte) (*acce
428431
resp, err := c.client.GetTransactionResult(
429432
ctx,
430433
&access.GetTransactionRequest{
431-
Id: hash,
434+
Id: hash,
435+
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
432436
},
433437
)
434438
cancel()
@@ -453,7 +457,8 @@ func (c Client) TransactionResultsByBlockID(ctx context.Context, blockID []byte)
453457
resp, err := c.client.GetTransactionResultsByBlockID(
454458
ctx,
455459
&access.GetTransactionsByBlockIDRequest{
456-
BlockId: blockID,
460+
BlockId: blockID,
461+
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
457462
},
458463
)
459464
cancel()
@@ -473,7 +478,8 @@ func (c Client) TransactionsByBlockID(ctx context.Context, blockID []byte) ([]*e
473478
resp, err := c.client.GetTransactionsByBlockID(
474479
ctx,
475480
&access.GetTransactionsByBlockIDRequest{
476-
BlockId: blockID,
481+
BlockId: blockID,
482+
EventEncodingVersion: entities.EventEncodingVersion_CCF_V0,
477483
},
478484
)
479485
cancel()

0 commit comments

Comments
 (0)