ERC-20 Account Contract APIs
You can use the following identity and access control methods in ERC-20 account contracts.
Account Management Methods
createAccount- This method creates an account for a specified user. An account must be created for any user who will have tokens at any point. Accounts track balances and on-hold balances. This method can be called only by a
Token Adminor by anOrg Adminof the specified organization. deleteAccount- This method deletes the account of the specified user. This method can be called only by a
Token Adminor by anOrg Adminof the specified organization. getAccountStatus- This method gets the current account status of the specified user. This method can be called by the
Token AdminorToken Auditor, anOrg Adminof the specified organization, or by the token account owner. getAccountByAddress- This method gets the account of the specified user. This method can be called by the
Token AdminorToken Auditor, anOrg Adminof the specified organization, or by the token account owner. getAllAccounts- This method gets all accounts, with paginated output. This method can be called only by the
Token AdminorToken Auditor. activateAccount- This method activates the account of the specified user. This method can be called only by a
Token Adminor by anOrg Adminof the specified organization. suspendAccount- This method activates the account of the specified user. This method can be called only by a
Token Adminor by anOrg Adminof the specified organization. setMaxDailyAmount- This method sets the maximum amount of tokens that can be used in transactions daily by the specified user. This method can be called only by a
Token Adminor by anOrg Adminof the specified organization. setMaxDailyTransactionCount- This method sets the maximum number of transactions that can be completed daily by the specified user. This method can be called only by a
Token Adminor by anOrg Adminof the specified organization.
Admin Management Methods
addTokenAdmin- This method adds a
Token Admin. This method can be called only by aToken Admin. removeTokenAdmin- This method removes a
Token Admin. This method can be called only by aToken Admin. getAllTokenAdmins- This method gets account information for all
Token Adminusers. This method can be called only by aToken AdminorToken Auditor. isTokenAdmin- This method checks whether a specified user is a
Token Admin. This method can be called only by aToken Admin,Token Auditor,Org Admin, orOrg Auditor. addOrgAdmin- This method adds an
Org Admin. This method can be called only by aToken AdminorOrg Adminof the specified organization. removeOrgAdmin- This method removes an
Org Admin. This method can be called only by aToken AdminorOrg Adminof the specified organization. getAllOrgAdmins- This method gets account information for all
Org Adminusers. This method can be called only by aToken Admin,Token Auditor,Org Admin, orOrg Auditor. isOrgAdmin- This method checks whether a specified user is an
Org Admin. This method can be called only by aToken Admin,Token Auditor,Org Admin, orOrg Auditor.
Auditor Management Methods
addTokenAuditor- This method adds a
Token Auditor. This method can be called only by aToken Admin. removeTokenAuditor- This method removes a
Token Auditor. This method can be called only by aToken Admin. getAllTokenAuditors- This method gets account information for all
Token Auditorusers. This method can be called only by aToken AdminorToken Auditor. isTokenAuditor- This method checks whether a specified user is a
Token Auditor. This method can be called by any user. addOrgAuditor- This method adds an
Org Auditor. This method can be called only by aToken AdminorOrg Adminof the specified organization. removeOrgAuditor- This method removes an
Org Auditor. This method can be called only by aToken AdminorOrg Adminof the specified organization. getAllOrgAuditors- This method gets account information for all
Org Auditorusers. This method can be called only by aToken Admin,Token Auditor,Org Admin, orOrg Auditor. isOrgAuditor- This method checks whether a specified user is an
Org Auditor. This method can be called by any user.
Role Management Methods
addRole- This method adds a role to a specified user. This method can be called only by a
Token AdminorOrg Adminof the specified organization. removeRole- This method removes a role from the specified user. This method can be called only by a
Token AdminorOrg Adminof the specified organization. isInRole- This method checks whether a user has a specified role. This method can be called by any user.
hasRole- This method checks whether a user has a specified role. This method can be called by any user.
Context Management Methods
setContext- This method sets the token contract address for the account contract. This method can be called only by a
Token Admin. getContext- This method gets the token contract address for the account contract. This method can be called by any user.
setGovernanceContext- This method sets the governance contract to use to manage the governance life cycle for the account contract. This method can be called only by a
Token Admin. getGovernanceContext- This method gets the governance context details. This method can be called by any user.
isDeploymentActive- This method checks whether the deployment is active. This method can be called by any user.