Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions fvm/environment/facade_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/onflow/cadence/ast"
"github.com/onflow/cadence/common"
"github.com/onflow/cadence/interpreter"
"github.com/onflow/cadence/sema"

"github.com/onflow/flow-go/fvm/storage"
"github.com/onflow/flow-go/fvm/storage/snapshot"
Expand Down Expand Up @@ -351,10 +350,10 @@ func (env *facadeEnvironment) ValidateAccountCapabilitiesGet(
_ interpreter.AccountCapabilityGetValidationContext,
_ interpreter.AddressValue,
_ interpreter.PathValue,
wantedBorrowType *sema.ReferenceType,
_ *sema.ReferenceType,
wantedBorrowType *interpreter.ReferenceStaticType,
_ *interpreter.ReferenceStaticType,
) (bool, error) {
_, hasEntitlements := wantedBorrowType.Authorization.(sema.EntitlementSetAccess)
_, hasEntitlements := wantedBorrowType.Authorization.(interpreter.EntitlementSetAuthorization)
if hasEntitlements {
// TODO: maybe abort
//return false, &interpreter.GetCapabilityError{}
Expand Down
10 changes: 4 additions & 6 deletions fvm/environment/mock/environment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions fvm/fvm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3976,15 +3976,19 @@ func TestAccountCapabilitiesGetEntitledRejection(t *testing.T) {
nil,
interpreter.AddressValue(common.ZeroAddress),
interpreter.NewUnmeteredPathValue(common.PathDomainPublic, "dummy_value"),
sema.NewReferenceType(
interpreter.NewReferenceStaticType(
nil,
sema.NewEntitlementSetAccess(
[]*sema.EntitlementType{
sema.MutateType,
interpreter.NewEntitlementSetAuthorization(
nil,
func() []common.TypeID {
return []common.TypeID{
sema.MutateType.ID(),
}
},
1,
sema.Conjunction,
),
sema.IntType,
interpreter.PrimitiveStaticTypeInt,
),
nil,
)
Expand All @@ -4005,10 +4009,10 @@ func TestAccountCapabilitiesGetEntitledRejection(t *testing.T) {
nil,
interpreter.AddressValue(common.ZeroAddress),
interpreter.NewUnmeteredPathValue(common.PathDomainPublic, "dummy_value"),
sema.NewReferenceType(
interpreter.NewReferenceStaticType(
nil,
sema.UnauthorizedAccess,
sema.IntType,
interpreter.UnauthorizedAccess,
interpreter.PrimitiveStaticTypeInt,
),
nil,
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require (
github.com/multiformats/go-multiaddr-dns v0.4.1
github.com/multiformats/go-multihash v0.2.3
github.com/onflow/atree v0.12.0
github.com/onflow/cadence v1.9.1
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279
github.com/onflow/crypto v0.25.3
github.com/onflow/flow v0.4.15
github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,8 @@ github.com/onflow/atree v0.12.0 h1:X7/UEPyCaaEQ1gCg11KDvfyEtEeQLhtRtxMHjAiH/Co=
github.com/onflow/atree v0.12.0/go.mod h1:qdZcfLQwPirHcNpLiK+2t3KAo+SAb9Si6TqurE6pykE=
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.9.1 h1:z78U90Vt+5aBb4MlFk3mQWNi/5fYcUYtXSB/NBNfMKo=
github.com/onflow/cadence v1.9.1/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE=
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279 h1:ASEFfO49ht2Z6+OU6pornOM+ypzo9PfP+CFboWmfbgw=
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE=
github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U=
github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs=
github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90=
Expand Down
2 changes: 1 addition & 1 deletion insecure/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/atree v0.12.0 // indirect
github.com/onflow/cadence v1.9.1 // indirect
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279 // indirect
github.com/onflow/fixed-point v0.1.1 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v1.9.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions insecure/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ github.com/onflow/atree v0.12.0 h1:X7/UEPyCaaEQ1gCg11KDvfyEtEeQLhtRtxMHjAiH/Co=
github.com/onflow/atree v0.12.0/go.mod h1:qdZcfLQwPirHcNpLiK+2t3KAo+SAb9Si6TqurE6pykE=
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.9.1 h1:z78U90Vt+5aBb4MlFk3mQWNi/5fYcUYtXSB/NBNfMKo=
github.com/onflow/cadence v1.9.1/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE=
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279 h1:ASEFfO49ht2Z6+OU6pornOM+ypzo9PfP+CFboWmfbgw=
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE=
github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U=
github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs=
github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90=
Expand Down
2 changes: 1 addition & 1 deletion integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/ipfs/go-datastore v0.8.2
github.com/ipfs/go-ds-pebble v0.5.0
github.com/libp2p/go-libp2p v0.38.2
github.com/onflow/cadence v1.9.1
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279
github.com/onflow/crypto v0.25.3
github.com/onflow/flow v0.4.15
github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2
Expand Down
4 changes: 2 additions & 2 deletions integration/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,8 @@ github.com/onflow/atree v0.12.0 h1:X7/UEPyCaaEQ1gCg11KDvfyEtEeQLhtRtxMHjAiH/Co=
github.com/onflow/atree v0.12.0/go.mod h1:qdZcfLQwPirHcNpLiK+2t3KAo+SAb9Si6TqurE6pykE=
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.9.1 h1:z78U90Vt+5aBb4MlFk3mQWNi/5fYcUYtXSB/NBNfMKo=
github.com/onflow/cadence v1.9.1/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE=
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279 h1:ASEFfO49ht2Z6+OU6pornOM+ypzo9PfP+CFboWmfbgw=
github.com/onflow/cadence v1.9.2-0.20251205230900-d0c5cc82b279/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE=
github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U=
github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs=
github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90=
Expand Down
Loading