pub fn validate_group_membership(
contract_package: &ContractPackage,
access: &EntryPointAccess,
validator: impl Fn(&URef) -> bool
) -> Result<(), Error>
Expand description
Validates an entry point access with a special validator callback.
If the passed access
object is a Groups
variant, then this function will return a
Error::InvalidContext
if there are no groups specified, as such entry point is uncallable.
For each URef
in every group that this access
object refers to, a validator callback is
called. If a validator function returns false
for any of the URef
in the set, an
Error::InvalidContext
is returned.
Otherwise, if access
object is a Public
variant, then the entry point is considered callable
and an unit value is returned.