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
NONEremoves the delegationn and
SOME key_hashsets the key_hash as the delegate, is this correct?
Will it produce an error if the
key_hashis 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_hashis fully delegated to?
Are there any other conditions in which
SET_DELEGATEcan produce an error?