ComBoox - White Paper
  • πŸ‘‹Welcome to ComBoox!
  • πŸ›οΈSystem Overview
    • ⌨️Overview
      • βš οΈβ€œPain Points” of Corporate Governance
      • πŸ’‘Blockchain Solution
      • πŸ’°Tokenization and Company Evaluation
      • ✨Features and Advantages
    • πŸ–₯️Computational Control Model
    • πŸ—οΈSystem Architecture
    • 🚷Identification and Access Control
    • πŸ“Templates and Version Control
    • πŸ’°CBP and Economic Model
    • πŸ’ΈFinancial Records
    • ☝️Key Legal Issues
    • πŸ₯‡Software License
  • πŸ•ΉοΈOperation Guide
    • πŸ›£οΈGet Start !
    • βœ’οΈDraft SHA
    • πŸ—³οΈPut Director On Board
    • πŸ—žοΈInvest And Trade Shares
  • πŸ“šTechnical Brochure
    • 🌻Key Objects
      • πŸ—žοΈShare and SharesRepo
      • πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘§Member and MembersRepo
      • πŸ’ΊPosition and OfficersRepo
      • πŸ—³οΈMotion and MotionsRepo
        • ✍️DelegateMap
        • πŸ—³οΈBallot and BallotsBox
      • πŸ›οΈDeal and DealsRepo
        • πŸ”„Swap and SwapsRepo
      • πŸ“ˆOrder and OrdersRepo
      • πŸ“‘Pledge and PledgesRepo
      • βš–οΈOption and OptionsRepo
      • πŸ“Rule and RulesParser
      • 🍡Anti-Dilution
      • πŸ”Lock Up
      • 🚜Drag / Tag Along
      • πŸ›ΈPut / Call Options
    • πŸ› οΈStructure and Components
      • ⏱️Checkpoints
      • 🏁TopChain
      • πŸ₯‡GoldChain
      • πŸ”€EnumerableSet
      • πŸ”„Condition and ConsRepo
      • πŸ”HashLock and LockersRepo
      • πŸ–‹οΈSignature and Sigpage
      • πŸ“‚File and FilesRepo
      • πŸ—„οΈDoc and DocsRepo
    • πŸ‘¨β€πŸš€Identity and Verification
      • 😜Role and RolesRepo
      • 🚷Access Control Contract
      • 🦸User and UsersRepo
    • πŸ„β€β™€οΈBehaviors and Process
      • 🀝Share Transaction
Powered by GitBook
On this page
  • Function and Usage
  • Members and Attributes
  • Role Objects
  • Roles Repo
  • Query API
  • Source Code
  1. Technical Brochure
  2. Identity and Verification

Role and RolesRepo

PreviousIdentity and VerificationNextAccess Control Contract

Last updated 1 year ago

Function and Usage

The Roles repo is the basic component of the access control for writing operation at the smart contract's level, and it is also the core member of access control smart contracts. The roles repo is the access control of writing instruction for drafting and finalization process of investment agreements and shareholders agreement. Specifically, a shareholder can create a new contract as the owner, then appoint the account with a specific address as an Attorney, who can draft the body of the agreement and set the signature page. After the contract is drafted and approved by the shareholder, the shareholder can revoke the appointment of all contract attorneys as the owner of the contract at once and transfer the contract owner to "0 Address", thus finalizing the contract.

Members and Attributes

The roles repo mainly defines the owner and role objects, as well as the role object mapping with the structure of "Role Name -> Role Object".

Role Objects

The Attribute Meaning of Role Objects

Attribute
Commercial and Legal Meaning

admin

The account address of the role bookkeeper.

isMember

Determines whether the account with a specific address is a member of the role.

Roles Repo

The Attribute Meaning of Role Objects

Attribute
Commercial and Legal Meaning

owner

Owner account address.

state

States of the roles repo. 0 - Setting up, 1 - Initialized, 2 - Finalized.

roles

Role mapping. mapping structure: "Role name (bytes32) -> Role object"

Query API

The query API well describes the function and use of the Roles Repo in the whole system, as shown in the table below.

getOwner

Query the owner's account address.

getRoleAdmin

Query the address of the bookkeeper account for a specific name role.

hasRole

Query if the account with a specific address is a member of a specific role.

Source Code

πŸ“š
πŸ‘¨β€πŸš€
😜
RolesRepo
Structure of Role Objects
Structure of Roles Repo