The Michelson Documentation does not say much about this function:
SET_DELEGATE: Forge a delegation.
:: option key_hash : 'S -> operation : 'S
This left me wondering about its behavior and if can produce an error in any certain cases.
I am assuming
SET_DELEGATE
onNONE
removes the delegationn andSOME key_hash
sets the key_hash as the delegate, is this correct?Will it produce an error if the
key_hash
is not a baker or if it was once a baker and no longer is?Will it produce an error if the baker at the
key_hash
is fully delegated to?Are there any other conditions in which
SET_DELEGATE
can produce an error?