Skip to content

Commit

Permalink
Merge pull request #689 from onflow/auto-update-onflow-cadence-v1.0.0…
Browse files Browse the repository at this point in the history
…-preview.35
  • Loading branch information
turbolent authored Jun 25, 2024
2 parents 66c4b2e + 83b24b1 commit 9cfed2f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 15 deletions.
6 changes: 4 additions & 2 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/onflow/flow-go-sdk/examples

go 1.21.0
go 1.22

toolchain go1.22.4

replace github.com/onflow/flow-go-sdk => ../

require (
github.com/onflow/cadence v1.0.0-preview.31
github.com/onflow/cadence v1.0.0-preview.35
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
Expand Down
1 change: 1 addition & 0 deletions examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ github.com/onflow/cadence v1.0.0-preview.25/go.mod h1:fGhLBbuEmv5rh48qv0ZS0tUz53
github.com/onflow/cadence v1.0.0-preview.26/go.mod h1:fGhLBbuEmv5rh48qv0ZS0tUz53gxWsHpB4dPsF09h6E=
github.com/onflow/cadence v1.0.0-preview.29/go.mod h1:3LM1VgE9HkJ815whY/F0LYWULwJa8p2nJiKyIIxpGAE=
github.com/onflow/cadence v1.0.0-preview.31/go.mod h1:3LM1VgE9HkJ815whY/F0LYWULwJa8p2nJiKyIIxpGAE=
github.com/onflow/cadence v1.0.0-preview.35/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0=
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=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/aws/aws-sdk-go-v2 v1.27.0
github.com/aws/aws-sdk-go-v2/config v1.27.15
github.com/aws/aws-sdk-go-v2/service/kms v1.31.0
github.com/onflow/cadence v1.0.0-preview.34
github.com/onflow/cadence v1.0.0-preview.35
github.com/onflow/crypto v0.25.1
github.com/onflow/flow/protobuf/go/flow v0.4.3
github.com/onflow/go-ethereum v1.13.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/onflow/atree v0.7.0-rc.2 h1:mZmVrl/zPlfI44EjV3FdR2QwIqT8nz1sCONUBFcML/U=
github.com/onflow/atree v0.7.0-rc.2/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/cadence v1.0.0-preview.34 h1:MJSli75W6LJVUqSx/tq4MQe64H1+EcQBD/sNgpOO4jE=
github.com/onflow/cadence v1.0.0-preview.34/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0=
github.com/onflow/cadence v1.0.0-preview.35 h1:HZgt/9Foa6sCSH9SNaIFUSXK6q2ZxETg0ivsZbf+hhU=
github.com/onflow/cadence v1.0.0-preview.35/go.mod h1:jOwvPSSLTr9TvaKMs7KKiBYMmpdpNNAFxBsjMlrqVD0=
github.com/onflow/crypto v0.25.1 h1:0txy2PKPMM873JbpxQNbJmuOJtD56bfs48RQfm0ts5A=
github.com/onflow/crypto v0.25.1/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI=
github.com/onflow/flow/protobuf/go/flow v0.4.3 h1:gdY7Ftto8dtU+0wI+6ZgW4oE+z0DSDUMIDwVx8mqae8=
Expand Down
11 changes: 6 additions & 5 deletions templates/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ func AccountKeyToCadenceCryptoKey(key *flow.AccountKey) (cadence.Value, error) {
hash,
weight,
cadence.NewBool(false),
}).WithType(&cadence.StructType{
Location: common.IdentifierLocation("Crypto"),
QualifiedIdentifier: "Crypto.KeyListEntry",
Fields: []cadence.Field{{
}).WithType(cadence.NewStructType(
common.IdentifierLocation("Crypto"),
"Crypto.KeyListEntry",
[]cadence.Field{{
Identifier: "keyIndex",
Type: cadence.IntType,
}, {
Expand All @@ -169,7 +169,8 @@ func AccountKeyToCadenceCryptoKey(key *flow.AccountKey) (cadence.Value, error) {
Identifier: "isRevoked",
Type: cadence.BoolType,
}},
}), nil
nil,
)), nil
}

// CreateAccount generates a transactions that creates a new account.
Expand Down
11 changes: 6 additions & 5 deletions test/entities.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ func (g *Events) New() flow.Event {

location := common.StringLocation("test")

testEventType := &cadence.EventType{
Location: location,
QualifiedIdentifier: identifier,
Fields: []cadence.Field{
testEventType := cadence.NewEventType(
location,
identifier,
[]cadence.Field{
{
Identifier: "a",
Type: cadence.IntType,
Expand All @@ -274,7 +274,8 @@ func (g *Events) New() flow.Event {
Type: cadence.StringType,
},
},
}
nil,
)

testEvent := cadence.NewEvent(
[]cadence.Value{
Expand Down

0 comments on commit 9cfed2f

Please sign in to comment.