Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into feature/stable-cadence #26

Merged
merged 14 commits into from
Mar 8, 2024
Merged
4 changes: 4 additions & 0 deletions flowkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ func (f *Flowkit) Ping() error {
return f.gateway.Ping()
}

func (f *Flowkit) WaitServer(ctx context.Context) error {
return f.gateway.WaitServer(ctx)
}

// GetAccount fetches account on the Flow network.
func (f *Flowkit) GetAccount(ctx context.Context, address flow.Address) (*flow.Account, error) {
return f.gateway.GetAccount(ctx, address)
Expand Down
4 changes: 4 additions & 0 deletions gateway/emulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ func (g *EmulatorGateway) Ping() error {
return nil
}

func (g *EmulatorGateway) WaitServer(ctx context.Context) error {
return nil
}

type scriptQuery struct {
id flow.Identifier
height uint64
Expand Down
1 change: 1 addition & 0 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ type Gateway interface {
GetCollection(context.Context, flow.Identifier) (*flow.Collection, error)
GetLatestProtocolStateSnapshot(context.Context) ([]byte, error)
Ping() error
WaitServer(context.Context) error
SecureConnection() bool
}
4 changes: 4 additions & 0 deletions gateway/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ func (g *GrpcGateway) Ping() error {
return g.client.Ping(ctx)
}

func (g *GrpcGateway) WaitServer(ctx context.Context) error {
return g.client.WaitServer(ctx)
}

// SecureConnection is used to log warning if a service should be using a secure client but is not
func (g *GrpcGateway) SecureConnection() bool {
return g.secureClient
Expand Down
18 changes: 18 additions & 0 deletions gateway/mocks/Gateway.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ require (
github.com/gosuri/uilive v0.0.4
github.com/invopop/jsonschema v0.7.0
github.com/lmars/go-slip10 v0.0.0-20190606092855-400ba44fee12
github.com/onflow/cadence v1.0.0-M8
github.com/onflow/crypto v0.25.0
github.com/onflow/cadence v1.0.0-M9
github.com/onflow/flow-emulator v1.0.0-M7
github.com/onflow/flow-go v0.34.0-crescendo-preview.1.0.20240222213538-3677206d445c
github.com/onflow/flow-go-sdk v1.0.0-M5
github.com/onflow/flow-go-sdk v1.0.0-M8
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.29.0
github.com/spf13/afero v1.10.0
Expand Down Expand Up @@ -136,6 +135,7 @@ require (
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect
github.com/onflow/crypto v0.25.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7 // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs
github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8=
github.com/onflow/cadence v1.0.0-M8 h1:ioQ7TyhpsIaImAC7Xn2r8kIgIBdimvyuWeKlGfRxWB8=
github.com/onflow/cadence v1.0.0-M8/go.mod h1:a4mccDU90hmuxCLUFzs9J/ANG/rYbFa36h4Z0bBAqNU=
github.com/onflow/cadence v1.0.0-M9 h1:hYqh6iok2X+QEyAlvoEY1k57EV7Yt8+Iz5+lGvjey3o=
github.com/onflow/cadence v1.0.0-M9/go.mod h1:a4mccDU90hmuxCLUFzs9J/ANG/rYbFa36h4Z0bBAqNU=
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/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 h1:OI/4F2NK/X/4x3dTUFFDGtuOsSa9pX+jjBeSEcBrY/M=
Expand All @@ -1859,6 +1861,8 @@ github.com/onflow/flow-go v0.34.0-crescendo-preview.1.0.20240222213538-3677206d4
github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo=
github.com/onflow/flow-go-sdk v1.0.0-M5 h1:R86DQQfXS3z8O6AShAaUNbkPOM7lOwcTk06cofdVEsk=
github.com/onflow/flow-go-sdk v1.0.0-M5/go.mod h1:aXSavLzoRlz5FiMjcI7p5QhihWScGctxydzf4dv/avo=
github.com/onflow/flow-go-sdk v1.0.0-M8 h1:jnWA6X29sZlMsrIjdxoEkBAJsZBazXTcQJ/wPw1ZbfU=
github.com/onflow/flow-go-sdk v1.0.0-M8/go.mod h1:qFy2LF0DKfYsEnyEaIxD0frA/zAMc5hURbnqTrSZBjA=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6 h1:/2vvjKkWG/3cKP3IpgiGNqXi0yskn4GmNTjmeCwMoz8=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE=
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
Expand Down
19 changes: 19 additions & 0 deletions mocks/Services.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions services.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
type Services interface {
Network() config.Network
Ping() error
WaitServer(context.Context) error
Gateway() gateway.Gateway
SetLogger(output.Logger)

Expand Down
Loading