From 98aa5ab2bd46a0d24c7088269b1776819ac1caf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Mon, 26 Aug 2024 17:23:59 -0700 Subject: [PATCH 1/2] Update to Cadence v1.0.0-preview.50 --- languageserver/go.mod | 14 +++++++------- languageserver/go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/languageserver/go.mod b/languageserver/go.mod index 44bfa921..87ba77d1 100644 --- a/languageserver/go.mod +++ b/languageserver/go.mod @@ -7,12 +7,12 @@ require ( github.com/google/uuid v1.6.0 github.com/mattn/go-isatty v0.0.20 github.com/mitchellh/mapstructure v1.5.0 - github.com/onflow/cadence v1.0.0-preview.49 - github.com/onflow/cadence-tools/lint v1.0.0-preview.37 - github.com/onflow/cadence-tools/test v1.0.0-preview.37 - github.com/onflow/flow-go v0.37.7-0.20240822174309-8b4fff2114d4 - github.com/onflow/flow-go-sdk v1.0.0-preview.51 - github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.31 + github.com/onflow/cadence v1.0.0-preview.50 + github.com/onflow/cadence-tools/lint v1.0.0-preview.38 + github.com/onflow/cadence-tools/test v1.0.0-preview.38 + github.com/onflow/flow-go v0.37.7-0.20240826193109-e211841b59f5 + github.com/onflow/flow-go-sdk v1.0.0-preview.53 + github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.32 github.com/sourcegraph/jsonrpc2 v0.1.0 github.com/spf13/afero v1.10.0 github.com/spf13/pflag v1.0.5 @@ -153,7 +153,7 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onflow/atree v0.8.0-rc.6 // indirect github.com/onflow/crypto v0.25.2 // indirect - github.com/onflow/flow-emulator v1.0.0-preview.40 // indirect + github.com/onflow/flow-emulator v1.0.0-preview.41 // 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 diff --git a/languageserver/go.sum b/languageserver/go.sum index 0ba0c3d8..806884ad 100644 --- a/languageserver/go.sum +++ b/languageserver/go.sum @@ -1945,12 +1945,12 @@ 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.49 h1:MXy6qAtFyRSnqSVKpDkh2J1sb2JEryJoYy/5qsaixlw= -github.com/onflow/cadence v1.0.0-preview.49/go.mod h1:7wvvecnAZtYOspLOS3Lh+FuAmMeSrXhAWiycC3kQ1UU= -github.com/onflow/cadence-tools/lint v1.0.0-preview.37 h1:GffJsraPlJydwTH/N13g4AAOxkkF8fguzhmhxCLpeow= -github.com/onflow/cadence-tools/lint v1.0.0-preview.37/go.mod h1:6gUUCUyC2ZNx/RSqY+97huXa/Rb857sJvEqCl3ckdmY= -github.com/onflow/cadence-tools/test v1.0.0-preview.37 h1:TzLg+22QH6x0VETyPTLi0lwaUxHxm9nAMXzU9S89LWY= -github.com/onflow/cadence-tools/test v1.0.0-preview.37/go.mod h1:IbjA7WlZARTOyXL5AXjVJeYpwzbcMOEY7EW7VU+htKo= +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-tools/lint v1.0.0-preview.38 h1:ZIYrFkWh2z/iI54W+R9QmdfSN8WG/7tHeBvMx7gOb+0= +github.com/onflow/cadence-tools/lint v1.0.0-preview.38/go.mod h1:7kEvUs7yVy6y/HPH/8JSfh0w4+peOwPd/a1U7as3l2M= +github.com/onflow/cadence-tools/test v1.0.0-preview.38 h1:k2QREJ14Seq+Ye7h9V5vqLiZzVMeVuzKP21oMpUyMWw= +github.com/onflow/cadence-tools/test v1.0.0-preview.38/go.mod h1:90FLNQlrvdIdgiIbYrLr+OYNNcmW3bFmtlKWCXmlbQk= 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= @@ -1958,17 +1958,17 @@ github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1 h1:q9tXLIALwQ76bO4 github.com/onflow/flow-core-contracts/lib/go/contracts v1.3.1/go.mod h1:u/mkP/B+PbV33tEG3qfkhhBlydSvAKxfLZSfB4lsJHg= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1 h1:FfhMBAb78p6VAWkJ+iqdKLErGQVQgxk5w6DP5ZruWX8= github.com/onflow/flow-core-contracts/lib/go/templates v1.3.1/go.mod h1:NgbMOYnMh0GN48VsNKZuiwK7uyk38Wyo8jN9+C9QE30= -github.com/onflow/flow-emulator v1.0.0-preview.40 h1:VoblJbxqz6xTzgTL1LbbWhuWJ8isONdH8pwQ3Cy1ObM= -github.com/onflow/flow-emulator v1.0.0-preview.40/go.mod h1:AjbLv8TSsT2hrKF+XudEohbdKNdWomHjH2RlreuxrdU= +github.com/onflow/flow-emulator v1.0.0-preview.41 h1:Ep8lb4CD5xG7XC55Ne4ZfKHee58osp3jhmMlUYSjZtw= +github.com/onflow/flow-emulator v1.0.0-preview.41/go.mod h1:selKgeV9J+VC3mwh2tBbv8h1sEDxCldDeRfj1cUqPg4= 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.37.7-0.20240822174309-8b4fff2114d4 h1:DpC/WAaNDHTbKN/L8HhSwGMGZWPi+C6fUPAYeUjwImc= -github.com/onflow/flow-go v0.37.7-0.20240822174309-8b4fff2114d4/go.mod h1:iZG3ofIPrPAChSdZxByDGrsBAC5CVDw2hyo4akoQ1NY= +github.com/onflow/flow-go v0.37.7-0.20240826193109-e211841b59f5 h1:rgX5DJC++uXpeVUiUeOY1fvvQlTWuhrstDz+OTluWIw= +github.com/onflow/flow-go v0.37.7-0.20240826193109-e211841b59f5/go.mod h1:enp027y6GD0GP/PU9x2Ki5E6X+BSLvNN88Ma4RklZDA= github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-go-sdk v1.0.0-preview.51 h1:rsvjyEdiot4oKwx2YsEqV2hsXqDrakuVmSUexsU/lSI= -github.com/onflow/flow-go-sdk v1.0.0-preview.51/go.mod h1:yXinctVJY1VlpQaJhkCUMiC5lvv2kYCCMdMo+FdSV5A= +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-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= @@ -1976,8 +1976,8 @@ github.com/onflow/flow-nft/lib/go/templates v1.2.0/go.mod h1:p+2hRvtjLUR3MW1NsoJ 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.4.5 h1:6o+pgYGqwXdEhqSJxu2BdnDXkOQVOkfGAb6IiXB+NPM= github.com/onflow/flow/protobuf/go/flow v0.4.5/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.31 h1:DzkRlfkwJo1seJp4QlV1Yli13g4rT1kmf2y3WCn8CAg= -github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.31/go.mod h1:hd1m2k64ZRlCpGnZ1VFeLRRcCXV186l9+chb3M643h8= +github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.32 h1:7gzHh7ITIJyBMmqIfXtmu2i+XRFyfsDcdNAheyN2UdQ= +github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.32/go.mod h1:0IuMeFtFbv1lCaoF7pB9U2trYjwMzqvuTgSj4mXZX24= github.com/onflow/go-ethereum v1.14.7 h1:gg3awYqI02e3AypRdpJKEvNTJ6kz/OhAqRti0h54Wlc= github.com/onflow/go-ethereum v1.14.7/go.mod h1:zV14QLrXyYu5ucvcwHUA0r6UaqveqbXaehAVQJlSW+I= github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= From cd940c0b52a48aad839f0a068cf73aba59aee0c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Mon, 26 Aug 2024 17:31:08 -0700 Subject: [PATCH 2/2] remove unnecessary use of NewInternalEVMContractValue --- languageserver/integration/stdlib.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/languageserver/integration/stdlib.go b/languageserver/integration/stdlib.go index 21c91ddd..e7c4400a 100644 --- a/languageserver/integration/stdlib.go +++ b/languageserver/integration/stdlib.go @@ -24,16 +24,17 @@ import ( evmstdlib "github.com/onflow/flow-go/fvm/evm/stdlib" ) -// FVMtandardLibraryValues returns the standard library values which are provided by the FVM +// FVMStandardLibraryValues returns the standard library values which are provided by the FVM // these are not part of the Cadence standard library func FVMStandardLibraryValues() []stdlib.StandardLibraryValue { return []stdlib.StandardLibraryValue{ // InternalEVM contract { - Name: evmstdlib.InternalEVMContractName, - Type: evmstdlib.InternalEVMContractType, - Value: evmstdlib.NewInternalEVMContractValue(nil, nil, common.AddressLocation{}), - Kind: common.DeclarationKindContract, + Name: evmstdlib.InternalEVMContractName, + Type: evmstdlib.InternalEVMContractType, + Kind: common.DeclarationKindContract, + // Not needed for checking + Value: nil, }, } }