Skip to content

Commit

Permalink
Merge pull request onflow#6383 from onflow/supun/update-cadence
Browse files Browse the repository at this point in the history
Update to cadence v1.0.0-preview.49
  • Loading branch information
j1010001 authored Aug 21, 2024
2 parents 3bd915b + 89cddfd commit e51cea8
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 44 deletions.
52 changes: 26 additions & 26 deletions cmd/util/ledger/migrations/cadence_values_migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2390,7 +2390,7 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
interpreter.UnauthorizedAccess,
interpreter.PrimitiveStaticTypeString,
),
CapabilityID: 3,
CapabilityID: 4,
},
cadenceValueMigrationEntry{
StorageKey: interpreter.StorageKey{
Expand All @@ -2407,7 +2407,7 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "d"),
},
BorrowType: dBorrowType,
CapabilityID: 4,
CapabilityID: 5,
},
cadenceValueMigrationEntry{
StorageKey: interpreter.StorageKey{
Expand All @@ -2424,7 +2424,7 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"),
},
BorrowType: borrowType,
CapabilityID: 5,
CapabilityID: 3,
},
cadenceValueMigrationEntry{
StorageKey: interpreter.StorageKey{
Expand All @@ -2451,6 +2451,25 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
require.Equal(
t,
[]any{
storageCapConIssuedEntry{
AccountAddress: addressB,
AddressPath: interpreter.AddressPath{
Address: addressB,
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"),
},
BorrowType: borrowType,
CapabilityID: 3,
},
storageCapConsMissingBorrowTypeEntry{
TargetPath: interpreter.AddressPath{
Address: addressB,
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "b"),
},
StoredPath: interpreter.AddressPath{
Address: addressB,
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "bCap"),
},
},
storageCapConsMissingBorrowTypeEntry{
TargetPath: interpreter.AddressPath{
Address: addressB,
Expand Down Expand Up @@ -2479,7 +2498,7 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "c"),
},
BorrowType: inferredBorrowType,
CapabilityID: 3,
CapabilityID: 4,
},
storageCapConIssuedEntry{
AccountAddress: addressB,
Expand All @@ -2488,27 +2507,8 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "d"),
},
BorrowType: dBorrowType,
CapabilityID: 4,
},
storageCapConIssuedEntry{
AccountAddress: addressB,
AddressPath: interpreter.AddressPath{
Address: addressB,
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "a"),
},
BorrowType: borrowType,
CapabilityID: 5,
},
storageCapConsMissingBorrowTypeEntry{
TargetPath: interpreter.AddressPath{
Address: addressB,
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "b"),
},
StoredPath: interpreter.AddressPath{
Address: addressB,
Path: interpreter.NewUnmeteredPathValue(common.PathDomainStorage, "bCap"),
},
},
},
issueStorageCapConReporter.entries,
)
Expand All @@ -2527,9 +2527,9 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
let aCap = storage.copy<Capability>(from: /storage/aCap)!
let bCap = storage.copy<Capability>(from: /storage/bCap)!
let cCap = storage.copy<Capability>(from: /storage/cCap)!
assert(aCap.id == 5)
assert(aCap.id == 3)
assert(bCap.id == 0)
assert(cCap.id == 3)
assert(cCap.id == 4)
}
`,
addressA.HexWithPrefix(),
Expand Down Expand Up @@ -2570,7 +2570,7 @@ func TestStoragePathCapabilityMigration(t *testing.T) {
let capabilities = getAuthAccount<auth(Capabilities) &Account>(%s).capabilities.storage
let aCapCons = capabilities.getControllers(forPath: /storage/a)
assert(aCapCons.length == 1)
assert(aCapCons[0].capabilityID == 5)
assert(aCapCons[0].capabilityID == 3)
}
`,
addressB.HexWithPrefix(),
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ require (
github.com/multiformats/go-multiaddr v0.12.2
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.5
github.com/onflow/cadence v1.0.0-preview.48
github.com/onflow/atree v0.8.0-rc.6
github.com/onflow/cadence v1.0.0-preview.49
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
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2163,13 +2163,13 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/atree v0.8.0-rc.5 h1:1sU+c6UfDzq/EjM8nTw4EI8GvEMarcxkWkJKy6piFSY=
github.com/onflow/atree v0.8.0-rc.5/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo=
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/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.48 h1:WkgU0z6H/oRe44kLL6OO+wkGeKULWChoCT8i7sgiWdg=
github.com/onflow/cadence v1.0.0-preview.48/go.mod h1:BCoenp1TYp+SmG7FGWStjehvvzcvNQ3xvpK5rkthq3Y=
github.com/onflow/cadence v1.0.0-preview.49 h1:MXy6qAtFyRSnqSVKpDkh2J1sb2JEryJoYy/5qsaixlw=
github.com/onflow/cadence v1.0.0-preview.49/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=
Expand Down
4 changes: 2 additions & 2 deletions insecure/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ require (
github.com/multiformats/go-multistream v0.5.0 // indirect
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.5 // indirect
github.com/onflow/cadence v1.0.0-preview.48 // indirect
github.com/onflow/atree v0.8.0-rc.6 // indirect
github.com/onflow/cadence v1.0.0-preview.49 // 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
Expand Down
8 changes: 4 additions & 4 deletions insecure/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2155,11 +2155,11 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/atree v0.8.0-rc.5 h1:1sU+c6UfDzq/EjM8nTw4EI8GvEMarcxkWkJKy6piFSY=
github.com/onflow/atree v0.8.0-rc.5/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo=
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.48 h1:WkgU0z6H/oRe44kLL6OO+wkGeKULWChoCT8i7sgiWdg=
github.com/onflow/cadence v1.0.0-preview.48/go.mod h1:BCoenp1TYp+SmG7FGWStjehvvzcvNQ3xvpK5rkthq3Y=
github.com/onflow/cadence v1.0.0-preview.49 h1:MXy6qAtFyRSnqSVKpDkh2J1sb2JEryJoYy/5qsaixlw=
github.com/onflow/cadence v1.0.0-preview.49/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=
Expand Down
4 changes: 2 additions & 2 deletions integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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.48
github.com/onflow/cadence v1.0.0-preview.49
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
Expand Down Expand Up @@ -244,7 +244,7 @@ require (
github.com/multiformats/go-multistream v0.5.0 // indirect
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.5 // indirect
github.com/onflow/atree v0.8.0-rc.6 // 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
Expand Down
8 changes: 4 additions & 4 deletions integration/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2139,11 +2139,11 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/atree v0.8.0-rc.5 h1:1sU+c6UfDzq/EjM8nTw4EI8GvEMarcxkWkJKy6piFSY=
github.com/onflow/atree v0.8.0-rc.5/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo=
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.48 h1:WkgU0z6H/oRe44kLL6OO+wkGeKULWChoCT8i7sgiWdg=
github.com/onflow/cadence v1.0.0-preview.48/go.mod h1:BCoenp1TYp+SmG7FGWStjehvvzcvNQ3xvpK5rkthq3Y=
github.com/onflow/cadence v1.0.0-preview.49 h1:MXy6qAtFyRSnqSVKpDkh2J1sb2JEryJoYy/5qsaixlw=
github.com/onflow/cadence v1.0.0-preview.49/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=
Expand Down

0 comments on commit e51cea8

Please sign in to comment.