[][src]Function transaction_builder::encode_set_validator_operator_script

pub fn encode_set_validator_operator_script(
    operator_name: Vec<u8>,
    operator_account: AccountAddress
) -> Script


Sets the validator operator for a validator in the validator's configuration resource "locally" and does not reconfigure the system. Changes from this transaction will not picked up by the system until a reconfiguration of the system is triggered. May only be sent by an account with Validator role.

Technical Description

Sets the account at operator_account address and with the specified human_name as an operator for the sending validator account. The account at operator_account address must have a Validator Operator role and have a ValidatorOperatorConfig::ValidatorOperatorConfig resource published under it. The sending account must be a Validator and have a ValidatorConfig::ValidatorConfig resource published under it. This script does not emit a LibraConfig::NewEpochEvent and no reconfiguration of the system is initiated by this script.


account&signerThe signer reference of the sending account of the transaction.
operator_namevector<u8>Validator operator's human name.
operator_accountaddressAddress of the validator operator account to be added as the account validator's operator.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::NOT_PUBLISHEDValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIGThe ValidatorOperatorConfig::ValidatorOperatorConfig resource is not published under operator_account.
00The human_name field of the ValidatorOperatorConfig::ValidatorOperatorConfig resource under operator_account does not match the provided human_name.
Errors::REQUIRES_ROLERoles::EVALIDATORaccount does not have a Validator account role.
Errors::INVALID_ARGUMENTValidatorConfig::ENOT_A_VALIDATOR_OPERATORThe account at operator_account does not have a ValidatorOperatorConfig::ValidatorOperatorConfig resource.
Errors::NOT_PUBLISHEDValidatorConfig::EVALIDATOR_CONFIGA ValidatorConfig::ValidatorConfig is not published under account.

Related Scripts