Skip to main content

uninit_NonnegativeIntSetAdd

Function uninit_NonnegativeIntSetAdd 

Source
pub fn uninit_NonnegativeIntSetAdd(
    key: &StorageKeyContractData,
    set_value: Option<&i128>,
    add_value: &i128,
) -> Result<(), SysErr>
Expand description

Sets or modifies a nonnegative integer at the specified storage key. The set_value (if provided) sets the base value, and add_value is added as a delta. The final value must remain nonnegative. Will overwrite any value of that key, even if that value has a different type.

§Arguments

§Inputs

  • key
  • set_value
  • add_value

§Outputs

  • None

§Errors

  • kSyscallErrorCodeInvalidSyscallInput: The operation would always result in a negative value (i.e. set_add(1, -2)).