Function casper_contract::contract_api::storage::create_contract_user_group [−][src]
pub fn create_contract_user_group(
contract_package_hash: ContractPackageHash,
group_label: &str,
num_new_urefs: u8,
existing_urefs: BTreeSet<URef>
) -> Result<Vec<URef>, ApiError>
Expand description
Create a new “user group” for a (versioned) contract. User groups associate
a set of URefs with a label. Entry points on a contract can be given a list of
labels they accept and the runtime will check that a URef from at least one
of the allowed groups is present in the caller’s context before
execution. This allows access control for entry_points of a contract. This
function returns the list of new URefs created for the group (the list will
contain num_new_urefs
elements).