Skip to content

Commit

Permalink
Merge pull request #10 from onflow/auto-update-onflow-cadence-v1.0.0-M6
Browse files Browse the repository at this point in the history
Update to Cadence v1.0.0-M6
  • Loading branch information
ianthpun authored Feb 14, 2024
2 parents 1f3bc1b + 426cf46 commit 095ba29
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 72 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [main]
branches:
- master
- 'feature/**'
pull_request:
branches: [main]
branches:
- master
- 'feature/**'

env:
GO_VERSION: '1.20'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

jobs:
test:
Expand All @@ -17,7 +26,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 install-tools
Expand All @@ -39,7 +48,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: ${{ env.GO_VERSION }}
- name: generate
run: make generate
- uses: golangci/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MIXPANEL_PROJECT_TOKEN := 3fae49de272be1ceb8cf34119f747073

.PHONY: test
test:
GO111MODULE=on go test -coverprofile=$(COVER_PROFILE) $(if $(JSON_OUTPUT),-json,) ./...
GO111MODULE=on go test -v -coverprofile=$(COVER_PROFILE) $(if $(JSON_OUTPUT),-json,) ./...

.PHONY: install-tools
install-tools:
Expand All @@ -35,7 +35,7 @@ generate-schema:

.PHONY: check-schema
check-schema:
go run ./cmd/flow-schema/flow-schema.go --verify=true ./schema.json
go run ./cmd/flow-schema/flow-schema.go --verify=true ./schema.json

.PHONY: check-tidy
check-tidy:
Expand All @@ -58,4 +58,4 @@ ifeq ($(COVER), true)
gocov-html cover.json > index.html
# coverage.zip will automatically be picked up by teamcity
gozip -c coverage.zip index.html
endif
endif
4 changes: 2 additions & 2 deletions config/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ func TestAccounts_Remove(t *testing.T) {
accounts := Accounts{acc1, acc2, acc3}

accounts.Remove("account2")
assert.Equal(t, len(accounts), 2)
assert.Len(t, accounts, 2)

_, err := accounts.ByName("account2")
assert.Error(t, err)

accounts.Remove("account4")
assert.Equal(t, len(accounts), 2)
assert.Len(t, accounts, 2)
}
8 changes: 4 additions & 4 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ func Test_GetNetworkByNameComplex(t *testing.T) {

network, err = conf.Networks.ByName("testnet")
assert.NoError(t, err)
assert.Equal(t, network.Host, "access.devnet.nodes.onflow.org:9000")
assert.Equal(t, network.Key, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd")
assert.Equal(t, "access.devnet.nodes.onflow.org:9000", network.Host)
assert.Equal(t, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd", network.Key)
}

func TestConfig_Validate(t *testing.T) {
Expand Down Expand Up @@ -323,8 +323,8 @@ func TestConfig_Validate(t *testing.T) {
func Test_DefaultConfig(t *testing.T) {
cfg := config.Default()
assert.Len(t, cfg.Emulators, 1)
assert.Equal(t, cfg.Emulators[0].Name, "default")
assert.Equal(t, cfg.Emulators[0].ServiceAccount, "emulator-account")
assert.Equal(t, "default", cfg.Emulators[0].Name)
assert.Equal(t, "emulator-account", cfg.Emulators[0].ServiceAccount)
assert.Len(t, cfg.Networks, 4)
assert.Equal(t, "emulator", cfg.Networks[0].Name)
assert.Equal(t, "testing", cfg.Networks[1].Name)
Expand Down
4 changes: 2 additions & 2 deletions config/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func Test_Deployment(t *testing.T) {

network := deployments.ByNetwork("net")
assert.Len(t, network, 2)
assert.Equal(t, network[0].Account, "acc")
assert.Equal(t, network[1].Account, "acc2")
assert.Equal(t, "acc", network[0].Account)
assert.Equal(t, "acc2", network[1].Account)
})

t.Run("Remove non-existing deployment", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion config/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func Test_JSONEnv(t *testing.T) {
conf, loadErr := composer.Load([]string{"test2-flow.json"})

assert.NoError(t, loadErr)
assert.Equal(t, 2, len(conf.Accounts))
assert.Len(t, conf.Accounts, 2)

acc1, _ := conf.Accounts.ByName("advanced")
assert.Equal(t, fmt.Sprintf("0x%s", key2), acc1.Key.PrivateKey.String())
Expand Down
4 changes: 2 additions & 2 deletions config/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestNetworks_AddOrUpdate(t *testing.T) {

// Test adding a new network.
networks.AddOrUpdate(Network{Name: "flow-testnet", Host: "localhost:3570", Key: "flow-testnet-key"})
assert.Equal(t, 2, len(networks))
assert.Len(t, networks, 2)

// Test updating an existing network.
networks.AddOrUpdate(Network{Name: "flow-local", Host: "localhost:3580", Key: "flow-local-key-updated"})
Expand All @@ -70,7 +70,7 @@ func TestNetworks_Remove(t *testing.T) {
// Test removing an existing network.
err := networks.Remove("flow-local")
assert.NoError(t, err)
assert.Equal(t, 1, len(networks))
assert.Len(t, networks, 1)

// Test removing a non-existent network.
err = networks.Remove("flow-mainnet")
Expand Down
32 changes: 16 additions & 16 deletions flowkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ func TestAccounts(t *testing.T) {
ctx,
serviceAcc,
[]accounts.PublicKey{{
Public: pubKey,
Weight: flow.AccountKeyWeightThreshold,
SigAlgo: crypto.ECDSA_P256,
Public: pubKey,
Weight: flow.AccountKeyWeightThreshold,
SigAlgo: crypto.ECDSA_P256,
HashAlgo: crypto.SHA3_256,
}},
)
Expand Down Expand Up @@ -706,8 +706,8 @@ func TestBlocksGet_Integration(t *testing.T) {
block, err := flowkit.GetBlock(ctx, BlockQuery{Latest: true})

assert.NoError(t, err)
assert.Equal(t, block.Height, uint64(0))
assert.Equal(t, block.ID.String(), "03d40910037d575d52831647b39814f445bc8cc7ba8653286c0eb1473778c34f")
assert.Equal(t, uint64(0), block.Height)
assert.Equal(t, "a20c602fbee6fe4491e116403e3258e7b7924609696ab2edb9a93eed2c29e445", block.ID.String())
})
}

Expand Down Expand Up @@ -1526,9 +1526,9 @@ func setupAccount(state *State, flowkit Flowkit, account *accounts.Account) {
ctx,
srv,
[]accounts.PublicKey{{
Public: (*pk).PublicKey(),
Weight: flow.AccountKeyWeightThreshold,
SigAlgo: key.SigAlgo(),
Public: (*pk).PublicKey(),
Weight: flow.AccountKeyWeightThreshold,
SigAlgo: key.SigAlgo(),
HashAlgo: key.HashAlgo(),
}},
)
Expand Down Expand Up @@ -1743,9 +1743,9 @@ func TestTransactions_Integration(t *testing.T) {
tx, err := flowkit.BuildTransaction(
ctx,
transactions.AddressesRoles{
Proposer: signer,
Proposer: signer,
Authorizers: []flow.Address{signer},
Payer: signer,
Payer: signer,
},
srvAcc.Key.Index(),
Script{
Expand Down Expand Up @@ -1777,9 +1777,9 @@ func TestTransactions_Integration(t *testing.T) {
tx, err := flowkit.BuildTransaction(
ctx,
transactions.AddressesRoles{
Proposer: a.Address,
Proposer: a.Address,
Authorizers: nil,
Payer: a.Address,
Payer: a.Address,
},
0,
Script{
Expand Down Expand Up @@ -1816,9 +1816,9 @@ func TestTransactions_Integration(t *testing.T) {
tx, err := flowkit.BuildTransaction(
ctx,
transactions.AddressesRoles{
Proposer: a.Address,
Proposer: a.Address,
Authorizers: []flow.Address{a.Address},
Payer: a.Address,
Payer: a.Address,
},
0,
Script{
Expand Down Expand Up @@ -1855,9 +1855,9 @@ func TestTransactions_Integration(t *testing.T) {
tx, err := flowkit.BuildTransaction(
ctx,
transactions.AddressesRoles{
Proposer: a.Address,
Proposer: a.Address,
Authorizers: []flow.Address{a.Address},
Payer: a.Address,
Payer: a.Address,
},
0,
Script{
Expand Down
24 changes: 10 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ 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-M4
github.com/onflow/cadence v1.0.0-M6
github.com/onflow/crypto v0.25.0
github.com/onflow/flow-emulator v1.0.0-M1
github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f
github.com/onflow/flow-go-sdk v1.0.0-M1
github.com/onflow/flow-emulator v1.0.0-M4
github.com/onflow/flow-go v0.33.2-0.20240213000303-9fb4c62e8291
github.com/onflow/flow-go-sdk v1.0.0-M3
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 @@ -120,7 +120,7 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand All @@ -136,11 +136,11 @@ 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/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // 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
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.7 // indirect
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
Expand Down Expand Up @@ -216,7 +216,3 @@ require (
modernc.org/sqlite v1.28.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/onflow/flow-core-contracts/lib/go/contracts => github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d

replace github.com/onflow/flow-core-contracts/lib/go/templates => github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d
38 changes: 20 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1746,8 +1746,9 @@ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
Expand Down Expand Up @@ -1835,27 +1836,28 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f h1:Z8/PgTqOgOg02MTRpTBYO2k16FE6z4wEOtaC2WBR9Xo=
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8=
github.com/onflow/cadence v1.0.0-M4 h1:/nt3j7vpYDxuI0ghIgAJrb2R01ijvJYZLAkKt+zbpTY=
github.com/onflow/cadence v1.0.0-M4/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8=
github.com/onflow/cadence v1.0.0-M6 h1:3Y5xFrmOGMCAaHKNjEwCbnDFlkwZHDzeOtrcX9beWMA=
github.com/onflow/cadence v1.0.0-M6/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.1-0.20240125214229-b7a95136dd0d h1:Afcfk/9jAQZ1v5PLGdP68FG/0yPPM60fn9Eq8ChBGS0=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:Ts/HN+N0RaYJ6oPCqR1JPaMVFiVaMdKTSUH4OdSjjs0=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d h1:IQJpP3VLLjT4R8ItBpr+Mmp0IOnC/8iBcM0/67JNB9c=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg=
github.com/onflow/flow-emulator v1.0.0-M1 h1:0hBEmvm73F+5HhN5ugkOP3UyN+Ea9yGWflEmoeGzgdw=
github.com/onflow/flow-emulator v1.0.0-M1/go.mod h1:JFJCeQVyhCQVD2Tq4QhctIXK6j5U6aU15yoEwMJt5AQ=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 h1:8iKk5RuFvhe7NQyAO3c+xiVvv38RB/yopHdWxp4AbL8=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f h1:F1y95CpteZn0i4v0FDGjKiqI13Xlir3hX4x0C1xMRoc=
github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f/go.mod h1:9q+c+fuTpc/emueM/2bI/Ih2jw3V+9WS3Eu+pWBuLW0=
github.com/onflow/flow-go-sdk v1.0.0-M1 h1:mke/ebYwNRRWPZqcwCV56Alx0A8psew43ZbSEUQ4TL8=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 h1:OI/4F2NK/X/4x3dTUFFDGtuOsSa9pX+jjBeSEcBrY/M=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7/go.mod h1:GK+Ik1K3L3v8xmHmRQv5yxJz81lYhdYSNm0PQ63Xrws=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7 h1:WAx8ftVz1BeXiKvQ9gLKEf1J3NBWK26Pbczd0iH4C6I=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg=
github.com/onflow/flow-emulator v1.0.0-M4 h1:w3CygAycA9WEUaICGbbavUW0kh9yNfkmSz0WEnS1tcI=
github.com/onflow/flow-emulator v1.0.0-M4/go.mod h1:G+0/cyxeqsZ3SnJPrl0dnbtBooz05v077pWqHBgpHBU=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0 h1:u6/YcUvO8jU0f3Evb/6agzXqeOo+VbL2a3mmj/5ifRs=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-go v0.33.2-0.20240213000303-9fb4c62e8291 h1:bQP9/SbnhTL8A9778rCnyyxkpZ43WRteLdfsUG9fYg0=
github.com/onflow/flow-go v0.33.2-0.20240213000303-9fb4c62e8291/go.mod h1:u66wuOAEEo/bc/d4P2Z2QFRXV8xMh5/MVkpuI9MLrDs=
github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad h1:I6LD9BOsilGbiqhGjP86FIIXJe0YdUz75d/oWdHFzDI=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE=
github.com/onflow/flow-go-sdk v1.0.0-M3 h1:8ZWn+dmJGoFJ1jTHxS02rVftGwU+2dJkhXpBzvSBWKs=
github.com/onflow/flow-go-sdk v1.0.0-M3/go.mod h1:MZi3kMUCGDek4Yjlg/g57f2QO3M0tQeDn9GVMFJYReQ=
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=
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A=
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/flow/protobuf/go/flow v0.3.7 h1:+6sBdlE/u4ZMTVB9U1lA6Xn2Bd48lOOX96Bv9dNubsk=
github.com/onflow/flow/protobuf/go/flow v0.3.7/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba h1:rIehuhO6bj4FkwE4VzwEjX7MoAlOhUJENBJLqDqVxAo=
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU=
github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d h1:gAEqYPn3DS83rHIKEpsajnppVD1+zwuYPFyeDVFaQvg=
Expand Down
2 changes: 1 addition & 1 deletion state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func Test_GetContractsByNameComplex(t *testing.T) {

contracts, err := p.DeploymentContractsByNetwork(config.EmulatorNetwork)
require.NoError(t, err)
require.Equal(t, 7, len(contracts))
require.Len(t, contracts, 7)

//sort contracts by name so tests are deterministic
sort.Slice(contracts, func(i, j int) bool {
Expand Down
6 changes: 3 additions & 3 deletions tests/testnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ func Test_Foo(t *testing.T) {
require.NoError(t, err)

out, _ := rw.ReadFile("test")
assert.Equal(t, out, []byte("foo"))
assert.Equal(t, []byte("foo"), out)

err = rw.WriteFile("test", []byte("bar"), 0644)
require.NoError(t, err)

out, _ = st.ReadFile("test")
assert.Equal(t, out, []byte("bar"))
assert.Equal(t, []byte("bar"), out)
}

func Test_Testnet_ProjectDeploy(t *testing.T) {
Expand Down Expand Up @@ -216,4 +216,4 @@ func Test_Testnet_ProjectDeploy(t *testing.T) {
assert.Equal(t, ContractB.Name, contracts[1].Name)
assert.Equal(t, ContractB.Source, updated)
assert.Equal(t, ContractC.Name, contracts[2].Name)
}
}

0 comments on commit 095ba29

Please sign in to comment.