Stablecoin Contract Methods
The stablecoin contract includes all the methods that are available in the extended ERC-20 contract and additional methods that are specific to the stablecoin scenario.
Stablecoin Asset Methods
The stablecoin asset is based on the extended ERC-20 standard, and supports all of the generic methods for that standard. For more information about the generic ERC-20 methods, see Digital Assets APIs.Note:
In the stablecoin contract, theexecuteHoldTokens method behaves differently from the generic version. The stablecoin version of the method always completes the full hold amount, and does not support partial transfers.
Account Policy Check Methods
-
createOrupdateAccountPolicy - This method creates or updates a policy for a specified account. This method can be called only by a
Token AdminorOrg Adminof the specified organization. -
getAccountPolicyById - This method gets the account policy details for a specified policy ID. This method can be called only by a
Token AdminorToken Auditor, or anOrg AdminorOrg Auditorof the specified organization. -
deleteAccountPolicy - This method deletes the policy for a specified policy ID. This method can be called only by a
Token AdminorOrg Adminof the specified organization.
Approval Policy Check Methods
-
createOrupdateApprovalPolicy - This method creates or updates an approval policy. This method can be called only by a
Token Admin. -
getApprovalPolicyById - This method gets the approval policy details for a specified policy ID. This method can be called only by a
Token AdminorToken Auditor. -
deleteApprovalPolicy - This method deletes the approval policy for a specified policy ID. This method can be called only by a
Token Admin.
Approval Transactions Methods
-
getApprovalTransactionsById - This method gets the approval transaction for a specified transaction ID. This method can be called only by a
Token AdminorToken Auditor. -
getApprovalStatusByOperationId - This method gets the approval transaction for a specified transaction ID. This method can be called only by a
Token AdminorToken Auditor. -
approveTransaction - An approver can use this method to approve a hold transaction.
Transfer Restriction Methods
You can use transfer restrictions to control the minimum and maximum transaction amounts that are allowed for token transfers. Transfer restrictions are applied when an account has the restrictionFlag value set to true. Transfer restrictions operate independently of the approval policy rules used for hold operations. The TransferRestriction asset sets the global lower and upper transfer limits that apply to all accounts where transfer restrictions are enabled. After the contract is deployed, administrators can retrieve or update these values using the following methods.
-
setOrupdateTransferRestriction - This method sets or updates the transfer restriction configuration by setting new lower and upper transaction limits. This method can be called only by a
Token Admin. -
getTransferRestriction - This method returns the current transfer restriction configuration, including the lower and upper transaction limits. This method can be called only by a
Token AdminorToken Auditor.