Skip to content

Commit

Permalink
Merge pull request #1167 from onflow/supun/stable-cadence
Browse files Browse the repository at this point in the history
Update to latest stable cadence
  • Loading branch information
SupunS authored Aug 29, 2023
2 parents aead014 + cdfffa1 commit 8bcb4f3
Show file tree
Hide file tree
Showing 18 changed files with 1,943 additions and 271 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ name: CI
# events but only for the master branch
on:
push:
branches: [ master ]
branches:
- master
- 'feature/**'
pull_request:
branches: [ master ]
branches:
- master
- 'feature/**'

jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ Key 0 Public Key c8a2a318b9099cc6c872a0ec3dcd9f59d17837e4ffd6cd8
Hash Algorithm SHA3_256
Code
pub contract Foo {
pub var bar: String
access(all) contract Foo {
access(all) var bar: String
init() {
self.bar = "Hello, World!"
Expand Down
6 changes: 3 additions & 3 deletions flowkit/arguments/arguments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func Test_ParseWithoutType(t *testing.T) {
args, err := ParseWithoutType(
[]string{literal},
[]byte(fmt.Sprintf(
`pub fun main(test: %s) {}`,
`access(all) fun main(test: %s) {}`,
testCase.Type.ID(),
)),
"",
Expand All @@ -217,8 +217,8 @@ func Test_ParseWithoutType(t *testing.T) {
t.Parallel()

template := map[string]string{
"script": `pub fun main(foo: String): Void {}`,
"contract": `pub contract Foo { init(foo: String) {} }`,
"script": `access(all) fun main(foo: String): Void {}`,
"contract": `access(all) contract Foo { init(foo: String) {} }`,
"transaction": `transaction(foo: String) {}`,
}

Expand Down
4 changes: 2 additions & 2 deletions flowkit/flowkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ func TestAccountsAddContract_Integration(t *testing.T) {
assert.NoError(t, err)

updated := tests.ContractSimple
updated.Source = []byte(`pub contract Simple { init() {} }`)
updated.Source = []byte(`access(all) contract Simple { init() {} }`)
_, _, err = flowkit.AddContract(
ctx,
srvAcc,
Expand Down Expand Up @@ -1333,7 +1333,7 @@ func TestScripts(t *testing.T) {
_, flowkit, gw := setup()

gw.ExecuteScript.Run(func(args mock.Arguments) {
assert.Len(t, string(args.Get(0).([]byte)), 78)
assert.Len(t, string(args.Get(0).([]byte)), 86)
assert.Equal(t, "\"Foo\"", args.Get(1).([]cadence.Value)[0].String())
gw.ExecuteScript.Return(cadence.MustConvertValue(""), nil)
})
Expand Down
2 changes: 1 addition & 1 deletion flowkit/gateway/mocks/Gateway.go

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

23 changes: 13 additions & 10 deletions flowkit/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,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 v0.40.0
github.com/onflow/flow-emulator v0.54.0
github.com/onflow/flow-go v0.31.1-0.20230808172820-f074502a67e3
github.com/onflow/flow-go-sdk v0.41.10
github.com/onflow/cadence v0.39.13-stable-cadence.0.20230815215130-fc15617946a1
github.com/onflow/flow-emulator v0.54.1-0.20230824191334-33ca4ff2621a
github.com/onflow/flow-go v0.31.1-0.20230825164918-09c1887078ac
github.com/onflow/flow-go-sdk v0.41.10-0.20230815215544-c3e9ce914aee
github.com/onflow/flow-go/crypto v0.24.9
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.29.0
Expand All @@ -30,9 +30,11 @@ require (
cloud.google.com/go/kms v1.10.1 // indirect
github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect
github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect
github.com/SaveTheRbtz/mph v0.1.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.5.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -84,7 +86,8 @@ require (
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // 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.16.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
Expand All @@ -107,12 +110,11 @@ require (
github.com/multiformats/go-multistream v0.4.1 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/onflow/atree v0.6.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4-0.20230703193002-53362441b57d // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v1.2.3 // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.0 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4-0.20230822191436-8a95802475f4 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v1.2.4-0.20230808220007-f00e74ca675b // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20230818200853-ab1b03e98a95 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20230818200521-3acffe2472a3 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20230628215638-83439d22e0ce // 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/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
Expand Down Expand Up @@ -144,6 +146,7 @@ require (
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect
Expand Down
Loading

0 comments on commit 8bcb4f3

Please sign in to comment.