onflow / flixkit-go

Apache License 2.0
0 stars 7 forks source link

Convert FLIX to Cadence struct #44

Closed BoiseITGuru closed 7 months ago

BoiseITGuru commented 7 months ago

Tooling to convert FLIX to a cadence struct value

BoiseITGuru commented 7 months ago

Adding underflow seem to miss match versions of one of the packages causing the cadence types to become invalid

github.com/bjartek/underflow
../../../go/pkg/mod/github.com/bjartek/underflow@v0.1.0/cadence.go:231:15: undefined: cadence.PathCapability
../../../go/pkg/mod/github.com/bjartek/underflow@v0.1.0/cadence.go:311:19: cadence.AddressType (variable of type cadence.PrimitiveType) is not a type
# github.com/onflow/flow-go/model/flow
../../../go/pkg/mod/github.com/onflow/flow-go@v0.32.4-0.20231130134727-3c01c7f8966c/model/flow/identity.go:374:23: type IdentityOrder of less does not match inferred type func(a *Identity, b *Identity) int for func(a E, b E) int
../../../go/pkg/mod/github.com/onflow/flow-go@v0.32.4-0.20231130134727-3c01c7f8966c/model/flow/identity.go:380:33: type IdentityOrder of less does not match inferred type func(a *Identity, b *Identity) int for func(a E, b E) int
../../../go/pkg/mod/github.com/onflow/flow-go@v0.32.4-0.20231130134727-3c01c7f8966c/model/flow/identity.go:527:25: type func(a *Identity, b *Identity) bool of func(a, b *Identity) bool {…} does not match inferred type func(a *Identity, b *Identity) int for func(a E, b E) int
../../../go/pkg/mod/github.com/onflow/flow-go@v0.32.4-0.20231130134727-3c01c7f8966c/model/flow/sealing_segment.go:318:39: type func(lhs *Block, rhs *Block) bool of func(lhs, rhs *Block) bool {…} does not match inferred type func(a *Block, b *Block) int for func(a E, b E) int
# github.com/onflow/flow-go-sdk/test
../../../go/pkg/mod/github.com/onflow/flow-go-sdk@v0.41.17/test/entities.go:266:17: cadence.IntType (variable of type cadence.PrimitiveType) is not a type
../../../go/pkg/mod/github.com/onflow/flow-go-sdk@v0.41.17/test/entities.go:270:17: cadence.StringType (variable of type cadence.PrimitiveType) is not a type
# github.com/onflow/flow-go-sdk/templates
../../../go/pkg/mod/github.com/onflow/flow-go-sdk@v0.41.17/templates/accounts.go:157:16: cadence.IntType (variable of type cadence.PrimitiveType) is not a type
../../../go/pkg/mod/github.com/onflow/flow-go-sdk@v0.41.17/templates/accounts.go:166:16: cadence.UFix64Type (variable of type cadence.PrimitiveType) is not a type
../../../go/pkg/mod/github.com/onflow/flow-go-sdk@v0.41.17/templates/accounts.go:169:16: cadence.BoolType (variable of type cadence.PrimitiveType) is not a type
?       github.com/onflow/flixkit-go/internal/contracts [no test files]
?       github.com/onflow/flixkit-go/internal/templates [no test files]
?       github.com/onflow/flixkit-go/internal/v1    [no test files]
FAIL    github.com/onflow/flixkit-go/internal [build failed]
FAIL    github.com/onflow/flixkit-go/internal/v1_1 [build failed]
FAIL
bthaile commented 7 months ago

Might have better luck working off of feature/stable-cadence branch https://github.com/onflow/flixkit-go/tree/feature/stable-cadence

We are in a weird no-mans zone between now and cadence v1.0