pub fn encode_add_vasp_domain_script_function(
    address: AccountAddress,
    domain: Vec<u8>
) -> TransactionPayload
Expand description

Summary

Add a VASP domain to parent VASP account. The transaction can only be sent by the Treasury Compliance account.

Technical Description

Adds a VASPDomain::VASPDomain to the domains field of the VASPDomain::VASPDomains resource published under the account at address.

Parameters

NameTypeDescription
tc_accountsignerThe signer of the sending account of this transaction. Must be the Treasury Compliance account.
addressaddressThe address of the parent VASP account that will have have domain added to its domains.
domainvector<u8>The domain to be added.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::REQUIRES_ROLERoles::ETREASURY_COMPLIANCEThe sending account is not the Treasury Compliance account.
Errors::REQUIRES_ADDRESSCoreAddresses::ETREASURY_COMPLIANCEtc_account is not the Treasury Compliance account.
Errors::NOT_PUBLISHEDVASPDomain::EVASP_DOMAIN_MANAGERThe VASPDomain::VASPDomainManager resource is not yet published under the Treasury Compliance account.
Errors::NOT_PUBLISHEDVASPDomain::EVASP_DOMAINS_NOT_PUBLISHEDaddress does not have a VASPDomain::VASPDomains resource published under it.
Errors::INVALID_ARGUMENTVASPDomain::EDOMAIN_ALREADY_EXISTSThe domain already exists in the list of VASPDomain::VASPDomains in the VASPDomain::VASPDomains resource published under address.
Errors::INVALID_ARGUMENTVASPDomain::EINVALID_VASP_DOMAINThe domain is greater in length than VASPDomain::DOMAIN_LENGTH.