From 88ee3a247a5a727f09c160308774905861a157d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Thu, 27 Jun 2024 13:49:12 -0700 Subject: [PATCH 1/2] Update to Cadence v1.0.0-preview.35 --- test/go.mod | 14 +++++++------- test/go.sum | 27 ++++++++++++++------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/test/go.mod b/test/go.mod index 2f7617ca..b79f0832 100644 --- a/test/go.mod +++ b/test/go.mod @@ -5,10 +5,10 @@ go 1.22 require ( github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 github.com/onflow/atree v0.7.0-rc.2 - github.com/onflow/cadence v1.0.0-preview.34 - github.com/onflow/flow-emulator v1.0.0-preview.32 - github.com/onflow/flow-go v0.35.14-crescendo-preview.27 - github.com/onflow/flow-go-sdk v1.0.0-preview.36 + github.com/onflow/cadence v1.0.0-preview.35 + github.com/onflow/flow-emulator v1.0.0-preview.33 + github.com/onflow/flow-go v0.35.14-crescendo-preview.27.0.20240626210601-604590f19db9 + github.com/onflow/flow-go-sdk v1.0.0-preview.37 github.com/rs/zerolog v1.29.0 github.com/stretchr/testify v1.9.0 ) @@ -126,15 +126,15 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/crypto v0.25.1 // 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-core-contracts/lib/go/contracts v1.3.0 // indirect + github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 // 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-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/onflow/sdks v0.6.0-preview.1 // 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 diff --git a/test/go.sum b/test/go.sum index ac73f37e..338477f8 100644 --- a/test/go.sum +++ b/test/go.sum @@ -1933,26 +1933,26 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs 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-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -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.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= 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-core-contracts/lib/go/contracts v1.1.0 h1:AegPBm079X0qjneUYs+mRCpEUxSZ1lw5h4MbuXHlqn0= -github.com/onflow/flow-core-contracts/lib/go/contracts v1.1.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= -github.com/onflow/flow-core-contracts/lib/go/templates v1.0.0 h1:za6bxPPW4JIsthhasUDTa1ruKjIO8DIhun9INQfj61Y= -github.com/onflow/flow-core-contracts/lib/go/templates v1.0.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v1.0.0-preview.32 h1:VkJL7u75XUB8077CQvojKhxSCGirGCrsjAxjTOUIpD4= -github.com/onflow/flow-emulator v1.0.0-preview.32/go.mod h1:wwHM6+cJ5s3BIS9Wj0pXTRumj9n929fqwNuXqOD1g7g= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0 h1:cq3RfBr9TnTSnsGlUHMjMGZib24Horfb1XJqMpkN5ew= +github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.0/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0 h1:aMFJdB2CW+Dzm+AJ5QN6J1yWh+a0l2RxHN2/TtLaXUo= +github.com/onflow/flow-core-contracts/lib/go/templates v1.3.0/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= +github.com/onflow/flow-emulator v1.0.0-preview.33 h1:1LFVpZJrgAZjPr5Jou3dbg6zOO5GMREnmE1dr9ndnJE= +github.com/onflow/flow-emulator v1.0.0-preview.33/go.mod h1:4T/kFzo8jccGF8GbxLlu3b/jwBH6GxX8p0hTPURHZ7k= github.com/onflow/flow-ft/lib/go/contracts v1.0.0 h1:mToacZ5NWqtlWwk/7RgIl/jeKB/Sy/tIXdw90yKHcV0= github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= github.com/onflow/flow-ft/lib/go/templates v1.0.0 h1:6cMS/lUJJ17HjKBfMO/eh0GGvnpElPgBXx7h5aoWJhs= github.com/onflow/flow-ft/lib/go/templates v1.0.0/go.mod h1:uQ8XFqmMK2jxyBSVrmyuwdWjTEb+6zGjRYotfDJ5pAE= -github.com/onflow/flow-go v0.35.14-crescendo-preview.27 h1:sWjWsutcFOP9o/etZF3Zii0eq4MMqKQchquwmyElWCQ= -github.com/onflow/flow-go v0.35.14-crescendo-preview.27/go.mod h1:P7AnyTH5W+hNm5pmhnYasIh7T6Z2kU4tiy53NJKvhZA= +github.com/onflow/flow-go v0.35.14-crescendo-preview.27.0.20240626210601-604590f19db9 h1:9GfHBXy9T8QEAkwX+KkmZjJadSOAVgiyn2n8s7sSueY= +github.com/onflow/flow-go v0.35.14-crescendo-preview.27.0.20240626210601-604590f19db9/go.mod h1:SE4kph7kpF6ydOXObtueEecGk3Hrjy/if/0UHY/eRO8= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.36 h1:3g72MjmZPEEVAbtDATbjwqKoNSB7yHLWswUHSAB5zwQ= -github.com/onflow/flow-go-sdk v1.0.0-preview.36/go.mod h1:mjkXIluC+kseYyd8Z1aTq73IiffAUeoY5fuX/C2Z+1w= +github.com/onflow/flow-go-sdk v1.0.0-preview.37 h1:ujeIQheD+skzFt9+eOT9nXcc1rFxVLSCzwisEI3+2DA= +github.com/onflow/flow-go-sdk v1.0.0-preview.37/go.mod h1:2aSN7RdKzxWoCtCyOJz9W/ZNqkLgQDQS3hKLYwPlvGw= github.com/onflow/flow-nft/lib/go/contracts v1.2.1 h1:woAAS5z651sDpi7ihAHll8NvRS9uFXIXkL6xR+bKFZY= github.com/onflow/flow-nft/lib/go/contracts v1.2.1/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= github.com/onflow/flow-nft/lib/go/templates v1.2.0 h1:JSQyh9rg0RC+D1930BiRXN8lrtMs+ubVMK6aQPon6Yc= @@ -1962,8 +1962,9 @@ github.com/onflow/flow/protobuf/go/flow v0.4.4 h1:lD1owoZGFgLcvdLZDmP0Kc4GOuQeSU github.com/onflow/flow/protobuf/go/flow v0.4.4/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= github.com/onflow/go-ethereum v1.13.4 h1:iNO86fm8RbBbhZ87ZulblInqCdHnAQVY8okBrNsTevc= github.com/onflow/go-ethereum v1.13.4/go.mod h1:cE/gEUkAffhwbVmMJYz+t1dAfVNHNwZCgc3BWtZxBGY= -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/sdks v0.6.0-preview.1 h1:mb/cUezuqWEP1gFZNAgUI4boBltudv4nlfxke1KBp9k= +github.com/onflow/sdks v0.6.0-preview.1/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onflow/wal v1.0.2 h1:5bgsJVf2O3cfMNK12fiiTyYZ8cOrUiELt3heBJfHOhc= github.com/onflow/wal v1.0.2/go.mod h1:iMC8gkLqu4nkbkAla5HkSBb+FGyQOZiWz3DYm2wSXCk= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= From 3fd2e73c35c07c4e082413fc1b1f5e7325d14a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Thu, 27 Jun 2024 14:20:31 -0700 Subject: [PATCH 2/2] adjust tests --- test/test_framework_test.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/test/test_framework_test.go b/test/test_framework_test.go index d5d782d0..d6530755 100644 --- a/test/test_framework_test.go +++ b/test/test_framework_test.go @@ -701,17 +701,27 @@ func TestImportContract(t *testing.T) { // Test access of methods & fields from deployed contract Test.assertEqual("Hi from BarContract", BarContract.sayHi()) Test.assertEqual(/public/BarContractPublicPath, BarContract.publicPath) - Test.assertEqual( - ["one", "two", "three"], - BarContract.proposals - ) + + // TODO: + //Test.assertEqual( + // &["one", "two", "three"] as &[String], + // BarContract.proposals + //) + Test.assertEqual("one", BarContract.proposals[0]) + Test.assertEqual("two", BarContract.proposals[1]) + Test.assertEqual("three", BarContract.proposals[2]) // Test access of methods & fields from deployed contract Test.assertEqual("Hi from FooContract", FooContract.sayHi()) - Test.assertEqual( - {1: "one", 2: "two", 3: "three"}, - FooContract.numbers - ) + + // TODO: + //Test.assertEqual( + // &{1: "one", 2: "two", 3: "three"} as &{Int: String}, + // FooContract.numbers + //) + Test.assertEqual("one" as String?, FooContract.numbers[1]) + Test.assertEqual("two" as String?, FooContract.numbers[2]) + Test.assertEqual("three" as String?, FooContract.numbers[3]) // Test access of methods & fields from deployed contract Test.assertEqual("Hi from BazContract", BazContract.sayHi())