diff --git a/cmd/util/ledger/migrations/cadence_values_migration_test.go b/cmd/util/ledger/migrations/cadence_values_migration_test.go index 6cf03c38c51..cad06ce594d 100644 --- a/cmd/util/ledger/migrations/cadence_values_migration_test.go +++ b/cmd/util/ledger/migrations/cadence_values_migration_test.go @@ -2218,14 +2218,13 @@ func TestStoragePathCapabilityMigration(t *testing.T) { aCapStorageMapKey := interpreter.StringStorageMapKey("aCap") - aCapability := &interpreter.PathCapabilityValue{ - BorrowType: borrowType, - Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"), - + aCapability := interpreter.NewUnmeteredPathCapabilityValue( + borrowType, // Important: Capability must be for a different address, // compared to where the capability is stored. - Address: interpreter.AddressValue(addressB), - } + interpreter.AddressValue(addressB), + interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"), + ) storageMapForAddressA.WriteValue( migrationRuntime.Interpreter, @@ -2238,13 +2237,14 @@ func TestStoragePathCapabilityMigration(t *testing.T) { bCapStorageMapKey := interpreter.StringStorageMapKey("bCap") - bCapability := &interpreter.PathCapabilityValue{ - Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "b"), - + bCapability := interpreter.NewUnmeteredPathCapabilityValue( + // NOTE: no borrow type + nil, // Important: Capability must be for a different address, // compared to where the capability is stored. - Address: interpreter.AddressValue(addressB), - } + interpreter.AddressValue(addressB), + interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "b"), + ) storageMapForAddressA.WriteValue( migrationRuntime.Interpreter, @@ -2269,13 +2269,14 @@ func TestStoragePathCapabilityMigration(t *testing.T) { cCapStorageMapKey := interpreter.StringStorageMapKey("cCap") - cCapability := &interpreter.PathCapabilityValue{ - Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "c"), - + cCapability := interpreter.NewUnmeteredPathCapabilityValue( + // NOTE: no borrow type + nil, // Important: Capability must be for a different address, // compared to where the capability is stored. - Address: interpreter.AddressValue(addressB), - } + interpreter.AddressValue(addressB), + interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "c"), + ) storageMapForAddressA.WriteValue( migrationRuntime.Interpreter, @@ -2297,14 +2298,13 @@ func TestStoragePathCapabilityMigration(t *testing.T) { dCapStorageMapKey := interpreter.StringStorageMapKey("dCap") - dCapability := &interpreter.PathCapabilityValue{ - BorrowType: dBorrowType, - Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "d"), - + dCapability := interpreter.NewUnmeteredPathCapabilityValue( + dBorrowType, // Important: Capability must be for a different address, // compared to where the capability is stored. - Address: interpreter.AddressValue(addressB), - } + interpreter.AddressValue(addressB), + interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "d"), + ) storageMapForAddressA.WriteValue( migrationRuntime.Interpreter, @@ -3008,12 +3008,12 @@ func TestStorageCapsMigrationDeterminism(t *testing.T) { interpreter.PrimitiveStaticTypeAnyStruct, ) - aCapability := &interpreter.PathCapabilityValue{ - BorrowType: borrowType, - Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"), + aCapability := interpreter.NewUnmeteredPathCapabilityValue( + borrowType, // Important: Capability must be for address A. - Address: interpreter.AddressValue(addressA), - } + interpreter.AddressValue(addressA), + interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"), + ) storageMapForAddressA := storage.GetStorageMap( addressA, @@ -3032,12 +3032,12 @@ func TestStorageCapsMigrationDeterminism(t *testing.T) { // Then, create a capability with storage path, issued for account A, // and store it in account B. - bCapability := &interpreter.PathCapabilityValue{ - BorrowType: borrowType, - Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "b"), + bCapability := interpreter.NewUnmeteredPathCapabilityValue( + borrowType, // Important: Capability must be for address A. - Address: interpreter.AddressValue(addressA), - } + interpreter.AddressValue(addressA), + interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "b"), + ) storageMapForAddressB := storage.GetStorageMap( addressB, diff --git a/go.mod b/go.mod index a8cd063a984..15d4a7cd71e 100644 --- a/go.mod +++ b/go.mod @@ -48,12 +48,12 @@ require ( github.com/multiformats/go-multiaddr-dns v0.3.1 github.com/multiformats/go-multihash v0.2.3 github.com/onflow/atree v0.8.0-rc.6 - github.com/onflow/cadence v1.0.0-preview.50 + github.com/onflow/cadence v1.0.0-preview.52 github.com/onflow/crypto v0.25.2 github.com/onflow/flow v0.3.4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 - github.com/onflow/flow-go-sdk v1.0.0-preview.53 + github.com/onflow/flow-go-sdk v1.0.0-preview.54 github.com/onflow/flow/protobuf/go/flow v0.4.5 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 github.com/pierrec/lz4 v2.6.1+incompatible diff --git a/go.sum b/go.sum index 066bd2b82f3..c0ac54f6600 100644 --- a/go.sum +++ b/go.sum @@ -2168,8 +2168,8 @@ github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/ github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483 h1:LpiQhTAfM9CAmNVEs0n//cBBgCg+vJSiIxTHYUklZ84= github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483/go.mod h1:pIZgTWdm3k3pLF9Uq6MB8JEcW07UDwNJjlXW1HELW80= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.50 h1:sEfUOG7BXzEqPzB68yZZrG/lkBmHf/o0poYDCY18x3A= -github.com/onflow/cadence v1.0.0-preview.50/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.0.0-preview.52 h1:hZ92e6lL2+PQa3C1i5jJh0zZYFdW89+X1MS0Bkd6Ayo= +github.com/onflow/cadence v1.0.0-preview.52/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY= @@ -2184,8 +2184,8 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/ 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-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.53 h1:hF6X5b9gVQoc/wUa5JTcYU6tw1B7aW71XDdfsFhU5Gw= -github.com/onflow/flow-go-sdk v1.0.0-preview.53/go.mod h1:FtsoOHw5RNmMMwC7jI1hc99ZVJWhnm/gE3OMvFaZjyg= +github.com/onflow/flow-go-sdk v1.0.0-preview.54 h1:5GjCkyIyvE9KolOUUPTkGdEiV/8qOe1MGnLHOLBmthA= +github.com/onflow/flow-go-sdk v1.0.0-preview.54/go.mod h1:u9oFiS25TpnU1EW62PQlq22jzkwBAj4VEiiCBM6nhHo= 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= diff --git a/insecure/go.mod b/insecure/go.mod index 88a650aa346..0c627ca59a0 100644 --- a/insecure/go.mod +++ b/insecure/go.mod @@ -202,12 +202,12 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.8.0-rc.6 // indirect - github.com/onflow/cadence v1.0.0-preview.50 // indirect + github.com/onflow/cadence v1.0.0-preview.52 // indirect github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 // indirect github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 // 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-sdk v1.0.0-preview.53 // indirect + github.com/onflow/flow-go-sdk v1.0.0-preview.54 // 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.5 // indirect diff --git a/insecure/go.sum b/insecure/go.sum index 16ed598441d..39c9676ca6e 100644 --- a/insecure/go.sum +++ b/insecure/go.sum @@ -2158,8 +2158,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.8.0-rc.6 h1:GWgaylK24b5ta2Hq+TvyOF7X5tZLiLzMMn7lEt59fsA= github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.50 h1:sEfUOG7BXzEqPzB68yZZrG/lkBmHf/o0poYDCY18x3A= -github.com/onflow/cadence v1.0.0-preview.50/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.0.0-preview.52 h1:hZ92e6lL2+PQa3C1i5jJh0zZYFdW89+X1MS0Bkd6Ayo= +github.com/onflow/cadence v1.0.0-preview.52/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY= @@ -2172,8 +2172,8 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/ 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-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.53 h1:hF6X5b9gVQoc/wUa5JTcYU6tw1B7aW71XDdfsFhU5Gw= -github.com/onflow/flow-go-sdk v1.0.0-preview.53/go.mod h1:FtsoOHw5RNmMMwC7jI1hc99ZVJWhnm/gE3OMvFaZjyg= +github.com/onflow/flow-go-sdk v1.0.0-preview.54 h1:5GjCkyIyvE9KolOUUPTkGdEiV/8qOe1MGnLHOLBmthA= +github.com/onflow/flow-go-sdk v1.0.0-preview.54/go.mod h1:u9oFiS25TpnU1EW62PQlq22jzkwBAj4VEiiCBM6nhHo= 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= diff --git a/integration/go.mod b/integration/go.mod index cb36f7734f1..e61eec29247 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -20,13 +20,13 @@ require ( github.com/ipfs/go-ds-badger2 v0.1.3 github.com/ipfs/go-ds-pebble v0.3.1 github.com/libp2p/go-libp2p v0.32.2 - github.com/onflow/cadence v1.0.0-preview.50 + github.com/onflow/cadence v1.0.0-preview.52 github.com/onflow/crypto v0.25.2 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 github.com/onflow/flow-emulator v1.0.0-preview.36.0.20240729195722-d4eb1c30eb9f github.com/onflow/flow-go v0.36.8-0.20240729193633-433a32eeb0cd - github.com/onflow/flow-go-sdk v1.0.0-preview.53 + github.com/onflow/flow-go-sdk v1.0.0-preview.54 github.com/onflow/flow-go/insecure v0.0.0-00010101000000-000000000000 github.com/onflow/flow/protobuf/go/flow v0.4.5 github.com/onflow/go-ethereum v1.14.7 diff --git a/integration/go.sum b/integration/go.sum index d0b24eeba3b..1b425524376 100644 --- a/integration/go.sum +++ b/integration/go.sum @@ -2142,8 +2142,8 @@ github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs github.com/onflow/atree v0.8.0-rc.6 h1:GWgaylK24b5ta2Hq+TvyOF7X5tZLiLzMMn7lEt59fsA= github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo= github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-preview.50 h1:sEfUOG7BXzEqPzB68yZZrG/lkBmHf/o0poYDCY18x3A= -github.com/onflow/cadence v1.0.0-preview.50/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= +github.com/onflow/cadence v1.0.0-preview.52 h1:hZ92e6lL2+PQa3C1i5jJh0zZYFdW89+X1MS0Bkd6Ayo= +github.com/onflow/cadence v1.0.0-preview.52/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= github.com/onflow/crypto v0.25.2 h1:GjHunqVt+vPcdqhxxhAXiMIF3YiLX7gTuTR5O+VG2ns= github.com/onflow/crypto v0.25.2/go.mod h1:fY7eLqUdMKV8EGOw301unP8h7PvLVy8/6gVR++/g0BY= @@ -2158,8 +2158,8 @@ github.com/onflow/flow-ft/lib/go/contracts v1.0.0/go.mod h1:PwsL8fC81cjnUnTfmyL/ 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-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.53 h1:hF6X5b9gVQoc/wUa5JTcYU6tw1B7aW71XDdfsFhU5Gw= -github.com/onflow/flow-go-sdk v1.0.0-preview.53/go.mod h1:FtsoOHw5RNmMMwC7jI1hc99ZVJWhnm/gE3OMvFaZjyg= +github.com/onflow/flow-go-sdk v1.0.0-preview.54 h1:5GjCkyIyvE9KolOUUPTkGdEiV/8qOe1MGnLHOLBmthA= +github.com/onflow/flow-go-sdk v1.0.0-preview.54/go.mod h1:u9oFiS25TpnU1EW62PQlq22jzkwBAj4VEiiCBM6nhHo= 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=