From b141f0f995c1efe8aed326537cf8d4b2841c6160 Mon Sep 17 00:00:00 2001 From: Andrii Date: Tue, 17 Sep 2024 12:28:44 +0300 Subject: [PATCH 1/5] Added two new endpoints with implementation --- access/grpc/client.go | 8 ++++++++ access/grpc/grpc.go | 45 +++++++++++++++++++++++++++++++++++++++++++ examples/go.mod | 4 ++-- examples/go.sum | 2 ++ 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/access/grpc/client.go b/access/grpc/client.go index d1c15d903..0fe1a4762 100644 --- a/access/grpc/client.go +++ b/access/grpc/client.go @@ -169,6 +169,14 @@ func (c *Client) GetTransaction(ctx context.Context, txID flow.Identifier) (*flo return c.grpc.GetTransaction(ctx, txID) } +func (c *Client) GetSystemTransaction(ctx context.Context, blockID flow.Identifier) (*flow.Transaction, error) { + return c.grpc.GetSystemTransaction(ctx, blockID) +} + +func (c *Client) GetSystemTransactionResult(ctx context.Context, blockID flow.Identifier) (*flow.TransactionResult, error) { + return c.grpc.GetSystemTransactionResult(ctx, blockID) +} + func (c *Client) GetTransactionsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.Transaction, error) { return c.grpc.GetTransactionsByBlockID(ctx, blockID) } diff --git a/access/grpc/grpc.go b/access/grpc/grpc.go index 042f09c24..911970359 100644 --- a/access/grpc/grpc.go +++ b/access/grpc/grpc.go @@ -358,6 +358,51 @@ func (c *BaseClient) GetTransaction( return &result, nil } +func (c *BaseClient) GetSystemTransaction( + ctx context.Context, + blockID flow.Identifier, + opts ...grpc.CallOption, +) (*flow.Transaction, error) { + req := &access.GetSystemTransactionRequest{ + BlockId: blockID.Bytes(), + } + + res, err := c.rpcClient.GetSystemTransaction(ctx, req, opts...) + if err != nil { + return nil, newRPCError(err) + } + + result, err := convert.MessageToTransaction(res.GetTransaction()) + if err != nil { + return nil, newMessageToEntityError(entityTransaction, err) + } + + return &result, nil +} + +func (c *BaseClient) GetSystemTransactionResult( + ctx context.Context, + blockID flow.Identifier, + opts ...grpc.CallOption, +) (*flow.TransactionResult, error) { + req := &access.GetSystemTransactionResultRequest{ + BlockId: blockID.Bytes(), + EventEncodingVersion: c.eventEncoding, + } + + res, err := c.rpcClient.GetSystemTransactionResult(ctx, req, opts...) + if err != nil { + return nil, newRPCError(err) + } + + result, err := convert.MessageToTransactionResult(res, c.jsonOptions) + if err != nil { + return nil, newMessageToEntityError(entityTransactionResult, err) + } + + return &result, nil +} + func (c *BaseClient) GetTransactionsByBlockID( ctx context.Context, blockID flow.Identifier, diff --git a/examples/go.mod b/examples/go.mod index b1c8aae8f..03a20899a 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.4 replace github.com/onflow/flow-go-sdk => ../ require ( - github.com/onflow/cadence v1.0.0-preview.38 + github.com/onflow/cadence v1.0.0-preview.52 github.com/onflow/flow-cli/flowkit v1.11.0 github.com/onflow/flow-go-sdk v0.41.17 github.com/spf13/afero v1.11.0 @@ -41,7 +41,7 @@ require ( github.com/logrusorgru/aurora/v4 v4.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/onflow/atree v0.7.0-rc.2 // indirect + github.com/onflow/atree v0.8.0-rc.6 // indirect github.com/onflow/crypto v0.25.1 // indirect github.com/onflow/flow/protobuf/go/flow v0.4.3 // indirect github.com/onflow/sdks v0.6.0-preview.1 // indirect diff --git a/examples/go.sum b/examples/go.sum index cbdeadaee..262eb6949 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -104,6 +104,7 @@ github.com/onflow/atree v0.6.0/go.mod h1:gBHU0M05qCbv9NN0kijLWMgC47gHVNBIp4KmsVF github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/atree v0.6.1-0.20240429171449-cb486ceb1f9c/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= +github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v0.42.7 h1:Qp9VYX901saO7wPwF/rwV4cMS+0mfWxnm9EqbYElYy4= github.com/onflow/cadence v0.42.7/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= @@ -115,6 +116,7 @@ github.com/onflow/cadence v1.0.0-preview.31/go.mod h1:3LM1VgE9HkJ815whY/F0LYWULw github.com/onflow/cadence v1.0.0-preview.35/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/cadence v1.0.0-preview.36/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= +github.com/onflow/cadence v1.0.0-preview.52/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= From 7081e5f15d62ad972e0158f3b987f2ccc24e75ab Mon Sep 17 00:00:00 2001 From: Andrii Date: Tue, 17 Sep 2024 13:05:04 +0300 Subject: [PATCH 2/5] Added tests for new endponts: --- access/grpc/client.go | 8 ++-- access/grpc/grpc.go | 46 ++++++++++---------- access/grpc/grpc_test.go | 92 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 27 deletions(-) diff --git a/access/grpc/client.go b/access/grpc/client.go index 0fe1a4762..e161d40f9 100644 --- a/access/grpc/client.go +++ b/access/grpc/client.go @@ -173,14 +173,14 @@ func (c *Client) GetSystemTransaction(ctx context.Context, blockID flow.Identifi return c.grpc.GetSystemTransaction(ctx, blockID) } -func (c *Client) GetSystemTransactionResult(ctx context.Context, blockID flow.Identifier) (*flow.TransactionResult, error) { - return c.grpc.GetSystemTransactionResult(ctx, blockID) -} - func (c *Client) GetTransactionsByBlockID(ctx context.Context, blockID flow.Identifier) ([]*flow.Transaction, error) { return c.grpc.GetTransactionsByBlockID(ctx, blockID) } +func (c *Client) GetSystemTransactionResult(ctx context.Context, blockID flow.Identifier) (*flow.TransactionResult, error) { + return c.grpc.GetSystemTransactionResult(ctx, blockID) +} + func (c *Client) GetTransactionResult(ctx context.Context, txID flow.Identifier) (*flow.TransactionResult, error) { return c.grpc.GetTransactionResult(ctx, txID) } diff --git a/access/grpc/grpc.go b/access/grpc/grpc.go index 911970359..6616be1da 100644 --- a/access/grpc/grpc.go +++ b/access/grpc/grpc.go @@ -380,29 +380,6 @@ func (c *BaseClient) GetSystemTransaction( return &result, nil } -func (c *BaseClient) GetSystemTransactionResult( - ctx context.Context, - blockID flow.Identifier, - opts ...grpc.CallOption, -) (*flow.TransactionResult, error) { - req := &access.GetSystemTransactionResultRequest{ - BlockId: blockID.Bytes(), - EventEncodingVersion: c.eventEncoding, - } - - res, err := c.rpcClient.GetSystemTransactionResult(ctx, req, opts...) - if err != nil { - return nil, newRPCError(err) - } - - result, err := convert.MessageToTransactionResult(res, c.jsonOptions) - if err != nil { - return nil, newMessageToEntityError(entityTransactionResult, err) - } - - return &result, nil -} - func (c *BaseClient) GetTransactionsByBlockID( ctx context.Context, blockID flow.Identifier, @@ -430,6 +407,29 @@ func (c *BaseClient) GetTransactionsByBlockID( return results, nil } +func (c *BaseClient) GetSystemTransactionResult( + ctx context.Context, + blockID flow.Identifier, + opts ...grpc.CallOption, +) (*flow.TransactionResult, error) { + req := &access.GetSystemTransactionResultRequest{ + BlockId: blockID.Bytes(), + EventEncodingVersion: c.eventEncoding, + } + + res, err := c.rpcClient.GetSystemTransactionResult(ctx, req, opts...) + if err != nil { + return nil, newRPCError(err) + } + + result, err := convert.MessageToTransactionResult(res, c.jsonOptions) + if err != nil { + return nil, newMessageToEntityError(entityTransactionResult, err) + } + + return &result, nil +} + func (c *BaseClient) GetTransactionResult( ctx context.Context, txID flow.Identifier, diff --git a/access/grpc/grpc_test.go b/access/grpc/grpc_test.go index d818f898e..07963a7b0 100644 --- a/access/grpc/grpc_test.go +++ b/access/grpc/grpc_test.go @@ -445,6 +445,42 @@ func TestClient_SendTransaction(t *testing.T) { })) } +func TestClient_GetSystemTransaction(t *testing.T) { + txs := test.TransactionGenerator() + ids := test.IdentifierGenerator() + + t.Run("Success", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + blockID := ids.New() + expectedTx := txs.New() + + txMsg, err := convert.TransactionToMessage(*expectedTx) + require.NoError(t, err) + + response := &access.TransactionResponse{ + Transaction: txMsg, + } + + rpc.On("GetSystemTransaction", ctx, mock.Anything).Return(response, nil) + + tx, err := c.GetSystemTransaction(ctx, blockID) + require.NoError(t, err) + + assert.Equal(t, expectedTx, tx) + })) + + t.Run("Not found error", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + blockID := ids.New() + + rpc.On("GetSystemTransaction", ctx, mock.Anything). + Return(nil, errNotFound) + + tx, err := c.GetSystemTransaction(ctx, blockID) + assert.Error(t, err) + assert.Equal(t, codes.NotFound, status.Code(err)) + assert.Nil(t, tx) + })) +} + func TestClient_GetTransaction(t *testing.T) { txs := test.TransactionGenerator() ids := test.IdentifierGenerator() @@ -516,6 +552,62 @@ func TestClient_GetTransactionsByBlockID(t *testing.T) { })) } +func TestClient_GetSystemTransactionResult(t *testing.T) { + ids := test.IdentifierGenerator() + + t.Run("Success", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + results := test.TransactionResultGenerator(flow.EventEncodingVersionCCF) + blockID := ids.New() + expectedResult := results.New() + response, _ := convert.TransactionResultToMessage(expectedResult, flow.EventEncodingVersionCCF) + + rpc.On("GetSystemTransactionResult", ctx, mock.Anything).Return(response, nil) + + result, err := c.GetSystemTransactionResult(ctx, blockID) + require.NoError(t, err) + + // Force evaluation of type ID, which is cached in type. + // Necessary for equality check below + for _, event := range result.Events { + _ = event.Value.Type().ID() + } + + assert.Equal(t, expectedResult, *result) + })) + + t.Run("Success with jsoncdc", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + results := test.TransactionResultGenerator(flow.EventEncodingVersionJSONCDC) + blockID := ids.New() + expectedResult := results.New() + response, _ := convert.TransactionResultToMessage(expectedResult, flow.EventEncodingVersionJSONCDC) + + rpc.On("GetSystemTransactionResult", ctx, mock.Anything).Return(response, nil) + + result, err := c.GetSystemTransactionResult(ctx, blockID) + require.NoError(t, err) + + // Force evaluation of type ID, which is cached in type. + // Necessary for equality check below + for _, event := range result.Events { + _ = event.Value.Type().ID() + } + + assert.Equal(t, expectedResult, *result) + })) + + t.Run("Not found error", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + blockID := ids.New() + + rpc.On("GetSystemTransactionResult", ctx, mock.Anything). + Return(nil, errNotFound) + + result, err := c.GetSystemTransactionResult(ctx, blockID) + assert.Error(t, err) + assert.Equal(t, codes.NotFound, status.Code(err)) + assert.Nil(t, result) + })) +} + func TestClient_GetTransactionResult(t *testing.T) { ids := test.IdentifierGenerator() From cc1594226dd4fd3f11e0c735089b7efb53864e2a Mon Sep 17 00:00:00 2001 From: Andrii Date: Tue, 17 Sep 2024 13:15:57 +0300 Subject: [PATCH 3/5] Make generate --- go.mod | 3 +++ go.sum | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/go.mod b/go.mod index 7ab67be1c..bb28ff4c8 100644 --- a/go.mod +++ b/go.mod @@ -67,6 +67,7 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect + github.com/vektra/mockery v1.1.2 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/blake3 v0.2.3 // indirect go.opencensus.io v0.24.0 // indirect @@ -79,12 +80,14 @@ require ( golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 089bf087a..47b35a7d3 100644 --- a/go.sum +++ b/go.sum @@ -157,10 +157,12 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -171,8 +173,11 @@ github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8 github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c/go.mod h1:JlzghshsemAMDGZLytTFY8C1JQxQPhnatWqNwUXjggo= github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d h1:5JInRQbk5UBX8JfUvKh2oYTLMVwj3p6n+wapDDm7hko= github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d/go.mod h1:Nlx5Y115XQvNcIdIy7dZXaNSUpzwBSge4/Ivk93/Yog= +github.com/vektra/mockery v1.1.2 h1:uc0Yn67rJpjt8U/mAZimdCKn9AeA97BOkjpmtBSlfP4= +github.com/vektra/mockery v1.1.2/go.mod h1:VcfZjKaFOPO+MpN4ZvwPjs4c48lkq1o3Ym8yHZJu0jU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= @@ -212,6 +217,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= @@ -221,6 +227,7 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -232,6 +239,7 @@ golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5H golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -266,6 +274,7 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= From f2c5da3e5822ff9f07dd8aeb0264931b8ee0cf70 Mon Sep 17 00:00:00 2001 From: Andrii Date: Tue, 17 Sep 2024 13:19:26 +0300 Subject: [PATCH 4/5] Tidy: --- go.mod | 3 --- go.sum | 9 --------- 2 files changed, 12 deletions(-) diff --git a/go.mod b/go.mod index bb28ff4c8..7ab67be1c 100644 --- a/go.mod +++ b/go.mod @@ -67,7 +67,6 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect - github.com/vektra/mockery v1.1.2 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/blake3 v0.2.3 // indirect go.opencensus.io v0.24.0 // indirect @@ -80,14 +79,12 @@ require ( golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 47b35a7d3..089bf087a 100644 --- a/go.sum +++ b/go.sum @@ -157,12 +157,10 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -173,11 +171,8 @@ github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8 github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c/go.mod h1:JlzghshsemAMDGZLytTFY8C1JQxQPhnatWqNwUXjggo= github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d h1:5JInRQbk5UBX8JfUvKh2oYTLMVwj3p6n+wapDDm7hko= github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d/go.mod h1:Nlx5Y115XQvNcIdIy7dZXaNSUpzwBSge4/Ivk93/Yog= -github.com/vektra/mockery v1.1.2 h1:uc0Yn67rJpjt8U/mAZimdCKn9AeA97BOkjpmtBSlfP4= -github.com/vektra/mockery v1.1.2/go.mod h1:VcfZjKaFOPO+MpN4ZvwPjs4c48lkq1o3Ym8yHZJu0jU= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= @@ -217,7 +212,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= @@ -227,7 +221,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -239,7 +232,6 @@ golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5H golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -274,7 +266,6 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= From 6d6a330622962406c9f61b3eff51496b126565ab Mon Sep 17 00:00:00 2001 From: Illia Malachyn Date: Tue, 17 Sep 2024 13:31:55 +0300 Subject: [PATCH 5/5] Add GetExecutionResultByID endpoint --- access/grpc/client.go | 4 ++ access/grpc/convert/convert.go | 32 +++++++++++ access/grpc/grpc.go | 35 +++--------- access/grpc/grpc_test.go | 100 +++++++++++++++++++++++++++++++-- examples/go.mod | 4 +- examples/go.sum | 2 + 6 files changed, 144 insertions(+), 33 deletions(-) diff --git a/access/grpc/client.go b/access/grpc/client.go index 7171ed797..37d06401b 100644 --- a/access/grpc/client.go +++ b/access/grpc/client.go @@ -232,6 +232,10 @@ func (c *Client) GetExecutionResultForBlockID(ctx context.Context, blockID flow. return c.grpc.GetExecutionResultForBlockID(ctx, blockID) } +func (c *Client) GetExecutionResultByID(ctx context.Context, id flow.Identifier) (*flow.ExecutionResult, error) { + return c.grpc.GetExecutionResultByID(ctx, id) +} + func (c *Client) GetExecutionDataByBlockID(ctx context.Context, blockID flow.Identifier) (*flow.ExecutionData, error) { return c.grpc.GetExecutionDataByBlockID(ctx, blockID) } diff --git a/access/grpc/convert/convert.go b/access/grpc/convert/convert.go index e52500a08..0c45da014 100644 --- a/access/grpc/convert/convert.go +++ b/access/grpc/convert/convert.go @@ -575,6 +575,38 @@ func MessageToTransactionResult(m *access.TransactionResultResponse, options []j }, nil } +func MessageToExecutionResult(execResult *entities.ExecutionResult) (*flow.ExecutionResult, error) { + chunks := make([]*flow.Chunk, len(execResult.Chunks)) + serviceEvents := make([]*flow.ServiceEvent, len(execResult.ServiceEvents)) + + for i, chunk := range execResult.Chunks { + chunks[i] = &flow.Chunk{ + CollectionIndex: uint(chunk.CollectionIndex), + StartState: flow.BytesToStateCommitment(chunk.StartState), + EventCollection: flow.BytesToHash(chunk.EventCollection), + BlockID: flow.BytesToID(chunk.BlockId), + TotalComputationUsed: chunk.TotalComputationUsed, + NumberOfTransactions: uint16(chunk.NumberOfTransactions), + Index: chunk.Index, + EndState: flow.BytesToStateCommitment(chunk.EndState), + } + } + + for i, serviceEvent := range execResult.ServiceEvents { + serviceEvents[i] = &flow.ServiceEvent{ + Type: serviceEvent.Type, + Payload: serviceEvent.Payload, + } + } + + return &flow.ExecutionResult{ + PreviousResultID: flow.BytesToID(execResult.PreviousResultId), + BlockID: flow.BytesToID(execResult.BlockId), + Chunks: chunks, + ServiceEvents: serviceEvents, + }, nil +} + func BlockExecutionDataToMessage( execData *flow.ExecutionData, ) (*entities.BlockExecutionData, error) { diff --git a/access/grpc/grpc.go b/access/grpc/grpc.go index 51df44442..93a66b00e 100644 --- a/access/grpc/grpc.go +++ b/access/grpc/grpc.go @@ -701,35 +701,18 @@ func (c *BaseClient) GetExecutionResultForBlockID(ctx context.Context, blockID f return nil, newRPCError(err) } - chunks := make([]*flow.Chunk, len(er.ExecutionResult.Chunks)) - serviceEvents := make([]*flow.ServiceEvent, len(er.ExecutionResult.ServiceEvents)) - - for i, chunk := range er.ExecutionResult.Chunks { - chunks[i] = &flow.Chunk{ - CollectionIndex: uint(chunk.CollectionIndex), - StartState: flow.BytesToStateCommitment(chunk.StartState), - EventCollection: flow.BytesToHash(chunk.EventCollection), - BlockID: flow.BytesToID(chunk.BlockId), - TotalComputationUsed: chunk.TotalComputationUsed, - NumberOfTransactions: uint16(chunk.NumberOfTransactions), - Index: chunk.Index, - EndState: flow.BytesToStateCommitment(chunk.EndState), - } - } + return convert.MessageToExecutionResult(er.ExecutionResult) +} - for i, serviceEvent := range er.ExecutionResult.ServiceEvents { - serviceEvents[i] = &flow.ServiceEvent{ - Type: serviceEvent.Type, - Payload: serviceEvent.Payload, - } +func (c *BaseClient) GetExecutionResultByID(ctx context.Context, id flow.Identifier, opts ...grpc.CallOption) (*flow.ExecutionResult, error) { + er, err := c.rpcClient.GetExecutionResultByID(ctx, &access.GetExecutionResultByIDRequest{ + Id: convert.IdentifierToMessage(id), + }, opts...) + if err != nil { + return nil, newRPCError(err) } - return &flow.ExecutionResult{ - PreviousResultID: flow.BytesToID(er.ExecutionResult.PreviousResultId), - BlockID: flow.BytesToID(er.ExecutionResult.BlockId), - Chunks: chunks, - ServiceEvents: serviceEvents, - }, nil + return convert.MessageToExecutionResult(er.ExecutionResult) } func (c *BaseClient) GetExecutionDataByBlockID( diff --git a/access/grpc/grpc_test.go b/access/grpc/grpc_test.go index d818f898e..8287b0ef4 100644 --- a/access/grpc/grpc_test.go +++ b/access/grpc/grpc_test.go @@ -1233,13 +1233,103 @@ func TestClient_GetExecutionResultForBlockID(t *testing.T) { })) - t.Run("Internal error", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { - rpc.On("GetLatestProtocolStateSnapshot", ctx, mock.Anything). - Return(nil, errInternal) + t.Run("Not found error", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + blockId := ids.New() - _, err := c.GetLatestProtocolStateSnapshot(ctx) + rpc.On("GetExecutionResultForBlockID", ctx, &access.GetExecutionResultForBlockIDRequest{ + BlockId: blockId.Bytes(), + }).Return(nil, errNotFound) + + res, err := c.GetExecutionResultForBlockID(ctx, blockId) assert.Error(t, err) - assert.Equal(t, codes.Internal, status.Code(err)) + assert.Nil(t, res) + assert.Equal(t, codes.NotFound, status.Code(err)) + })) +} + +func TestClient_GetExecutionResultByID(t *testing.T) { + ids := test.IdentifierGenerator() + t.Run("Success", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + blockID := ids.New() + executionResult := &entities.ExecutionResult{ + PreviousResultId: ids.New().Bytes(), + BlockId: blockID.Bytes(), + Chunks: []*entities.Chunk{ + { + CollectionIndex: 0, + StartState: ids.New().Bytes(), + EventCollection: ids.New().Bytes(), + BlockId: blockID.Bytes(), + TotalComputationUsed: 22, + NumberOfTransactions: 33, + Index: 0, + EndState: ids.New().Bytes(), + }, + { + CollectionIndex: 1, + StartState: ids.New().Bytes(), + EventCollection: ids.New().Bytes(), + BlockId: blockID.Bytes(), + TotalComputationUsed: 222, + NumberOfTransactions: 333, + Index: 1, + EndState: ids.New().Bytes(), + }, + }, + ServiceEvents: []*entities.ServiceEvent{ + { + Type: "serviceEvent", + Payload: []byte("{\"whatever\":21}"), + }, + }, + } + result := &access.ExecutionResultByIDResponse{ + ExecutionResult: executionResult, + } + rpc.On("GetExecutionResultByID", ctx, &access.GetExecutionResultByIDRequest{ + Id: blockID.Bytes(), + }).Return(result, nil) + + res, err := c.GetExecutionResultByID(ctx, blockID) + assert.NoError(t, err) + + require.NotNil(t, res) + + require.Len(t, res.Chunks, len(executionResult.Chunks)) + require.Len(t, res.ServiceEvents, len(executionResult.ServiceEvents)) + + assert.Equal(t, res.BlockID.Bytes(), executionResult.BlockId) + assert.Equal(t, res.PreviousResultID.Bytes(), executionResult.PreviousResultId) + + for i, chunk := range res.Chunks { + assert.Equal(t, chunk.BlockID[:], executionResult.Chunks[i].BlockId) + assert.Equal(t, chunk.Index, executionResult.Chunks[i].Index) + assert.Equal(t, uint32(chunk.CollectionIndex), executionResult.Chunks[i].CollectionIndex) + assert.Equal(t, chunk.StartState[:], executionResult.Chunks[i].StartState) + assert.Equal(t, []byte(chunk.EventCollection), executionResult.Chunks[i].EventCollection) + assert.Equal(t, chunk.TotalComputationUsed, executionResult.Chunks[i].TotalComputationUsed) + assert.Equal(t, uint32(chunk.NumberOfTransactions), executionResult.Chunks[i].NumberOfTransactions) + assert.Equal(t, chunk.EndState[:], executionResult.Chunks[i].EndState) + } + + for i, serviceEvent := range res.ServiceEvents { + assert.Equal(t, serviceEvent.Type, executionResult.ServiceEvents[i].Type) + assert.Equal(t, serviceEvent.Payload, executionResult.ServiceEvents[i].Payload) + } + + })) + + t.Run("Not found error", clientTest(func(t *testing.T, ctx context.Context, rpc *mocks.MockRPCClient, c *BaseClient) { + id := ids.New() + + rpc.On("GetExecutionResultByID", ctx, &access.GetExecutionResultByIDRequest{ + Id: id.Bytes(), + }).Return(nil, errNotFound) + + res, err := c.GetExecutionResultByID(ctx, id) + assert.Error(t, err) + assert.Nil(t, res) + assert.Equal(t, codes.NotFound, status.Code(err)) })) } diff --git a/examples/go.mod b/examples/go.mod index b1c8aae8f..03a20899a 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -7,7 +7,7 @@ toolchain go1.22.4 replace github.com/onflow/flow-go-sdk => ../ require ( - github.com/onflow/cadence v1.0.0-preview.38 + github.com/onflow/cadence v1.0.0-preview.52 github.com/onflow/flow-cli/flowkit v1.11.0 github.com/onflow/flow-go-sdk v0.41.17 github.com/spf13/afero v1.11.0 @@ -41,7 +41,7 @@ require ( github.com/logrusorgru/aurora/v4 v4.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/onflow/atree v0.7.0-rc.2 // indirect + github.com/onflow/atree v0.8.0-rc.6 // indirect github.com/onflow/crypto v0.25.1 // indirect github.com/onflow/flow/protobuf/go/flow v0.4.3 // indirect github.com/onflow/sdks v0.6.0-preview.1 // indirect diff --git a/examples/go.sum b/examples/go.sum index cbdeadaee..262eb6949 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -104,6 +104,7 @@ github.com/onflow/atree v0.6.0/go.mod h1:gBHU0M05qCbv9NN0kijLWMgC47gHVNBIp4KmsVF github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/atree v0.6.1-0.20240429171449-cb486ceb1f9c/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= +github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v0.42.7 h1:Qp9VYX901saO7wPwF/rwV4cMS+0mfWxnm9EqbYElYy4= github.com/onflow/cadence v0.42.7/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= @@ -115,6 +116,7 @@ github.com/onflow/cadence v1.0.0-preview.31/go.mod h1:3LM1VgE9HkJ815whY/F0LYWULw github.com/onflow/cadence v1.0.0-preview.35/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/cadence v1.0.0-preview.36/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= github.com/onflow/cadence v1.0.0-preview.38/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0= +github.com/onflow/cadence v1.0.0-preview.52/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI=