[−][src]Function casperlabs_contract::ext_ffi::set_action_threshold
pub unsafe extern "C" fn set_action_threshold(
permission_level: u32,
threshold: u32
) -> i32
This function changes the threshold to perform the specified action. The
action index is interpreted as follows: 0 means deployment and 1 means key
management. Thresholds are represented internally as a u8
, this function
will cause a Trap
if the new threshold is not between 0 and 255
inclusively. The return value is a status code where 0 means success, 1
means the key management threshold cannot be set lower than the deploy
threshold, 2 means the deployment threshold cannot be set higher than the
key management threshold, 3 means permission denied (this could be because
the function was called outside of session code or because the key
management threshold was not met by the keys authorizing the deploy), and
4 means the threshold would be set higher than the total weight of
associated keys (and therefore would be impossible to meet).
Arguments
action
- index representing the action threshold to setthreshold
- new value of the threshold for performing this action