Skip to content

Commit

Permalink
Merge #2653
Browse files Browse the repository at this point in the history
2653: Fix Cadence code r=turbolent a=turbolent

In github.com/onflow/cadence#1717, the check of argument labels for nested constructors was fixed.
Fix the previously accepted code, which is now rejected:
- Update to the fixed core contracts
- Add the missing argument label


Co-authored-by: Bastian Müller <bastian@axiomzen.co>
Co-authored-by: Daniel Sainati <sainatidaniel@gmail.com>
  • Loading branch information
3 people committed Jun 28, 2022
2 parents eabdbd8 + 5c28245 commit ea3b018
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fvm/blueprints/epochs.go
Expand Up @@ -35,7 +35,7 @@ transaction(clusterWeights: [{String: UInt64}]) {
let clusters: [FlowClusterQC.Cluster] = []
var clusterIndex: UInt16 = 0
for weightMapping in clusterWeights {
let cluster = FlowClusterQC.Cluster(clusterIndex, weightMapping)
let cluster = FlowClusterQC.Cluster(index: clusterIndex, nodeWeights: weightMapping)
clusterIndex = clusterIndex + 1
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -56,7 +56,7 @@ require (
github.com/onflow/atree v0.3.1-0.20220531231935-525fbc26f40a
github.com/onflow/cadence v0.24.1
github.com/onflow/flow v0.3.1
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220513155751-c4c1f8d59f83
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83
github.com/onflow/flow-emulator v0.33.0
github.com/onflow/flow-go-sdk v0.26.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -1348,8 +1348,8 @@ github.com/onflow/cadence v0.24.1 h1:ERWaKaNXyeUwJkVp+66Yfp/DsojrzQ0btvY3D6XK9sY
github.com/onflow/cadence v0.24.1/go.mod h1:tIJiQ4RIq1WUTXdBewv8p+gNUETN93Eb7jSFedjqs5w=
github.com/onflow/flow v0.3.1 h1:kL/tNvCXeBw4yCVPys/m9rxvKxrO7Ck/mVNqHFtkTrI=
github.com/onflow/flow v0.3.1/go.mod h1:lzyAYmbu1HfkZ9cfnL5/sjrrsnJiUU8fRL26CqLP7+c=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220513155751-c4c1f8d59f83 h1:mpJirFu/JWMLV0IhKDZleVrVdN5B8QERV4gSXDef5bA=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220513155751-c4c1f8d59f83/go.mod h1:T6yhM+kWrFxiP6F3hh8lh9DcocHfmv48P4ITnjLhKSk=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84 h1:VKIZufzFyxfeMbKeDIyttN2CmFYCzHOimr4xNFimVpA=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84/go.mod h1:T6yhM+kWrFxiP6F3hh8lh9DcocHfmv48P4ITnjLhKSk=
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83 h1:w4uXFTvjQmLtA/X50H4YXVlzbdsoL3vDI3Y86jtJOMM=
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83/go.mod h1:JB2hWVxUjhMshUDNVQKfn4dzhhawOO+i3XjlhLMV5MM=
github.com/onflow/flow-emulator v0.33.0 h1:6vzaHlb7nPjlIBUCrkNZviFYYprnYfOWG1z0GCn5ltY=
Expand Down
2 changes: 1 addition & 1 deletion integration/go.mod
Expand Up @@ -15,7 +15,7 @@ require (
github.com/ipfs/go-ipfs-blockstore v0.2.0
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/onflow/cadence v0.24.1
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220513155751-c4c1f8d59f83
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83
github.com/onflow/flow-emulator v0.33.0
github.com/onflow/flow-ft/lib/go/templates v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions integration/go.sum
Expand Up @@ -1440,8 +1440,8 @@ github.com/onflow/cadence v0.11.2/go.mod h1:8NwJGO535nnY/+QWEMDc2rhvOFChToWQ9Bg7
github.com/onflow/cadence v0.15.0/go.mod h1:KMzDF6cIv6nb5PJW9aITaqazbmJX8MMeibFcpPP385M=
github.com/onflow/cadence v0.24.1 h1:ERWaKaNXyeUwJkVp+66Yfp/DsojrzQ0btvY3D6XK9sY=
github.com/onflow/cadence v0.24.1/go.mod h1:tIJiQ4RIq1WUTXdBewv8p+gNUETN93Eb7jSFedjqs5w=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220513155751-c4c1f8d59f83 h1:mpJirFu/JWMLV0IhKDZleVrVdN5B8QERV4gSXDef5bA=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220513155751-c4c1f8d59f83/go.mod h1:T6yhM+kWrFxiP6F3hh8lh9DcocHfmv48P4ITnjLhKSk=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84 h1:VKIZufzFyxfeMbKeDIyttN2CmFYCzHOimr4xNFimVpA=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84/go.mod h1:T6yhM+kWrFxiP6F3hh8lh9DcocHfmv48P4ITnjLhKSk=
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83 h1:w4uXFTvjQmLtA/X50H4YXVlzbdsoL3vDI3Y86jtJOMM=
github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83/go.mod h1:JB2hWVxUjhMshUDNVQKfn4dzhhawOO+i3XjlhLMV5MM=
github.com/onflow/flow-emulator v0.33.0 h1:6vzaHlb7nPjlIBUCrkNZviFYYprnYfOWG1z0GCn5ltY=
Expand Down

0 comments on commit ea3b018

Please sign in to comment.