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
Name | Type | Description |
---|---|---|
tc_account | signer | The signer of the sending account of this transaction. Must be the Treasury Compliance account. |
address | address | The address of the parent VASP account that will have have domain added to its domains. |
domain | vector<u8> | The domain to be added. |
Common Abort Conditions
Error Category | Error Reason | Description |
---|---|---|
Errors::REQUIRES_ROLE | Roles::ETREASURY_COMPLIANCE | The sending account is not the Treasury Compliance account. |
Errors::REQUIRES_ADDRESS | CoreAddresses::ETREASURY_COMPLIANCE | tc_account is not the Treasury Compliance account. |
Errors::NOT_PUBLISHED | VASPDomain::EVASP_DOMAIN_MANAGER | The VASPDomain::VASPDomainManager resource is not yet published under the Treasury Compliance account. |
Errors::NOT_PUBLISHED | VASPDomain::EVASP_DOMAINS_NOT_PUBLISHED | address does not have a VASPDomain::VASPDomains resource published under it. |
Errors::INVALID_ARGUMENT | VASPDomain::EDOMAIN_ALREADY_EXISTS | The domain already exists in the list of VASPDomain::VASPDomain s in the VASPDomain::VASPDomains resource published under address . |
Errors::INVALID_ARGUMENT | VASPDomain::EINVALID_VASP_DOMAIN | The domain is greater in length than VASPDomain::DOMAIN_LENGTH . |