ERC-1155 Account Contract APIs
You can use the following identity and access control methods in ERC-1155 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 Admin. getAccountStatus- This method gets the current account status of the specified user. This method can be called by the
Token Adminor by the token account owner. getAccountByAddress- This method gets the account of the specified user. This method can be called by the
Token Adminor by the token account owner. getAllAccounts- This method gets all accounts, with paginated output. This method can be called only by the
Token Admin. activateAccount- This method activates the account of the specified user. This method can be called only by a
Token Admin. suspendAccount- This method activates the account of the specified user. This method can be called only by a
Token Admin.
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 Admin. isTokenAdmin- This method checks whether a specified user is a
Token Admin. This method can be called only by aToken Admin.
Role Management Methods
addRole- This method adds a role to a specified user. This method can be called only by a
Token Admin. removeRole- This method removes a role from the specified user. This method can be called only by a
Token Admin. isInRole- This method checks whether a user has a specified role. This method can be called only by a
Token Admin. isInRole- This method checks whether a user has a specified role. This method can be called only by a
Token Admin. addTokenSysRole- This method adds the
TOKEN_SYS_VAULT_ROLErole to a specified user. This method can be called only by aToken Admin. removeTokenSysRole- This method removes the
TOKEN_SYS_VAULT_ROLErole from a specified user. This method can be called only by aToken Admin. transferTokenSysRole- This method tranfsers the
TOKEN_SYS_VAULT_ROLErole from a specified user to a recipient. This method can be called only by aToken Admin.
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 govnerance 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.