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

Update to Cadence 1.0 #27

Merged
merged 55 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6361072
update to Cadence 1.0 RC1
turbolent Dec 19, 2023
06f824c
update core contract templates
turbolent Dec 19, 2023
d566cfd
Merge branch 'main' into bastian/update-stable-cadence
turbolent Jan 31, 2024
e9b8ac3
update to Cadence v1.0.0-M4
turbolent Jan 31, 2024
d6a3015
Merge pull request #35 from onflow/bastian/update-stable-cadence
turbolent Jan 31, 2024
cd4c454
Merge pull request #36 from onflow/bastian/update-cadence
turbolent Jan 31, 2024
35e5891
Update to Cadence v1.0.0-M7
turbolent Feb 14, 2024
1292ec5
Merge pull request #40 from onflow/auto-update-onflow-cadence-v1.0.0-M7
turbolent Feb 14, 2024
d6af9d1
switch to onflow/flowkit/v2
turbolent Feb 14, 2024
03b90f7
Merge pull request #42 from onflow/bastian/stable-cadence-flowkit-v2
turbolent Feb 14, 2024
46e8981
fix merge conflict, convert test cadence to v1.0, fix tests
bthaile Feb 15, 2024
7fcde4d
Update to Cadence v1.0.0-M7
turbolent Feb 20, 2024
eaab0d6
Merge pull request #43 from onflow/auto-update-onflow-cadence-v1.0.0-M7
turbolent Feb 20, 2024
7d4fc6a
fix issue where cadence 1.0 networks are mixed with old cadence netwo…
bthaile Feb 21, 2024
b66221b
upgrade flowkit v2
bthaile Feb 21, 2024
6e18a9e
Update to Cadence v1.0.0-M8
turbolent Feb 22, 2024
1dc086f
Merge pull request #46 from onflow/auto-update-onflow-cadence-v1.0.0-M8
turbolent Feb 22, 2024
e4906eb
Update to Cadence v1.0.0-preview.12
turbolent Mar 12, 2024
4755ffe
Merge pull request #48 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Mar 12, 2024
5028f05
Update to Cadence v1.0.0-preview.13
turbolent Mar 13, 2024
abaeff6
Merge pull request #49 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Mar 13, 2024
0dc328e
Update to Cadence v1.0.0-preview.15
SupunS Mar 18, 2024
94edf83
Merge pull request #51 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS Mar 18, 2024
c0113f4
Update to Cadence v1.0.0-preview.16
SupunS Mar 21, 2024
3046a7e
Merge pull request #52 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS Mar 21, 2024
4e22a1e
Update to Cadence v1.0.0-preview.18
SupunS Mar 28, 2024
44cc332
Merge pull request #53 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS Mar 28, 2024
7b8bbe0
Update to Cadence v1.0.0-preview.19
turbolent Apr 3, 2024
af95dd1
Merge branch 'main' into bastian/sync
turbolent Apr 3, 2024
5564f7a
Merge pull request #56 from onflow/bastian/sync
turbolent Apr 3, 2024
7abb791
Merge branch 'feature/stable-cadence' into auto-update-onflow-cadence…
turbolent Apr 3, 2024
2160428
Merge pull request #54 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Apr 3, 2024
ea811d2
add view resolver contract
bthaile Apr 18, 2024
d579487
update to filter networks when generating flix, update tests
bthaile Apr 18, 2024
e6a42b0
Update to Cadence v1.0.0-preview.22
turbolent Apr 26, 2024
1271c8b
Merge pull request #59 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Apr 26, 2024
7687902
Update to Cadence v1.0.0-preview.25
turbolent May 2, 2024
9428f4d
Merge pull request #61 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent May 2, 2024
17354b7
Update to alpha 19
chasefleming May 14, 2024
56b5088
Update
chasefleming May 14, 2024
9226b0f
Remove
chasefleming May 14, 2024
fcc4dc5
Merge pull request #64 from onflow/cf/update-flowkit-alpha-19
chasefleming May 14, 2024
6c9ee94
Update to Cadence v1.0.0-preview.29
SupunS May 17, 2024
4906b4f
Merge pull request #66 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS May 17, 2024
62ab08b
Update to Cadence v1.0.0-preview.30
turbolent May 30, 2024
47df5ff
Merge pull request #67 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent May 30, 2024
976f72c
update flowkit to 22
ianthpun May 31, 2024
b3c641d
Merge pull request #68 from onflow/ianthpun/update-flow-emu
ianthpun May 31, 2024
e3edd35
Update to Cadence v1.0.0-preview.32
turbolent Jun 4, 2024
c87ebef
Merge pull request #69 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Jun 4, 2024
136fcb2
Update to Cadence v1.0.0-preview.34
turbolent Jun 12, 2024
fe5e163
update to Go 1.22
turbolent Jun 12, 2024
ed82bfb
update golangci-lint
turbolent Jun 12, 2024
c149565
Merge pull request #70 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Jun 12, 2024
7b6837a
Merge branch 'main' into feature/stable-cadence
turbolent Jun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- main
- "feature/**"

env:
GO_VERSION: 1.22

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -21,7 +24,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: ${{ env.GO_VERSION }}
- name: Run tests
run: |
make tidy
Expand All @@ -38,10 +41,10 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- uses: golangci/golangci-lint-action@v3.7.0
go-version: ${{ env.GO_VERSION }}
- uses: golangci/golangci-lint-action@v6
with:
version: v1.52.2
version: v1.54
only-new-issues: true
skip-pkg-cache: true
args: --timeout=3m
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ tidy:

test:
@echo "Running tests..."
go test ./...
go test -v ./...
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fmt.Println(prettyJSON)
import "FlowToken"
transaction(amount: UFix64, to: Address) {
let vault: @FlowToken.Vault
prepare(signer: AuthAccount) {
prepare(signer: &Account) {
...
}
}
Expand Down Expand Up @@ -172,4 +172,4 @@ Notice: Nested structures in Cadence pragma will be supported in future, this wi
],
)
...
```
```
3 changes: 2 additions & 1 deletion flixkit/flix_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

"github.com/onflow/flixkit-go/internal"
"github.com/onflow/flowkit/v2/config"
)

type FlixService interface {
Expand All @@ -14,7 +15,7 @@ type FlixService interface {
// GenerateBinding returns the generated binding given the language
GetTemplateAndCreateBinding(ctx context.Context, templateName string, lang string, destFile string) (string, error)
// GenerateTemplate returns the generated raw template
CreateTemplate(ctx context.Context, contractInfos ContractInfos, code string, preFill string) (string, error)
CreateTemplate(ctx context.Context, contractInfos ContractInfos, code string, preFill string, networks []config.Network) (string, error)
}

// FlowInteractionTemplateCadence is the interface returned from Replacing imports, it provides helper methods to assist in executing the resulting Cadence.
Expand Down
113 changes: 62 additions & 51 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
module github.com/onflow/flixkit-go

go 1.20
go 1.22

toolchain go1.22.3

require (
github.com/ethereum/go-ethereum v1.13.10
github.com/hexops/autogold/v2 v2.2.1
github.com/onflow/cadence v0.42.10
github.com/onflow/flow-go-sdk v0.46.2
github.com/onflow/flowkit v1.18.0
github.com/onflow/go-ethereum v1.13.4
github.com/onflow/cadence v1.0.0-preview.34
github.com/onflow/flow-go-sdk v1.0.0-preview.36
github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.24
github.com/spf13/afero v1.10.0
github.com/stoewer/go-strcase v1.3.0
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.18.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.19.0
)

require (
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.24.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/kms v1.15.5 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go/kms v1.15.7 // indirect
cloud.google.com/go/storage v1.36.0 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -52,23 +57,24 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ef-ds/deque v1.0.4 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/ethereum/go-ethereum v1.13.10 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect
github.com/fxamacker/circlehash v0.3.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/glebarez/go-sqlite v1.21.1 // indirect
github.com/glebarez/go-sqlite v1.22.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
Expand All @@ -77,8 +83,7 @@ require (
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gosuri/uilive v0.0.4 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -89,24 +94,26 @@ require (
github.com/hexops/valast v1.4.4 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huandu/go-clone v1.6.0 // indirect
github.com/huandu/go-clone/generic v1.7.2 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/invopop/jsonschema v0.7.0 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/boxo v0.17.1-0.20240131173518-89bceff34bf1 // indirect
github.com/ipfs/go-block-format v0.2.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-datastore v0.6.0 // indirect
github.com/ipfs/go-ipfs-blockstore v1.3.0 // indirect
github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
github.com/ipfs/go-ipld-format v0.6.0 // indirect
github.com/ipfs/go-log v1.0.5 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/k0kubun/pp/v3 v3.2.0 // indirect
github.com/kevinburke/go-bindata v3.23.0+incompatible // indirect
github.com/k0kubun/pp v3.0.1+incompatible // indirect
github.com/kevinburke/go-bindata v3.24.0+incompatible // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/kr/pretty v0.3.1 // indirect
Expand Down Expand Up @@ -135,18 +142,19 @@ require (
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/nightlyone/lockfile v1.0.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/atree v0.6.0 // indirect
github.com/onflow/atree v0.7.0-rc.2 // indirect
github.com/onflow/crypto v0.25.1 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4-0.20231016154253-a00dbf7c061f // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v1.2.4-0.20231016154253-a00dbf7c061f // indirect
github.com/onflow/flow-emulator v0.62.1 // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230711213910-baad011d2b13 // indirect
github.com/onflow/flow-go v0.33.2-0.20240412174857-015156b297b5 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.0 // indirect
github.com/onflow/flow/protobuf/go/flow v0.4.0 // indirect
github.com/onflow/nft-storefront/lib/go/contracts v0.0.0-20221222181731-14b90207cead // indirect
github.com/onflow/sdks v0.5.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.1.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v1.0.0 // indirect
github.com/onflow/flow-emulator v1.0.0-preview.32 // indirect
github.com/onflow/flow-ft/lib/go/contracts v1.0.0 // indirect
github.com/onflow/flow-ft/lib/go/templates v1.0.0 // indirect
github.com/onflow/flow-go v0.35.14-crescendo-preview.27 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.2.1 // indirect
github.com/onflow/flow-nft/lib/go/templates v1.2.0 // indirect
github.com/onflow/flow/protobuf/go/flow v0.4.4 // indirect
github.com/onflow/go-ethereum v1.13.4 // indirect
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
Expand All @@ -171,7 +179,8 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
Expand All @@ -186,41 +195,43 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.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.16.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.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/api v0.151.0 // indirect
google.golang.org/api v0.162.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
modernc.org/libc v1.22.3 // indirect
modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.5.0 // indirect
modernc.org/sqlite v1.21.1 // indirect
modernc.org/libc v1.37.6 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.28.0 // indirect
mvdan.cc/gofumpt v0.5.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading
Loading