neo-go/pkg/smartcontract/manifest
Roman Khimov b10af1ed31 manifest: make default trusts invalid
Refs. #3522. The core problem is the same as for groups/features: we can't
allow empty trusts when they're unmarshalled from JSON. But unlike others we
can't easily differentiate missing any value with other cases because the
default value for WildPermissionDescs is a valid thing. Adding an additional
field makes it invalid and we can build around it. Other options are
implementing custom UnmarshalJSON for Manifest (too much for this) or making
Trusts a pointer (an option, but can fail in too many ways).

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2024-07-26 15:18:25 +03:00
..
standard *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
abi.go smartcontract: improve manifest validness errors 2022-08-22 14:59:28 +03:00
abi_test.go manifest: add duplicate events/methods checks to ABI 2021-02-09 22:31:26 +03:00
container.go manifest: make default trusts invalid 2024-07-26 15:18:25 +03:00
container_test.go manifest: make default trusts invalid 2024-07-26 15:18:25 +03:00
event.go smartcontract: improve invalid notification error text 2023-08-18 12:02:43 +03:00
event_test.go runtime: check notifications against ABI 2022-10-04 17:52:38 +03:00
group.go manifest: disallow null groups, fix #3522 2024-07-26 11:22:44 +03:00
group_test.go manifest: disallow null groups, fix #3522 2024-07-26 11:22:44 +03:00
manifest.go manifest: make default trusts invalid 2024-07-26 15:18:25 +03:00
manifest_test.go manifest: make default trusts invalid 2024-07-26 15:18:25 +03:00
method.go manifest: add method validity check 2021-02-09 22:31:26 +03:00
method_test.go manifest: add method validity check 2021-02-09 22:31:26 +03:00
parameter.go smartcontract: improve manifest validness errors 2022-08-22 14:59:28 +03:00
parameter_test.go manifest: add validity checks for Parameter 2021-02-09 22:31:26 +03:00
permission.go crypto: add StringCompressed() for PublicKey 2024-04-11 15:24:46 +03:00
permission_test.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00