pub fn add_undelegation(
    from: Address,
    to: Address,
    epoch: EpochTime,
    shares: u128,
    receipt: u64
) -> Result<u64, Error>
Expand description

Record new undelegation and add to undelegation queue.

In case an undelegation for the given (from, to, epoch) tuple already exists, the undelegation entry is merged by adding shares. When a non-zero receipt identifier is passed, the identifier is set in case the existing entry has no such identifier yet.

It returns the receipt identifier of the undelegation done receipt.